( app: App | undefined, command: IUserScript, settingName: string, value: string, existingRef?: string, option?: UserScriptOptionDefinition, )
| 622 | } |
| 623 | |
| 624 | export async function storeUserScriptSecret( |
| 625 | app: App | undefined, |
| 626 | command: IUserScript, |
| 627 | settingName: string, |
| 628 | value: string, |
| 629 | existingRef?: string, |
| 630 | option?: UserScriptOptionDefinition, |
| 631 | ): Promise<string | null> { |
| 632 | if (value.length === 0) return null; |
| 633 | |
| 634 | const secretRef = |
| 635 | existingRef?.trim() || |
| 636 | (await buildAvailableSecretRef(app, command, settingName, value, option)); |
| 637 | const stored = await writeSecretStorageEntry(app, secretRef, value); |
| 638 | |
| 639 | return stored ? secretRef : null; |
| 640 | } |
| 641 | |
| 642 | export async function clearUserScriptSecret( |
| 643 | app: App | undefined, |
no test coverage detected