fullcourtdefense-cli 1.16.0 → 1.17.1
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/commands/daemon.js
CHANGED
|
@@ -658,10 +658,13 @@ async function runDaemon(args, config) {
|
|
|
658
658
|
const watched = refreshWatchTargets();
|
|
659
659
|
log(`Watching ${watched} config file(s) across ${watchers.size} director${watchers.size === 1 ? 'y' : 'ies'}.`);
|
|
660
660
|
await pollBundle();
|
|
661
|
-
await heartbeat();
|
|
662
661
|
// One protective pass at startup so a machine that drifted while the daemon
|
|
663
|
-
// was down converges immediately.
|
|
662
|
+
// was down converges immediately. Runs BEFORE the first heartbeat: upgrades
|
|
663
|
+
// legitimately leave stale hook/wrap paths behind, and heartbeating first
|
|
664
|
+
// would report a false "damaged" state (and fire admin integrity alerts)
|
|
665
|
+
// for a condition the very next line repairs.
|
|
664
666
|
await reprotect(['startup pass']);
|
|
667
|
+
await heartbeat();
|
|
665
668
|
// Fresh machines have never uploaded an inventory (MSI/onboard defers the
|
|
666
669
|
// initial discovery to keep setup fast), so the dashboard shows "Never" for
|
|
667
670
|
// discovery + posture until the daily scheduled job fires — up to 24h later.
|
package/dist/commands/login.d.ts
CHANGED
|
@@ -3,6 +3,8 @@ export interface LoginArgs {
|
|
|
3
3
|
/** Reusable, non-expiring fleet enrollment token (or FCD_ENROLL_TOKEN env). */
|
|
4
4
|
token?: string;
|
|
5
5
|
apiUrl?: string;
|
|
6
|
+
/** Admin-facing friendly machine name shown next to the hostname in the console. */
|
|
7
|
+
nickname?: string;
|
|
6
8
|
}
|
|
7
9
|
/**
|
|
8
10
|
* `fullcourtdefense login` — zero-paste machine enrollment.
|
package/dist/commands/login.js
CHANGED
|
@@ -21,8 +21,11 @@ async function loginCommand(args, config) {
|
|
|
21
21
|
}
|
|
22
22
|
const identity = (0, machineIdentity_1.getMachineIdentity)();
|
|
23
23
|
const shieldName = (0, machineIdentity_1.suggestedShieldName)(identity);
|
|
24
|
+
const nickname = (args.nickname || process.env.FCD_MACHINE_NICKNAME || '').trim().slice(0, 80) || undefined;
|
|
24
25
|
console.log('\x1b[1mEnrolling this machine…\x1b[0m');
|
|
25
26
|
console.log(` Device: ${identity.developerName}`);
|
|
27
|
+
if (nickname)
|
|
28
|
+
console.log(` Name: ${nickname}`);
|
|
26
29
|
console.log(` OS: ${identity.osFriendly}`);
|
|
27
30
|
console.log(` Shield: ${shieldName}`);
|
|
28
31
|
const resp = await fetch(`${apiUrl}/api/cli/enroll`, {
|
|
@@ -39,6 +42,7 @@ async function loginCommand(args, config) {
|
|
|
39
42
|
osFriendly: identity.osFriendly,
|
|
40
43
|
platform: identity.platform,
|
|
41
44
|
shieldName,
|
|
45
|
+
nickname,
|
|
42
46
|
}),
|
|
43
47
|
});
|
|
44
48
|
const data = (await resp.json().catch(() => ({})));
|
|
@@ -3,6 +3,8 @@ import { InstallAllArgs } from './installAll';
|
|
|
3
3
|
export interface OnboardArgs extends InstallAllArgs {
|
|
4
4
|
/** Fleet enrollment token (or FCD_ENROLL_TOKEN env). Optional when already enrolled. */
|
|
5
5
|
token?: string;
|
|
6
|
+
/** Admin-facing friendly machine name (or FCD_MACHINE_NICKNAME env) shown in the console. */
|
|
7
|
+
nickname?: string;
|
|
6
8
|
/** Continue a persisted onboarding transaction. */
|
|
7
9
|
resume?: string;
|
|
8
10
|
/** Re-run completed install steps to repair changed machine state. */
|
package/dist/commands/onboard.js
CHANGED
|
@@ -251,7 +251,7 @@ async function onboardCommand(args, config) {
|
|
|
251
251
|
mark('enrollment', 'skipped', alreadyEnrolled ? 'would reuse existing per-machine Shield credentials' : 'would enroll with supplied token');
|
|
252
252
|
}
|
|
253
253
|
else if (token) {
|
|
254
|
-
await (0, login_1.loginCommand)({ token, apiUrl: args.apiUrl }, config);
|
|
254
|
+
await (0, login_1.loginCommand)({ token, apiUrl: args.apiUrl, nickname: args.nickname }, config);
|
|
255
255
|
mark('enrollment', 'completed', 'machine enrolled');
|
|
256
256
|
}
|
|
257
257
|
else if (alreadyEnrolled) {
|
package/dist/index.js
CHANGED
|
@@ -506,6 +506,7 @@ async function main() {
|
|
|
506
506
|
const args = {
|
|
507
507
|
token: flags.token || flags['enroll-token'],
|
|
508
508
|
apiUrl: flags['api-url'],
|
|
509
|
+
nickname: flags.nickname || flags['machine-name'],
|
|
509
510
|
};
|
|
510
511
|
await (0, login_1.loginCommand)(args, config);
|
|
511
512
|
break;
|
|
@@ -646,6 +647,7 @@ async function main() {
|
|
|
646
647
|
const args = {
|
|
647
648
|
...buildInstallArgs(),
|
|
648
649
|
token: flags.token || flags['enroll-token'],
|
|
650
|
+
nickname: flags.nickname || flags['machine-name'],
|
|
649
651
|
hooks: flags.hooks,
|
|
650
652
|
discover: flags.discover,
|
|
651
653
|
autoProtect: flags['auto-protect'],
|
package/dist/version.json
CHANGED