(secretName: string, secretValue: string)
| 221 | }; |
| 222 | |
| 223 | const handleSetAndMap = async (secretName: string, secretValue: string) => { |
| 224 | await RpcApi.SetSecretsCommand(TabRpcClient, { [secretName]: secretValue }); |
| 225 | setAvailableSecrets((prev) => [...prev, secretName]); |
| 226 | |
| 227 | const newBindings = { ...secretBindings, [secretName]: secretName }; |
| 228 | |
| 229 | try { |
| 230 | const appId = globalStore.get(atoms.builderAppId); |
| 231 | await RpcApi.WriteAppSecretBindingsCommand(TabRpcClient, { |
| 232 | appid: appId, |
| 233 | bindings: newBindings, |
| 234 | }); |
| 235 | model.updateSecretBindings(newBindings); |
| 236 | globalStore.set(model.errorAtom, ""); |
| 237 | model.restartBuilder(); |
| 238 | } catch (err) { |
| 239 | console.error("Failed to save secret bindings:", err); |
| 240 | globalStore.set(model.errorAtom, `Failed to save secret bindings: ${err.message || "Unknown error"}`); |
| 241 | } |
| 242 | }; |
| 243 | |
| 244 | const allRequiredBound = |
| 245 | sortedSecretEntries.filter(([_, meta]) => !meta.optional).every(([name]) => secretBindings[name]?.trim()) || |
nothing calls this directly
no test coverage detected