diff --git a/lib/index.js b/lib/index.js index c46e200..01eed61 100644 --- a/lib/index.js +++ b/lib/index.js @@ -312,6 +312,16 @@ export default class Now extends EventEmitter { uploadChunk(); } + async listSecrets () { + return this.retry(async (bail, attempt) => { + if (this._debug) console.time(`> [debug] #${attempt} GET /secrets`); + const res = await this._fetch('/now/secrets'); + if (this._debug) console.timeEnd(`> [debug] #${attempt} GET /secrets`); + const body = await res.json(); + return body.secrets; + }); + } + async list (app) { const query = app ? `?app=${encodeURIComponent(app)}` : '';