diff --git a/packages/cli/package.json b/packages/cli/package.json index 659e4a8733..89bbacb592 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -7,13 +7,14 @@ "bugs": "https://github.com/heroku/cli/issues", "dependencies": { "@heroku-cli/color": "2.0.1", - "@heroku-cli/command": "^11.3.1", + "@heroku-cli/command": "^11.4.0", "@heroku-cli/notifications": "^1.2.4", - "@heroku-cli/plugin-ps-exec": "2.6.0", + "@heroku-cli/plugin-ps-exec": "2.6.1", "@heroku-cli/schema": "^1.0.25", "@heroku/buildpack-registry": "^1.0.1", "@heroku/eventsource": "^1.0.7", "@heroku/heroku-cli-util": "^8.0.13", + "@heroku/http-call": "^5.4.0", "@inquirer/prompts": "^5.0.5", "@oclif/core": "^2.16.0", "@oclif/plugin-commands": "2.2.28", @@ -49,7 +50,6 @@ "github-url-to-object": "^4.0.4", "glob": "^10.3.10", "got": "^11.8.6", - "http-call": "5.3.0", "inquirer": "^8.2.6", "lodash": "^4.17.21", "netrc-parser": "3.1.6", diff --git a/packages/cli/src/commands/addons/open.ts b/packages/cli/src/commands/addons/open.ts index 93835218f7..5a81f65482 100644 --- a/packages/cli/src/commands/addons/open.ts +++ b/packages/cli/src/commands/addons/open.ts @@ -5,7 +5,7 @@ import {attachmentResolver, resolveAddon} from '../../lib/addons/resolve' import * as fs from 'node:fs/promises' import * as os from 'node:os' import * as path from 'node:path' -import {HTTP, HTTPError} from 'http-call' +import {HTTP, HTTPError} from '@heroku/http-call' import {AddOnAttachment} from '@heroku-cli/schema' import * as open from 'open' diff --git a/packages/cli/src/commands/addons/upgrade.ts b/packages/cli/src/commands/addons/upgrade.ts index c4606f00c2..84ecbaa8ac 100644 --- a/packages/cli/src/commands/addons/upgrade.ts +++ b/packages/cli/src/commands/addons/upgrade.ts @@ -4,7 +4,7 @@ import {Args, ux} from '@oclif/core' import {formatPriceText} from '../../lib/addons/util' import {addonResolver} from '../../lib/addons/resolve' import type {AddOn, Plan} from '@heroku-cli/schema' -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' import {HerokuAPIError} from '@heroku-cli/command/lib/api-client' import type {AddOnAttachmentWithConfigVarsAndPlan} from '../../lib/pg/types' diff --git a/packages/cli/src/commands/apps/errors.ts b/packages/cli/src/commands/apps/errors.ts index 77f9a2eaa1..b9027a8efc 100644 --- a/packages/cli/src/commands/apps/errors.ts +++ b/packages/cli/src/commands/apps/errors.ts @@ -1,7 +1,7 @@ import color from '@heroku-cli/color' import {Command, flags} from '@heroku-cli/command' import {ux} from '@oclif/core' -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' import {sum} from 'lodash' import errorInfo from '../../lib/apps/error_info' import * as Heroku from '@heroku-cli/schema' diff --git a/packages/cli/src/commands/pg/backups/capture.ts b/packages/cli/src/commands/pg/backups/capture.ts index 965254bed2..0ae161aeb1 100644 --- a/packages/cli/src/commands/pg/backups/capture.ts +++ b/packages/cli/src/commands/pg/backups/capture.ts @@ -6,7 +6,7 @@ import {BackupTransfer, PgDatabase} from '../../../lib/pg/types' import {getAddon} from '../../../lib/pg/fetcher' import pgHost from '../../../lib/pg/host' import heredoc from 'tsheredoc' -import {HTTPError} from 'http-call' +import {HTTPError} from '@heroku/http-call' import {nls} from '../../../nls' export default class Capture extends Command { diff --git a/packages/cli/src/commands/pg/backups/schedule.ts b/packages/cli/src/commands/pg/backups/schedule.ts index 03aa489dac..ab25e52c6f 100644 --- a/packages/cli/src/commands/pg/backups/schedule.ts +++ b/packages/cli/src/commands/pg/backups/schedule.ts @@ -4,7 +4,7 @@ import {Args, ux} from '@oclif/core' import pgHost from '../../../lib/pg/host' import {getAttachment} from '../../../lib/pg/fetcher' import {PgDatabase} from '../../../lib/pg/types' -import {HTTPError} from 'http-call' +import {HTTPError} from '@heroku/http-call' import {nls} from '../../../nls' type Timezone = { diff --git a/packages/cli/src/commands/pg/wait.ts b/packages/cli/src/commands/pg/wait.ts index e39192b14c..ce198bdecb 100644 --- a/packages/cli/src/commands/pg/wait.ts +++ b/packages/cli/src/commands/pg/wait.ts @@ -6,7 +6,7 @@ import {all, getAddon} from '../../lib/pg/fetcher' import pgHost from '../../lib/pg/host' import notify from '../../lib/notify' import {AddOnAttachmentWithConfigVarsAndPlan, AddOnWithRelatedData, PgStatus} from '../../lib/pg/types' -import {HTTPError} from 'http-call' +import {HTTPError} from '@heroku/http-call' import {nls} from '../../nls' const wait = (ms: number) => new Promise(resolve => { diff --git a/packages/cli/src/commands/pipelines/diff.ts b/packages/cli/src/commands/pipelines/diff.ts index 65b64b3657..e4d2bfb5fc 100644 --- a/packages/cli/src/commands/pipelines/diff.ts +++ b/packages/cli/src/commands/pipelines/diff.ts @@ -1,7 +1,7 @@ import color from '@heroku-cli/color' import {Command, flags} from '@heroku-cli/command' import {ux} from '@oclif/core' -import HTTP from 'http-call' +import HTTP from '@heroku/http-call' import {getCoupling, getReleases, listPipelineApps, SDK_HEADER} from '../../lib/api' import KolkrabbiAPI from '../../lib/pipelines/kolkrabbi-api' diff --git a/packages/cli/src/commands/redis/wait.ts b/packages/cli/src/commands/redis/wait.ts index 9b1493a8b6..19740f7bef 100644 --- a/packages/cli/src/commands/redis/wait.ts +++ b/packages/cli/src/commands/redis/wait.ts @@ -2,7 +2,7 @@ import color from '@heroku-cli/color' import {Command, flags} from '@heroku-cli/command' import {Args, ux} from '@oclif/core' import redisApi, {RedisFormationWaitResponse} from '../../lib/redis/api' -import {HTTPError} from 'http-call' +import {HTTPError} from '@heroku/http-call' const wait = (ms: number) => new Promise(resolve => { setTimeout(resolve, ms) diff --git a/packages/cli/src/commands/status.ts b/packages/cli/src/commands/status.ts index 2be7c8368a..bc8c4f64d8 100644 --- a/packages/cli/src/commands/status.ts +++ b/packages/cli/src/commands/status.ts @@ -2,7 +2,7 @@ import color from '@heroku-cli/color' import {Command, Flags, ux} from '@oclif/core' import {capitalize} from '@oclif/core/lib/util' import {formatDistanceToNow} from 'date-fns' -import HTTP from 'http-call' +import HTTP from '@heroku/http-call' import {maxBy} from '../lib/status/util' diff --git a/packages/cli/src/deps.ts b/packages/cli/src/deps.ts index d2e1adb2e8..61c524a0d8 100644 --- a/packages/cli/src/deps.ts +++ b/packages/cli/src/deps.ts @@ -1,4 +1,4 @@ -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' import UserConfig from './user-config' import FS = require('fs-extra') @@ -18,7 +18,7 @@ export default { return fetch('fs-extra') }, get HTTP(): typeof HTTP { - return fetch('http-call').HTTP + return fetch('@heroku/http-call').HTTP }, get file(): typeof file { return fetch('./file') diff --git a/packages/cli/src/lib/addons/resolve.ts b/packages/cli/src/lib/addons/resolve.ts index ef689de11c..bfea2cb38e 100644 --- a/packages/cli/src/lib/addons/resolve.ts +++ b/packages/cli/src/lib/addons/resolve.ts @@ -1,5 +1,5 @@ import {APIClient} from '@heroku-cli/command' -import {HTTP, HTTPError} from 'http-call' +import {HTTP, HTTPError} from '@heroku/http-call' import type {AddOn, AddOnAttachment} from '@heroku-cli/schema' import {HerokuAPIError} from '@heroku-cli/command/lib/api-client' import type {AddOnAttachmentWithConfigVarsAndPlan} from '../pg/types' diff --git a/packages/cli/src/lib/certs/flags.ts b/packages/cli/src/lib/certs/flags.ts index ab619bffc9..f1e59deddd 100644 --- a/packages/cli/src/lib/certs/flags.ts +++ b/packages/cli/src/lib/certs/flags.ts @@ -1,6 +1,6 @@ import {SniEndpoint} from '../types/sni_endpoint' import {APIClient} from '@heroku-cli/command' -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' import {Domain} from '../types/domain' export default async function (flags: { endpoint: string | undefined; name: string | undefined; app: string }, heroku: APIClient) { diff --git a/packages/cli/src/lib/container/streamer.ts b/packages/cli/src/lib/container/streamer.ts index cca423d059..cdea685fa0 100644 --- a/packages/cli/src/lib/container/streamer.ts +++ b/packages/cli/src/lib/container/streamer.ts @@ -1,5 +1,5 @@ async function call(url: string, out: NodeJS.WriteStream, retries: number) { - const http = require('http-call').HTTP + const http = require('@heroku/http-call').HTTP const maxRetries = 30 try { const {response} = await http.stream(url) diff --git a/packages/cli/src/lib/pg/config.ts b/packages/cli/src/lib/pg/config.ts index 48d3964402..fbf2e4905f 100644 --- a/packages/cli/src/lib/pg/config.ts +++ b/packages/cli/src/lib/pg/config.ts @@ -1,5 +1,5 @@ import type {APIClient} from '@heroku-cli/command' -import type {HTTP} from 'http-call' +import type {HTTP} from '@heroku/http-call' const responseByAppId: Map>>> = new Map() diff --git a/packages/cli/src/lib/pipelines/github-api.ts b/packages/cli/src/lib/pipelines/github-api.ts index c1e767fc6c..1be6d6c161 100644 --- a/packages/cli/src/lib/pipelines/github-api.ts +++ b/packages/cli/src/lib/pipelines/github-api.ts @@ -1,4 +1,4 @@ -import HTTP from 'http-call' +import HTTP from '@heroku/http-call' const GITHUB_API = 'https://api.github.com' export default class GitHubAPI { diff --git a/packages/cli/src/lib/pipelines/kolkrabbi-api.ts b/packages/cli/src/lib/pipelines/kolkrabbi-api.ts index 5fec47dad9..d26ff0fcce 100644 --- a/packages/cli/src/lib/pipelines/kolkrabbi-api.ts +++ b/packages/cli/src/lib/pipelines/kolkrabbi-api.ts @@ -1,4 +1,4 @@ -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' const KOLKRABBI_BASE_URL = 'https://kolkrabbi.heroku.com' diff --git a/packages/cli/src/lib/run/dyno.ts b/packages/cli/src/lib/run/dyno.ts index a76013b6b0..b369fa5e55 100644 --- a/packages/cli/src/lib/run/dyno.ts +++ b/packages/cli/src/lib/run/dyno.ts @@ -7,7 +7,7 @@ import {Dyno as APIDyno} from '@heroku-cli/schema' import {spawn} from 'child_process' import {ux} from '@oclif/core' import debugFactory from 'debug' -import {HTTP} from 'http-call' +import {HTTP} from '@heroku/http-call' import * as https from 'https' import * as net from 'net' import {Duplex, Transform} from 'stream' diff --git a/packages/cli/src/lib/utils/paginator.ts b/packages/cli/src/lib/utils/paginator.ts index 8c36a16698..cb9fbadef7 100644 --- a/packages/cli/src/lib/utils/paginator.ts +++ b/packages/cli/src/lib/utils/paginator.ts @@ -3,7 +3,7 @@ // This paginator uses status code to determine passing the Next-Range header import {APIClient} from '@heroku-cli/command' -import HTTP from 'http-call' +import HTTP from '@heroku/http-call' export async function paginateRequest(client: APIClient, url: string, pageSize = 200): Promise { let isPartial = true diff --git a/packages/cli/test/unit/commands/pg/backups/schedule.unit.test.ts b/packages/cli/test/unit/commands/pg/backups/schedule.unit.test.ts index cf27e76944..610094ba94 100644 --- a/packages/cli/test/unit/commands/pg/backups/schedule.unit.test.ts +++ b/packages/cli/test/unit/commands/pg/backups/schedule.unit.test.ts @@ -6,7 +6,6 @@ import heredoc from 'tsheredoc' import {expect} from 'chai' import stripAnsi = require('strip-ansi') import {CLIError} from '@oclif/core/lib/errors' -import {HTTPError} from 'http-call' describe('pg:backups:schedule', function () { let api: nock.Scope diff --git a/yarn.lock b/yarn.lock index 440dbd123e..01ab6a1fb9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1607,23 +1607,23 @@ __metadata: languageName: node linkType: hard -"@heroku-cli/command@npm:^11.3.1": - version: 11.3.1 - resolution: "@heroku-cli/command@npm:11.3.1" +"@heroku-cli/command@npm:^11.4.0": + version: 11.4.0 + resolution: "@heroku-cli/command@npm:11.4.0" dependencies: "@heroku-cli/color": ^2.0.1 + "@heroku/http-call": ^5.4.0 "@oclif/core": ^2.16.0 cli-ux: ^6.0.9 - debug: ^4.3.4 + debug: ^4.4.0 fs-extra: ^9.1.0 heroku-client: ^3.1.0 - http-call: ^5.3.0 netrc-parser: ^3.1.6 open: ^8.4.2 uuid: ^8.3.0 yargs-parser: ^18.1.3 yargs-unparser: ^2.0.0 - checksum: 8dad0aec09ce7ebcee688ca52b4f6085b5272dd87d32ee7b4e7cc9d633deb42031ad73674de027671da698cc8851e8ba7d93f4f6dac334488291ccd87dbd07d3 + checksum: fb4ddfdbc43d4e9ccdb5ce697c52cb2984f83705a7e24ab38d50264fb5d0b923f2b6c71863b15e49086a1df50c15fc91aeebe1a49a096b540404aedcdaf7d9d3 languageName: node linkType: hard @@ -1645,9 +1645,9 @@ __metadata: languageName: node linkType: hard -"@heroku-cli/heroku-exec-util@npm:0.9.0": - version: 0.9.0 - resolution: "@heroku-cli/heroku-exec-util@npm:0.9.0" +"@heroku-cli/heroku-exec-util@npm:0.9.1": + version: 0.9.1 + resolution: "@heroku-cli/heroku-exec-util@npm:0.9.1" dependencies: "@heroku/heroku-cli-util": ^8.0.13 "@heroku/socksv5": ^0.0.9 @@ -1658,7 +1658,7 @@ __metadata: smooth-progress: 1.1.0 ssh2: 1.4.0 temp: 0.9.1 - checksum: f0411e5a41e2a1774abb0c47f9356fd7bcb1fb36a80b95caec2c0e73756585dc01c1eb9d609669046a38e01d6b719664705ab6907dd96a0a762329af71bd2d98 + checksum: 7b51fbd7fadaf02bf8567d58ae8f1cc72710eb282600959e613f54c5fe0e852728d2c2cef99c4f780324b6a69d2a75f4d225b2bfd341bbeda5a6a288a1231c84 languageName: node linkType: hard @@ -1671,13 +1671,13 @@ __metadata: languageName: node linkType: hard -"@heroku-cli/plugin-ps-exec@npm:2.6.0": - version: 2.6.0 - resolution: "@heroku-cli/plugin-ps-exec@npm:2.6.0" +"@heroku-cli/plugin-ps-exec@npm:2.6.1": + version: 2.6.1 + resolution: "@heroku-cli/plugin-ps-exec@npm:2.6.1" dependencies: - "@heroku-cli/heroku-exec-util": 0.9.0 + "@heroku-cli/heroku-exec-util": 0.9.1 "@heroku/heroku-cli-util": ^8.0.13 - checksum: 94e33a23b16f62068830bf12d28c16b7132cef8e58d6f9d658aedb65142642f4cf4c5603fe97c51b0ab3b2aaaa9c397a955e5328dd9cd899190dd6e2cb5f5987 + checksum: d5e0fe9e6a80a029b917fdfcd34ec6ca0f78900c9cfb4817ee3a751e9c409d3c5450c6c9f1a890bdf7b5e30fc9fa9090b9c5dc5b0c4821b190dca6f097d9db7f languageName: node linkType: hard @@ -1729,6 +1729,19 @@ __metadata: languageName: node linkType: hard +"@heroku/http-call@npm:^5.4.0": + version: 5.4.0 + resolution: "@heroku/http-call@npm:5.4.0" + dependencies: + content-type: ^1.0.5 + debug: ^4.4.0 + is-retry-allowed: ^2.2.0 + is-stream: ^2.0.0 + tunnel-agent: ^0.6.0 + checksum: 46e522a6f1d1ae44d857db202862aa0ca800804af7ba04b13a46a99f7bb1233adaf47d7d22dbf4fcd7443e78603e3793b3d6662486e8eb1c9ab6e3569e116f25 + languageName: node + linkType: hard + "@heroku/socksv5@npm:^0.0.9": version: 0.0.9 resolution: "@heroku/socksv5@npm:0.0.9" @@ -7214,6 +7227,13 @@ __metadata: languageName: node linkType: hard +"content-type@npm:^1.0.5": + version: 1.0.5 + resolution: "content-type@npm:1.0.5" + checksum: 566271e0a251642254cde0f845f9dd4f9856e52d988f4eb0d0dcffbb7a1f8ec98de7a5215fc628f3bce30fe2fb6fd2bc064b562d721658c59b544e2d34ea2766 + languageName: node + linkType: hard + "conventional-changelog-angular@npm:^5.0.12": version: 5.0.13 resolution: "conventional-changelog-angular@npm:5.0.13" @@ -7684,6 +7704,18 @@ __metadata: languageName: node linkType: hard +"debug@npm:^4.4.0": + version: 4.4.0 + resolution: "debug@npm:4.4.0" + dependencies: + ms: ^2.1.3 + peerDependenciesMeta: + supports-color: + optional: true + checksum: fb42df878dd0e22816fc56e1fdca9da73caa85212fbe40c868b1295a6878f9101ae684f4eeef516c13acfc700f5ea07f1136954f43d4cd2d477a811144136479 + languageName: node + linkType: hard + "debuglog@npm:^1.0.1": version: 1.0.1 resolution: "debuglog@npm:1.0.1" @@ -10331,13 +10363,14 @@ __metadata: resolution: "heroku@workspace:packages/cli" dependencies: "@heroku-cli/color": 2.0.1 - "@heroku-cli/command": ^11.3.1 + "@heroku-cli/command": ^11.4.0 "@heroku-cli/notifications": ^1.2.4 - "@heroku-cli/plugin-ps-exec": 2.6.0 + "@heroku-cli/plugin-ps-exec": 2.6.1 "@heroku-cli/schema": ^1.0.25 "@heroku/buildpack-registry": ^1.0.1 "@heroku/eventsource": ^1.0.7 "@heroku/heroku-cli-util": ^8.0.13 + "@heroku/http-call": ^5.4.0 "@inquirer/prompts": ^5.0.5 "@oclif/core": ^2.16.0 "@oclif/plugin-commands": 2.2.28 @@ -10406,7 +10439,6 @@ __metadata: glob: ^10.3.10 globby: ^10.0.2 got: ^11.8.6 - http-call: 5.3.0 inquirer: ^8.2.6 lodash: ^4.17.11 lolex: ^3.1.0 @@ -10521,9 +10553,9 @@ __metadata: languageName: node linkType: hard -"http-call@npm:5.3.0, http-call@npm:^5.2.2, http-call@npm:^5.2.4, http-call@npm:^5.3.0": - version: 5.3.0 - resolution: "http-call@npm:5.3.0" +"http-call@npm:^5.1.2": + version: 5.2.4 + resolution: "http-call@npm:5.2.4" dependencies: content-type: ^1.0.4 debug: ^4.1.1 @@ -10531,13 +10563,13 @@ __metadata: is-stream: ^2.0.0 parse-json: ^4.0.0 tunnel-agent: ^0.6.0 - checksum: 06e9342e1fc9d805ab666c862cac58ece953e0a72007410f4fba9aef40075f4c8bf0fdebbcfa1648433db05003ce1e00496ddb92e8dcff319a976638b2be4057 + checksum: 61fe14c84a83b205e1bd53306899b1d6cfd4767140bd9e4ce3b362e21da770c16f235fd09207937fafde7cbbce621a991423338c07acd4c6db64b8cc3be649fb languageName: node linkType: hard -"http-call@npm:^5.1.2": - version: 5.2.4 - resolution: "http-call@npm:5.2.4" +"http-call@npm:^5.2.2, http-call@npm:^5.2.4, http-call@npm:^5.3.0": + version: 5.3.0 + resolution: "http-call@npm:5.3.0" dependencies: content-type: ^1.0.4 debug: ^4.1.1 @@ -10545,7 +10577,7 @@ __metadata: is-stream: ^2.0.0 parse-json: ^4.0.0 tunnel-agent: ^0.6.0 - checksum: 61fe14c84a83b205e1bd53306899b1d6cfd4767140bd9e4ce3b362e21da770c16f235fd09207937fafde7cbbce621a991423338c07acd4c6db64b8cc3be649fb + checksum: 06e9342e1fc9d805ab666c862cac58ece953e0a72007410f4fba9aef40075f4c8bf0fdebbcfa1648433db05003ce1e00496ddb92e8dcff319a976638b2be4057 languageName: node linkType: hard @@ -11264,6 +11296,13 @@ __metadata: languageName: node linkType: hard +"is-retry-allowed@npm:^2.2.0": + version: 2.2.0 + resolution: "is-retry-allowed@npm:2.2.0" + checksum: 3d1103a9290b5d03626756a41054844633eac78bc5d3e3a95b13afeae94fa3cfbcf7f0b5520d83f75f48a25ce7b142fdbac4217dc4b0630f3ea55e866ec3a029 + languageName: node + linkType: hard + "is-set@npm:^2.0.3": version: 2.0.3 resolution: "is-set@npm:2.0.3"