@heroku/plugin-ai
Version:
Heroku CLI plugin for Heroku AI add-on
15 lines (14 loc) • 657 B
JavaScript
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;
}
;