diff --git a/.eslintrc.json b/.eslintrc.json index cd9b761..6d37def 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -15,7 +15,8 @@ // Temporary workaaround until they fix the behavior of @rollup typescript (issue #1010) "@typescript-eslint/no-unused-vars": "error", "@typescript-eslint/consistent-type-definitions": ["error", "type"], - "@typescript-eslint/no-non-null-assertion": "off" + "@typescript-eslint/no-non-null-assertion": "off", + "@typescript-eslint/no-explicit-any": "off" }, "plugins": [ "@typescript-eslint" diff --git a/.prettierrc.json b/.prettierrc.json index 92cde39..1502887 100644 --- a/.prettierrc.json +++ b/.prettierrc.json @@ -1,3 +1,4 @@ { - "singleQuote": true + "singleQuote": true, + "trailingComma": "es5" } \ No newline at end of file diff --git a/README.md b/README.md index 5ea9d1a..73cd795 100644 --- a/README.md +++ b/README.md @@ -11,13 +11,13 @@ NodeJS CLI which simplifies the headless setup of a Raspberry Pi Install it locally with ```bash -npm i https://github.com/matteosacchetto/rpi-headless-setup-helper/releases/download/v0.2.2/matteosacchetto-rpi-headless-setup-helper-0.2.2.tgz +npm i https://github.com/matteosacchetto/rpi-headless-setup-helper/releases/download/v0.3.0/matteosacchetto-rpi-headless-setup-helper-0.3.0.tgz ``` Or install it globally with ```bash -npm i --location=global https://github.com/matteosacchetto/rpi-headless-setup-helper/releases/download/v0.2.2/matteosacchetto-rpi-headless-setup-helper-0.2.2.tgz +npm i --location=global https://github.com/matteosacchetto/rpi-headless-setup-helper/releases/download/v0.3.0/matteosacchetto-rpi-headless-setup-helper-0.3.0.tgz ``` ### Other version @@ -38,7 +38,7 @@ Or install it globally with npm i --location=global ``` -where you have to replace `{version}` with the version number you downloaded (ex: 0.2.2) +where you have to replace `{version}` with the version number you downloaded (ex: 0.3.0) ### Bash completion @@ -121,6 +121,7 @@ Commands: ssh [options] create SSH headless setup file user [options] create user headless setup file wifi [options] create WiFi headless setup file + advanced [options] create advanced headless setup file help [command] display help for command ``` @@ -243,6 +244,62 @@ In case the WiFi specific files for the headless setup already exist, overwrite This CLI is being used in a script, so disable all interactive prompts. In case the WiFi specific files already exist and the `-y, --yes` option was not used, it will not ask if you want to overwrite the files and simply fail (default: `false`). +#### `advanced` + +Allows you to configure additional settings, like SSH keys, disabling password authentication and so on. The way to configure these additional settings is based on the way the [rpi-imager]() tool does it, with some differences related to the configuration of SSH, user and WiFi. If you are interested in knowing more, please refer to [this discussion on how to run a script on first boot](https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/40#issuecomment-849552711) and to [this file of the rpi-imager repo containing the details on how the configure those settings](https://github.com/raspberrypi/rpi-imager/blob/5fa3fbe8dcef4ab01c0a2fed5638759265c3f7f6/src/OptionsPopup.qml) + +``` +Usage: rpi-headless-setup-helper advanced [options] + +create advanced headless setup file + +Options: + -v, --version output the version number + -t, --timezone set the timezone + -l, --kbd-layout set the keyboard layout + -k, --ssh-key specify the path to the public SSH key + -d, --ssh-password-disable disable password authentication for SSH (default: false) + -h, --hostname set the hostname (default: "raspberrypi") + -y, --yes overwrite file if exists (default: false) + -s, --script it will run it as a script and will disable every interactive prompt (default: false) + --help display help for command +``` + +##### Options + +###### `-t, --timezone ` + +Set the timezone by specifying the IANA timezone identifier (ex. `America/New_York`). + +This options is `required` + +###### `-l, --kbd-layout ` + +Set the specific keyboard layout based on the x11 list (on a Linux machine you can run `localectl list-x11-keymap-layouts` to see the whole list, or refer to [src/utils/keyboard-layouts.ts](src/utils/keyboard-layouts.ts)). + +This options is `required` + +###### `-k, --ssh-key ` + +Specify the path to the public key to copy to the raspberry pi first user. + +###### `-d, --ssh-password-disable` + +Disable SSH password authentication. This can be done ONLY if you provide a public key with the `-k` option (default: `false`) + + +###### `-h, --hostname ` + +Set a custom hostname (default: `raspberrypi`) + +###### `-y, --yes` + +In case the WiFi specific files for the headless setup already exist, overwrite them (default: `false`). + +###### `-s, --script` + +This CLI is being used in a script, so disable all interactive prompts. In case the WiFi specific files already exist and the `-y, --yes` option was not used, it will not ask if you want to overwrite the files and simply fail (default: `false`). + ### Usage Simply run this CLI without any parameter for the interactive CLI or run it providing the subcommand and all the necessary options. \ No newline at end of file diff --git a/bash-completion.sh b/bash-completion.sh index a166e1f..f10ee17 100644 --- a/bash-completion.sh +++ b/bash-completion.sh @@ -70,12 +70,39 @@ __rpi-headless-setup-helper_completion() { ;; esac ;; + advanced) + case $prev in + -t|--timezone) + COMPREPLY=($(compgen -W " Africa/Abidjan Africa/Accra Africa/Addis_Ababa Africa/Algiers Africa/Asmara Africa/Bamako Africa/Bangui Africa/Banjul Africa/Bissau Africa/Blantyre Africa/Brazzaville Africa/Bujumbura Africa/Cairo Africa/Casablanca Africa/Ceuta Africa/Conakry Africa/Dakar Africa/Dar_es_Salaam Africa/Djibouti Africa/Douala Africa/El_Aaiun Africa/Freetown Africa/Gaborone Africa/Harare Africa/Johannesburg Africa/Juba Africa/Kampala Africa/Khartoum Africa/Kigali Africa/Kinshasa Africa/Lagos Africa/Libreville Africa/Lome Africa/Luanda Africa/Lubumbashi Africa/Lusaka Africa/Malabo Africa/Maputo Africa/Maseru Africa/Mbabane Africa/Mogadishu Africa/Monrovia Africa/Nairobi Africa/Ndjamena Africa/Niamey Africa/Nouakchott Africa/Ouagadougou Africa/Porto-Novo Africa/Sao_Tome Africa/Tripoli Africa/Tunis Africa/Windhoek America/Adak America/Anchorage America/Anguilla America/Antigua America/Araguaina America/Argentina/Buenos_Aires America/Argentina/Catamarca America/Argentina/Cordoba America/Argentina/Jujuy America/Argentina/La_Rioja America/Argentina/Mendoza America/Argentina/Rio_Gallegos America/Argentina/Salta America/Argentina/San_Juan America/Argentina/San_Luis America/Argentina/Tucuman America/Argentina/Ushuaia America/Aruba America/Asuncion America/Atikokan America/Bahia America/Bahia_Banderas America/Barbados America/Belem America/Belize America/Blanc-Sablon America/Boa_Vista America/Bogota America/Boise America/Cambridge_Bay America/Campo_Grande America/Cancun America/Caracas America/Cayenne America/Cayman America/Chicago America/Chihuahua America/Costa_Rica America/Creston America/Cuiaba America/Curacao America/Danmarkshavn America/Dawson America/Dawson_Creek America/Denver America/Detroit America/Dominica America/Edmonton America/Eirunepe America/El_Salvador America/Fort_Nelson America/Fortaleza America/Glace_Bay America/Godthab America/Goose_Bay America/Grand_Turk America/Grenada America/Guadeloupe America/Guatemala America/Guayaquil America/Guyana America/Halifax America/Havana America/Hermosillo America/Indiana/Indianapolis America/Indiana/Knox America/Indiana/Marengo America/Indiana/Petersburg America/Indiana/Tell_City America/Indiana/Vevay America/Indiana/Vincennes America/Indiana/Winamac America/Inuvik America/Iqaluit America/Jamaica America/Juneau America/Kentucky/Louisville America/Kentucky/Monticello America/Kralendijk America/La_Paz America/Lima America/Los_Angeles America/Lower_Princes America/Maceio America/Managua America/Manaus America/Marigot America/Martinique America/Matamoros America/Mazatlan America/Menominee America/Merida America/Metlakatla America/Mexico_City America/Miquelon America/Moncton America/Monterrey America/Montevideo America/Montserrat America/Nassau America/New_York America/Nipigon America/Nome America/Noronha America/North_Dakota/Beulah America/North_Dakota/Center America/North_Dakota/New_Salem America/Nuuk America/Ojinaga America/Panama America/Pangnirtung America/Paramaribo America/Phoenix America/Port-au-Prince America/Port_of_Spain America/Porto_Velho America/Puerto_Rico America/Punta_Arenas America/Rainy_River America/Rankin_Inlet America/Recife America/Regina America/Resolute America/Rio_Branco America/Santarem America/Santiago America/Santo_Domingo America/Sao_Paulo America/Scoresbysund America/Sitka America/St_Barthelemy America/St_Johns America/St_Kitts America/St_Lucia America/St_Thomas America/St_Vincent America/Swift_Current America/Tegucigalpa America/Thule America/Thunder_Bay America/Tijuana America/Toronto America/Tortola America/Vancouver America/Whitehorse America/Winnipeg America/Yakutat America/Yellowknife Antarctica/Casey Antarctica/Davis Antarctica/DumontDUrville Antarctica/Macquarie Antarctica/Mawson Antarctica/Palmer Antarctica/Rothera Antarctica/Syowa Antarctica/Troll Antarctica/Vostok Arctic/Longyearbyen Asia/Almaty Asia/Amman Asia/Anadyr Asia/Aqtau Asia/Aqtobe Asia/Ashgabat Asia/Atyrau Asia/Baghdad Asia/Baku Asia/Bangkok Asia/Barnaul Asia/Beirut Asia/Bishkek Asia/Brunei Asia/Chita Asia/Choibalsan Asia/Colombo Asia/Damascus Asia/Dhaka Asia/Dili Asia/Dubai Asia/Dushanbe Asia/Famagusta Asia/Gaza Asia/Hebron Asia/Ho_Chi_Minh Asia/Hong_Kong Asia/Hovd Asia/Irkutsk Asia/Jakarta Asia/Jayapura Asia/Jerusalem Asia/Kabul Asia/Kamchatka Asia/Karachi Asia/Kathmandu Asia/Khandyga Asia/Kolkata Asia/Krasnoyarsk Asia/Kuala_Lumpur Asia/Kuching Asia/Macau Asia/Magadan Asia/Makassar Asia/Manila Asia/Nicosia Asia/Novokuznetsk Asia/Novosibirsk Asia/Omsk Asia/Oral Asia/Phnom_Penh Asia/Pontianak Asia/Pyongyang Asia/Qatar Asia/Qostanay Asia/Qyzylorda Asia/Riyadh Asia/Sakhalin Asia/Samarkand Asia/Seoul Asia/Shanghai Asia/Singapore Asia/Srednekolymsk Asia/Taipei Asia/Tashkent Asia/Tbilisi Asia/Tehran Asia/Thimphu Asia/Tokyo Asia/Tomsk Asia/Ulaanbaatar Asia/Urumqi Asia/Ust-Nera Asia/Vientiane Asia/Vladivostok Asia/Yakutsk Asia/Yangon Asia/Yekaterinburg Asia/Yerevan Atlantic/Azores Atlantic/Bermuda Atlantic/Canary Atlantic/Cape_Verde Atlantic/Faroe Atlantic/Madeira Atlantic/Reykjavik Atlantic/South_Georgia Atlantic/St_Helena Atlantic/Stanley Australia/Adelaide Australia/Brisbane Australia/Broken_Hill Australia/Currie Australia/Darwin Australia/Eucla Australia/Hobart Australia/Lindeman Australia/Lord_Howe Australia/Melbourne Australia/Perth Australia/Sydney Europe/Amsterdam Europe/Andorra Europe/Astrakhan Europe/Athens Europe/Belgrade Europe/Berlin Europe/Bratislava Europe/Brussels Europe/Bucharest Europe/Budapest Europe/Busingen Europe/Chisinau Europe/Copenhagen Europe/Dublin Europe/Gibraltar Europe/Guernsey Europe/Helsinki Europe/Isle_of_Man Europe/Istanbul Europe/Jersey Europe/Kaliningrad Europe/Kiev Europe/Kirov Europe/Lisbon Europe/Ljubljana Europe/London Europe/Luxembourg Europe/Madrid Europe/Malta Europe/Mariehamn Europe/Minsk Europe/Monaco Europe/Moscow Europe/Oslo Europe/Paris Europe/Podgorica Europe/Prague Europe/Riga Europe/Rome Europe/Samara Europe/San_Marino Europe/Sarajevo Europe/Saratov Europe/Simferopol Europe/Skopje Europe/Sofia Europe/Stockholm Europe/Tallinn Europe/Tirane Europe/Ulyanovsk Europe/Uzhgorod Europe/Vaduz Europe/Vatican Europe/Vienna Europe/Vilnius Europe/Volgograd Europe/Warsaw Europe/Zagreb Europe/Zaporozhye Europe/Zurich Indian/Antananarivo Indian/Chagos Indian/Christmas Indian/Cocos Indian/Comoro Indian/Kerguelen Indian/Mahe Indian/Maldives Indian/Mauritius Indian/Mayotte Indian/Reunion Pacific/Apia Pacific/Auckland Pacific/Bougainville Pacific/Chatham Pacific/Chuuk Pacific/Easter Pacific/Efate Pacific/Enderbury Pacific/Fakaofo Pacific/Fiji Pacific/Funafuti Pacific/Galapagos Pacific/Gambier Pacific/Guadalcanal Pacific/Guam Pacific/Honolulu Pacific/Kiritimati Pacific/Kosrae Pacific/Kwajalein Pacific/Majuro Pacific/Marquesas Pacific/Midway Pacific/Nauru Pacific/Niue Pacific/Norfolk Pacific/Noumea Pacific/Pago_Pago Pacific/Palau Pacific/Pitcairn Pacific/Pohnpei Pacific/Port_Moresby Pacific/Rarotonga Pacific/Saipan Pacific/Tahiti Pacific/Tarawa Pacific/Tongatapu Pacific/Wake Pacific/Wallis" -- "$cur")) + return 0; + ;; + -l|--kbd-layout) + COMPREPLY=($(compgen -W " af al am usa at au az ba bd be bg br brai bt bw by ca cd ch cm cn custom cz de dk dz ee epo es et fi fo fr gb ge gh gn gr hr hu id ie il in iq ir is it jp jv ke kg kh kr kz la latam lk lt lv ma mao md me mk ml mm mn mt mv my nec_vndr/jp ng nl no np ph pk pl pt ro rs ru se si sk sn sy tg th tj tm tr tw tz ua us uz vn za" -- "$cur")) + return 0; + ;; + -k|--ssh-key) + _filedir; + return 0; + ;; + -h|--hostname) + COMPREPLY='' + return 0; + ;; + esac + + case $last_opt in + *) + COMPREPLY=($(compgen -W "-v --version -t --timezone -l --kbd-layout -k --ssh-key -d --ssh-password-disable -h --hostname -y --yes -s --script -h --help" -- "$cur")) + return 0; + ;; + esac + ;; help) COMPREPLY=($(compgen -W "ssh user wifi" -- "$cur")) return 0; ;; *) - COMPREPLY=($(compgen -W "-h --help -v --version ssh user wifi help" -- "$cur")) + COMPREPLY=($(compgen -W "-h --help -v --version ssh user wifi advanced help" -- "$cur")) return 0; ;; esac diff --git a/package-lock.json b/package-lock.json index 9f5c612..fe4f5a5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6,18 +6,18 @@ "packages": { "": { "name": "@matteosacchetto/rpi-headless-setup-helper", - "version": "0.1.0", + "version": "0.2.2", "license": "MIT", "dependencies": { - "@commander-js/extra-typings": "^10.0.3", - "@inquirer/confirm": "^1.0.11", - "@inquirer/input": "^1.1.2", - "@inquirer/password": "^1.0.11", - "chalk": "^5.2.0", - "commander": "^10.0.1", + "@commander-js/extra-typings": "^11.0.0", + "@inquirer/confirm": "^2.0.5", + "@inquirer/input": "^1.2.4", + "@inquirer/password": "^1.1.4", + "chalk": "^5.3.0", + "commander": "^11.0.0", "log-symbols": "^5.1.0", "ora": "^6.3.1", - "strip-ansi": "^7.0.1", + "strip-ansi": "^7.1.0", "which": "^3.0.1" }, "bin": { @@ -29,29 +29,38 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-run": "^3.0.1", - "@rollup/plugin-typescript": "^11.1.1", - "@types/node": "^20.2.3", + "@rollup/plugin-typescript": "^11.1.2", + "@types/node": "^18.16.19", "@types/tap": "^15.0.8", "@types/which": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.7", - "@typescript-eslint/parser": "^5.59.7", - "c8": "^7.13.0", - "esbuild": "^0.17.19", - "eslint": "^8.41.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "c8": "^8.0.0", + "esbuild": "^0.18.12", + "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", - "prettier": "^2.8.8", - "rollup": "^3.23.0", + "prettier": "^3.0.0", + "rollup": "^3.26.2", "rollup-plugin-esbuild": "^5.0.0", - "rollup-plugin-node-externals": "^6.0.1", + "rollup-plugin-node-externals": "^6.1.1", "rollup-plugin-typescript-paths": "^1.4.0", - "tap": "^16.3.4", - "typescript": "^5.0.4" + "tap": "^16.3.7", + "typescript": "^5.1.6" }, "engines": { "node": ">=18.14.0", "npm": ">=9.3.1" } }, + "node_modules/@aashutoshrathi/word-wrap": { + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz", + "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -489,11 +498,11 @@ "dev": true }, "node_modules/@commander-js/extra-typings": { - "version": "10.0.3", - "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-10.0.3.tgz", - "integrity": "sha512-OIw28QV/GlP8k0B5CJTRsl8IyNvd0R8C8rfo54Yz9P388vCNDgdNrFlKxZTGqps+5j6lSw3Ss9JTQwcur1w1oA==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/@commander-js/extra-typings/-/extra-typings-11.0.0.tgz", + "integrity": "sha512-06ol6Kn5gPjFY6v0vWOZ84nQwyqhZdaeZCHYH3vhwewjpOEjniF1KHZxh18887G3poWiJ8qyq5pb6ANuiddfPQ==", "peerDependencies": { - "commander": "10.0.x" + "commander": "11.0.x" } }, "node_modules/@esbuild-kit/core-utils": { @@ -506,17 +515,7 @@ "source-map-support": "^0.5.21" } }, - "node_modules/@esbuild-kit/esm-loader": { - "version": "2.5.5", - "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.5.5.tgz", - "integrity": "sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==", - "dev": true, - "dependencies": { - "@esbuild-kit/core-utils": "^3.0.0", - "get-tsconfig": "^4.4.0" - } - }, - "node_modules/@esbuild/android-arm": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", @@ -532,7 +531,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/android-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", @@ -548,7 +547,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/android-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/android-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", @@ -564,7 +563,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", @@ -580,7 +579,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/darwin-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/darwin-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", @@ -596,7 +595,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/freebsd-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", @@ -612,7 +611,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/freebsd-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/freebsd-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", @@ -628,7 +627,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-arm": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", @@ -644,7 +643,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", "integrity": "sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg==", @@ -660,7 +659,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-ia32": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ia32": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", @@ -676,7 +675,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-loong64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-loong64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", @@ -692,7 +691,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-mips64el": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-mips64el": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", @@ -708,7 +707,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-ppc64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-ppc64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", @@ -724,7 +723,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-riscv64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-riscv64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", @@ -740,7 +739,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-s390x": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-s390x": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", @@ -756,7 +755,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/linux-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/linux-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", @@ -772,7 +771,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/netbsd-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/netbsd-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", @@ -788,7 +787,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/openbsd-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/openbsd-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", @@ -804,7 +803,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/sunos-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/sunos-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", @@ -820,7 +819,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/win32-arm64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", @@ -836,7 +835,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/win32-ia32": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-ia32": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", @@ -852,7 +851,7 @@ "node": ">=12" } }, - "node_modules/@esbuild/win32-x64": { + "node_modules/@esbuild-kit/core-utils/node_modules/@esbuild/win32-x64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", @@ -868,6 +867,405 @@ "node": ">=12" } }, + "node_modules/@esbuild-kit/core-utils/node_modules/esbuild": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", + "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/android-arm": "0.17.19", + "@esbuild/android-arm64": "0.17.19", + "@esbuild/android-x64": "0.17.19", + "@esbuild/darwin-arm64": "0.17.19", + "@esbuild/darwin-x64": "0.17.19", + "@esbuild/freebsd-arm64": "0.17.19", + "@esbuild/freebsd-x64": "0.17.19", + "@esbuild/linux-arm": "0.17.19", + "@esbuild/linux-arm64": "0.17.19", + "@esbuild/linux-ia32": "0.17.19", + "@esbuild/linux-loong64": "0.17.19", + "@esbuild/linux-mips64el": "0.17.19", + "@esbuild/linux-ppc64": "0.17.19", + "@esbuild/linux-riscv64": "0.17.19", + "@esbuild/linux-s390x": "0.17.19", + "@esbuild/linux-x64": "0.17.19", + "@esbuild/netbsd-x64": "0.17.19", + "@esbuild/openbsd-x64": "0.17.19", + "@esbuild/sunos-x64": "0.17.19", + "@esbuild/win32-arm64": "0.17.19", + "@esbuild/win32-ia32": "0.17.19", + "@esbuild/win32-x64": "0.17.19" + } + }, + "node_modules/@esbuild-kit/esm-loader": { + "version": "2.5.5", + "resolved": "https://registry.npmjs.org/@esbuild-kit/esm-loader/-/esm-loader-2.5.5.tgz", + "integrity": "sha512-Qwfvj/qoPbClxCRNuac1Du01r9gvNOT+pMYtJDapfB1eoGN1YlJ1BixLyL9WVENRx5RXgNLdfYdx/CuswlGhMw==", + "dev": true, + "dependencies": { + "@esbuild-kit/core-utils": "^3.0.0", + "get-tsconfig": "^4.4.0" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.12.tgz", + "integrity": "sha512-LIxaNIQfkFZbTLb4+cX7dozHlAbAshhFE5PKdro0l+FnCpx1GDJaQ2WMcqm+ToXKMt8p8Uojk/MFRuGyz3V5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.12.tgz", + "integrity": "sha512-BMAlczRqC/LUt2P97E4apTBbkvS9JTJnp2DKFbCwpZ8vBvXVbNdqmvzW/OsdtI/+mGr+apkkpqGM8WecLkPgrA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.12.tgz", + "integrity": "sha512-zU5MyluNsykf5cOJ0LZZZjgAHbhPJ1cWfdH1ZXVMXxVMhEV0VZiZXQdwBBVvmvbF28EizeK7obG9fs+fpmS0eQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.12.tgz", + "integrity": "sha512-zUZMep7YONnp6954QOOwEBwFX9svlKd3ov6PkxKd53LGTHsp/gy7vHaPGhhjBmEpqXEXShi6dddjIkmd+NgMsA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.12.tgz", + "integrity": "sha512-ohqLPc7i67yunArPj1+/FeeJ7AgwAjHqKZ512ADk3WsE3FHU9l+m5aa7NdxXr0HmN1bjDlUslBjWNbFlD9y12Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.12.tgz", + "integrity": "sha512-GIIHtQXqgeOOqdG16a/A9N28GpkvjJnjYMhOnXVbn3EDJcoItdR58v/pGN31CHjyXDc8uCcRnFWmqaJt24AYJg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.12.tgz", + "integrity": "sha512-zK0b9a1/0wZY+6FdOS3BpZcPc1kcx2G5yxxfEJtEUzVxI6n/FrC2Phsxj/YblPuBchhBZ/1wwn7AyEBUyNSa6g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.12.tgz", + "integrity": "sha512-y75OijvrBE/1XRrXq1jtrJfG26eHeMoqLJ2dwQNwviwTuTtHGCojsDO6BJNF8gU+3jTn1KzJEMETytwsFSvc+Q==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.12.tgz", + "integrity": "sha512-JKgG8Q/LL/9sw/iHHxQyVMoQYu3rU3+a5Z87DxC+wAu3engz+EmctIrV+FGOgI6gWG1z1+5nDDbXiRMGQZXqiw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.12.tgz", + "integrity": "sha512-yoRIAqc0B4lDIAAEFEIu9ttTRFV84iuAl0KNCN6MhKLxNPfzwCBvEMgwco2f71GxmpBcTtn7KdErueZaM2rEvw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.12.tgz", + "integrity": "sha512-qYgt3dHPVvf/MgbIBpJ4Sup/yb9DAopZ3a2JgMpNKIHUpOdnJ2eHBo/aQdnd8dJ21X/+sS58wxHtA9lEazYtXQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.12.tgz", + "integrity": "sha512-wHphlMLK4ufNOONqukELfVIbnGQJrHJ/mxZMMrP2jYrPgCRZhOtf0kC4yAXBwnfmULimV1qt5UJJOw4Kh13Yfg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.12.tgz", + "integrity": "sha512-TeN//1Ft20ZZW41+zDSdOI/Os1bEq5dbvBvYkberB7PHABbRcsteeoNVZFlI0YLpGdlBqohEpjrn06kv8heCJg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.12.tgz", + "integrity": "sha512-AgUebVS4DoAblBgiB2ACQ/8l4eGE5aWBb8ZXtkXHiET9mbj7GuWt3OnsIW/zX+XHJt2RYJZctbQ2S/mDjbp0UA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.12.tgz", + "integrity": "sha512-dJ3Rb3Ei2u/ysSXd6pzleGtfDdc2MuzKt8qc6ls8vreP1G3B7HInX3i7gXS4BGeVd24pp0yqyS7bJ5NHaI9ing==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.12.tgz", + "integrity": "sha512-OrNJMGQbPaVyHHcDF8ybNSwu7TDOfX8NGpXCbetwOSP6txOJiWlgQnRymfC9ocR1S0Y5PW0Wb1mV6pUddqmvmQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.12.tgz", + "integrity": "sha512-55FzVCAiwE9FK8wWeCRuvjazNRJ1QqLCYGZVB6E8RuQuTeStSwotpSW4xoRGwp3a1wUsaVCdYcj5LGCASVJmMg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.12.tgz", + "integrity": "sha512-qnluf8rfb6Y5Lw2tirfK2quZOBbVqmwxut7GPCIJsM8lc4AEUj9L8y0YPdLaPK0TECt4IdyBdBD/KRFKorlK3g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.12.tgz", + "integrity": "sha512-+RkKpVQR7bICjTOPUpkTBTaJ4TFqQBX5Ywyd/HSdDkQGn65VPkTsR/pL4AMvuMWy+wnXgIl4EY6q4mVpJal8Kg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.12.tgz", + "integrity": "sha512-GNHuciv0mFM7ouzsU0+AwY+7eV4Mgo5WnbhfDCQGtpvOtD1vbOiRjPYG6dhmMoFyBjj+pNqQu2X+7DKn0KQ/Gw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.12.tgz", + "integrity": "sha512-kR8cezhYipbbypGkaqCTWIeu4zID17gamC8YTPXYtcN3E5BhhtTnwKBn9I0PJur/T6UVwIEGYzkffNL0lFvxEw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.12.tgz", + "integrity": "sha512-O0UYQVkvfM/jO8a4OwoV0mAKSJw+mjWTAd1MJd/1FCX6uiMdLmMRPK/w6e9OQ0ob2WGxzIm9va/KG0Ja4zIOgg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.3.0.tgz", @@ -884,23 +1282,23 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.4.0.tgz", - "integrity": "sha512-A9983Q0LnDGdLPjxyXQ00sbV+K+O+ko2Dr+CZigbHWtX9pNfxlaBkMR8X1CztI73zuEyEBXTVjx7CE+/VSwDiQ==", + "version": "4.5.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.5.1.tgz", + "integrity": "sha512-Z5ba73P98O1KUYCCJTUeVpja9RcGoMdncZ6T49FCUl2lN38JtCJ+3WgIDBv0AuY4WChU5PmtJmOCTlN6FZTFKQ==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, "node_modules/@eslint/eslintrc": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.0.3.tgz", - "integrity": "sha512-+5gy6OQfk+xx3q0d6jGZZC3f3KzAkXc/IanVxd1is/VIIziRqqt3ongQz0FiTUXqTk0c7aDB3OaFuKnuSoJicQ==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.0.tgz", + "integrity": "sha512-Lj7DECXqIVCqnqjjHMPna4vn6GJcMgul/wuS0je9OZ9gsL0zzDpKPVtcG1HaDVc+9y+qgXneTeUMbCqXJNpH1A==", "dev": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", - "espree": "^9.5.2", + "espree": "^9.6.0", "globals": "^13.19.0", "ignore": "^5.2.0", "import-fresh": "^3.2.1", @@ -916,18 +1314,18 @@ } }, "node_modules/@eslint/js": { - "version": "8.41.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.41.0.tgz", - "integrity": "sha512-LxcyMGxwmTh2lY9FwHPGWOHmYFCZvbrFCBZL4FzSSsxsRPuhrYUg/49/0KDfW8tnIEaEHtfmn6+NPN+1DqaNmA==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.44.0.tgz", + "integrity": "sha512-Ag+9YM4ocKQx9AarydN0KY2j0ErMHNIocPDrVo8zAE44xLTjEtz81OdR68/cydGtk6m6jDb5Za3r2useMzYmSw==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.8", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.8.tgz", - "integrity": "sha512-UybHIJzJnR5Qc/MsD9Kr+RpO2h+/P1GhOwdiLPXK5TWk5sgTdu88bTD9UP+CKbPPh5Rni1u0GjAdYQLemG8g+g==", + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.10.tgz", + "integrity": "sha512-KVVjQmNUepDVGXNuoRRdmmEjruj0KfiGSbS8LVc12LMsWDQzRXJ0qdhN8L8uUigKpfEHRhlaQFY0ib1tnUbNeQ==", "dev": true, "dependencies": { "@humanwhocodes/object-schema": "^1.2.1", @@ -958,12 +1356,12 @@ "dev": true }, "node_modules/@inquirer/confirm": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-1.0.11.tgz", - "integrity": "sha512-UWYJ+0dN9rWw0czTPqqKRGLqHsLML9rrQlScn5oOVUtiL2WDTxs95JehP2axKsNkSBMxmFAdA7TdctJkZFJcxA==", + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@inquirer/confirm/-/confirm-2.0.5.tgz", + "integrity": "sha512-+DjTHTgTGz2bsmG1aXsqIF/ZEhPjF0SFVdLLsGvlYzf6Q0iUzRgFbT2He5wyWlw/64XnJpJzrZyCJ+bxVQhzfg==", "dependencies": { - "@inquirer/core": "^1.3.0", - "@inquirer/type": "^1.0.5", + "@inquirer/core": "^2.3.1", + "@inquirer/type": "^1.1.1", "chalk": "^4.1.2" }, "engines": { @@ -986,11 +1384,14 @@ } }, "node_modules/@inquirer/core": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-1.3.0.tgz", - "integrity": "sha512-W7EA48gIMahFLiGW/zF+rgoineqTDK5IQizsOmwvbFfYgiQ8Asetut94THBmB3KnW0nrZL5UPHUK6QzcjEzaCw==", + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/@inquirer/core/-/core-2.3.1.tgz", + "integrity": "sha512-faYAYnIfdEuns3jGKykaog5oUqFiEVbCx9nXGZfUhyEEpKcHt5bpJfZTb3eOBQKo8I/v4sJkZeBHmFlSZQuBCw==", "dependencies": { - "@inquirer/type": "^1.0.5", + "@inquirer/type": "^1.1.1", + "@types/mute-stream": "^0.0.1", + "@types/node": "^20.4.2", + "@types/wrap-ansi": "^3.0.0", "ansi-escapes": "^4.3.2", "chalk": "^4.1.2", "cli-spinners": "^2.8.0", @@ -1006,6 +1407,11 @@ "node": ">=14.18.0" } }, + "node_modules/@inquirer/core/node_modules/@types/node": { + "version": "20.4.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-20.4.2.tgz", + "integrity": "sha512-Dd0BYtWgnWJKwO1jkmTrzofjK2QXXcai0dmtzvIBhcA+RsG5h8R3xlyta0kGOZRNfL9GuRtb1knmPEhQrePCEw==" + }, "node_modules/@inquirer/core/node_modules/ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", @@ -1054,12 +1460,12 @@ } }, "node_modules/@inquirer/input": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.1.2.tgz", - "integrity": "sha512-7/fS1EE9gvQJ7/NVKpsoyJeZAqbEoOiQBg6D8+YaCwnbEldXhKSyS53VlWoYrDWryw8XNutMpJI3o9vLxDw8KQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@inquirer/input/-/input-1.2.4.tgz", + "integrity": "sha512-niXWIF6K1e7S+OPgTF+6EPJz6oCukbSP30ORzmzAGS8YQ0E62V9limWRdsmKdBmRlkc4kpN0UuIuRyEjQ/F0Gg==", "dependencies": { - "@inquirer/core": "^1.3.0", - "@inquirer/type": "^1.0.5", + "@inquirer/core": "^2.3.1", + "@inquirer/type": "^1.1.1", "chalk": "^4.1.2" }, "engines": { @@ -1082,12 +1488,12 @@ } }, "node_modules/@inquirer/password": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.0.11.tgz", - "integrity": "sha512-2GtNIBN906V5PzLFe0GIrXKInZM47T7QZdET0ML0sdGn4HFI7WEN+Gw0W2yC+0xhiTtm1kdrhFxRNIq8AZFnLA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@inquirer/password/-/password-1.1.4.tgz", + "integrity": "sha512-RG74N/fVniPgJc3nbP7f2CWzoWfjH3k/p7zL6UOlOQ0jizKk6zp/ZBlJ526V17s51ccY5k+qt2jWlicms8mWxg==", "dependencies": { - "@inquirer/input": "^1.1.2", - "@inquirer/type": "^1.0.5", + "@inquirer/input": "^1.2.4", + "@inquirer/type": "^1.1.1", "chalk": "^4.1.2" }, "engines": { @@ -1110,9 +1516,9 @@ } }, "node_modules/@inquirer/type": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.0.5.tgz", - "integrity": "sha512-MCEsk3Ep4D8UwwyCGdMmtoTwfC78oxHusUKex1qR+WTJP4MKK/mykCTCXApbYYRBYuTpT71kdoOr9vxySh+l5Q==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@inquirer/type/-/type-1.1.1.tgz", + "integrity": "sha512-ACc2N1AnIYtg+bfnitna0OJ1rptWqa8apdDDRQnRWb0R5MEPGAgvqWaDbZahATXOnglqKDRIeHFEQfqxhM6p/g==", "engines": { "node": ">=14.18.0" } @@ -1396,9 +1802,9 @@ "dev": true }, "node_modules/@rollup/plugin-typescript": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.1.tgz", - "integrity": "sha512-Ioir+x5Bejv72Lx2Zbz3/qGg7tvGbxQZALCLoJaGrkNXak/19+vKgKYJYM3i/fJxvsb23I9FuFQ8CUBEfsmBRg==", + "version": "11.1.2", + "resolved": "https://registry.npmjs.org/@rollup/plugin-typescript/-/plugin-typescript-11.1.2.tgz", + "integrity": "sha512-0ghSOCMcA7fl1JM+0gYRf+Q/HWyg+zg7/gDSc+fRLmlJWcW5K1I+CLRzaRhXf4Y3DRyPnnDo4M2ktw+a6JcDEg==", "dev": true, "dependencies": { "@rollup/pluginutils": "^5.0.1", @@ -1456,16 +1862,23 @@ "dev": true }, "node_modules/@types/json-schema": { - "version": "7.0.11", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz", - "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", + "version": "7.0.12", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.12.tgz", + "integrity": "sha512-Hr5Jfhc9eYOQNPYO5WLDq/n4jqijdHNlDXjuAQkkt+mWdQR+XJToOHrsD4cPaMXpn6KO7y2+wM8AZEs8VpBLVA==", "dev": true }, + "node_modules/@types/mute-stream": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/@types/mute-stream/-/mute-stream-0.0.1.tgz", + "integrity": "sha512-0yQLzYhCqGz7CQPE3iDmYjhb7KMBFOP+tBkyw+/Y2YyDI5wpS7itXXxneN1zSsUwWx3Ji6YiVYrhAnpQGS/vkw==", + "dependencies": { + "@types/node": "*" + } + }, "node_modules/@types/node": { - "version": "20.2.3", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.3.tgz", - "integrity": "sha512-pg9d0yC4rVNWQzX8U7xb4olIOFuuVL9za3bzMT2pu2SU0SNEi66i2qrvhE2qt0HvkhuCaWJu7pLNOt/Pj8BIrw==", - "dev": true + "version": "18.16.19", + "resolved": "https://registry.npmjs.org/@types/node/-/node-18.16.19.tgz", + "integrity": "sha512-IXl7o+R9iti9eBW4Wg2hx1xQDig183jj7YLn8F7udNceyfkbn1ZxmzZXuak20gR40D7pIkIY1kYGx5VIGbaHKA==" }, "node_modules/@types/semver": { "version": "7.5.0", @@ -1488,33 +1901,41 @@ "integrity": "sha512-ASCxdbsrwNfSMXALlC3Decif9rwDMu+80KGp5zI2RLRotfMsTv7fHL8W8VDp24wymzDyIFudhUeSCugrgRFfHQ==", "dev": true }, + "node_modules/@types/wrap-ansi": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz", + "integrity": "sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g==" + }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.59.7.tgz", - "integrity": "sha512-BL+jYxUFIbuYwy+4fF86k5vdT9lT0CNJ6HtwrIvGh0PhH8s0yy5rjaKH2fDCrz5ITHy07WCzVGNvAmjJh4IJFA==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.0.0.tgz", + "integrity": "sha512-xuv6ghKGoiq856Bww/yVYnXGsKa588kY3M0XK7uUW/3fJNNULKRfZfSBkMTSpqGG/8ZCXCadfh8G/z/B4aqS/A==", "dev": true, "dependencies": { - "@eslint-community/regexpp": "^4.4.0", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/type-utils": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@eslint-community/regexpp": "^4.5.0", + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/type-utils": "6.0.0", + "@typescript-eslint/utils": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", "debug": "^4.3.4", "grapheme-splitter": "^1.0.4", - "ignore": "^5.2.0", + "graphemer": "^1.4.0", + "ignore": "^5.2.4", + "natural-compare": "^1.4.0", "natural-compare-lite": "^1.4.0", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.0", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "@typescript-eslint/parser": "^5.0.0", - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "@typescript-eslint/parser": "^6.0.0 || ^6.0.0-alpha", + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1523,25 +1944,26 @@ } }, "node_modules/@typescript-eslint/parser": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-5.59.7.tgz", - "integrity": "sha512-VhpsIEuq/8i5SF+mPg9jSdIwgMBBp0z9XqjiEay+81PYLJuroN+ET1hM5IhkiYMJd9MkTz8iJLt7aaGAgzWUbQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.0.0.tgz", + "integrity": "sha512-TNaufYSPrr1U8n+3xN+Yp9g31vQDJqhXzzPSHfQDLcaO4tU+mCfODPxCwf4H530zo7aUBE3QIdxCXamEnG04Tg==", "dev": true, "dependencies": { - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/typescript-estree": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", "debug": "^4.3.4" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1550,16 +1972,16 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-5.59.7.tgz", - "integrity": "sha512-FL6hkYWK9zBGdxT2wWEd2W8ocXMu3K94i3gvMrjXpx+koFYdYV7KprKfirpgY34vTGzEPPuKoERpP8kD5h7vZQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.0.0.tgz", + "integrity": "sha512-o4q0KHlgCZTqjuaZ25nw5W57NeykZT9LiMEG4do/ovwvOcPnDO1BI5BQdCsUkjxFyrCL0cSzLjvIMfR9uo7cWg==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7" + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1567,25 +1989,25 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-5.59.7.tgz", - "integrity": "sha512-ozuz/GILuYG7osdY5O5yg0QxXUAEoI4Go3Do5xeu+ERH9PorHBPSdvD3Tjp2NN2bNLh1NJQSsQu2TPu/Ly+HaQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.0.0.tgz", + "integrity": "sha512-ah6LJvLgkoZ/pyJ9GAdFkzeuMZ8goV6BH7eC9FPmojrnX9yNCIsfjB+zYcnex28YO3RFvBkV6rMV6WpIqkPvoQ==", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "5.59.7", - "@typescript-eslint/utils": "5.59.7", + "@typescript-eslint/typescript-estree": "6.0.0", + "@typescript-eslint/utils": "6.0.0", "debug": "^4.3.4", - "tsutils": "^3.21.0" + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "*" + "eslint": "^7.0.0 || ^8.0.0" }, "peerDependenciesMeta": { "typescript": { @@ -1594,12 +2016,12 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-5.59.7.tgz", - "integrity": "sha512-UnVS2MRRg6p7xOSATscWkKjlf/NDKuqo5TdbWck6rIRZbmKpVNTLALzNvcjIfHBE7736kZOFc/4Z3VcZwuOM/A==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.0.0.tgz", + "integrity": "sha512-Zk9KDggyZM6tj0AJWYYKgF0yQyrcnievdhG0g5FqyU3Y2DRxJn4yWY21sJC0QKBckbsdKKjYDV2yVrrEvuTgxg==", "dev": true, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1607,21 +2029,21 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-5.59.7.tgz", - "integrity": "sha512-4A1NtZ1I3wMN2UGDkU9HMBL+TIQfbrh4uS0WDMMpf3xMRursDbqEf1ahh6vAAe3mObt8k3ZATnezwG4pdtWuUQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.0.0.tgz", + "integrity": "sha512-2zq4O7P6YCQADfmJ5OTDQTP3ktajnXIRrYAtHM9ofto/CJZV3QfJ89GEaM2BNGeSr1KgmBuLhEkz5FBkS2RQhQ==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/visitor-keys": "5.59.7", + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/visitor-keys": "6.0.0", "debug": "^4.3.4", "globby": "^11.1.0", "is-glob": "^4.0.3", - "semver": "^7.3.7", - "tsutils": "^3.21.0" + "semver": "^7.5.0", + "ts-api-utils": "^1.0.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1634,42 +2056,42 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-5.59.7.tgz", - "integrity": "sha512-yCX9WpdQKaLufz5luG4aJbOpdXf/fjwGMcLFXZVPUz3QqLirG5QcwwnIHNf8cjLjxK4qtzTO8udUtMQSAToQnQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.0.0.tgz", + "integrity": "sha512-SOr6l4NB6HE4H/ktz0JVVWNXqCJTOo/mHnvIte1ZhBQ0Cvd04x5uKZa3zT6tiodL06zf5xxdK8COiDvPnQ27JQ==", "dev": true, "dependencies": { - "@eslint-community/eslint-utils": "^4.2.0", - "@types/json-schema": "^7.0.9", + "@eslint-community/eslint-utils": "^4.3.0", + "@types/json-schema": "^7.0.11", "@types/semver": "^7.3.12", - "@typescript-eslint/scope-manager": "5.59.7", - "@typescript-eslint/types": "5.59.7", - "@typescript-eslint/typescript-estree": "5.59.7", + "@typescript-eslint/scope-manager": "6.0.0", + "@typescript-eslint/types": "6.0.0", + "@typescript-eslint/typescript-estree": "6.0.0", "eslint-scope": "^5.1.1", - "semver": "^7.3.7" + "semver": "^7.5.0" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/typescript-eslint" }, "peerDependencies": { - "eslint": "^6.0.0 || ^7.0.0 || ^8.0.0" + "eslint": "^7.0.0 || ^8.0.0" } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "5.59.7", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-5.59.7.tgz", - "integrity": "sha512-tyN+X2jvMslUszIiYbF0ZleP+RqQsFVpGrKI6e0Eet1w8WmhsAtmzaqm8oM8WJQ1ysLwhnsK/4hYHJjOgJVfQQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.0.0.tgz", + "integrity": "sha512-cvJ63l8c0yXdeT5POHpL0Q1cZoRcmRKFCtSjNGJxPkcP571EfZMcNbzWAc7oK3D1dRzm/V5EwtkANTZxqvuuUA==", "dev": true, "dependencies": { - "@typescript-eslint/types": "5.59.7", - "eslint-visitor-keys": "^3.3.0" + "@typescript-eslint/types": "6.0.0", + "eslint-visitor-keys": "^3.4.1" }, "engines": { - "node": "^12.22.0 || ^14.17.0 || >=16.0.0" + "node": "^16.0.0 || >=18.0.0" }, "funding": { "type": "opencollective", @@ -1677,9 +2099,9 @@ } }, "node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", + "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1740,17 +2162,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/ansi-escapes/node_modules/type-fest": { - "version": "0.21.3", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", - "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/ansi-regex": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", @@ -1964,9 +2375,9 @@ "dev": true }, "node_modules/c8": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/c8/-/c8-7.13.0.tgz", - "integrity": "sha512-/NL4hQTv1gBL6J6ei80zu3IiTrmePDKXKXOTLpHvcIWZTVYQlDhVWjjWvkhICylE8EwwnMVzDZugCvdx0/DIIA==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/c8/-/c8-8.0.0.tgz", + "integrity": "sha512-XHA5vSfCLglAc0Xt8eLBZMv19lgiBSjnb1FLAQgnwkuhJYEonpilhEB4Ea3jPAbm0FhD6VVJrc0z73jPe7JyGQ==", "dev": true, "dependencies": { "@bcoe/v8-coverage": "^0.2.3", @@ -1986,7 +2397,7 @@ "c8": "bin/c8.js" }, "engines": { - "node": ">=10.12.0" + "node": ">=12" } }, "node_modules/caching-transform": { @@ -2039,9 +2450,9 @@ ] }, "node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -2196,11 +2607,11 @@ } }, "node_modules/commander": { - "version": "10.0.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", - "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", + "version": "11.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-11.0.0.tgz", + "integrity": "sha512-9HMlXtt/BNoYr8ooyjjNRdIilOTkVJXB+GhxMTtOKwk0R4j4lS4NpjuqmRxroBfnfTSHQIHQB7wryHhXarNjmQ==", "engines": { - "node": ">=14" + "node": ">=16" } }, "node_modules/commondir": { @@ -2365,9 +2776,9 @@ "dev": true }, "node_modules/esbuild": { - "version": "0.17.19", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz", - "integrity": "sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==", + "version": "0.18.12", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.12.tgz", + "integrity": "sha512-XuOVLDdtsDslXStStduT41op21Ytmf4/BDS46aa3xPJ7X5h2eMWBF1oAe3QjUH3bDksocNXgzGUZ7XHIBya6Tg==", "dev": true, "hasInstallScript": true, "bin": { @@ -2377,28 +2788,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.19", - "@esbuild/android-arm64": "0.17.19", - "@esbuild/android-x64": "0.17.19", - "@esbuild/darwin-arm64": "0.17.19", - "@esbuild/darwin-x64": "0.17.19", - "@esbuild/freebsd-arm64": "0.17.19", - "@esbuild/freebsd-x64": "0.17.19", - "@esbuild/linux-arm": "0.17.19", - "@esbuild/linux-arm64": "0.17.19", - "@esbuild/linux-ia32": "0.17.19", - "@esbuild/linux-loong64": "0.17.19", - "@esbuild/linux-mips64el": "0.17.19", - "@esbuild/linux-ppc64": "0.17.19", - "@esbuild/linux-riscv64": "0.17.19", - "@esbuild/linux-s390x": "0.17.19", - "@esbuild/linux-x64": "0.17.19", - "@esbuild/netbsd-x64": "0.17.19", - "@esbuild/openbsd-x64": "0.17.19", - "@esbuild/sunos-x64": "0.17.19", - "@esbuild/win32-arm64": "0.17.19", - "@esbuild/win32-ia32": "0.17.19", - "@esbuild/win32-x64": "0.17.19" + "@esbuild/android-arm": "0.18.12", + "@esbuild/android-arm64": "0.18.12", + "@esbuild/android-x64": "0.18.12", + "@esbuild/darwin-arm64": "0.18.12", + "@esbuild/darwin-x64": "0.18.12", + "@esbuild/freebsd-arm64": "0.18.12", + "@esbuild/freebsd-x64": "0.18.12", + "@esbuild/linux-arm": "0.18.12", + "@esbuild/linux-arm64": "0.18.12", + "@esbuild/linux-ia32": "0.18.12", + "@esbuild/linux-loong64": "0.18.12", + "@esbuild/linux-mips64el": "0.18.12", + "@esbuild/linux-ppc64": "0.18.12", + "@esbuild/linux-riscv64": "0.18.12", + "@esbuild/linux-s390x": "0.18.12", + "@esbuild/linux-x64": "0.18.12", + "@esbuild/netbsd-x64": "0.18.12", + "@esbuild/openbsd-x64": "0.18.12", + "@esbuild/sunos-x64": "0.18.12", + "@esbuild/win32-arm64": "0.18.12", + "@esbuild/win32-ia32": "0.18.12", + "@esbuild/win32-x64": "0.18.12" } }, "node_modules/escalade": { @@ -2423,16 +2834,16 @@ } }, "node_modules/eslint": { - "version": "8.41.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.41.0.tgz", - "integrity": "sha512-WQDQpzGBOP5IrXPo4Hc0814r4/v2rrIsB0rhT7jtunIalgg6gYXWhRMOejVO8yH21T/FGaxjmFjBMNqcIlmH1Q==", + "version": "8.44.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.44.0.tgz", + "integrity": "sha512-0wpHoUbDUHgNCyvFB5aXLiQVfK9B0at6gUvzy83k4kAsQ/u769TQDX6iKC+aO4upIHO9WSaA3QoXYQDHbNwf1A==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.4.0", - "@eslint/eslintrc": "^2.0.3", - "@eslint/js": "8.41.0", - "@humanwhocodes/config-array": "^0.11.8", + "@eslint/eslintrc": "^2.1.0", + "@eslint/js": "8.44.0", + "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "ajv": "^6.10.0", @@ -2443,7 +2854,7 @@ "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.0", "eslint-visitor-keys": "^3.4.1", - "espree": "^9.5.2", + "espree": "^9.6.0", "esquery": "^1.4.2", "esutils": "^2.0.2", "fast-deep-equal": "^3.1.3", @@ -2463,7 +2874,7 @@ "lodash.merge": "^4.6.2", "minimatch": "^3.1.2", "natural-compare": "^1.4.0", - "optionator": "^0.9.1", + "optionator": "^0.9.3", "strip-ansi": "^6.0.1", "strip-json-comments": "^3.1.0", "text-table": "^0.2.0" @@ -2578,12 +2989,12 @@ } }, "node_modules/espree": { - "version": "9.5.2", - "resolved": "https://registry.npmjs.org/espree/-/espree-9.5.2.tgz", - "integrity": "sha512-7OASN1Wma5fum5SrNhFMAMJxOUAbhyfQ8dQ//PJaJbNw0URTPWqIghHWt1MmAANKhHZIYOHruW4Kw4ruUWOdGw==", + "version": "9.6.0", + "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.0.tgz", + "integrity": "sha512-1FH/IiruXZ84tpUlm0aCUEwMl2Ho5ilqVh0VvQXw+byAz/4SAciyHLlfmL5WYqsvD38oymdUwBss0LtK8m4s/A==", "dev": true, "dependencies": { - "acorn": "^8.8.0", + "acorn": "^8.9.0", "acorn-jsx": "^5.3.2", "eslint-visitor-keys": "^3.4.1" }, @@ -2686,9 +3097,9 @@ "dev": true }, "node_modules/fast-glob": { - "version": "3.2.12", - "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.12.tgz", - "integrity": "sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.0.tgz", + "integrity": "sha512-ChDuvbOypPuNjO8yIDf36x7BlZX1smcUMTTcyoIjycexOxd6DFsKsg21qVBzEmr3G7fUKIRy2/psii+CIUt7FA==", "dev": true, "dependencies": { "@nodelib/fs.stat": "^2.0.2", @@ -2992,6 +3403,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/globals/node_modules/type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", + "dev": true, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -3938,17 +4361,17 @@ } }, "node_modules/optionator": { - "version": "0.9.1", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", - "integrity": "sha512-74RlY5FCnhq4jRxVUPKDaRwrVNXMqsGsiW6AJw4XK8hmtm10wC0ypZBLw5IIp85NZMr91+qd1RvvENwg7jjRFw==", + "version": "0.9.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz", + "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==", "dev": true, "dependencies": { + "@aashutoshrathi/word-wrap": "^1.2.3", "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", "levn": "^0.4.1", "prelude-ls": "^1.2.1", - "type-check": "^0.4.0", - "word-wrap": "^1.2.3" + "type-check": "^0.4.0" }, "engines": { "node": ">= 0.8.0" @@ -4203,15 +4626,15 @@ } }, "node_modules/prettier": { - "version": "2.8.8", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.8.8.tgz", - "integrity": "sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.0.tgz", + "integrity": "sha512-zBf5eHpwHOGPC47h0zrPyNn+eAEIdEzfywMoYn2XPi0P44Zp0tSq64rq0xAREh4auw2cJZHo9QUob+NqCQky4g==", "dev": true, "bin": { - "prettier": "bin-prettier.js" + "prettier": "bin/prettier.cjs" }, "engines": { - "node": ">=10.13.0" + "node": ">=14" }, "funding": { "url": "https://github.com/prettier/prettier?sponsor=1" @@ -4377,9 +4800,9 @@ } }, "node_modules/rollup": { - "version": "3.23.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.23.0.tgz", - "integrity": "sha512-h31UlwEi7FHihLe1zbk+3Q7z1k/84rb9BSwmBSr/XjOCEaBJ2YyedQDuM0t/kfOS0IxM+vk1/zI9XxYj9V+NJQ==", + "version": "3.26.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.26.2.tgz", + "integrity": "sha512-6umBIGVz93er97pMgQO08LuH3m6PUb3jlDUUGFsNJB6VgTCUaDFpupf5JfU30529m/UKOgmiX+uY6Sx8cOYpLA==", "dev": true, "bin": { "rollup": "dist/bin/rollup" @@ -4414,9 +4837,9 @@ } }, "node_modules/rollup-plugin-node-externals": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-externals/-/rollup-plugin-node-externals-6.0.1.tgz", - "integrity": "sha512-PIZKc0j44MAzEz9XqWfZ8vbjavWbs9fehh3LHsSB1WF5bdTjz5B8qVuaWiAzdd0tKOjjR/lh8f9Qv6bpLUTllg==", + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/rollup-plugin-node-externals/-/rollup-plugin-node-externals-6.1.1.tgz", + "integrity": "sha512-127OFMkpH5rBVlRHRBDUMk1m1sGuzbGy7so5aj/IkpUb2r3+wOWjR/erUzd2ChEQWPsxsyQG6xpYYvPBAdcBRA==", "dev": true, "engines": { "node": ">=16.0.0" @@ -4485,9 +4908,9 @@ ] }, "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz", + "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==", "dev": true, "dependencies": { "lru-cache": "^6.0.0" @@ -4673,9 +5096,9 @@ } }, "node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", + "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dependencies": { "ansi-regex": "^6.0.1" }, @@ -4731,9 +5154,9 @@ } }, "node_modules/tap": { - "version": "16.3.4", - "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.4.tgz", - "integrity": "sha512-SAexdt2ZF4XBgye6TPucFI2y7VE0qeFXlXucJIV1XDPCs+iJodk0MYacr1zR6Ycltzz7PYg8zrblDXKbAZM2LQ==", + "version": "16.3.7", + "resolved": "https://registry.npmjs.org/tap/-/tap-16.3.7.tgz", + "integrity": "sha512-AaovVsfXVKcIf9eD1NxgwIqSDz5LauvybTpS6bjAKVYqz3+iavHC1abwxTkXmswb2n7eq8qKLt8DvY3D6iWcYA==", "bundleDependencies": [ "ink", "treport", @@ -4858,31 +5281,32 @@ } }, "node_modules/tap/node_modules/@ampproject/remapping": { - "version": "2.1.2", + "version": "2.2.1", "dev": true, "inBundle": true, "license": "Apache-2.0", "dependencies": { - "@jridgewell/trace-mapping": "^0.3.0" + "@jridgewell/gen-mapping": "^0.3.0", + "@jridgewell/trace-mapping": "^0.3.9" }, "engines": { "node": ">=6.0.0" } }, "node_modules/tap/node_modules/@babel/code-frame": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/highlight": "^7.16.7" + "@babel/highlight": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/compat-data": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", @@ -4891,25 +5315,25 @@ } }, "node_modules/tap/node_modules/@babel/core": { - "version": "7.17.8", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@ampproject/remapping": "^2.1.0", - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.7", - "@babel/helper-compilation-targets": "^7.17.7", - "@babel/helper-module-transforms": "^7.17.7", - "@babel/helpers": "^7.17.8", - "@babel/parser": "^7.17.8", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0", + "@ampproject/remapping": "^2.2.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-compilation-targets": "^7.22.5", + "@babel/helper-module-transforms": "^7.22.5", + "@babel/helpers": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", + "json5": "^2.2.2", "semver": "^6.3.0" }, "engines": { @@ -4921,40 +5345,42 @@ } }, "node_modules/tap/node_modules/@babel/generator": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.17.0", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" + "@babel/types": "^7.22.5", + "@jridgewell/gen-mapping": "^0.3.2", + "@jridgewell/trace-mapping": "^0.3.17", + "jsesc": "^2.5.1" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-annotate-as-pure": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-compilation-targets": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.17.7", - "@babel/helper-validator-option": "^7.16.7", - "browserslist": "^4.17.5", + "@babel/compat-data": "^7.22.5", + "@babel/helper-validator-option": "^7.22.5", + "browserslist": "^4.21.3", + "lru-cache": "^5.1.1", "semver": "^6.3.0" }, "engines": { @@ -4965,88 +5391,72 @@ } }, "node_modules/tap/node_modules/@babel/helper-environment-visitor": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", - "dependencies": { - "@babel/types": "^7.16.7" - }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-function-name": { - "version": "7.16.7", - "dev": true, - "inBundle": true, - "license": "MIT", - "dependencies": { - "@babel/helper-get-function-arity": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/types": "^7.16.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/tap/node_modules/@babel/helper-get-function-arity": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/template": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-hoist-variables": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-module-imports": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-module-transforms": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-simple-access": "^7.17.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/helper-validator-identifier": "^7.16.7", - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-simple-access": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", @@ -5055,31 +5465,40 @@ } }, "node_modules/tap/node_modules/@babel/helper-simple-access": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.17.0" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/helper-split-export-declaration": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/types": "^7.16.7" + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, + "node_modules/tap/node_modules/@babel/helper-string-parser": { + "version": "7.22.5", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, "node_modules/tap/node_modules/@babel/helper-validator-identifier": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", @@ -5088,7 +5507,7 @@ } }, "node_modules/tap/node_modules/@babel/helper-validator-option": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", @@ -5097,26 +5516,26 @@ } }, "node_modules/tap/node_modules/@babel/helpers": { - "version": "7.17.8", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/template": "^7.16.7", - "@babel/traverse": "^7.17.3", - "@babel/types": "^7.17.0" + "@babel/template": "^7.22.5", + "@babel/traverse": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/highlight": { - "version": "7.16.10", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-validator-identifier": "^7.22.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" }, @@ -5125,7 +5544,7 @@ } }, "node_modules/tap/node_modules/@babel/parser": { - "version": "7.17.8", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", @@ -5137,16 +5556,16 @@ } }, "node_modules/tap/node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.17.3", + "version": "7.20.7", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/compat-data": "^7.17.0", - "@babel/helper-compilation-targets": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", + "@babel/compat-data": "^7.20.5", + "@babel/helper-compilation-targets": "^7.20.7", + "@babel/helper-plugin-utils": "^7.20.2", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.16.7" + "@babel/plugin-transform-parameters": "^7.20.7" }, "engines": { "node": ">=6.9.0" @@ -5156,12 +5575,12 @@ } }, "node_modules/tap/node_modules/@babel/plugin-syntax-jsx": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -5183,12 +5602,12 @@ } }, "node_modules/tap/node_modules/@babel/plugin-transform-destructuring": { - "version": "7.17.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -5198,12 +5617,12 @@ } }, "node_modules/tap/node_modules/@babel/plugin-transform-parameters": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-plugin-utils": "^7.16.7" + "@babel/helper-plugin-utils": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -5213,16 +5632,16 @@ } }, "node_modules/tap/node_modules/@babel/plugin-transform-react-jsx": { - "version": "7.17.3", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-annotate-as-pure": "^7.16.7", - "@babel/helper-module-imports": "^7.16.7", - "@babel/helper-plugin-utils": "^7.16.7", - "@babel/plugin-syntax-jsx": "^7.16.7", - "@babel/types": "^7.17.0" + "@babel/helper-annotate-as-pure": "^7.22.5", + "@babel/helper-module-imports": "^7.22.5", + "@babel/helper-plugin-utils": "^7.22.5", + "@babel/plugin-syntax-jsx": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" @@ -5232,33 +5651,33 @@ } }, "node_modules/tap/node_modules/@babel/template": { - "version": "7.16.7", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/parser": "^7.16.7", - "@babel/types": "^7.16.7" + "@babel/code-frame": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5" }, "engines": { "node": ">=6.9.0" } }, "node_modules/tap/node_modules/@babel/traverse": { - "version": "7.17.3", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/code-frame": "^7.16.7", - "@babel/generator": "^7.17.3", - "@babel/helper-environment-visitor": "^7.16.7", - "@babel/helper-function-name": "^7.16.7", - "@babel/helper-hoist-variables": "^7.16.7", - "@babel/helper-split-export-declaration": "^7.16.7", - "@babel/parser": "^7.17.3", - "@babel/types": "^7.17.0", + "@babel/code-frame": "^7.22.5", + "@babel/generator": "^7.22.5", + "@babel/helper-environment-visitor": "^7.22.5", + "@babel/helper-function-name": "^7.22.5", + "@babel/helper-hoist-variables": "^7.22.5", + "@babel/helper-split-export-declaration": "^7.22.5", + "@babel/parser": "^7.22.5", + "@babel/types": "^7.22.5", "debug": "^4.1.0", "globals": "^11.1.0" }, @@ -5267,12 +5686,13 @@ } }, "node_modules/tap/node_modules/@babel/types": { - "version": "7.17.0", + "version": "7.22.5", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@babel/helper-validator-identifier": "^7.16.7", + "@babel/helper-string-parser": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.5", "to-fast-properties": "^2.0.0" }, "engines": { @@ -5299,8 +5719,31 @@ "node": ">=10" } }, + "node_modules/tap/node_modules/@jridgewell/gen-mapping": { + "version": "0.3.3", + "dev": true, + "inBundle": true, + "license": "MIT", + "dependencies": { + "@jridgewell/set-array": "^1.0.1", + "@jridgewell/sourcemap-codec": "^1.4.10", + "@jridgewell/trace-mapping": "^0.3.9" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/tap/node_modules/@jridgewell/resolve-uri": { - "version": "3.0.5", + "version": "3.1.0", + "dev": true, + "inBundle": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/tap/node_modules/@jridgewell/set-array": { + "version": "1.1.2", "dev": true, "inBundle": true, "license": "MIT", @@ -5309,29 +5752,35 @@ } }, "node_modules/tap/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.11", + "version": "1.4.15", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/@jridgewell/trace-mapping": { - "version": "0.3.4", + "version": "0.3.18", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "@jridgewell/resolve-uri": "^3.0.3", - "@jridgewell/sourcemap-codec": "^1.4.10" + "@jridgewell/resolve-uri": "3.1.0", + "@jridgewell/sourcemap-codec": "1.4.14" } }, + "node_modules/tap/node_modules/@jridgewell/trace-mapping/node_modules/@jridgewell/sourcemap-codec": { + "version": "1.4.14", + "dev": true, + "inBundle": true, + "license": "MIT" + }, "node_modules/tap/node_modules/@types/prop-types": { - "version": "15.7.4", + "version": "15.7.5", "dev": true, "inBundle": true, "license": "MIT" }, "node_modules/tap/node_modules/@types/react": { - "version": "17.0.52", + "version": "17.0.62", "dev": true, "inBundle": true, "license": "MIT", @@ -5342,7 +5791,7 @@ } }, "node_modules/tap/node_modules/@types/scheduler": { - "version": "0.16.2", + "version": "0.16.3", "dev": true, "inBundle": true, "license": "MIT" @@ -5445,7 +5894,7 @@ } }, "node_modules/tap/node_modules/browserslist": { - "version": "4.20.2", + "version": "4.21.9", "dev": true, "funding": [ { @@ -5455,16 +5904,19 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "inBundle": true, "license": "MIT", "dependencies": { - "caniuse-lite": "^1.0.30001317", - "electron-to-chromium": "^1.4.84", - "escalade": "^3.1.1", - "node-releases": "^2.0.2", - "picocolors": "^1.0.0" + "caniuse-lite": "^1.0.30001503", + "electron-to-chromium": "^1.4.431", + "node-releases": "^2.0.12", + "update-browserslist-db": "^1.0.11" }, "bin": { "browserslist": "cli.js" @@ -5507,7 +5959,7 @@ } }, "node_modules/tap/node_modules/caniuse-lite": { - "version": "1.0.30001319", + "version": "1.0.30001506", "dev": true, "funding": [ { @@ -5517,6 +5969,10 @@ { "type": "tidelift", "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" } ], "inBundle": true, @@ -5635,13 +6091,10 @@ "license": "MIT" }, "node_modules/tap/node_modules/convert-source-map": { - "version": "1.8.0", + "version": "1.9.0", "dev": true, "inBundle": true, - "license": "MIT", - "dependencies": { - "safe-buffer": "~5.1.1" - } + "license": "MIT" }, "node_modules/tap/node_modules/convert-to-spaces": { "version": "1.0.2", @@ -5653,7 +6106,7 @@ } }, "node_modules/tap/node_modules/csstype": { - "version": "3.0.11", + "version": "3.1.2", "dev": true, "inBundle": true, "license": "MIT" @@ -5676,7 +6129,7 @@ } }, "node_modules/tap/node_modules/electron-to-chromium": { - "version": "1.4.89", + "version": "1.4.438", "dev": true, "inBundle": true, "license": "ISC" @@ -6026,6 +6479,15 @@ "loose-envify": "cli.js" } }, + "node_modules/tap/node_modules/lru-cache": { + "version": "5.1.1", + "dev": true, + "inBundle": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, "node_modules/tap/node_modules/make-dir": { "version": "3.1.0", "dev": true, @@ -6063,7 +6525,7 @@ } }, "node_modules/tap/node_modules/minipass": { - "version": "3.3.4", + "version": "3.3.6", "dev": true, "inBundle": true, "license": "ISC", @@ -6074,6 +6536,12 @@ "node": ">=8" } }, + "node_modules/tap/node_modules/minipass/node_modules/yallist": { + "version": "4.0.0", + "dev": true, + "inBundle": true, + "license": "ISC" + }, "node_modules/tap/node_modules/ms": { "version": "2.1.2", "dev": true, @@ -6081,7 +6549,7 @@ "license": "MIT" }, "node_modules/tap/node_modules/node-releases": { - "version": "2.0.2", + "version": "2.0.12", "dev": true, "inBundle": true, "license": "MIT" @@ -6201,7 +6669,7 @@ } }, "node_modules/tap/node_modules/punycode": { - "version": "2.1.1", + "version": "2.3.0", "dev": true, "inBundle": true, "license": "MIT", @@ -6223,7 +6691,7 @@ } }, "node_modules/tap/node_modules/react-devtools-core": { - "version": "4.24.1", + "version": "4.27.8", "dev": true, "inBundle": true, "license": "MIT", @@ -6295,12 +6763,6 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/tap/node_modules/safe-buffer": { - "version": "5.1.2", - "dev": true, - "inBundle": true, - "license": "MIT" - }, "node_modules/tap/node_modules/scheduler": { "version": "0.20.2", "dev": true, @@ -6321,10 +6783,13 @@ } }, "node_modules/tap/node_modules/shell-quote": { - "version": "1.7.3", + "version": "1.8.1", "dev": true, "inBundle": true, - "license": "MIT" + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, "node_modules/tap/node_modules/signal-exit": { "version": "3.0.7", @@ -6379,17 +6844,8 @@ "inBundle": true, "license": "MIT" }, - "node_modules/tap/node_modules/source-map": { - "version": "0.5.7", - "dev": true, - "inBundle": true, - "license": "BSD-3-Clause", - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/tap/node_modules/stack-utils": { - "version": "2.0.5", + "version": "2.0.6", "dev": true, "inBundle": true, "license": "MIT", @@ -6581,34 +7037,42 @@ } }, "node_modules/tap/node_modules/unicode-length": { - "version": "2.0.2", + "version": "2.1.0", "dev": true, "inBundle": true, "license": "MIT", "dependencies": { - "punycode": "^2.0.0", - "strip-ansi": "^3.0.1" - } - }, - "node_modules/tap/node_modules/unicode-length/node_modules/ansi-regex": { - "version": "2.1.1", - "dev": true, - "inBundle": true, - "license": "MIT", - "engines": { - "node": ">=0.10.0" + "punycode": "^2.0.0" } }, - "node_modules/tap/node_modules/unicode-length/node_modules/strip-ansi": { - "version": "3.0.1", + "node_modules/tap/node_modules/update-browserslist-db": { + "version": "1.0.11", "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], "inBundle": true, "license": "MIT", "dependencies": { - "ansi-regex": "^2.0.0" + "escalade": "^3.1.1", + "picocolors": "^1.0.0" }, - "engines": { - "node": ">=0.10.0" + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" } }, "node_modules/tap/node_modules/which": { @@ -6692,7 +7156,7 @@ "license": "ISC" }, "node_modules/tap/node_modules/ws": { - "version": "7.5.7", + "version": "7.5.9", "dev": true, "inBundle": true, "license": "MIT", @@ -6713,7 +7177,7 @@ } }, "node_modules/tap/node_modules/yallist": { - "version": "4.0.0", + "version": "3.1.1", "dev": true, "inBundle": true, "license": "ISC" @@ -6801,27 +7265,26 @@ "node": ">= 8" } }, - "node_modules/tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", - "dev": true - }, - "node_modules/tsutils": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.21.0.tgz", - "integrity": "sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA==", + "node_modules/ts-api-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.0.1.tgz", + "integrity": "sha512-lC/RGlPmwdrIBFTX59wwNzqh7aR2otPNPR/5brHZm/XKFYKsfqxihXUe9pU3JI+3vGkl+vyCoNNnPhJn3aLK1A==", "dev": true, - "dependencies": { - "tslib": "^1.8.1" - }, "engines": { - "node": ">= 6" + "node": ">=16.13.0" }, "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" + "typescript": ">=4.2.0" } }, + "node_modules/tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true, + "optional": true, + "peer": true + }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", @@ -6835,10 +7298,9 @@ } }, "node_modules/type-fest": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", - "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==", - "dev": true, + "version": "0.21.3", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", + "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "engines": { "node": ">=10" }, @@ -6856,16 +7318,16 @@ } }, "node_modules/typescript": { - "version": "5.0.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.0.4.tgz", - "integrity": "sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw==", + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.1.6.tgz", + "integrity": "sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA==", "dev": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" }, "engines": { - "node": ">=12.20" + "node": ">=14.17" } }, "node_modules/unicode-length": { @@ -6968,15 +7430,6 @@ "integrity": "sha512-B+enWhmw6cjfVC7kS8Pj9pCrKSc5txArRyaYGe088shv/FGWH+0Rjx/xPgtsWfsUtS27FkP697E4DDhgrgoc0Q==", "dev": true }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/wrap-ansi": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", diff --git a/package.json b/package.json index 5252a40..5870c92 100644 --- a/package.json +++ b/package.json @@ -30,38 +30,38 @@ "@rollup/plugin-json": "^6.0.0", "@rollup/plugin-replace": "^5.0.2", "@rollup/plugin-run": "^3.0.1", - "@rollup/plugin-typescript": "^11.1.1", - "@types/node": "^20.2.3", + "@rollup/plugin-typescript": "^11.1.2", + "@types/node": "^18.16.19", "@types/tap": "^15.0.8", "@types/which": "^3.0.0", - "@typescript-eslint/eslint-plugin": "^5.59.7", - "@typescript-eslint/parser": "^5.59.7", - "c8": "^7.13.0", - "esbuild": "^0.17.19", - "eslint": "^8.41.0", + "@typescript-eslint/eslint-plugin": "^6.0.0", + "@typescript-eslint/parser": "^6.0.0", + "c8": "^8.0.0", + "esbuild": "^0.18.12", + "eslint": "^8.44.0", "eslint-config-prettier": "^8.8.0", - "prettier": "^2.8.8", - "rollup": "^3.23.0", + "prettier": "^3.0.0", + "rollup": "^3.26.2", "rollup-plugin-esbuild": "^5.0.0", - "rollup-plugin-node-externals": "^6.0.1", + "rollup-plugin-node-externals": "^6.1.1", "rollup-plugin-typescript-paths": "^1.4.0", - "tap": "^16.3.4", - "typescript": "^5.0.4" + "tap": "^16.3.7", + "typescript": "^5.1.6" }, "engines": { "node": ">=18.14.0", "npm": ">=9.3.1" }, "dependencies": { - "@commander-js/extra-typings": "^10.0.3", - "@inquirer/confirm": "^1.0.11", - "@inquirer/input": "^1.1.2", - "@inquirer/password": "^1.0.11", - "chalk": "^5.2.0", - "commander": "^10.0.1", + "@commander-js/extra-typings": "^11.0.0", + "@inquirer/confirm": "^2.0.5", + "@inquirer/input": "^1.2.4", + "@inquirer/password": "^1.1.4", + "chalk": "^5.3.0", + "commander": "^11.0.0", "log-symbols": "^5.1.0", "ora": "^6.3.1", - "strip-ansi": "^7.0.1", + "strip-ansi": "^7.1.0", "which": "^3.0.1" } } diff --git a/src/commands/advanced.ts b/src/commands/advanced.ts new file mode 100644 index 0000000..cd55cf9 --- /dev/null +++ b/src/commands/advanced.ts @@ -0,0 +1,93 @@ +import { config_overwrite } from '@/config/config-overwrite'; +import { advanced_config } from '@/config/advanced'; +import { createCommand } from '@/utils/commands'; +import { exit_fail_on_error } from '@/utils/process'; +import { validation_spinner } from '@/validation/validation-spinner'; +import { validate_timezone } from '@/validation/timezone'; +import { validate_kbd_layout } from '@/validation/kbd_layout'; +import { validate_key_path } from '@/validation/ssh'; +import { validate_hostname } from '@/validation/hostname'; + +const name = 'advanced'; +const description = 'create advanced headless setup file'; + +const advanced_command = createCommand(name, description) + .requiredOption('-t, --timezone ', 'set the timezone') + .requiredOption('-l, --kbd-layout ', 'set the keyboard layout') + .option( + '-k, --ssh-key ', + 'specify the path to the public SSH key' + ) + .option( + '-d, --ssh-password-disable', + 'disable password authentication for SSH', + false + ) + .option('-h, --hostname ', 'set the hostname', 'raspberrypi') + .option('-y, --yes', 'overwrite file if exists', false) + .option( + '-s, --script', + 'it will run it as a script and will disable every interactive prompt', + false + ); + +advanced_command.action(async (options) => { + await exit_fail_on_error(async () => { + await validation_spinner({ + name: 'hostname', + value: options.hostname, + fn: async () => validate_hostname(options.hostname), + }); + + await validation_spinner({ + name: 'timezone', + value: options.timezone, + fn: async () => validate_timezone(options.timezone), + }); + + await validation_spinner({ + name: 'keyboard layout', + value: options.kbdLayout, + fn: async () => validate_kbd_layout(options.kbdLayout), + }); + + if (options.sshKey) { + await validation_spinner({ + name: 'timezone', + value: options.sshKey, + fn: async () => validate_key_path(options.sshKey!), + }); + } else if (options.sshPasswordDisable) { + await validation_spinner({ + name: 'SSH disable password', + value: `${options.sshPasswordDisable}`, + fn: async () => { + throw new Error( + 'to disable SSH password login you MUST provide an SSH key' + ); + }, + }); + } + }); + + await exit_fail_on_error(async () => { + await config_overwrite({ + name: `advanced`, + fn: async (overwrite: boolean) => + await advanced_config({ + overwrite, + hostname: options.hostname, + timezone: options.timezone, + kbd_layout: options.kbdLayout, + ssh: { + key_path: options.sshKey, + disable_password_login: options.sshPasswordDisable, + }, + }), + overwrite: options.yes, + retry: !options.script, + }); + }); +}); + +export default advanced_command; diff --git a/src/config/advanced.ts b/src/config/advanced.ts new file mode 100644 index 0000000..7b6c116 --- /dev/null +++ b/src/config/advanced.ts @@ -0,0 +1,61 @@ +import { throw_if_file_exists, throw_if_file_not_exists } from '@/utils/fs'; +import { readFile, writeFile } from 'node:fs/promises'; +import * as a from '@/utils/advanced'; + +/** + * For headless setup of advanced configuration refer to the following discussion and resource + * + * @link https://github.com/RPi-Distro/raspberrypi-sys-mods/pull/40#issuecomment-849552711 + * @link https://github.com/raspberrypi/rpi-imager/blob/5fa3fbe8dcef4ab01c0a2fed5638759265c3f7f6/src/OptionsPopup.qml + * + * The customization used here is based on what the raspberry pi imager does + */ +export const advanced_config = async ({ + overwrite = false, + hostname, + ssh, + timezone, + kbd_layout, +}: { + overwrite?: boolean; + hostname: string; + ssh: { key_path?: string; disable_password_login?: boolean }; + timezone: string; + kbd_layout: string; +}) => { + const firstrun = 'firstrun.sh'; + if (!overwrite) { + await throw_if_file_exists(firstrun); + } + const cmdline = 'cmdline.txt'; + await throw_if_file_not_exists(cmdline); + + const firstrun_content = [ + a.start(), + a.set_hostname(hostname), + ssh.key_path !== undefined + ? a.set_ssh_key(await readFile(ssh.key_path, { encoding: 'utf-8' })) + : undefined, + ssh.disable_password_login ? a.set_ssh_disable_password_login() : undefined, + a.set_timezone(timezone), + a.set_kdb_layout(kbd_layout), + a.end(), + ] + .filter((el) => el !== undefined) + .join('\n'); + + await writeFile(firstrun, firstrun_content); + + // Update cmdline + const cmdline_content = await readFile(cmdline, { encoding: 'utf-8' }); + const cmdline_updated_content = cmdline_content + .replaceAll(/systemd\.[^ ]+/g, '') // Remove previous systemd.* statements + .replace( + /init=[^ ]+/, + `init=/usr/lib/raspberrypi-sys-mods/firstboot systemd.run=/boot/${firstrun} systemd.run_success_action=reboot systemd.unit=kernel-command-line.target` + ); // Remove previous init=* statement + + await writeFile(cmdline, cmdline_updated_content, { + mode: 0o755, + }); +}; diff --git a/src/const/regex.ts b/src/const/regex.ts index e3928de..d12768b 100644 --- a/src/const/regex.ts +++ b/src/const/regex.ts @@ -2,3 +2,6 @@ export const user_regex = /^[a-z_][a-z0-9_-]*[$]?$/; export const ssid_regex = /^[^!#;+\]/"\t][^+\]/"\t]{0,30}[^ !#;+\]/"\t]$|^[^ !#;+\]/"\t]$/; + +export const hostname_regex = + /^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/; diff --git a/src/errors/file-not-exists-error.ts b/src/errors/file-not-exists-error.ts new file mode 100644 index 0000000..690cb60 --- /dev/null +++ b/src/errors/file-not-exists-error.ts @@ -0,0 +1,7 @@ +import { CustomError } from './custom-error'; + +export class FileNotExistsError extends CustomError { + constructor(message: string) { + super(message); + } +} diff --git a/src/index.ts b/src/index.ts index 72c5be0..b98b282 100644 --- a/src/index.ts +++ b/src/index.ts @@ -2,6 +2,7 @@ import { config_overwrite } from './config/config-overwrite'; import { ssh_config } from './config/ssh'; import { user_config } from './config/user'; import { wifi_config } from './config/wifi'; +import { advanced_config } from './config/advanced'; import { check_dependency_spinner } from './dependencies/check-dependency-spinner'; import { openssl } from './dependencies/openssl'; import { logger } from './logger'; @@ -9,6 +10,7 @@ import { confirm_creation_prompt } from './prompts/confirm-creation'; import { ssh_prompt } from './prompts/ssh'; import { user_prompt } from './prompts/user'; import { wifi_prompt } from './prompts/wifi'; +import { advanced_prompt } from './prompts/advanced'; import { exit_fail_on_error, exit_success } from './utils/process'; import { deep_redact } from './utils/redact'; @@ -18,12 +20,14 @@ import { name, description } from './config'; import ssh_command from './commands/ssh'; import user_command from './commands/user'; import wifi_command from './commands/wifi'; +import advanced_command from './commands/advanced'; const program = createCommand(name, description); program.addCommand(ssh_command); program.addCommand(user_command); program.addCommand(wifi_command); +program.addCommand(advanced_command); program.addHelpCommand(); program.action(async () => { @@ -35,8 +39,11 @@ program.action(async () => { const ssh = await ssh_prompt(); const user = await user_prompt('*'); const wifi = await wifi_prompt('*'); + const advanced = await advanced_prompt({ + ssh_enabled: ssh.enable, + }); - if (!ssh.enable && !user.enable && !wifi.enable) { + if (!ssh.enable && !user.enable && !wifi.enable && !advanced.enable) { await exit_success(() => { logger.empty(); logger.info('No configuration file created'); @@ -48,6 +55,7 @@ program.action(async () => { ssh, user: deep_redact(user, ['password']), wifi: deep_redact(wifi, ['psk']), + advanced, }; // Ask for confirmation @@ -108,6 +116,24 @@ program.action(async () => { }); }); } + + if (advanced.enable) { + await exit_fail_on_error(async () => { + await config_overwrite({ + name: `Advanced`, + fn: async (overwrite: boolean) => + await advanced_config({ + overwrite, + hostname: advanced.hostname, + timezone: advanced.timezone, + kbd_layout: advanced.kbd_layout, + ssh: advanced.ssh, + }), + overwrite: false, + retry: true, + }); + }); + } }); program.parse(process.argv); diff --git a/src/prompts/advanced.ts b/src/prompts/advanced.ts new file mode 100644 index 0000000..d8b9715 --- /dev/null +++ b/src/prompts/advanced.ts @@ -0,0 +1,85 @@ +import { kbd_layout_by_locale } from '@/utils/keyboard-layouts'; +import { get_country_from_locale, get_locale_country } from '@/utils/locale'; +import { get_timezone } from '@/utils/timezone'; +import { async_error_to_msg, error_to_msg } from '@/utils/validation'; +import { validate_kbd_layout } from '@/validation/kbd_layout'; +import { validate_timezone } from '@/validation/timezone'; +import confirm from '@inquirer/confirm'; +import input from '@inquirer/input'; +import chalk from 'chalk'; +import { Advanced } from './types'; +import { validate_key_path } from '@/validation/ssh'; +import { validate_hostname } from '@/validation/hostname'; + +// Prop +export const advanced_prompt = async ({ + ssh_enabled, +}: { + ssh_enabled: boolean; +}) => { + const enable = await confirm({ + message: 'Set advanced settings', + default: false, + }); + + const hostname = await input({ + message: 'Set hostname', + default: 'raspberrypi', + validate: (proposed_hostname) => + error_to_msg(() => validate_hostname(proposed_hostname)), + }); + + const ssh: { + key_path?: string; + disable_password_login?: boolean; + } = {}; + + if (ssh_enabled) { + const enable_pub_key = await confirm({ + message: 'Add public key', + default: true, + }); + + if (enable_pub_key) { + ssh.key_path = await input({ + message: `Public key path ${chalk.reset.dim( + `(cwd: ${process.cwd()})` + )}`, + validate: async (proposed_key_path) => + await async_error_to_msg( + async () => await validate_key_path(proposed_key_path) + ), + }); + + ssh.disable_password_login = await confirm({ + message: 'Disable password login', + default: false, + }); + } + } + + const timezone = await input({ + message: 'Set timezone', + default: get_timezone(), + validate: (proposed_timezone) => + error_to_msg(() => validate_timezone(proposed_timezone)), + }); + + const kbd_layout = await input({ + message: 'Keyboard layout', + default: + kbd_layout_by_locale.get( + get_country_from_locale(get_locale_country()) as any + ) ?? '', + validate: (proposed_kbd_layout) => + error_to_msg(() => validate_kbd_layout(proposed_kbd_layout)), + }); + + return { + enable, + hostname, + ssh, + timezone, + kbd_layout, + }; +}; diff --git a/src/prompts/types.ts b/src/prompts/types.ts index a530edd..7434902 100644 --- a/src/prompts/types.ts +++ b/src/prompts/types.ts @@ -18,3 +18,12 @@ export type WiFi = Pretty< country_code: string; } >; + +export type Advanced = Pretty< + CommonProperties & { + hostname: string; + ssh: { key_path?: string; disable_password_login?: boolean }; + timezone: string; + kbd_layout: string; + } +>; diff --git a/src/utils/advanced.ts b/src/utils/advanced.ts new file mode 100644 index 0000000..255e4ef --- /dev/null +++ b/src/utils/advanced.ts @@ -0,0 +1,66 @@ +/** + * The parts of the script used here are based on the following resource + * + * @link https://github.com/raspberrypi/rpi-imager/blob/5fa3fbe8dcef4ab01c0a2fed5638759265c3f7f6/src/OptionsPopup.qml + * + * This customization is based on what the raspberry pi imager does + */ + +export const start = () => { + return `#!/bin/bash + +set +e +`; +}; + +export const set_ssh_key = (key: string) => { + return `# Set SSH key +FIRSTUSER=\`getent passwd 1000 | cut -d: -f1\` +FIRSTUSERHOME=\`getent passwd 1000 | cut -d: -f6\` +install -o "$FIRSTUSER" -m 700 -d "$FIRSTUSERHOME/.ssh" +install -o "$FIRSTUSER" -m 600 <(printf "${key}") "$FIRSTUSERHOME/.ssh/authorized_keys" +`; +}; + +export const set_ssh_disable_password_login = () => { + return `# Disable SSH password login +echo 'PasswordAuthentication no' >> /etc/ssh/sshd_config +`; +}; + +export const set_kdb_layout = (kbd_layout: string) => { + return `# Set keyboard layout +cat >/etc/default/keyboard <<'KBEOF' +XKBMODEL="pc105" +XKBLAYOUT="${kbd_layout}" +XKBVARIANT="" +XKBOPTIONS="" + +KBEOF +dpkg-reconfigure -f noninteractive keyboard-configuration +`; +}; + +export const set_timezone = (timezone: string) => { + return `# Set timezone +rm -f /etc/localtime +echo "${timezone}" >/etc/timezone +dpkg-reconfigure -f noninteractive tzdata +`; +}; + +export const set_hostname = (hostname: string) => { + return `# Set hostname +CURRENT_HOSTNAME=\`cat /etc/hostname | tr -d " \\t\\n\\r"\` +echo ${hostname} >/etc/hostname +sed -i "s/127.0.1.1.*$CURRENT_HOSTNAME/127.0.1.1\\t${hostname}/g" /etc/hosts +`; +}; + +export const end = () => { + return `# Remove this script +rm -f /boot/firstrun.sh +sed -i 's| systemd.run.*||g' /boot/cmdline.txt +exit 0 +`; +}; diff --git a/src/utils/country-codes.ts b/src/utils/country-codes.ts index 6dc399f..46686b3 100644 --- a/src/utils/country-codes.ts +++ b/src/utils/country-codes.ts @@ -1,4 +1,4 @@ -export const iso_3166_codes: ReadonlySet = new Set([ +const _iso_3166_codes = [ 'AF', 'AL', 'DZ', @@ -249,7 +249,9 @@ export const iso_3166_codes: ReadonlySet = new Set([ 'SX', 'SS', 'XK', -]); +] as const; +export type ISO_3166_Codes = (typeof _iso_3166_codes)[number]; +export const iso_3166_codes: ReadonlySet = new Set(_iso_3166_codes); export const is_country_code_valid = (country_code: string) => { return country_code !== '' ? iso_3166_codes.has(country_code) : false; diff --git a/src/utils/fs.ts b/src/utils/fs.ts index eeee5ca..c2ae592 100644 --- a/src/utils/fs.ts +++ b/src/utils/fs.ts @@ -1,4 +1,5 @@ import { FileExistsError } from '@/errors/file-exists-error'; +import { FileNotExistsError } from '@/errors/file-not-exists-error'; import { access, constants } from 'fs/promises'; export const exists = async (path: string) => { @@ -15,3 +16,9 @@ export const throw_if_file_exists = async (path: string) => { throw new FileExistsError(`File '${path}' already exists`); } }; + +export const throw_if_file_not_exists = async (path: string) => { + if (!(await exists(path))) { + throw new FileNotExistsError(`File '${path}' does not exist`); + } +}; diff --git a/src/utils/keyboard-layouts.ts b/src/utils/keyboard-layouts.ts new file mode 100644 index 0000000..cc78115 --- /dev/null +++ b/src/utils/keyboard-layouts.ts @@ -0,0 +1,361 @@ +import { ISO_3166_Codes } from './country-codes'; + +// Obtained with `localectl list-x11-keymap-layouts` +export const _kbd_layouts = [ + 'af', + 'al', + 'am', + 'usa', + 'at', + 'au', + 'az', + 'ba', + 'bd', + 'be', + 'bg', + 'br', + 'brai', + 'bt', + 'bw', + 'by', + 'ca', + 'cd', + 'ch', + 'cm', + 'cn', + 'custom', + 'cz', + 'de', + 'dk', + 'dz', + 'ee', + 'epo', + 'es', + 'et', + 'fi', + 'fo', + 'fr', + 'gb', + 'ge', + 'gh', + 'gn', + 'gr', + 'hr', + 'hu', + 'id', + 'ie', + 'il', + 'in', + 'iq', + 'ir', + 'is', + 'it', + 'jp', + 'jv', + 'ke', + 'kg', + 'kh', + 'kr', + 'kz', + 'la', + 'latam', + 'lk', + 'lt', + 'lv', + 'ma', + 'mao', + 'md', + 'me', + 'mk', + 'ml', + 'mm', + 'mn', + 'mt', + 'mv', + 'my', + 'nec_vndr/jp', + 'ng', + 'nl', + 'no', + 'np', + 'ph', + 'pk', + 'pl', + 'pt', + 'ro', + 'rs', + 'ru', + 'se', + 'si', + 'sk', + 'sn', + 'sy', + 'tg', + 'th', + 'tj', + 'tm', + 'tr', + 'tw', + 'tz', + 'ua', + 'us', + 'uz', + 'vn', + 'za', +] as const; +export type Kbd_Layouts = (typeof _kbd_layouts)[number]; +export const kbd_layouts = new Set(_kbd_layouts); + +export const kbd_layout_by_locale: ReadonlyMap = + new Map([ + ['AF', 'us'], + ['AL', 'us'], + ['DZ', 'fr'], + ['AS', 'us'], + ['AD', 'es'], + ['AO', 'us'], + ['AI', 'us'], + ['AQ', 'us'], + ['AG', 'us'], + ['AR', 'es'], + ['AX', 'us'], + ['AM', 'us'], + ['AW', 'us'], + ['AU', 'us'], + ['AT', 'de'], + ['AZ', 'us'], + ['BS', 'us'], + ['BH', 'us'], + ['BD', 'us'], + ['BB', 'us'], + ['BY', 'us'], + ['BE', 'be'], + ['BZ', 'us'], + ['BJ', 'fr'], + ['BM', 'us'], + ['BT', 'us'], + ['BO', 'es'], + ['BQ', 'us'], + ['BA', 'us'], + ['BW', 'us'], + ['BV', 'us'], + ['BR', 'pt'], + ['IO', 'us'], + ['BN', 'us'], + ['BG', 'us'], + ['BF', 'fr'], + ['BI', 'fr'], + ['CV', 'pt'], + ['KH', 'us'], + ['CM', 'fr'], + ['CA', 'us'], + ['KY', 'us'], + ['CF', 'fr'], + ['TD', 'fr'], + ['CL', 'es'], + ['CN', 'us'], + ['CX', 'us'], + ['CC', 'us'], + ['CO', 'es'], + ['KM', 'fr'], + ['CG', 'fr'], + ['CD', 'fr'], + ['CK', 'us'], + ['CR', 'es'], + ['CI', 'fr'], + ['HR', 'us'], + ['CU', 'es'], + ['CW', 'us'], + ['CY', 'us'], + ['CZ', 'cz'], + ['DK', 'dk'], + ['DJ', 'fr'], + ['DM', 'us'], + ['DO', 'es'], + ['EC', 'es'], + ['EG', 'us'], + ['SV', 'es'], + ['GQ', 'es'], + ['ER', 'us'], + ['EE', 'us'], + ['SZ', 'us'], + ['ET', 'us'], + ['FK', 'us'], + ['FO', 'dk'], + ['FJ', 'us'], + ['FI', 'fi'], + ['FR', 'fr'], + ['GF', 'fr'], + ['PF', 'fr'], + ['TF', 'fr'], + ['GA', 'fr'], + ['GM', 'us'], + ['GE', 'us'], + ['DE', 'de'], + ['GH', 'us'], + ['GI', 'gb'], + ['GR', 'us'], + ['GL', 'us'], + ['GD', 'us'], + ['GP', 'fr'], + ['GU', 'us'], + ['GT', 'es'], + ['GG', 'gb'], + ['GN', 'fr'], + ['GW', 'us'], + ['GY', 'us'], + ['HT', 'us'], + ['HM', 'us'], + ['VA', 'it'], + ['HN', 'es'], + ['HK', 'us'], + ['HU', 'hu'], + ['IS', 'is'], + ['IN', 'us'], + ['ID', 'id'], + ['IR', 'us'], + ['IQ', 'us'], + ['IE', 'ie'], + ['IM', 'gb'], + ['IL', 'us'], + ['IT', 'it'], + ['JM', 'us'], + ['JP', 'jp'], + ['JE', 'gb'], + ['JO', 'us'], + ['KZ', 'us'], + ['KE', 'us'], + ['KI', 'us'], + ['KP', 'us'], + ['KR', 'us'], + ['KW', 'us'], + ['KG', 'us'], + ['LA', 'us'], + ['LV', 'lv'], + ['LB', 'us'], + ['LS', 'us'], + ['LR', 'us'], + ['LY', 'us'], + ['LI', 'de'], + ['LT', 'lt'], + ['LU', 'de'], + ['MO', 'us'], + ['MG', 'fr'], + ['MW', 'us'], + ['MY', 'us'], + ['MV', 'us'], + ['ML', 'fr'], + ['MT', 'us'], + ['MH', 'us'], + ['MQ', 'fr'], + ['MR', 'us'], + ['MU', 'us'], + ['YT', 'fr'], + ['MX', 'es'], + ['FM', 'us'], + ['MD', 'us'], + ['MC', 'fr'], + ['MN', 'mn'], + ['ME', 'us'], + ['MS', 'us'], + ['MA', 'us'], + ['MZ', 'pt'], + ['MM', 'us'], + ['NA', 'us'], + ['NR', 'us'], + ['NP', 'us'], + ['NL', 'nl'], + ['NC', 'fr'], + ['NZ', 'us'], + ['NI', 'es'], + ['NE', 'fr'], + ['NG', 'us'], + ['NU', 'us'], + ['NF', 'us'], + ['MK', 'mk'], + ['MP', 'us'], + ['NO', 'no'], + ['OM', 'us'], + ['PK', 'us'], + ['PW', 'us'], + ['PS', 'us'], + ['PA', 'es'], + ['PG', 'us'], + ['PY', 'es'], + ['PE', 'es'], + ['PH', 'us'], + ['PN', 'us'], + ['PL', 'pl'], + ['PT', 'pt'], + ['PR', 'us'], + ['QA', 'us'], + ['RE', 'fr'], + ['RO', 'ro'], + ['RU', 'ru'], + ['RW', 'us'], + ['BL', 'fr'], + ['SH', 'gb'], + ['KN', 'us'], + ['LC', 'us'], + ['MF', 'fr'], + ['PM', 'fr'], + ['VC', 'us'], + ['WS', 'us'], + ['SM', 'it'], + ['ST', 'us'], + ['SA', 'us'], + ['SN', 'fr'], + ['RS', 'us'], + ['SC', 'fr'], + ['SL', 'us'], + ['SG', 'us'], + ['SX', 'us'], + ['SK', 'sk'], + ['SI', 'si'], + ['SB', 'us'], + ['SO', 'us'], + ['ZA', 'us'], + ['GS', 'us'], + ['SS', 'us'], + ['ES', 'es'], + ['LK', 'us'], + ['SD', 'us'], + ['SR', 'us'], + ['SJ', 'no'], + ['SE', 'se'], + ['CH', 'de'], + ['SY', 'us'], + ['TW', 'us'], + ['TJ', 'us'], + ['TZ', 'us'], + ['TH', 'th'], + ['TL', 'pt'], + ['TG', 'fr'], + ['TK', 'us'], + ['TO', 'us'], + ['TT', 'us'], + ['TN', 'us'], + ['TR', 'tr'], + ['TM', 'us'], + ['TC', 'us'], + ['TV', 'us'], + ['UG', 'us'], + ['UA', 'gb'], + ['AE', 'us'], + ['GB', 'gb'], + ['US', 'us'], + ['UM', 'us'], + ['UY', 'es'], + ['UZ', 'us'], + ['VU', 'us'], + ['VE', 'es'], + ['VN', 'vn'], + ['VG', 'us'], + ['VI', 'us'], + ['WF', 'fr'], + ['EH', 'us'], + ['YE', 'us'], + ['ZM', 'us'], + ['ZW', 'us'], + ['XK', 'us'], + ]); diff --git a/src/utils/timezone.ts b/src/utils/timezone.ts new file mode 100644 index 0000000..fad2f12 --- /dev/null +++ b/src/utils/timezone.ts @@ -0,0 +1,438 @@ +/* c8 ignore start */ +export const get_timezone = () => { + return Intl.DateTimeFormat().resolvedOptions().timeZone; +}; +/* c8 ignore end */ + +/* c8 ignore start */ +export const get_timezone_offset = () => { + const offset = -(new Date().getTimezoneOffset() / 60); + return `UTC${offset > 0 ? `+${offset}` : offset < 0 ? `-${offset}` : ''}`; +}; +/* c8 ignore end */ + +const _timezone_list = [ + 'Africa/Abidjan', + 'Africa/Accra', + 'Africa/Addis_Ababa', + 'Africa/Algiers', + 'Africa/Asmara', + 'Africa/Bamako', + 'Africa/Bangui', + 'Africa/Banjul', + 'Africa/Bissau', + 'Africa/Blantyre', + 'Africa/Brazzaville', + 'Africa/Bujumbura', + 'Africa/Cairo', + 'Africa/Casablanca', + 'Africa/Ceuta', + 'Africa/Conakry', + 'Africa/Dakar', + 'Africa/Dar_es_Salaam', + 'Africa/Djibouti', + 'Africa/Douala', + 'Africa/El_Aaiun', + 'Africa/Freetown', + 'Africa/Gaborone', + 'Africa/Harare', + 'Africa/Johannesburg', + 'Africa/Juba', + 'Africa/Kampala', + 'Africa/Khartoum', + 'Africa/Kigali', + 'Africa/Kinshasa', + 'Africa/Lagos', + 'Africa/Libreville', + 'Africa/Lome', + 'Africa/Luanda', + 'Africa/Lubumbashi', + 'Africa/Lusaka', + 'Africa/Malabo', + 'Africa/Maputo', + 'Africa/Maseru', + 'Africa/Mbabane', + 'Africa/Mogadishu', + 'Africa/Monrovia', + 'Africa/Nairobi', + 'Africa/Ndjamena', + 'Africa/Niamey', + 'Africa/Nouakchott', + 'Africa/Ouagadougou', + 'Africa/Porto-Novo', + 'Africa/Sao_Tome', + 'Africa/Tripoli', + 'Africa/Tunis', + 'Africa/Windhoek', + 'America/Adak', + 'America/Anchorage', + 'America/Anguilla', + 'America/Antigua', + 'America/Araguaina', + 'America/Argentina/Buenos_Aires', + 'America/Argentina/Catamarca', + 'America/Argentina/Cordoba', + 'America/Argentina/Jujuy', + 'America/Argentina/La_Rioja', + 'America/Argentina/Mendoza', + 'America/Argentina/Rio_Gallegos', + 'America/Argentina/Salta', + 'America/Argentina/San_Juan', + 'America/Argentina/San_Luis', + 'America/Argentina/Tucuman', + 'America/Argentina/Ushuaia', + 'America/Aruba', + 'America/Asuncion', + 'America/Atikokan', + 'America/Bahia', + 'America/Bahia_Banderas', + 'America/Barbados', + 'America/Belem', + 'America/Belize', + 'America/Blanc-Sablon', + 'America/Boa_Vista', + 'America/Bogota', + 'America/Boise', + 'America/Cambridge_Bay', + 'America/Campo_Grande', + 'America/Cancun', + 'America/Caracas', + 'America/Cayenne', + 'America/Cayman', + 'America/Chicago', + 'America/Chihuahua', + 'America/Costa_Rica', + 'America/Creston', + 'America/Cuiaba', + 'America/Curacao', + 'America/Danmarkshavn', + 'America/Dawson', + 'America/Dawson_Creek', + 'America/Denver', + 'America/Detroit', + 'America/Dominica', + 'America/Edmonton', + 'America/Eirunepe', + 'America/El_Salvador', + 'America/Fort_Nelson', + 'America/Fortaleza', + 'America/Glace_Bay', + 'America/Godthab', + 'America/Goose_Bay', + 'America/Grand_Turk', + 'America/Grenada', + 'America/Guadeloupe', + 'America/Guatemala', + 'America/Guayaquil', + 'America/Guyana', + 'America/Halifax', + 'America/Havana', + 'America/Hermosillo', + 'America/Indiana/Indianapolis', + 'America/Indiana/Knox', + 'America/Indiana/Marengo', + 'America/Indiana/Petersburg', + 'America/Indiana/Tell_City', + 'America/Indiana/Vevay', + 'America/Indiana/Vincennes', + 'America/Indiana/Winamac', + 'America/Inuvik', + 'America/Iqaluit', + 'America/Jamaica', + 'America/Juneau', + 'America/Kentucky/Louisville', + 'America/Kentucky/Monticello', + 'America/Kralendijk', + 'America/La_Paz', + 'America/Lima', + 'America/Los_Angeles', + 'America/Lower_Princes', + 'America/Maceio', + 'America/Managua', + 'America/Manaus', + 'America/Marigot', + 'America/Martinique', + 'America/Matamoros', + 'America/Mazatlan', + 'America/Menominee', + 'America/Merida', + 'America/Metlakatla', + 'America/Mexico_City', + 'America/Miquelon', + 'America/Moncton', + 'America/Monterrey', + 'America/Montevideo', + 'America/Montserrat', + 'America/Nassau', + 'America/New_York', + 'America/Nipigon', + 'America/Nome', + 'America/Noronha', + 'America/North_Dakota/Beulah', + 'America/North_Dakota/Center', + 'America/North_Dakota/New_Salem', + 'America/Nuuk', + 'America/Ojinaga', + 'America/Panama', + 'America/Pangnirtung', + 'America/Paramaribo', + 'America/Phoenix', + 'America/Port-au-Prince', + 'America/Port_of_Spain', + 'America/Porto_Velho', + 'America/Puerto_Rico', + 'America/Punta_Arenas', + 'America/Rainy_River', + 'America/Rankin_Inlet', + 'America/Recife', + 'America/Regina', + 'America/Resolute', + 'America/Rio_Branco', + 'America/Santarem', + 'America/Santiago', + 'America/Santo_Domingo', + 'America/Sao_Paulo', + 'America/Scoresbysund', + 'America/Sitka', + 'America/St_Barthelemy', + 'America/St_Johns', + 'America/St_Kitts', + 'America/St_Lucia', + 'America/St_Thomas', + 'America/St_Vincent', + 'America/Swift_Current', + 'America/Tegucigalpa', + 'America/Thule', + 'America/Thunder_Bay', + 'America/Tijuana', + 'America/Toronto', + 'America/Tortola', + 'America/Vancouver', + 'America/Whitehorse', + 'America/Winnipeg', + 'America/Yakutat', + 'America/Yellowknife', + 'Antarctica/Casey', + 'Antarctica/Davis', + 'Antarctica/DumontDUrville', + 'Antarctica/Macquarie', + 'Antarctica/Mawson', + 'Antarctica/Palmer', + 'Antarctica/Rothera', + 'Antarctica/Syowa', + 'Antarctica/Troll', + 'Antarctica/Vostok', + 'Arctic/Longyearbyen', + 'Asia/Almaty', + 'Asia/Amman', + 'Asia/Anadyr', + 'Asia/Aqtau', + 'Asia/Aqtobe', + 'Asia/Ashgabat', + 'Asia/Atyrau', + 'Asia/Baghdad', + 'Asia/Baku', + 'Asia/Bangkok', + 'Asia/Barnaul', + 'Asia/Beirut', + 'Asia/Bishkek', + 'Asia/Brunei', + 'Asia/Chita', + 'Asia/Choibalsan', + 'Asia/Colombo', + 'Asia/Damascus', + 'Asia/Dhaka', + 'Asia/Dili', + 'Asia/Dubai', + 'Asia/Dushanbe', + 'Asia/Famagusta', + 'Asia/Gaza', + 'Asia/Hebron', + 'Asia/Ho_Chi_Minh', + 'Asia/Hong_Kong', + 'Asia/Hovd', + 'Asia/Irkutsk', + 'Asia/Jakarta', + 'Asia/Jayapura', + 'Asia/Jerusalem', + 'Asia/Kabul', + 'Asia/Kamchatka', + 'Asia/Karachi', + 'Asia/Kathmandu', + 'Asia/Khandyga', + 'Asia/Kolkata', + 'Asia/Krasnoyarsk', + 'Asia/Kuala_Lumpur', + 'Asia/Kuching', + 'Asia/Macau', + 'Asia/Magadan', + 'Asia/Makassar', + 'Asia/Manila', + 'Asia/Nicosia', + 'Asia/Novokuznetsk', + 'Asia/Novosibirsk', + 'Asia/Omsk', + 'Asia/Oral', + 'Asia/Phnom_Penh', + 'Asia/Pontianak', + 'Asia/Pyongyang', + 'Asia/Qatar', + 'Asia/Qostanay', + 'Asia/Qyzylorda', + 'Asia/Riyadh', + 'Asia/Sakhalin', + 'Asia/Samarkand', + 'Asia/Seoul', + 'Asia/Shanghai', + 'Asia/Singapore', + 'Asia/Srednekolymsk', + 'Asia/Taipei', + 'Asia/Tashkent', + 'Asia/Tbilisi', + 'Asia/Tehran', + 'Asia/Thimphu', + 'Asia/Tokyo', + 'Asia/Tomsk', + 'Asia/Ulaanbaatar', + 'Asia/Urumqi', + 'Asia/Ust-Nera', + 'Asia/Vientiane', + 'Asia/Vladivostok', + 'Asia/Yakutsk', + 'Asia/Yangon', + 'Asia/Yekaterinburg', + 'Asia/Yerevan', + 'Atlantic/Azores', + 'Atlantic/Bermuda', + 'Atlantic/Canary', + 'Atlantic/Cape_Verde', + 'Atlantic/Faroe', + 'Atlantic/Madeira', + 'Atlantic/Reykjavik', + 'Atlantic/South_Georgia', + 'Atlantic/St_Helena', + 'Atlantic/Stanley', + 'Australia/Adelaide', + 'Australia/Brisbane', + 'Australia/Broken_Hill', + 'Australia/Currie', + 'Australia/Darwin', + 'Australia/Eucla', + 'Australia/Hobart', + 'Australia/Lindeman', + 'Australia/Lord_Howe', + 'Australia/Melbourne', + 'Australia/Perth', + 'Australia/Sydney', + 'Europe/Amsterdam', + 'Europe/Andorra', + 'Europe/Astrakhan', + 'Europe/Athens', + 'Europe/Belgrade', + 'Europe/Berlin', + 'Europe/Bratislava', + 'Europe/Brussels', + 'Europe/Bucharest', + 'Europe/Budapest', + 'Europe/Busingen', + 'Europe/Chisinau', + 'Europe/Copenhagen', + 'Europe/Dublin', + 'Europe/Gibraltar', + 'Europe/Guernsey', + 'Europe/Helsinki', + 'Europe/Isle_of_Man', + 'Europe/Istanbul', + 'Europe/Jersey', + 'Europe/Kaliningrad', + 'Europe/Kiev', + 'Europe/Kirov', + 'Europe/Lisbon', + 'Europe/Ljubljana', + 'Europe/London', + 'Europe/Luxembourg', + 'Europe/Madrid', + 'Europe/Malta', + 'Europe/Mariehamn', + 'Europe/Minsk', + 'Europe/Monaco', + 'Europe/Moscow', + 'Europe/Oslo', + 'Europe/Paris', + 'Europe/Podgorica', + 'Europe/Prague', + 'Europe/Riga', + 'Europe/Rome', + 'Europe/Samara', + 'Europe/San_Marino', + 'Europe/Sarajevo', + 'Europe/Saratov', + 'Europe/Simferopol', + 'Europe/Skopje', + 'Europe/Sofia', + 'Europe/Stockholm', + 'Europe/Tallinn', + 'Europe/Tirane', + 'Europe/Ulyanovsk', + 'Europe/Uzhgorod', + 'Europe/Vaduz', + 'Europe/Vatican', + 'Europe/Vienna', + 'Europe/Vilnius', + 'Europe/Volgograd', + 'Europe/Warsaw', + 'Europe/Zagreb', + 'Europe/Zaporozhye', + 'Europe/Zurich', + 'Indian/Antananarivo', + 'Indian/Chagos', + 'Indian/Christmas', + 'Indian/Cocos', + 'Indian/Comoro', + 'Indian/Kerguelen', + 'Indian/Mahe', + 'Indian/Maldives', + 'Indian/Mauritius', + 'Indian/Mayotte', + 'Indian/Reunion', + 'Pacific/Apia', + 'Pacific/Auckland', + 'Pacific/Bougainville', + 'Pacific/Chatham', + 'Pacific/Chuuk', + 'Pacific/Easter', + 'Pacific/Efate', + 'Pacific/Enderbury', + 'Pacific/Fakaofo', + 'Pacific/Fiji', + 'Pacific/Funafuti', + 'Pacific/Galapagos', + 'Pacific/Gambier', + 'Pacific/Guadalcanal', + 'Pacific/Guam', + 'Pacific/Honolulu', + 'Pacific/Kiritimati', + 'Pacific/Kosrae', + 'Pacific/Kwajalein', + 'Pacific/Majuro', + 'Pacific/Marquesas', + 'Pacific/Midway', + 'Pacific/Nauru', + 'Pacific/Niue', + 'Pacific/Norfolk', + 'Pacific/Noumea', + 'Pacific/Pago_Pago', + 'Pacific/Palau', + 'Pacific/Pitcairn', + 'Pacific/Pohnpei', + 'Pacific/Port_Moresby', + 'Pacific/Rarotonga', + 'Pacific/Saipan', + 'Pacific/Tahiti', + 'Pacific/Tarawa', + 'Pacific/Tongatapu', + 'Pacific/Wake', + 'Pacific/Wallis', +] as const; + +export const timezone_list = new Set(_timezone_list); diff --git a/src/utils/validation.ts b/src/utils/validation.ts index 75fb83a..889b05d 100644 --- a/src/utils/validation.ts +++ b/src/utils/validation.ts @@ -14,3 +14,20 @@ export const error_to_msg = ( } } }; + +export const async_error_to_msg = async ( + fn: (...args: T) => R, + ...params: T +) => { + try { + return (await fn(...params)) as R; + } catch (e) { + if (e instanceof Error) { + return e.message; + } else if (typeof e === 'string') { + return e; + } else { + return 'unknown error'; + } + } +}; diff --git a/src/validation/hostname.ts b/src/validation/hostname.ts new file mode 100644 index 0000000..9f83ca5 --- /dev/null +++ b/src/validation/hostname.ts @@ -0,0 +1,12 @@ +import { hostname_regex } from '@/const/regex'; +import { ValidationError } from '@/errors/validation-error'; + +export const validate_hostname = (hostname: string) => { + if (hostname.match(hostname_regex)) { + return true; + } + + throw new ValidationError( + `hostname MUST match the following regular expression: ${hostname_regex}` + ); +}; diff --git a/src/validation/kbd_layout.ts b/src/validation/kbd_layout.ts new file mode 100644 index 0000000..9640603 --- /dev/null +++ b/src/validation/kbd_layout.ts @@ -0,0 +1,12 @@ +import { ValidationError } from '@/errors/validation-error'; +import { kbd_layouts } from '@/utils/keyboard-layouts'; + +export const validate_kbd_layout = (kbd_layout: string) => { + if (kbd_layouts.has(kbd_layout)) { + return true; + } + + throw new ValidationError( + `The keyboard layuot ${kbd_layout} may not be supported` + ); +}; diff --git a/src/validation/ssh.ts b/src/validation/ssh.ts new file mode 100644 index 0000000..7a61ca6 --- /dev/null +++ b/src/validation/ssh.ts @@ -0,0 +1,39 @@ +import { ValidationError } from '@/errors/validation-error'; +import { exists } from '@/utils/fs'; +import { readFile } from 'fs/promises'; + +const ssh_dss = /^ssh-dss AAAAB3NzaC1kc3[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; +const ecdsa_sha2_nistp256 = + /^ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNT[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; +const sk_ecdsa_sha2_nistp256 = + /^sk-ecdsa-sha2-nistp256@openssh.com AAAAInNrLWVjZHNhLXNoYTItbmlzdHAyNTZAb3BlbnNzaC5jb2[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; +const ssh_ed25519 = + /^ssh-ed25519 AAAAC3NzaC1lZDI1NTE5[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; +const sk_ssh_ed25519 = + /^sk-ssh-ed25519@openssh.com AAAAGnNrLXNzaC1lZDI1NTE5QG9wZW5zc2guY29t[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; +const ssh_rsa = /^ssh-rsa AAAAB3NzaC1yc2[0-9A-Za-z+/]+[=]{0,3}(\s.*)?$/; + +const regexes = [ + ssh_rsa, + ssh_ed25519, + ecdsa_sha2_nistp256, + ssh_dss, + sk_ecdsa_sha2_nistp256, + sk_ssh_ed25519, +]; + +export const validate_key_path = async (key_path: string) => { + if (!(await exists(key_path))) { + throw new ValidationError(`The file ${key_path} does not exist`); + } + + const file_content = (await readFile(key_path, { encoding: 'utf-8' })).trim(); + + if (regexes.some((el) => el.test(file_content))) { + return true; + } + + throw new ValidationError( + `The file ${key_path} does not contain a public SSH key` + ); +}; diff --git a/src/validation/timezone.ts b/src/validation/timezone.ts new file mode 100644 index 0000000..23b3e10 --- /dev/null +++ b/src/validation/timezone.ts @@ -0,0 +1,10 @@ +import { ValidationError } from '@/errors/validation-error'; +import { timezone_list } from '@/utils/timezone'; + +export const validate_timezone = (timezone: string) => { + if (timezone_list.has(timezone)) { + return true; + } + + throw new ValidationError(`Timezone ${timezone} is not supported`); +}; diff --git a/test/utils/validation.test.ts b/test/utils/validation.test.ts index b480e0e..e83aa56 100644 --- a/test/utils/validation.test.ts +++ b/test/utils/validation.test.ts @@ -1,4 +1,4 @@ -import { error_to_msg } from '@/utils/validation'; +import { async_error_to_msg, error_to_msg } from '@/utils/validation'; import t from 'tap'; t.test('error to msg (true)', async (t) => { @@ -43,3 +43,46 @@ t.test('error to msg (false)', async (t) => { t.type(resposne, 'string'); t.same(resposne, 'unknown error'); }); + +t.test('async error to msg (true)', async (t) => { + t.ok(await async_error_to_msg(async () => true)); +}); + +t.test('async error to msg (false)', async (t) => { + t.notOk(await async_error_to_msg(async () => false)); +}); + +t.test('async error to msg (true)', async (t) => { + t.ok(await async_error_to_msg(async (flag: boolean) => flag, true)); +}); + +t.test('async error to msg (false)', async (t) => { + t.notOk(await async_error_to_msg(async (flag: boolean) => flag, false)); +}); + +t.test('async error to msg (false)', async (t) => { + const resposne = await async_error_to_msg(async () => { + throw new Error('a'); + }); + + t.type(resposne, 'string'); + t.same(resposne, 'a'); +}); + +t.test('async error to msg (false)', async (t) => { + const resposne = await async_error_to_msg(async () => { + throw 'a'; + }); + + t.type(resposne, 'string'); + t.same(resposne, 'a'); +}); + +t.test('async error to msg (false)', async (t) => { + const resposne = await async_error_to_msg(async () => { + throw 1; + }); + + t.type(resposne, 'string'); + t.same(resposne, 'unknown error'); +}); diff --git a/test/validation/hostname.test.ts b/test/validation/hostname.test.ts new file mode 100644 index 0000000..5e04113 --- /dev/null +++ b/test/validation/hostname.test.ts @@ -0,0 +1,10 @@ +import { validate_hostname } from '@/validation/hostname'; +import t from 'tap'; + +t.test('valid hostname', async (t) => { + t.ok(validate_hostname('raspberrypi')); +}); + +t.test('invalid hostname', async (t) => { + t.throws(() => validate_hostname('raspberry_pi')); +}); diff --git a/test/validation/kbd_layout.test.ts b/test/validation/kbd_layout.test.ts new file mode 100644 index 0000000..0e2e199 --- /dev/null +++ b/test/validation/kbd_layout.test.ts @@ -0,0 +1,10 @@ +import { validate_kbd_layout } from '@/validation/kbd_layout'; +import t from 'tap'; + +t.test('valid keyboard layout', async (t) => { + t.ok(validate_kbd_layout('us')); +}); + +t.test('invalid keyboard layout', async (t) => { + t.throws(() => validate_kbd_layout('en')); +}); diff --git a/test/validation/timezone.test.ts b/test/validation/timezone.test.ts new file mode 100644 index 0000000..af7bed2 --- /dev/null +++ b/test/validation/timezone.test.ts @@ -0,0 +1,10 @@ +import { validate_timezone } from '@/validation/timezone'; +import t from 'tap'; + +t.test('valid timezone', async (t) => { + t.ok(validate_timezone('America/New_York')); +}); + +t.test('invalid timezone', async (t) => { + t.throws(() => validate_timezone('America/NewYork')); +});