feat(api): profil machine éditable, sonde, et réglages globaux apt-cacher-ng

- machines : updateMachine (PATCH /machines/:id) + POST /machines/:id/probe
  (sonde synchrone → faits + proposition de correction) ; MachineView expose
  machineKind/virtualization ; CreateMachineInput accepte aptProxyMode persistent
- app_settings (clé/valeur, migration 0006) + service appSettings :
  défaut apt-cacher-ng (mode + url) ; applyProxyToAllMachines
- routes /settings : GET, PUT /apt-proxy, POST /apt-proxy/apply-all

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-06 07:53:47 +02:00
parent 0ab6b1d392
commit 2b684da9cd
10 changed files with 2366 additions and 5 deletions
@@ -0,0 +1,5 @@
CREATE TABLE `app_settings` (
`key` text PRIMARY KEY NOT NULL,
`value` text,
`updated_at` text NOT NULL
);
File diff suppressed because it is too large Load Diff
+7
View File
@@ -43,6 +43,13 @@
"when": 1780718324238,
"tag": "0005_silent_drax",
"breakpoints": true
},
{
"idx": 6,
"version": "6",
"when": 1780724800966,
"tag": "0006_many_northstar",
"breakpoints": true
}
]
}
+7
View File
@@ -312,3 +312,10 @@ export const actionRequests = sqliteTable("action_requests", {
executionId: text("execution_id"),
expiresAt: text("expires_at"),
});
// Réglages globaux de l'application (clé/valeur). Ex. proxy APT par défaut.
export const appSettings = sqliteTable("app_settings", {
key: text("key").primaryKey(),
value: text("value"),
updatedAt: text("updated_at").notNull(),
});