first commit

This commit is contained in:
2026-03-10 16:18:05 +00:00
commit 11f9c069b5
31635 changed files with 3187747 additions and 0 deletions

91
node_modules/dnssd-advertise/CHANGELOG.md generated vendored Normal file
View File

@@ -0,0 +1,91 @@
# dns-message
## 1.1.3
### Patch Changes
- ⚠️ Fix self-referential enum value, which Babel's transformer doesn't handle
Submitted by [@kitten](https://github.com/kitten) (See [#23](https://github.com/kitten/dnssd-advertise/pull/23))
## 1.1.2
### Patch Changes
- Update rollup config for reduced output and exclude sources from sourcemaps
Submitted by [@kitten](https://github.com/kitten) (See [#21](https://github.com/kitten/dnssd-advertise/pull/21))
## 1.1.1
### Patch Changes
- Sort IPv6 addresses to put link-local address last
Submitted by [@kitten](https://github.com/kitten) (See [#19](https://github.com/kitten/dnssd-advertise/pull/19))
## 1.1.0
### Minor Changes
- Add `stack` option to allow IPv4/IPv6-only single stack use
Submitted by [@kitten](https://github.com/kitten) (See [#17](https://github.com/kitten/dnssd-advertise/pull/17))
## 1.0.8
### Patch Changes
- Filter incoming messages by remote address manually to check for IPv6 zone match or subnet address on Linux. `SO_BINDTODEVICE` isn't accessible to us for Linux, which means that we have to manually filter incoming messages per socket
Submitted by [@kitten](https://github.com/kitten) (See [#15](https://github.com/kitten/dnssd-advertise/pull/15))
## 1.0.7
### Patch Changes
- Set default TTL to 120s
Submitted by [@kitten](https://github.com/kitten) (See [#13](https://github.com/kitten/dnssd-advertise/pull/13))
## 1.0.6
### Patch Changes
- Apply loops limit of 15 to probing
Submitted by [@kitten](https://github.com/kitten) (See [#11](https://github.com/kitten/dnssd-advertise/pull/11))
## 1.0.5
### Patch Changes
- ⚠️ Fix goodbye message being cancelled by scheduler cancellation
Submitted by [@kitten](https://github.com/kitten) (See [#9](https://github.com/kitten/dnssd-advertise/pull/9))
- ⚠️ Fix uncaught errors in main advertiser
Submitted by [@kitten](https://github.com/kitten) (See [#9](https://github.com/kitten/dnssd-advertise/pull/9))
## 1.0.4
### Patch Changes
- Tweak default behaviour and constants
Submitted by [@kitten](https://github.com/kitten) (See [#7](https://github.com/kitten/dnssd-advertise/pull/7))
## 1.0.3
### Patch Changes
- Implement tiebreaker loss cases properly and extend probes for expected length
Submitted by [@kitten](https://github.com/kitten) (See [#5](https://github.com/kitten/dnssd-advertise/pull/5))
## 1.0.2
### Patch Changes
- Compare all A/AAAA addresses when checking for conflicts
Submitted by [@kitten](https://github.com/kitten) (See [#3](https://github.com/kitten/dnssd-advertise/pull/3))
## 1.0.1
### Patch Changes
- Remove sourcemaps' `sourcesContent` from published package
Submitted by [@kitten](https://github.com/kitten) (See [#1](https://github.com/kitten/dnssd-advertise/pull/1))
## 1.0.0
Initial Release.

22
node_modules/dnssd-advertise/LICENSE.md generated vendored Normal file
View File

@@ -0,0 +1,22 @@
MIT License
Copyright (c) Phil Pluckthun,
Copyright (c) 650 Industries, Inc. (aka Expo),
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.

56
node_modules/dnssd-advertise/README.md generated vendored Normal file
View File

@@ -0,0 +1,56 @@
# dnssd-advertise
A well-behaved Bonjour/DNS-SD service advertiser for Node.js, designed for long-running processes.
- Aims to be compliant with [RFC 6762](https://datatracker.ietf.org/doc/html/rfc6762) and [RFC 6763](https://datatracker.ietf.org/doc/html/rfc6763#section-6)
- Handles network interface changes, socket recovery, and re-announcements for long-running processes
- Supports dual-stack IPv4 and IPv6 service announcement with NIC-scoped responses
- Single dependency ([dns-message](https://github.com/kitten/dns-message) is bundled)
## Quick Reference
```javascript
import { advertise } from 'dnssd-advertise';
const stop = advertise({
name: 'My Service',
type: 'http',
protocol: 'tcp',
port: 3000,
});
process.on('exit', () => {
stop();
});
```
### Conflict Resolution
When a conflict is detected during probing, as per the specification, the name or hostname of your service may be altered:
- When the `name` conflicts a 4-character hex ID is appended (e.g. `My Service (B0A1)`
- When the `hostname` conflicts a number is appended to it (e.g. `my-hostname-2`)
When a conflict is detected during announcing, the probing phase restarts with the same conflict resolution.
## API Reference
### `advertise(options): () => Promise<void>`
Starts advertising a DNS-SD service on all available network interfaces.
Returns a function that, when called, stops advertising and sends goodbye packets to remove the service from the network.
Stopping the advertiser is, while preferred, optional as per the mDNS specification.
#### Options
| Option | Type | Description |
| ---------- | -------------------------- | ------------------------------------------------------------------ |
| `name` | `string` | Instance/display name of the service (e.g., "Living Room Speaker") |
| `type` | `string` | Service type without protocol (e.g., "http", "ssh", "airplay") |
| `protocol` | `'tcp' \| 'udp'` | Protocol used by the service |
| `port` | `number` | Port the service is listening on |
| `hostname` | `string` | Hostname to advertise (defaults to system hostname) |
| `subtypes` | `string[]` | Optional list of subtypes |
| `txt` | `Record<string, TxtValue>` | Optional service metadata as key-value pairs |
| `ttl` | `number` | TTL for DNS records in seconds (defaults to 250s) |

30
node_modules/dnssd-advertise/dist/dnssd-advertise.d.ts generated vendored Normal file
View File

@@ -0,0 +1,30 @@
type TxtValue = string | number | boolean | null | undefined;
interface AdvertiseOptions {
/** Instance/display name of the service */
name: string;
/** Service type without protocol (e.g. "http") */
type: string;
/** Protocol used by the service (typically "tcp" or "udp") */
protocol: 'tcp' | 'udp' | (string & {});
/** Hostname of device offering the service */
hostname?: string;
/** Port the service is listening on */
port: number;
/** List of subtypes for selective discovery */
subtypes?: string[];
/** Service metadata */
txt?: Record<string, TxtValue>;
/** TTL to apply to service records */
ttl?: number;
/** Set to "IPv4" or "IPv6" to run single stack rather than dual stack */
stack?: 'IPv4' | 'IPv6' | null;
}
interface AdvertiserHandle {
readonly promise: Promise<void>;
close(): Promise<void>;
}
declare function advertise(options: AdvertiseOptions): () => Promise<void>;
export { advertise };
export type { AdvertiseOptions, AdvertiserHandle };

2756
node_modules/dnssd-advertise/dist/dnssd-advertise.js generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

2754
node_modules/dnssd-advertise/dist/dnssd-advertise.mjs generated vendored Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

84
node_modules/dnssd-advertise/package.json generated vendored Normal file
View File

@@ -0,0 +1,84 @@
{
"name": "dnssd-advertise",
"version": "1.1.3",
"description": "A Bonjour DNS-SD service announcer via mDNS on UDP",
"author": "Phil Pluckthun <phil@kitten.sh>",
"source": "./src/index.ts",
"main": "./dist/dnssd-advertise",
"module": "./dist/dnssd-advertise.mjs",
"types": "./dist/dnssd-advertise.d.ts",
"files": [
"LICENSE.md",
"README.md",
"CHANGELOG.md",
"dist/"
],
"exports": {
".": {
"types": "./dist/dnssd-advertise.d.ts",
"import": "./dist/dnssd-advertise.mjs",
"require": "./dist/dnssd-advertise.js",
"source": "./src/index.ts"
},
"./package.json": "./package.json"
},
"prettier": {
"singleQuote": true,
"arrowParens": "avoid",
"trailingComma": "es5"
},
"lint-staged": {
"*.{js,ts,json,md}": "prettier --write"
},
"keywords": [
"mdns",
"dnssd",
"dns-sd",
"bonjour",
"advertise",
"announce"
],
"license": "MIT",
"repository": "https://github.com/kitten/dnssd-advertise",
"bugs": {
"url": "https://github.com/kitten/dnssd-advertise/issues"
},
"devDependencies": {
"@babel/plugin-transform-typescript": "^7.28.6",
"@changesets/cli": "^2.29.7",
"@changesets/get-github-info": "^0.6.0",
"@rollup/plugin-babel": "^6.1.0",
"@rollup/plugin-commonjs": "^29.0.0",
"@rollup/plugin-node-resolve": "^16.0.3",
"@rollup/plugin-terser": "^0.4.4",
"@types/node": "^25.0.3",
"@vitest/coverage-v8": "^4.0.16",
"dns-message": "^1.1.1",
"dotenv": "^17.2.3",
"lint-staged": "^16.2.6",
"npm-run-all": "^4.1.5",
"prettier": "^3.6.2",
"rimraf": "^6.1.0",
"rollup": "^4.53.3",
"rollup-plugin-cjs-check": "^1.0.3",
"rollup-plugin-dts": "^6.2.3",
"typescript": "^5.9.3",
"vitest": "^4.0.10"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"scripts": {
"test": "vitest test",
"test:run": "vitest test --run",
"prebench": "pnpm run build",
"bench": "vitest bench",
"build": "rollup -c ./scripts/rollup.config.mjs",
"postbuild": "tsc --lib esnext,dom,dom.iterable --target esnext --module nodenext --moduleResolution nodenext --noEmit ./dist/dnssd-advertise.d.ts",
"check": "tsc --noEmit",
"clean": "rimraf dist node_modules/.cache",
"changeset:version": "changeset version && pnpm install --lockfile-only",
"changeset:publish": "changeset publish"
}
}