@corewire/core 0.0.0 → 1.0.0-next.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -1
- package/dist/chunk-wE0WeVzl.mjs +22 -0
- package/dist/crypto-CXSIS6si.mjs +3093 -0
- package/dist/crypto.d.mts +111 -0
- package/dist/crypto.mjs +3 -0
- package/dist/discovery.d.mts +110 -0
- package/dist/discovery.mjs +763 -0
- package/dist/encoding-BaLbwFQ0.mjs +1663 -0
- package/dist/encoding.d.mts +411 -0
- package/dist/encoding.mjs +3 -0
- package/dist/errors-DVv1n4fL.mjs +125 -0
- package/dist/index-BJKNwUmq.d.mts +125 -0
- package/dist/index.d.mts +82 -0
- package/dist/index.mjs +5 -0
- package/dist/pairing.d.mts +169 -0
- package/dist/pairing.mjs +2487 -0
- package/dist/reporter-DfM6vPT0.mjs +223 -0
- package/dist/reporter-Dn7n2TXN.d.mts +112 -0
- package/dist/transport-C4BMdD2J.mjs +270 -0
- package/dist/transport.d.mts +2 -0
- package/dist/transport.mjs +3 -0
- package/dist/types-qzabRJJ9.d.mts +5 -0
- package/dist/utils-DY5OKUuy.mjs +8 -0
- package/package.json +84 -18
package/README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
1
|
# @corewire/core
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The shared base of the CoreWire protocol packages: codecs (OPack, TLV8, plist, DAAP, NTP, RTI), crypto, transport, HAP pairing (controller and accessory side), mDNS discovery and advertising, the error classes and the logger. It holds no protocol behavior of its own.
|
|
4
|
+
|
|
5
|
+
Part of [CoreWire](https://corewire.dev). Most applications use `@corewire/devices` instead.
|
|
6
|
+
|
|
7
|
+
## Install
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
npm install @corewire/core@next
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Requires Node.js 18.17 or later (20.3 or later on the 20 line).
|
|
14
|
+
|
|
15
|
+
## Example
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
import { Discovery } from '@corewire/core/discovery';
|
|
19
|
+
import { OPack } from '@corewire/core/encoding';
|
|
20
|
+
|
|
21
|
+
const receivers = await new Discovery('_airplay._tcp.local').find();
|
|
22
|
+
console.log(receivers.map(receiver => `${receiver.id} at ${receiver.address}`));
|
|
23
|
+
|
|
24
|
+
const encoded = OPack.encode({_i: '_systemInfo'});
|
|
25
|
+
console.log(OPack.decode(encoded));
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## License
|
|
29
|
+
|
|
30
|
+
MIT
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { createRequire } from "node:module";
|
|
2
|
+
|
|
3
|
+
//#region \0rolldown/runtime.js
|
|
4
|
+
var __defProp = Object.defineProperty;
|
|
5
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
6
|
+
var __exportAll = (all, no_symbols) => {
|
|
7
|
+
let target = {};
|
|
8
|
+
for (var name in all) {
|
|
9
|
+
__defProp(target, name, {
|
|
10
|
+
get: all[name],
|
|
11
|
+
enumerable: true
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
if (!no_symbols) {
|
|
15
|
+
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
16
|
+
}
|
|
17
|
+
return target;
|
|
18
|
+
};
|
|
19
|
+
var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
20
|
+
|
|
21
|
+
//#endregion
|
|
22
|
+
export { __exportAll as n, __require as r, __commonJSMin as t };
|