mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-04 01:44:13 +00:00
style: format server and shared with prettier
A mechanical prettier --write over server/src, server/tests, server/scripts and shared/src with the workspaces' .prettierrc; nothing but layout and import order changes, and every file keeps the same set of imports. shared is formatted throughout and its format baseline is empty. The server baseline keeps the 35 files that Prettier would grow past their lint:size limit (they need a split first, which is not a formatting change), and the generated entity files stay as their generator writes them.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { readEnv } from '../../app-config';
|
||||
import { decrypt_api_key, maybe_encrypt_api_key } from '../common/crypto/apiKeyCrypto';
|
||||
import type { AppSettingsRepository } from '../../db/repositories/AppSettings.repository';
|
||||
import type { UsersRepository, InstanceApiKeyName } from '../../db/repositories/Users.repository';
|
||||
import { decrypt_api_key, maybe_encrypt_api_key } from '../common/crypto/apiKeyCrypto';
|
||||
import type { ApiKeySource } from '@trek/shared';
|
||||
|
||||
/**
|
||||
@@ -97,7 +97,10 @@ export function operatorKeyVariables(): Partial<Record<InstanceApiKeyName, strin
|
||||
}
|
||||
|
||||
/** The instance-wide value in cleartext, or null when unset/cleared. */
|
||||
export async function readInstanceApiKey(appSettings: AppSettingsRepository, name: InstanceApiKeyName): Promise<string | null> {
|
||||
export async function readInstanceApiKey(
|
||||
appSettings: AppSettingsRepository,
|
||||
name: InstanceApiKeyName,
|
||||
): Promise<string | null> {
|
||||
return readInstanceValue(appSettings, name);
|
||||
}
|
||||
|
||||
@@ -107,7 +110,11 @@ export async function readInstanceApiKey(appSettings: AppSettingsRepository, nam
|
||||
* key", and a missing row would let the resolver fall through to whatever old
|
||||
* value still sits in their own users column.
|
||||
*/
|
||||
export async function writeInstanceApiKey(appSettings: AppSettingsRepository, name: InstanceApiKeyName, value: unknown): Promise<void> {
|
||||
export async function writeInstanceApiKey(
|
||||
appSettings: AppSettingsRepository,
|
||||
name: InstanceApiKeyName,
|
||||
value: unknown,
|
||||
): Promise<void> {
|
||||
await appSettings.setValue(name, maybe_encrypt_api_key(value) ?? '');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user