infracensus-collector 1.6.21 → 1.6.22
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/dist/a10-index.js +2 -2
- package/dist/azure-index.js +6 -6
- package/dist/{chunk-MP6JAAFY.js → chunk-4IEMV6WZ.js} +4 -4
- package/dist/{chunk-WPRMFIPU.js → chunk-4ZWKLK4J.js} +2 -2
- package/dist/{chunk-FNCTUV2L.js → chunk-5H3CC4JW.js} +2 -2
- package/dist/{chunk-FJ22GRKW.js → chunk-6LOVKE5Y.js} +2 -2
- package/dist/{chunk-HGADZRD3.js → chunk-ALFPZRSX.js} +4 -4
- package/dist/{chunk-SSKRKLNM.js → chunk-CN4SKR2W.js} +2 -2
- package/dist/{chunk-32BYFAKO.js → chunk-DA2A44PO.js} +2 -2
- package/dist/{chunk-FQNQEK35.js → chunk-ER3GVMGW.js} +2 -2
- package/dist/{chunk-HDNYHF57.js → chunk-FFCFK3H6.js} +4 -4
- package/dist/{chunk-4UOTVQ2D.js → chunk-H3F3FWT4.js} +217 -28
- package/dist/chunk-H3F3FWT4.js.map +7 -0
- package/dist/{chunk-FXUH6FPP.js → chunk-MBRLC752.js} +2 -2
- package/dist/{chunk-YWOXCYLX.js → chunk-NMBANWS2.js} +4 -4
- package/dist/{chunk-WYJH3AW5.js → chunk-OJDDZTYF.js} +2 -2
- package/dist/{chunk-SSELCAMT.js → chunk-UQAZFFNX.js} +2 -2
- package/dist/{chunk-2XRLDUAC.js → chunk-X25FV5BG.js} +5447 -6072
- package/dist/chunk-X25FV5BG.js.map +7 -0
- package/dist/{chunk-DI6WLXKR.js → chunk-ZFG4BMUQ.js} +3 -3
- package/dist/cli.js +7 -7
- package/dist/{config-5S3SX2ZB.js → config-F3LHDV77.js} +3 -3
- package/dist/configimport-index.js +4 -4
- package/dist/hyperv-index.js +6 -6
- package/dist/identity-index.js +6 -6
- package/dist/index.js +277 -21
- package/dist/index.js.map +3 -3
- package/dist/sensitive-data-index.js +7 -7
- package/dist/sql-index.js +6 -6
- package/dist/{status-7YZQI2LY.js → status-WUH2IS5C.js} +6 -6
- package/dist/vmware-index.js +6 -6
- package/dist/voice-index.js +6 -6
- package/package.json +1 -1
- package/dist/chunk-2XRLDUAC.js.map +0 -7
- package/dist/chunk-4UOTVQ2D.js.map +0 -7
- /package/dist/{chunk-MP6JAAFY.js.map → chunk-4IEMV6WZ.js.map} +0 -0
- /package/dist/{chunk-WPRMFIPU.js.map → chunk-4ZWKLK4J.js.map} +0 -0
- /package/dist/{chunk-FNCTUV2L.js.map → chunk-5H3CC4JW.js.map} +0 -0
- /package/dist/{chunk-FJ22GRKW.js.map → chunk-6LOVKE5Y.js.map} +0 -0
- /package/dist/{chunk-HGADZRD3.js.map → chunk-ALFPZRSX.js.map} +0 -0
- /package/dist/{chunk-SSKRKLNM.js.map → chunk-CN4SKR2W.js.map} +0 -0
- /package/dist/{chunk-32BYFAKO.js.map → chunk-DA2A44PO.js.map} +0 -0
- /package/dist/{chunk-FQNQEK35.js.map → chunk-ER3GVMGW.js.map} +0 -0
- /package/dist/{chunk-HDNYHF57.js.map → chunk-FFCFK3H6.js.map} +0 -0
- /package/dist/{chunk-FXUH6FPP.js.map → chunk-MBRLC752.js.map} +0 -0
- /package/dist/{chunk-YWOXCYLX.js.map → chunk-NMBANWS2.js.map} +0 -0
- /package/dist/{chunk-WYJH3AW5.js.map → chunk-OJDDZTYF.js.map} +0 -0
- /package/dist/{chunk-SSELCAMT.js.map → chunk-UQAZFFNX.js.map} +0 -0
- /package/dist/{chunk-DI6WLXKR.js.map → chunk-ZFG4BMUQ.js.map} +0 -0
- /package/dist/{config-5S3SX2ZB.js.map → config-F3LHDV77.js.map} +0 -0
- /package/dist/{status-7YZQI2LY.js.map → status-WUH2IS5C.js.map} +0 -0
package/dist/a10-index.js
CHANGED
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
} from "./chunk-NH4RDH3P.js";
|
|
5
5
|
import {
|
|
6
6
|
requireEntitlementToScan
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-H3F3FWT4.js";
|
|
8
8
|
import {
|
|
9
9
|
ROUTES
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-X25FV5BG.js";
|
|
11
11
|
import "./chunk-CW3YCPEC.js";
|
|
12
12
|
|
|
13
13
|
// src/a10-index.ts
|
package/dist/azure-index.js
CHANGED
|
@@ -2,18 +2,18 @@ import {
|
|
|
2
2
|
ArmClient,
|
|
3
3
|
buildAzureInventory,
|
|
4
4
|
listAccessibleSubscriptions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-DA2A44PO.js";
|
|
6
6
|
import {
|
|
7
7
|
pushAzureInventory
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-NMBANWS2.js";
|
|
9
|
+
import "./chunk-5H3CC4JW.js";
|
|
10
10
|
import {
|
|
11
11
|
loadAzureConfig
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ER3GVMGW.js";
|
|
13
13
|
import {
|
|
14
14
|
requireEntitlementToScan
|
|
15
|
-
} from "./chunk-
|
|
16
|
-
import "./chunk-
|
|
15
|
+
} from "./chunk-H3F3FWT4.js";
|
|
16
|
+
import "./chunk-X25FV5BG.js";
|
|
17
17
|
import "./chunk-CW3YCPEC.js";
|
|
18
18
|
|
|
19
19
|
// src/azure-index.ts
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VaultError,
|
|
3
3
|
openVault
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-UQAZFFNX.js";
|
|
5
5
|
import {
|
|
6
6
|
configFilePath,
|
|
7
7
|
vaultSettings
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ER3GVMGW.js";
|
|
9
9
|
import {
|
|
10
10
|
VaultProtection
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-X25FV5BG.js";
|
|
12
12
|
|
|
13
13
|
// src/vault/collectorKey.ts
|
|
14
14
|
import { readFileSync, writeFileSync, renameSync, existsSync } from "node:fs";
|
|
@@ -129,4 +129,4 @@ export {
|
|
|
129
129
|
migrateCollectorApiKey,
|
|
130
130
|
plaintextKeyWarning
|
|
131
131
|
};
|
|
132
|
-
//# sourceMappingURL=chunk-
|
|
132
|
+
//# sourceMappingURL=chunk-4IEMV6WZ.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
IdentityIngestBody,
|
|
14
14
|
M365Licensing,
|
|
15
15
|
M365Workload
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X25FV5BG.js";
|
|
17
17
|
|
|
18
18
|
// src/identity/graph.ts
|
|
19
19
|
var noopLog = () => {
|
|
@@ -1123,4 +1123,4 @@ export {
|
|
|
1123
1123
|
GraphClient,
|
|
1124
1124
|
buildIdentityInventory
|
|
1125
1125
|
};
|
|
1126
|
-
//# sourceMappingURL=chunk-
|
|
1126
|
+
//# sourceMappingURL=chunk-4ZWKLK4J.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
3
|
moduleForScanDomain
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-X25FV5BG.js";
|
|
5
5
|
|
|
6
6
|
// src/core/planRefusal.ts
|
|
7
7
|
var PLAN_REFUSAL_CODES = [
|
|
@@ -112,4 +112,4 @@ export {
|
|
|
112
112
|
asPlanRefusal,
|
|
113
113
|
createRefusalLatch
|
|
114
114
|
};
|
|
115
|
-
//# sourceMappingURL=chunk-
|
|
115
|
+
//# sourceMappingURL=chunk-5H3CC4JW.js.map
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-4ARXQ6VD.js";
|
|
4
4
|
import {
|
|
5
5
|
HypervIngestBody
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-X25FV5BG.js";
|
|
7
7
|
|
|
8
8
|
// src/hyperv/scan.ts
|
|
9
9
|
import { spawn } from "node:child_process";
|
|
@@ -538,4 +538,4 @@ export {
|
|
|
538
538
|
scanHypervTargets,
|
|
539
539
|
buildHypervInventory
|
|
540
540
|
};
|
|
541
|
-
//# sourceMappingURL=chunk-
|
|
541
|
+
//# sourceMappingURL=chunk-6LOVKE5Y.js.map
|
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
collectorVersion,
|
|
4
4
|
findModule,
|
|
5
5
|
restartNeededNotice
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-ZFG4BMUQ.js";
|
|
7
7
|
import {
|
|
8
8
|
redactLocal
|
|
9
9
|
} from "./chunk-DIS3S4SY.js";
|
|
10
10
|
import {
|
|
11
11
|
configFilePath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ER3GVMGW.js";
|
|
13
13
|
import {
|
|
14
14
|
collectorEntitlementStatus,
|
|
15
15
|
collectorOwnsModule
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-H3F3FWT4.js";
|
|
17
17
|
import {
|
|
18
18
|
PKG_ROOT
|
|
19
19
|
} from "./chunk-CW3YCPEC.js";
|
|
@@ -312,4 +312,4 @@ export {
|
|
|
312
312
|
condenseLogTail,
|
|
313
313
|
buildUiStatus
|
|
314
314
|
};
|
|
315
|
-
//# sourceMappingURL=chunk-
|
|
315
|
+
//# sourceMappingURL=chunk-ALFPZRSX.js.map
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
VoiceRegion,
|
|
14
14
|
VoiceSystem,
|
|
15
15
|
WebexCalling
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-X25FV5BG.js";
|
|
17
17
|
|
|
18
18
|
// src/voice/axl.ts
|
|
19
19
|
import { XMLParser } from "fast-xml-parser";
|
|
@@ -1951,4 +1951,4 @@ export {
|
|
|
1951
1951
|
buildUnityInventory,
|
|
1952
1952
|
buildWebexInventory
|
|
1953
1953
|
};
|
|
1954
|
-
//# sourceMappingURL=chunk-
|
|
1954
|
+
//# sourceMappingURL=chunk-CN4SKR2W.js.map
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
AzureRbacAssignment,
|
|
9
9
|
AzureResource,
|
|
10
10
|
AzureSubscription
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-X25FV5BG.js";
|
|
12
12
|
|
|
13
13
|
// src/azure/arm.ts
|
|
14
14
|
var noopLog = () => {
|
|
@@ -848,4 +848,4 @@ export {
|
|
|
848
848
|
listAccessibleSubscriptions,
|
|
849
849
|
buildAzureInventory
|
|
850
850
|
};
|
|
851
|
-
//# sourceMappingURL=chunk-
|
|
851
|
+
//# sourceMappingURL=chunk-DA2A44PO.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VaultProtection
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-X25FV5BG.js";
|
|
4
4
|
import {
|
|
5
5
|
PKG_ROOT
|
|
6
6
|
} from "./chunk-CW3YCPEC.js";
|
|
@@ -820,4 +820,4 @@ export {
|
|
|
820
820
|
loadSensitiveDataConfig,
|
|
821
821
|
loadAzureConfig
|
|
822
822
|
};
|
|
823
|
-
//# sourceMappingURL=chunk-
|
|
823
|
+
//# sourceMappingURL=chunk-ER3GVMGW.js.map
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import {
|
|
2
2
|
planRefusalFrom
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5H3CC4JW.js";
|
|
4
4
|
import {
|
|
5
5
|
COLLECTOR_AUTH_HEADER,
|
|
6
6
|
collectorBearer,
|
|
7
7
|
noteEntitlementRefusalFromPlane
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-H3F3FWT4.js";
|
|
9
9
|
import {
|
|
10
10
|
ApiError,
|
|
11
11
|
ClaimedJobResponse,
|
|
12
12
|
CollectorSddHostsResult,
|
|
13
13
|
ROUTES,
|
|
14
14
|
ScanJobStatusResult
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-X25FV5BG.js";
|
|
16
16
|
import {
|
|
17
17
|
PKG_ROOT
|
|
18
18
|
} from "./chunk-CW3YCPEC.js";
|
|
@@ -387,4 +387,4 @@ export {
|
|
|
387
387
|
claimNextJob,
|
|
388
388
|
reportStatus
|
|
389
389
|
};
|
|
390
|
-
//# sourceMappingURL=chunk-
|
|
390
|
+
//# sourceMappingURL=chunk-FFCFK3H6.js.map
|
|
@@ -1,23 +1,211 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ApiError,
|
|
3
3
|
CollectorEntitlementResult,
|
|
4
|
-
|
|
4
|
+
Device,
|
|
5
|
+
DeviceNeighbor,
|
|
6
|
+
Id,
|
|
7
|
+
IpAddress,
|
|
8
|
+
IsoTimestamp,
|
|
9
|
+
NetworkInterface,
|
|
10
|
+
NetworkLink,
|
|
5
11
|
ROUTES
|
|
6
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-X25FV5BG.js";
|
|
7
13
|
import {
|
|
8
14
|
PKG_ROOT
|
|
9
15
|
} from "./chunk-CW3YCPEC.js";
|
|
10
16
|
|
|
11
17
|
// ../../packages/collector-contract/src/ingest.ts
|
|
18
|
+
import { z as z3 } from "zod";
|
|
19
|
+
|
|
20
|
+
// ../../packages/canonical-model/src/operational.ts
|
|
12
21
|
import { z } from "zod";
|
|
22
|
+
var StpInstance = z.object({
|
|
23
|
+
/** VLAN id (PVST/RPVST) or MST instance id, as reported (e.g. "10", "MST0"). */
|
|
24
|
+
instance: z.string(),
|
|
25
|
+
/** The STP mode this instance runs — used to flag a mixed PVST/RPVST/MST estate. */
|
|
26
|
+
protocol: z.enum(["pvst", "rapid-pvst", "mst", "unknown"]).default("unknown"),
|
|
27
|
+
/** This bridge is the root for the instance ("This bridge is the root"). */
|
|
28
|
+
isRoot: z.boolean().default(false),
|
|
29
|
+
/** Root bridge id (priority + MAC) as reported, for cross-VLAN root-consistency. */
|
|
30
|
+
rootId: z.string().optional(),
|
|
31
|
+
/** Ports in BLK/blocking for this instance (a high count hints at an L2 loop / suboptimal topology). */
|
|
32
|
+
blockingPorts: z.number().int().nonnegative().default(0)
|
|
33
|
+
});
|
|
34
|
+
var StpState = z.object({
|
|
35
|
+
instances: z.array(StpInstance).default([]),
|
|
36
|
+
/** `spanning-tree loopguard default` present (from config, folded in for convenience). */
|
|
37
|
+
loopguardDefault: z.boolean().optional(),
|
|
38
|
+
/** Any interface has root guard enabled. */
|
|
39
|
+
rootguardAny: z.boolean().optional()
|
|
40
|
+
});
|
|
41
|
+
var BgpPeer = z.object({
|
|
42
|
+
peer: z.string(),
|
|
43
|
+
remoteAs: z.string().optional(),
|
|
44
|
+
/** "Established" when up; otherwise the FSM state (Idle / Active / Connect / OpenSent …). */
|
|
45
|
+
state: z.string(),
|
|
46
|
+
up: z.boolean(),
|
|
47
|
+
/** Prefixes received (PfxRcd), when the summary reports it. */
|
|
48
|
+
prefixes: z.number().int().nonnegative().optional(),
|
|
49
|
+
/** Up/Down time as reported (e.g. "3w2d", "00:00:12"). */
|
|
50
|
+
uptime: z.string().optional()
|
|
51
|
+
});
|
|
52
|
+
var OspfNeighbor = z.object({
|
|
53
|
+
neighbor: z.string(),
|
|
54
|
+
/** FULL / 2WAY / EXSTART / EXCHANGE / LOADING / INIT / DOWN … (adjacency FSM). */
|
|
55
|
+
state: z.string(),
|
|
56
|
+
/** Adjacency is fully formed (FULL, or 2WAY on a broadcast network with a DR/BDR). */
|
|
57
|
+
full: z.boolean(),
|
|
58
|
+
iface: z.string().optional()
|
|
59
|
+
});
|
|
60
|
+
var NtpSyncState = z.object({
|
|
61
|
+
/** An NTP source is configured / associated. */
|
|
62
|
+
configured: z.boolean().default(false),
|
|
63
|
+
/** The clock is actually SYNCHRONIZED to a source (not just configured). */
|
|
64
|
+
synchronized: z.boolean().default(false),
|
|
65
|
+
stratum: z.number().int().optional(),
|
|
66
|
+
/** The synced peer address, when reported. */
|
|
67
|
+
source: z.string().optional()
|
|
68
|
+
});
|
|
69
|
+
var PortChannelMember = z.object({
|
|
70
|
+
name: z.string(),
|
|
71
|
+
up: z.boolean(),
|
|
72
|
+
/** Member flag/state as reported (e.g. "P" bundled, "s" suspended, "D" down). */
|
|
73
|
+
status: z.string().optional()
|
|
74
|
+
});
|
|
75
|
+
var PortChannel = z.object({
|
|
76
|
+
id: z.string(),
|
|
77
|
+
/** LACP / PAgP / "-" (static). */
|
|
78
|
+
protocol: z.string().optional(),
|
|
79
|
+
/** The bundle itself is up (at least one member forwarding). */
|
|
80
|
+
up: z.boolean(),
|
|
81
|
+
members: z.array(PortChannelMember).default([])
|
|
82
|
+
});
|
|
83
|
+
var Vpc = z.object({
|
|
84
|
+
id: z.string(),
|
|
85
|
+
up: z.boolean(),
|
|
86
|
+
/** vPC consistency-check passed, when reported. */
|
|
87
|
+
consistent: z.boolean().optional()
|
|
88
|
+
});
|
|
89
|
+
var VpcState = z.object({
|
|
90
|
+
domainId: z.string().optional(),
|
|
91
|
+
/** vPC peer-link is up. */
|
|
92
|
+
peerLinkUp: z.boolean(),
|
|
93
|
+
/** vPC peer-keepalive is up. */
|
|
94
|
+
keepaliveUp: z.boolean(),
|
|
95
|
+
/** This peer's vPC role (primary / secondary / none), when reported. */
|
|
96
|
+
role: z.string().optional(),
|
|
97
|
+
vpcs: z.array(Vpc).default([])
|
|
98
|
+
});
|
|
99
|
+
var FhrpGroup = z.object({
|
|
100
|
+
protocol: z.enum(["hsrp", "vrrp", "glbp", "unknown"]).default("unknown"),
|
|
101
|
+
group: z.string(),
|
|
102
|
+
iface: z.string().optional(),
|
|
103
|
+
/** Active / Standby / Init / Listen / Speak (HSRP), Master / Backup (VRRP), etc. */
|
|
104
|
+
state: z.string(),
|
|
105
|
+
/** This box owns the virtual IP right now (HSRP Active, VRRP Master, GLBP Active). */
|
|
106
|
+
active: z.boolean(),
|
|
107
|
+
priority: z.number().int().optional(),
|
|
108
|
+
virtualIp: z.string().optional()
|
|
109
|
+
});
|
|
110
|
+
var IfStatus = z.object({
|
|
111
|
+
name: z.string(),
|
|
112
|
+
/** connected / notconnect / disabled / err-disabled / down / … (as reported). */
|
|
113
|
+
status: z.string(),
|
|
114
|
+
errDisabled: z.boolean().default(false),
|
|
115
|
+
/** Access VLAN or "trunk"/"routed", when reported. */
|
|
116
|
+
vlan: z.string().optional()
|
|
117
|
+
});
|
|
118
|
+
var PowerSupply = z.object({
|
|
119
|
+
id: z.string(),
|
|
120
|
+
ok: z.boolean(),
|
|
121
|
+
status: z.string().optional()
|
|
122
|
+
});
|
|
123
|
+
var OperationalStackMember = z.object({
|
|
124
|
+
id: z.string(),
|
|
125
|
+
/** master / member / standby, when reported. */
|
|
126
|
+
role: z.string().optional(),
|
|
127
|
+
model: z.string().optional(),
|
|
128
|
+
version: z.string().optional(),
|
|
129
|
+
/** Ready / provisioned / version-mismatch / …, when reported. */
|
|
130
|
+
state: z.string().optional()
|
|
131
|
+
});
|
|
132
|
+
var Environment = z.object({
|
|
133
|
+
powerSupplies: z.array(PowerSupply).default([]),
|
|
134
|
+
stackMembers: z.array(OperationalStackMember).default([])
|
|
135
|
+
});
|
|
136
|
+
var DeviceOperational = z.object({
|
|
137
|
+
deviceId: Id,
|
|
138
|
+
stp: StpState.optional(),
|
|
139
|
+
bgpPeers: z.array(BgpPeer).default([]),
|
|
140
|
+
ospfNeighbors: z.array(OspfNeighbor).default([]),
|
|
141
|
+
ntp: NtpSyncState.optional(),
|
|
142
|
+
portChannels: z.array(PortChannel).default([]),
|
|
143
|
+
vpc: VpcState.optional(),
|
|
144
|
+
fhrp: z.array(FhrpGroup).default([]),
|
|
145
|
+
interfaces: z.array(IfStatus).default([]),
|
|
146
|
+
environment: Environment.optional()
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
// ../../packages/canonical-model/src/snapshot.ts
|
|
150
|
+
import { z as z2 } from "zod";
|
|
151
|
+
var ConfigCapture = z2.object({
|
|
152
|
+
deviceId: Id,
|
|
153
|
+
/** e.g. "running-config". */
|
|
154
|
+
kind: z2.string().default("running-config"),
|
|
155
|
+
text: z2.string()
|
|
156
|
+
});
|
|
157
|
+
var DiscoverySnapshot = z2.object({
|
|
158
|
+
/** Schema version of the snapshot envelope itself. */
|
|
159
|
+
schemaVersion: z2.literal(1),
|
|
160
|
+
/** Stable id of the collector instance that produced this snapshot. */
|
|
161
|
+
collectorId: Id,
|
|
162
|
+
tenantId: Id,
|
|
163
|
+
orgId: Id,
|
|
164
|
+
siteId: Id,
|
|
165
|
+
/** When the scan completed, set by the collector. */
|
|
166
|
+
capturedAt: IsoTimestamp,
|
|
167
|
+
devices: z2.array(Device),
|
|
168
|
+
interfaces: z2.array(NetworkInterface),
|
|
169
|
+
ipAddresses: z2.array(IpAddress),
|
|
170
|
+
links: z2.array(NetworkLink),
|
|
171
|
+
/**
|
|
172
|
+
* Raw CDP/LLDP neighbor facts (ADR-006 Phase 2), additive to `links` — kept
|
|
173
|
+
* even when the neighbor's remote end isn't itself a device in this scan, so
|
|
174
|
+
* the control plane can resolve it against OTHER sites at read time.
|
|
175
|
+
* `.default([])` keeps snapshots from not-yet-upgraded collectors valid.
|
|
176
|
+
*/
|
|
177
|
+
neighbors: z2.array(DeviceNeighbor).default([]),
|
|
178
|
+
/** Per-device config text captured this run (may be empty). */
|
|
179
|
+
configs: z2.array(ConfigCapture).default([]),
|
|
180
|
+
/**
|
|
181
|
+
* Per-device OPERATIONAL state parsed from `show`-command output this run (STP
|
|
182
|
+
* root/blocking, BGP/OSPF adjacency state, NTP sync, port-channel/vPC/FHRP
|
|
183
|
+
* health, interface status, power/stack) — the runtime facts a running-config
|
|
184
|
+
* can't show, consumed by the operational rules engine. `.default([])` keeps
|
|
185
|
+
* snapshots from not-yet-upgraded collectors valid (they simply send none).
|
|
186
|
+
*/
|
|
187
|
+
operational: z2.array(DeviceOperational).default([])
|
|
188
|
+
});
|
|
189
|
+
var SnapshotHeader = z2.object({
|
|
190
|
+
id: Id,
|
|
191
|
+
tenantId: Id,
|
|
192
|
+
siteId: Id,
|
|
193
|
+
collectorId: Id,
|
|
194
|
+
version: z2.number().int().positive(),
|
|
195
|
+
capturedAt: IsoTimestamp,
|
|
196
|
+
receivedAt: IsoTimestamp,
|
|
197
|
+
deviceCount: z2.number().int().nonnegative()
|
|
198
|
+
});
|
|
199
|
+
|
|
200
|
+
// ../../packages/collector-contract/src/ingest.ts
|
|
13
201
|
var IngestBody = DiscoverySnapshot;
|
|
14
202
|
var COLLECTOR_AUTH_HEADER = "Authorization";
|
|
15
203
|
var collectorBearer = (apiKey) => `Bearer ${apiKey}`;
|
|
16
|
-
var IngestResult =
|
|
17
|
-
ok:
|
|
18
|
-
snapshotId:
|
|
19
|
-
version:
|
|
20
|
-
deviceCount:
|
|
204
|
+
var IngestResult = z3.object({
|
|
205
|
+
ok: z3.literal(true),
|
|
206
|
+
snapshotId: z3.string(),
|
|
207
|
+
version: z3.number().int().positive(),
|
|
208
|
+
deviceCount: z3.number().int().nonnegative()
|
|
21
209
|
});
|
|
22
210
|
|
|
23
211
|
// src/entitlement/verdict.ts
|
|
@@ -171,21 +359,21 @@ function describeTransportFailure(err) {
|
|
|
171
359
|
// src/entitlement/cache.ts
|
|
172
360
|
import { existsSync, mkdirSync, readFileSync, renameSync, writeFileSync } from "node:fs";
|
|
173
361
|
import { dirname, join } from "node:path";
|
|
174
|
-
import { z as
|
|
362
|
+
import { z as z4 } from "zod";
|
|
175
363
|
function entitlementCachePath() {
|
|
176
364
|
return process.env.COLLECTOR_ENTITLEMENT_CACHE_FILE ?? join(PKG_ROOT, "collector-entitlement.json");
|
|
177
365
|
}
|
|
178
|
-
var CachedVerdictFile =
|
|
179
|
-
version:
|
|
180
|
-
verdict:
|
|
181
|
-
|
|
182
|
-
allowed:
|
|
183
|
-
confirmedAtLocal:
|
|
184
|
-
confirmedAt:
|
|
185
|
-
licenceExpiresAt:
|
|
186
|
-
tier:
|
|
187
|
-
tenantId:
|
|
188
|
-
collectorId:
|
|
366
|
+
var CachedVerdictFile = z4.object({
|
|
367
|
+
version: z4.literal(1),
|
|
368
|
+
verdict: z4.union([
|
|
369
|
+
z4.object({
|
|
370
|
+
allowed: z4.literal(true),
|
|
371
|
+
confirmedAtLocal: z4.string(),
|
|
372
|
+
confirmedAt: z4.string(),
|
|
373
|
+
licenceExpiresAt: z4.string(),
|
|
374
|
+
tier: z4.string().nullable(),
|
|
375
|
+
tenantId: z4.string(),
|
|
376
|
+
collectorId: z4.string(),
|
|
189
377
|
// The owned-module list, so a restart can SHOW which scans were last
|
|
190
378
|
// permitted. Required for the same reason the rest of the shape is: a file
|
|
191
379
|
// written by an older build that lacks it fails to parse and reads as an
|
|
@@ -193,15 +381,15 @@ var CachedVerdictFile = z2.object({
|
|
|
193
381
|
// check rewrites it. Nothing starts work on a cached list either way: the
|
|
194
382
|
// synchronous per-module backstop, like the paid-collector one, refuses
|
|
195
383
|
// until THIS process has re-confirmed.
|
|
196
|
-
modules:
|
|
384
|
+
modules: z4.array(z4.string())
|
|
197
385
|
}),
|
|
198
|
-
|
|
199
|
-
allowed:
|
|
200
|
-
reason:
|
|
201
|
-
checkedAtLocal:
|
|
202
|
-
message:
|
|
203
|
-
planeMessage:
|
|
204
|
-
httpStatus:
|
|
386
|
+
z4.object({
|
|
387
|
+
allowed: z4.literal(false),
|
|
388
|
+
reason: z4.enum(["not_paid", "deactivated", "unconfirmed"]),
|
|
389
|
+
checkedAtLocal: z4.string(),
|
|
390
|
+
message: z4.string(),
|
|
391
|
+
planeMessage: z4.string().nullable(),
|
|
392
|
+
httpStatus: z4.number().nullable()
|
|
205
393
|
})
|
|
206
394
|
])
|
|
207
395
|
});
|
|
@@ -479,6 +667,7 @@ function assertEntitlementConfirmed(config, log, attempted) {
|
|
|
479
667
|
}
|
|
480
668
|
|
|
481
669
|
export {
|
|
670
|
+
ConfigCapture,
|
|
482
671
|
IngestBody,
|
|
483
672
|
COLLECTOR_AUTH_HEADER,
|
|
484
673
|
collectorBearer,
|
|
@@ -494,4 +683,4 @@ export {
|
|
|
494
683
|
requireEntitlementToScan,
|
|
495
684
|
assertEntitlementConfirmed
|
|
496
685
|
};
|
|
497
|
-
//# sourceMappingURL=chunk-
|
|
686
|
+
//# sourceMappingURL=chunk-H3F3FWT4.js.map
|