fix: Switch to Tailwind v3 - v4 incompatible with Astro
This commit is contained in:
30
node_modules/is-port-reachable/index.d.ts
generated
vendored
Normal file
30
node_modules/is-port-reachable/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,30 @@
|
||||
export interface Options {
|
||||
/**
|
||||
The host to check.
|
||||
|
||||
Can be a domain (optionally, with a sub-domain) or an IP address.
|
||||
|
||||
@example 'localhost'
|
||||
*/
|
||||
readonly host: string;
|
||||
|
||||
/**
|
||||
The time to wait in milliseconds before giving up.
|
||||
|
||||
@default 1000
|
||||
*/
|
||||
readonly timeout?: number;
|
||||
}
|
||||
|
||||
/**
|
||||
Check if a local or remote port is reachable.
|
||||
|
||||
@example
|
||||
```
|
||||
import isPortReachable from 'is-port-reachable';
|
||||
|
||||
console.log(await isPortReachable(80, {host: 'google.com'}));
|
||||
//=> true
|
||||
```
|
||||
*/
|
||||
export default function isPortReachable(port: number, options: Options): Promise<boolean>;
|
||||
32
node_modules/is-port-reachable/index.js
generated
vendored
Normal file
32
node_modules/is-port-reachable/index.js
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
import net from 'node:net';
|
||||
|
||||
export default async function isPortReachable(port, {host, timeout = 1000} = {}) {
|
||||
if (typeof host !== 'string') {
|
||||
throw new TypeError('Specify a `host`');
|
||||
}
|
||||
|
||||
const promise = new Promise(((resolve, reject) => {
|
||||
const socket = new net.Socket();
|
||||
|
||||
const onError = () => {
|
||||
socket.destroy();
|
||||
reject();
|
||||
};
|
||||
|
||||
socket.setTimeout(timeout);
|
||||
socket.once('error', onError);
|
||||
socket.once('timeout', onError);
|
||||
|
||||
socket.connect(port, host, () => {
|
||||
socket.end();
|
||||
resolve();
|
||||
});
|
||||
}));
|
||||
|
||||
try {
|
||||
await promise;
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
9
node_modules/is-port-reachable/license
generated
vendored
Normal file
9
node_modules/is-port-reachable/license
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
50
node_modules/is-port-reachable/package.json
generated
vendored
Normal file
50
node_modules/is-port-reachable/package.json
generated
vendored
Normal file
@@ -0,0 +1,50 @@
|
||||
{
|
||||
"name": "is-port-reachable",
|
||||
"version": "4.0.0",
|
||||
"description": "Check if a local or remote port is reachable",
|
||||
"license": "MIT",
|
||||
"repository": "sindresorhus/is-port-reachable",
|
||||
"funding": "https://github.com/sponsors/sindresorhus",
|
||||
"author": {
|
||||
"name": "Sindre Sorhus",
|
||||
"email": "sindresorhus@gmail.com",
|
||||
"url": "https://sindresorhus.com"
|
||||
},
|
||||
"contributors": [
|
||||
"silverwind <me@silverwind.io> (github.com/silverwind)"
|
||||
],
|
||||
"type": "module",
|
||||
"exports": "./index.js",
|
||||
"engines": {
|
||||
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "xo && ava && tsd"
|
||||
},
|
||||
"files": [
|
||||
"index.js",
|
||||
"index.d.ts"
|
||||
],
|
||||
"keywords": [
|
||||
"port",
|
||||
"reachable",
|
||||
"local",
|
||||
"remote",
|
||||
"host",
|
||||
"ip",
|
||||
"localhost",
|
||||
"address",
|
||||
"connect",
|
||||
"connectable",
|
||||
"online",
|
||||
"socket",
|
||||
"tcp",
|
||||
"is",
|
||||
"check"
|
||||
],
|
||||
"devDependencies": {
|
||||
"ava": "^3.15.0",
|
||||
"tsd": "^0.17.0",
|
||||
"xo": "^0.44.0"
|
||||
}
|
||||
}
|
||||
55
node_modules/is-port-reachable/readme.md
generated
vendored
Normal file
55
node_modules/is-port-reachable/readme.md
generated
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
# is-port-reachable
|
||||
|
||||
> Check if a local or remote port is reachable
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
npm install is-port-reachable
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
import isPortReachable from 'is-port-reachable';
|
||||
|
||||
console.log(await isPortReachable(80, {host: 'google.com'}));
|
||||
//=> true
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### isPortReachable(options)
|
||||
|
||||
Returns `Promise<boolean>` for whether the port is reachable.
|
||||
|
||||
##### port
|
||||
|
||||
Type: `number`
|
||||
|
||||
The port to check.
|
||||
|
||||
#### options
|
||||
|
||||
Type: `object`
|
||||
|
||||
##### host
|
||||
|
||||
**Required**\
|
||||
Type: `string`\
|
||||
Example: `'localhost'`
|
||||
|
||||
The host to check.
|
||||
|
||||
Can be a domain (optionally, with a sub-domain) or an IP address.
|
||||
|
||||
##### timeout
|
||||
|
||||
Type: `number`\
|
||||
Default: `1000`
|
||||
|
||||
The time to wait in milliseconds before giving up.
|
||||
|
||||
## Related
|
||||
|
||||
- [is-reachable](https://github.com/sindresorhus/is-reachable/) - Check if servers are reachable
|
||||
Reference in New Issue
Block a user