pmcf 2.23.0 → 2.24.0
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/package.json
CHANGED
|
@@ -5,7 +5,11 @@ import {
|
|
|
5
5
|
formatCIDR
|
|
6
6
|
} from "ip-utilties";
|
|
7
7
|
import { Base } from "./base.mjs";
|
|
8
|
-
import {
|
|
8
|
+
import {
|
|
9
|
+
Subnet,
|
|
10
|
+
SUBNET_LOCALHOST_IPV4,
|
|
11
|
+
SUBNET_LOCALHOST_IPV6
|
|
12
|
+
} from "./subnet.mjs";
|
|
9
13
|
import {
|
|
10
14
|
networkProperties,
|
|
11
15
|
networkAddressProperties
|
|
@@ -314,8 +318,8 @@ const LoopbackNetworkInterfaceTypeDefinition = {
|
|
|
314
318
|
};
|
|
315
319
|
|
|
316
320
|
const _localAddresses = new Map([
|
|
317
|
-
["127.0.0.1",
|
|
318
|
-
["::1",
|
|
321
|
+
["127.0.0.1", SUBNET_LOCALHOST_IPV4],
|
|
322
|
+
["::1", SUBNET_LOCALHOST_IPV6]
|
|
319
323
|
]);
|
|
320
324
|
|
|
321
325
|
export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
package/src/subnet.mjs
CHANGED
|
@@ -83,6 +83,10 @@ export class Subnet extends Base {
|
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
const _owner = { addObject() {} };
|
|
87
|
+
export const SUBNET_LOCALHOST_IPV4 = new Subnet(_owner, "127.0.0.1/8");
|
|
88
|
+
export const SUBNET_LOCALHOST_IPV6 = new Subnet(_owner, "::1/128");
|
|
89
|
+
|
|
86
90
|
export function subnets(sources) {
|
|
87
91
|
const all = new Set();
|
|
88
92
|
|
|
@@ -695,11 +695,7 @@ export class LoopbackNetworkInterface extends SkeletonNetworkInterface {
|
|
|
695
695
|
get kind(): string;
|
|
696
696
|
get scope(): string;
|
|
697
697
|
get hostName(): string;
|
|
698
|
-
get ipAddresses(): Map<string,
|
|
699
|
-
address: string;
|
|
700
|
-
prefix: string;
|
|
701
|
-
prefixLength: number;
|
|
702
|
-
}>;
|
|
698
|
+
get ipAddresses(): Map<string, Subnet>;
|
|
703
699
|
}
|
|
704
700
|
import { Subnet } from "./subnet.mjs";
|
|
705
701
|
declare class SkeletonNetworkInterface extends Base {
|
package/types/subnet.d.mts
CHANGED