@arcanewizards/tcnet 0.1.1 → 0.1.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 +69 -0
- package/dist/index.cjs +16 -16
- package/dist/index.js +19 -19
- package/dist/monitor.js +1 -1
- package/dist/utils.d.cts +1 -1
- package/dist/utils.d.ts +1 -1
- package/package.json +11 -11
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# `@arcanewizards/tcnet`
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@arcanewizards/tcnet)
|
|
4
|
+
|
|
5
|
+
TCNet node and monitoring utilities for Node.js applications.
|
|
6
|
+
|
|
7
|
+
This package can join a TCNet network, maintain node presence, emit packet and node lifecycle events, and derive higher-level timecode state from the underlying protocol traffic.
|
|
8
|
+
|
|
9
|
+
## Installation
|
|
10
|
+
|
|
11
|
+
```sh
|
|
12
|
+
pnpm add @arcanewizards/tcnet
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Exports
|
|
16
|
+
|
|
17
|
+
- `@arcanewizards/tcnet`
|
|
18
|
+
Exposes `createTCNetNode(...)`.
|
|
19
|
+
- `@arcanewizards/tcnet/monitor`
|
|
20
|
+
Exposes `createTCNetTimecodeMonitor(...)` and monitor event types.
|
|
21
|
+
- `@arcanewizards/tcnet/types`
|
|
22
|
+
Exposes `TCNetNode`, `TCNetNodeInfo`, `TCNetConnectedNodes`, `TCNetPortInformation`, `TCNetPortUsage`, `TCNetLogger`, and related runtime types.
|
|
23
|
+
|
|
24
|
+
## Usage
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import pino from 'pino';
|
|
28
|
+
import { createTCNetNode } from '@arcanewizards/tcnet';
|
|
29
|
+
import { createTCNetTimecodeMonitor } from '@arcanewizards/tcnet/monitor';
|
|
30
|
+
|
|
31
|
+
const logger = pino();
|
|
32
|
+
|
|
33
|
+
const node = createTCNetNode({
|
|
34
|
+
logger,
|
|
35
|
+
networkInterface: 'en0',
|
|
36
|
+
nodeName: 'TCNODE01',
|
|
37
|
+
vendorName: 'Arcane Wizards',
|
|
38
|
+
appName: 'Example App',
|
|
39
|
+
appVersion: '0.1.0',
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
node.on('ready', () => {
|
|
43
|
+
logger.info('TCNet node ready');
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
node.on('nodes-changed', (nodes) => {
|
|
47
|
+
logger.info(`Connected nodes: ${Object.keys(nodes).length}`);
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
const monitor = createTCNetTimecodeMonitor(node, logger);
|
|
51
|
+
|
|
52
|
+
monitor.addListener('timecode-changed', (timecode) => {
|
|
53
|
+
logger.info(
|
|
54
|
+
`${timecode.layerName}: ${timecode.playState.state} ${timecode.layerId}`,
|
|
55
|
+
);
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
node.connect();
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Lifecycle
|
|
62
|
+
|
|
63
|
+
- Call `connect()` to bind sockets and start TCNet presence announcements.
|
|
64
|
+
- Listen for `ready`, `port-state-changed`, `nodes-changed`, `time`, `data`, and `node-status` events on the node.
|
|
65
|
+
- Call `destroy()` during shutdown so the node can opt out cleanly and release sockets.
|
|
66
|
+
|
|
67
|
+
## Logger Contract
|
|
68
|
+
|
|
69
|
+
`createTCNetNode(...)` expects a logger with `error`, `warn`, `info`, and `debug` methods. `pino` works directly, and the package keeps `pino` as an optional peer dependency.
|
package/dist/index.cjs
CHANGED
|
@@ -24,9 +24,9 @@ var _chunkVRXVI5VAcjs = require('./chunk-VRXVI5VA.cjs');
|
|
|
24
24
|
|
|
25
25
|
var _chunkVYNI4G3Kcjs = require('./chunk-VYNI4G3K.cjs');
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// ../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js
|
|
28
28
|
var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
29
|
-
"
|
|
29
|
+
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js"(exports, module) {
|
|
30
30
|
"use strict";
|
|
31
31
|
(function() {
|
|
32
32
|
var undefined;
|
|
@@ -359,7 +359,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
359
359
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
360
360
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
361
361
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
362
|
-
var nodeUtil = function() {
|
|
362
|
+
var nodeUtil = (function() {
|
|
363
363
|
try {
|
|
364
364
|
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
365
365
|
if (types) {
|
|
@@ -368,7 +368,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
368
368
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
369
369
|
} catch (e) {
|
|
370
370
|
}
|
|
371
|
-
}();
|
|
371
|
+
})();
|
|
372
372
|
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
373
373
|
function apply(func, thisArg, args) {
|
|
374
374
|
switch (args.length) {
|
|
@@ -714,7 +714,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
714
714
|
function unicodeWords(string) {
|
|
715
715
|
return string.match(reUnicodeWord) || [];
|
|
716
716
|
}
|
|
717
|
-
var runInContext = function runInContext2(context) {
|
|
717
|
+
var runInContext = (function runInContext2(context) {
|
|
718
718
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
719
719
|
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
|
|
720
720
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
@@ -722,10 +722,10 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
722
722
|
var funcToString = funcProto.toString;
|
|
723
723
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
724
724
|
var idCounter = 0;
|
|
725
|
-
var maskSrcKey = function() {
|
|
725
|
+
var maskSrcKey = (function() {
|
|
726
726
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
727
727
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
728
|
-
}();
|
|
728
|
+
})();
|
|
729
729
|
var nativeObjectToString = objectProto.toString;
|
|
730
730
|
var objectCtorString = funcToString.call(Object2);
|
|
731
731
|
var oldDash = root._;
|
|
@@ -733,14 +733,14 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
733
733
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
734
734
|
);
|
|
735
735
|
var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
736
|
-
var defineProperty = function() {
|
|
736
|
+
var defineProperty = (function() {
|
|
737
737
|
try {
|
|
738
738
|
var func = getNative(Object2, "defineProperty");
|
|
739
739
|
func({}, "", {});
|
|
740
740
|
return func;
|
|
741
741
|
} catch (e) {
|
|
742
742
|
}
|
|
743
|
-
}();
|
|
743
|
+
})();
|
|
744
744
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
745
745
|
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
746
746
|
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
@@ -759,7 +759,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
759
759
|
}
|
|
760
760
|
return new LodashWrapper(value);
|
|
761
761
|
}
|
|
762
|
-
var baseCreate = /* @__PURE__ */ function() {
|
|
762
|
+
var baseCreate = /* @__PURE__ */ (function() {
|
|
763
763
|
function object() {
|
|
764
764
|
}
|
|
765
765
|
return function(proto) {
|
|
@@ -774,7 +774,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
774
774
|
object.prototype = undefined;
|
|
775
775
|
return result2;
|
|
776
776
|
};
|
|
777
|
-
}();
|
|
777
|
+
})();
|
|
778
778
|
function baseLodash() {
|
|
779
779
|
}
|
|
780
780
|
function LodashWrapper(value, chainAll) {
|
|
@@ -4086,9 +4086,9 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
4086
4086
|
var gte = createRelationalOperation(function(value, other) {
|
|
4087
4087
|
return value >= other;
|
|
4088
4088
|
});
|
|
4089
|
-
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
4089
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
|
|
4090
4090
|
return arguments;
|
|
4091
|
-
}()) ? baseIsArguments : function(value) {
|
|
4091
|
+
})()) ? baseIsArguments : function(value) {
|
|
4092
4092
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
4093
4093
|
};
|
|
4094
4094
|
var isArray = Array2.isArray;
|
|
@@ -5340,7 +5340,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
5340
5340
|
lodash.each = forEach;
|
|
5341
5341
|
lodash.eachRight = forEachRight;
|
|
5342
5342
|
lodash.first = head;
|
|
5343
|
-
mixin(lodash, function() {
|
|
5343
|
+
mixin(lodash, (function() {
|
|
5344
5344
|
var source = {};
|
|
5345
5345
|
baseForOwn(lodash, function(func, methodName) {
|
|
5346
5346
|
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
|
@@ -5348,7 +5348,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
5348
5348
|
}
|
|
5349
5349
|
});
|
|
5350
5350
|
return source;
|
|
5351
|
-
}(), { "chain": false });
|
|
5351
|
+
})(), { "chain": false });
|
|
5352
5352
|
lodash.VERSION = VERSION;
|
|
5353
5353
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
5354
5354
|
lodash[methodName].placeholder = lodash;
|
|
@@ -5508,7 +5508,7 @@ var require_lodash = _chunkVYNI4G3Kcjs.__commonJS.call(void 0, {
|
|
|
5508
5508
|
lodash.prototype[symIterator] = wrapperToIterator;
|
|
5509
5509
|
}
|
|
5510
5510
|
return lodash;
|
|
5511
|
-
};
|
|
5511
|
+
});
|
|
5512
5512
|
var _ = runInContext();
|
|
5513
5513
|
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
|
|
5514
5514
|
root._ = _;
|
package/dist/index.js
CHANGED
|
@@ -24,9 +24,9 @@ import {
|
|
|
24
24
|
__toESM
|
|
25
25
|
} from "./chunk-VXAKTGOW.js";
|
|
26
26
|
|
|
27
|
-
//
|
|
27
|
+
// ../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js
|
|
28
28
|
var require_lodash = __commonJS({
|
|
29
|
-
"
|
|
29
|
+
"../../node_modules/.pnpm/lodash@4.17.23/node_modules/lodash/lodash.js"(exports, module) {
|
|
30
30
|
"use strict";
|
|
31
31
|
(function() {
|
|
32
32
|
var undefined;
|
|
@@ -359,7 +359,7 @@ var require_lodash = __commonJS({
|
|
|
359
359
|
var freeModule = freeExports && typeof module == "object" && module && !module.nodeType && module;
|
|
360
360
|
var moduleExports = freeModule && freeModule.exports === freeExports;
|
|
361
361
|
var freeProcess = moduleExports && freeGlobal.process;
|
|
362
|
-
var nodeUtil = function() {
|
|
362
|
+
var nodeUtil = (function() {
|
|
363
363
|
try {
|
|
364
364
|
var types = freeModule && freeModule.require && freeModule.require("util").types;
|
|
365
365
|
if (types) {
|
|
@@ -368,7 +368,7 @@ var require_lodash = __commonJS({
|
|
|
368
368
|
return freeProcess && freeProcess.binding && freeProcess.binding("util");
|
|
369
369
|
} catch (e) {
|
|
370
370
|
}
|
|
371
|
-
}();
|
|
371
|
+
})();
|
|
372
372
|
var nodeIsArrayBuffer = nodeUtil && nodeUtil.isArrayBuffer, nodeIsDate = nodeUtil && nodeUtil.isDate, nodeIsMap = nodeUtil && nodeUtil.isMap, nodeIsRegExp = nodeUtil && nodeUtil.isRegExp, nodeIsSet = nodeUtil && nodeUtil.isSet, nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
|
|
373
373
|
function apply(func, thisArg, args) {
|
|
374
374
|
switch (args.length) {
|
|
@@ -714,7 +714,7 @@ var require_lodash = __commonJS({
|
|
|
714
714
|
function unicodeWords(string) {
|
|
715
715
|
return string.match(reUnicodeWord) || [];
|
|
716
716
|
}
|
|
717
|
-
var runInContext = function runInContext2(context) {
|
|
717
|
+
var runInContext = (function runInContext2(context) {
|
|
718
718
|
context = context == null ? root : _.defaults(root.Object(), context, _.pick(root, contextProps));
|
|
719
719
|
var Array2 = context.Array, Date2 = context.Date, Error2 = context.Error, Function2 = context.Function, Math2 = context.Math, Object2 = context.Object, RegExp2 = context.RegExp, String2 = context.String, TypeError = context.TypeError;
|
|
720
720
|
var arrayProto = Array2.prototype, funcProto = Function2.prototype, objectProto = Object2.prototype;
|
|
@@ -722,10 +722,10 @@ var require_lodash = __commonJS({
|
|
|
722
722
|
var funcToString = funcProto.toString;
|
|
723
723
|
var hasOwnProperty = objectProto.hasOwnProperty;
|
|
724
724
|
var idCounter = 0;
|
|
725
|
-
var maskSrcKey = function() {
|
|
725
|
+
var maskSrcKey = (function() {
|
|
726
726
|
var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || "");
|
|
727
727
|
return uid ? "Symbol(src)_1." + uid : "";
|
|
728
|
-
}();
|
|
728
|
+
})();
|
|
729
729
|
var nativeObjectToString = objectProto.toString;
|
|
730
730
|
var objectCtorString = funcToString.call(Object2);
|
|
731
731
|
var oldDash = root._;
|
|
@@ -733,14 +733,14 @@ var require_lodash = __commonJS({
|
|
|
733
733
|
"^" + funcToString.call(hasOwnProperty).replace(reRegExpChar, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
734
734
|
);
|
|
735
735
|
var Buffer = moduleExports ? context.Buffer : undefined, Symbol = context.Symbol, Uint8Array = context.Uint8Array, allocUnsafe = Buffer ? Buffer.allocUnsafe : undefined, getPrototype = overArg(Object2.getPrototypeOf, Object2), objectCreate = Object2.create, propertyIsEnumerable = objectProto.propertyIsEnumerable, splice = arrayProto.splice, spreadableSymbol = Symbol ? Symbol.isConcatSpreadable : undefined, symIterator = Symbol ? Symbol.iterator : undefined, symToStringTag = Symbol ? Symbol.toStringTag : undefined;
|
|
736
|
-
var defineProperty = function() {
|
|
736
|
+
var defineProperty = (function() {
|
|
737
737
|
try {
|
|
738
738
|
var func = getNative(Object2, "defineProperty");
|
|
739
739
|
func({}, "", {});
|
|
740
740
|
return func;
|
|
741
741
|
} catch (e) {
|
|
742
742
|
}
|
|
743
|
-
}();
|
|
743
|
+
})();
|
|
744
744
|
var ctxClearTimeout = context.clearTimeout !== root.clearTimeout && context.clearTimeout, ctxNow = Date2 && Date2.now !== root.Date.now && Date2.now, ctxSetTimeout = context.setTimeout !== root.setTimeout && context.setTimeout;
|
|
745
745
|
var nativeCeil = Math2.ceil, nativeFloor = Math2.floor, nativeGetSymbols = Object2.getOwnPropertySymbols, nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined, nativeIsFinite = context.isFinite, nativeJoin = arrayProto.join, nativeKeys = overArg(Object2.keys, Object2), nativeMax = Math2.max, nativeMin = Math2.min, nativeNow = Date2.now, nativeParseInt = context.parseInt, nativeRandom = Math2.random, nativeReverse = arrayProto.reverse;
|
|
746
746
|
var DataView = getNative(context, "DataView"), Map = getNative(context, "Map"), Promise2 = getNative(context, "Promise"), Set = getNative(context, "Set"), WeakMap = getNative(context, "WeakMap"), nativeCreate = getNative(Object2, "create");
|
|
@@ -759,7 +759,7 @@ var require_lodash = __commonJS({
|
|
|
759
759
|
}
|
|
760
760
|
return new LodashWrapper(value);
|
|
761
761
|
}
|
|
762
|
-
var baseCreate = /* @__PURE__ */ function() {
|
|
762
|
+
var baseCreate = /* @__PURE__ */ (function() {
|
|
763
763
|
function object() {
|
|
764
764
|
}
|
|
765
765
|
return function(proto) {
|
|
@@ -774,7 +774,7 @@ var require_lodash = __commonJS({
|
|
|
774
774
|
object.prototype = undefined;
|
|
775
775
|
return result2;
|
|
776
776
|
};
|
|
777
|
-
}();
|
|
777
|
+
})();
|
|
778
778
|
function baseLodash() {
|
|
779
779
|
}
|
|
780
780
|
function LodashWrapper(value, chainAll) {
|
|
@@ -4086,9 +4086,9 @@ var require_lodash = __commonJS({
|
|
|
4086
4086
|
var gte = createRelationalOperation(function(value, other) {
|
|
4087
4087
|
return value >= other;
|
|
4088
4088
|
});
|
|
4089
|
-
var isArguments = baseIsArguments(/* @__PURE__ */ function() {
|
|
4089
|
+
var isArguments = baseIsArguments(/* @__PURE__ */ (function() {
|
|
4090
4090
|
return arguments;
|
|
4091
|
-
}()) ? baseIsArguments : function(value) {
|
|
4091
|
+
})()) ? baseIsArguments : function(value) {
|
|
4092
4092
|
return isObjectLike(value) && hasOwnProperty.call(value, "callee") && !propertyIsEnumerable.call(value, "callee");
|
|
4093
4093
|
};
|
|
4094
4094
|
var isArray = Array2.isArray;
|
|
@@ -5340,7 +5340,7 @@ var require_lodash = __commonJS({
|
|
|
5340
5340
|
lodash.each = forEach;
|
|
5341
5341
|
lodash.eachRight = forEachRight;
|
|
5342
5342
|
lodash.first = head;
|
|
5343
|
-
mixin(lodash, function() {
|
|
5343
|
+
mixin(lodash, (function() {
|
|
5344
5344
|
var source = {};
|
|
5345
5345
|
baseForOwn(lodash, function(func, methodName) {
|
|
5346
5346
|
if (!hasOwnProperty.call(lodash.prototype, methodName)) {
|
|
@@ -5348,7 +5348,7 @@ var require_lodash = __commonJS({
|
|
|
5348
5348
|
}
|
|
5349
5349
|
});
|
|
5350
5350
|
return source;
|
|
5351
|
-
}(), { "chain": false });
|
|
5351
|
+
})(), { "chain": false });
|
|
5352
5352
|
lodash.VERSION = VERSION;
|
|
5353
5353
|
arrayEach(["bind", "bindKey", "curry", "curryRight", "partial", "partialRight"], function(methodName) {
|
|
5354
5354
|
lodash[methodName].placeholder = lodash;
|
|
@@ -5508,7 +5508,7 @@ var require_lodash = __commonJS({
|
|
|
5508
5508
|
lodash.prototype[symIterator] = wrapperToIterator;
|
|
5509
5509
|
}
|
|
5510
5510
|
return lodash;
|
|
5511
|
-
};
|
|
5511
|
+
});
|
|
5512
5512
|
var _ = runInContext();
|
|
5513
5513
|
if (typeof define == "function" && typeof define.amd == "object" && define.amd) {
|
|
5514
5514
|
root._ = _;
|
|
@@ -5526,12 +5526,12 @@ var require_lodash = __commonJS({
|
|
|
5526
5526
|
});
|
|
5527
5527
|
|
|
5528
5528
|
// src/index.ts
|
|
5529
|
-
import { createSocket } from "
|
|
5530
|
-
import EventEmitter from "
|
|
5529
|
+
import { createSocket } from "dgram";
|
|
5530
|
+
import EventEmitter from "events";
|
|
5531
5531
|
import {
|
|
5532
5532
|
getNetworkInterfaces
|
|
5533
5533
|
} from "@arcanewizards/net-utils";
|
|
5534
|
-
import { promisify } from "
|
|
5534
|
+
import { promisify } from "util";
|
|
5535
5535
|
var import_lodash = __toESM(require_lodash(), 1);
|
|
5536
5536
|
var OPT_IN_INTERVAL = 1e3;
|
|
5537
5537
|
var PORT_BROADCAST = 6e4;
|
package/dist/monitor.js
CHANGED
package/dist/utils.d.cts
CHANGED
package/dist/utils.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@arcanewizards/tcnet",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
@@ -32,14 +32,7 @@
|
|
|
32
32
|
"files": [
|
|
33
33
|
"dist"
|
|
34
34
|
],
|
|
35
|
-
"scripts": {
|
|
36
|
-
"build": "rm -rf dist && tsup && check-export-map",
|
|
37
|
-
"check:types": "tsc --noEmit",
|
|
38
|
-
"lint": "eslint . --max-warnings 0"
|
|
39
|
-
},
|
|
40
35
|
"devDependencies": {
|
|
41
|
-
"@arcanewizards/eslint-config": "workspace:^",
|
|
42
|
-
"@arcanewizards/typescript-config": "workspace:^",
|
|
43
36
|
"@types/lodash": "^4.17.13",
|
|
44
37
|
"@types/node": "^22.19.3",
|
|
45
38
|
"check-export-map": "^1.3.1",
|
|
@@ -47,7 +40,9 @@
|
|
|
47
40
|
"lodash": "^4.17.21",
|
|
48
41
|
"pino": "^9.5.0",
|
|
49
42
|
"tsup": "^8.1.0",
|
|
50
|
-
"typescript": "^5.7.3"
|
|
43
|
+
"typescript": "^5.7.3",
|
|
44
|
+
"@arcanewizards/typescript-config": "^0.0.0",
|
|
45
|
+
"@arcanewizards/eslint-config": "^0.0.0"
|
|
51
46
|
},
|
|
52
47
|
"eslintConfig": {
|
|
53
48
|
"extends": [
|
|
@@ -63,6 +58,11 @@
|
|
|
63
58
|
}
|
|
64
59
|
},
|
|
65
60
|
"dependencies": {
|
|
66
|
-
"@arcanewizards/net-utils": "
|
|
61
|
+
"@arcanewizards/net-utils": "^0.1.2"
|
|
62
|
+
},
|
|
63
|
+
"scripts": {
|
|
64
|
+
"build": "rm -rf dist && tsup && check-export-map",
|
|
65
|
+
"check:types": "tsc --noEmit",
|
|
66
|
+
"lint": "eslint . --max-warnings 0"
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|