SnowLuma v2.4.2 source snapshot
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
Publish MCP to npm / Build, test, and publish MCP (push) Waiting to run
Publish SDK to npm / Build, test, and publish SDK (push) Waiting to run
Sync action catalog to docs / sync (push) Waiting to run
Publish UI to npm / Build and publish UI (push) Waiting to run
Build and Release / preflight (push) Waiting to run
Dev Build / cleanup (push) Waiting to run
Dev Build / typecheck (push) Waiting to run
Publish MCP to npm / Build, test, and publish MCP (push) Waiting to run
Publish SDK to npm / Build, test, and publish SDK (push) Waiting to run
Sync action catalog to docs / sync (push) Waiting to run
Publish UI to npm / Build and publish UI (push) Waiting to run
Build and Release / preflight (push) Waiting to run
This commit is contained in:
commit
fa9c73363d
1367 files changed
+355735
No files matched your search
@@ -0,0 +1,31 @@
|
||||
import type { AccountConnections } from '@snowluma/onebot/manager';
|
||||
|
||||
export function comparableConnectionSnapshot(snapshot: unknown): unknown {
|
||||
if (!Array.isArray(snapshot)) {
|
||||
return snapshot;
|
||||
}
|
||||
|
||||
return (snapshot as AccountConnections[]).map((account) => ({
|
||||
uin: account.uin,
|
||||
nickname: account.nickname,
|
||||
adapters: Array.isArray(account.adapters)
|
||||
? account.adapters.map((adapter) => ({
|
||||
name: adapter.name,
|
||||
kind: adapter.kind,
|
||||
status: adapter.status,
|
||||
lastErrorAt: adapter.lastErrorAt,
|
||||
}))
|
||||
: [],
|
||||
databaseMigration: account.databaseMigration
|
||||
? {
|
||||
phase: account.databaseMigration.phase,
|
||||
usable: account.databaseMigration.usable,
|
||||
processed: account.databaseMigration.processed,
|
||||
total: account.databaseMigration.total,
|
||||
progress: account.databaseMigration.progress,
|
||||
estimatedRemainingSeconds: account.databaseMigration.estimatedRemainingSeconds,
|
||||
error: account.databaseMigration.error,
|
||||
}
|
||||
: undefined,
|
||||
}));
|
||||
}
|
||||
Reference in new issue
Block a user