UNPKG

@heroku/plugin-ai

Version:
15 lines (14 loc) 657 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.default = default_1; const command_1 = require("@heroku-cli/command"); async function default_1(config, app) { const herokuClient = new command_1.APIClient(config); const { body: response } = await herokuClient.get(`/apps/${app}/addons`, { headers: { 'Accept-Expansion': 'plan' }, }).catch(error => { const error_ = error.body && error.body.message ? new Error(`The add-on was unable to be destroyed: ${error.body.message}.`) : new Error(`The add-on was unable to be destroyed: ${error}.`); throw error_; }); return response; }