GeezerVison is showing github.com — fix(web): removing a secret provider lists the Simlock tokens that re… · adampeterhiggins/t3code@b690f08
File treeExpand file treeCollapse file tree Open diff view settings apps/web/src/components/settings
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/settings/SecretsSettings.logic.test.ts +10Lines changed: 10 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -31,6 +31,15 @@ const settings = Schema.decodeSync(ServerSettings)({ | 31 | 31 | easDeviceHosts: [ | 32 | 32 | { kind: "eas", id: "eas", label: "EAS Simulator", accessToken: personal("op://expo") }, | 33 | 33 | ], | | 34 | + simlockDeviceHosts: [ | | 35 | + { | | 36 | + kind: "simlock", | | 37 | + id: "pool", | | 38 | + label: "Simlock Pool", | | 39 | + gatewayUrl: "https://simlock.test", | | 40 | + agentToken: personal("op://simlock"), | | 41 | + }, | | 42 | + ], | 34 | 43 | cloudSpeechCredentials: { openai: personal("op://voice"), xai: "" }, | 35 | 44 | }); | 36 | 45 |
| @@ -43,6 +52,7 @@ it.each([ | 43 | 52 | "GitHub · github.com", | 44 | 53 | "https://hub.test · Management Key", | 45 | 54 | "EAS Simulator · Access Token", | | 55 | + "Simlock Pool · Agent Token", | 46 | 56 | "Voice · OpenAI", | 47 | 57 | ], | 48 | 58 | ], | |
Collapse file Copy file name to clipboardExpand all lines: apps/web/src/components/settings/SecretsSettings.logic.ts +5Lines changed: 5 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 5 | 5 | isSecretReference, | 6 | 6 | secretReferencesInSettings, | 7 | 7 | type ServerSettings, | | 8 | + SimlockDeviceHostConfig, | 8 | 9 | UsageLimitSourceConfig, | 9 | 10 | } from "@t3tools/contracts"; | 10 | 11 | import { getProviderClient } from "@t3tools/client-runtime/provider-clients"; | @@ -18,6 +19,7 @@ type SecretUseSettings = Pick< | 18 | 19 | | "sourceControlHosts" | 19 | 20 | | "usageLimitSources" | 20 | 21 | | "easDeviceHosts" | | 22 | + | "simlockDeviceHosts" | 21 | 23 | | "cloudSpeechCredentials" | 22 | 24 | >; | 23 | 25 |
| @@ -92,6 +94,9 @@ export function secretProviderUses( | 92 | 94 | ...settings.easDeviceHosts.flatMap((host) => | 93 | 95 | uses({ settingsSchema: EasDeviceHostConfig }, `eas:${host.id}`, host.label, host), | 94 | 96 | ), | | 97 | + ...settings.simlockDeviceHosts.flatMap((host) => | | 98 | + uses({ settingsSchema: SimlockDeviceHostConfig }, `simlock:${host.id}`, host.label, host), | | 99 | + ), | 95 | 100 | ...CloudSpeechProvider.literals.flatMap((provider) => { | 96 | 101 | const credential = settings.cloudSpeechCredentials[provider]; | 97 | 102 | return isSecretReference(credential) && credential.provider === providerId | |
|