heroku 10.0.0-beta.0 → 10.0.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,7 @@ GitRemote.example = `# set git remote heroku to https://git.heroku.com/example.g
36
36
  $ heroku git:remote -a example
37
37
 
38
38
  # set git remote heroku-staging to https://git.heroku.com/example.git
39
- $ heroku git:remote --remote heroku-staging -a example`;
39
+ $ heroku git:remote --remote heroku-staging -a example-staging`;
40
40
  GitRemote.flags = {
41
41
  app: command_1.flags.string({ char: 'a', description: 'the Heroku app to use' }),
42
42
  remote: command_1.flags.string({ char: 'r', description: 'the git remote to create' }),
@@ -1,14 +1,17 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class RunInside extends Command {
3
3
  static description: string;
4
- static hidden: boolean;
5
- static examples: string[];
4
+ static example: string;
6
5
  static flags: {
7
6
  app: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
7
  remote: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
8
  'exit-code': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
10
9
  listen: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
11
10
  };
11
+ static args: {
12
+ DYNO_NAME: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
13
+ COMMAND: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
14
+ };
12
15
  static strict: boolean;
13
16
  run(): Promise<void>;
14
17
  }
@@ -5,18 +5,16 @@ const core_1 = require("@oclif/core");
5
5
  const debug_1 = require("debug");
6
6
  const dyno_1 = require("../../lib/run/dyno");
7
7
  const helpers_1 = require("../../lib/run/helpers");
8
+ const tsheredoc_1 = require("tsheredoc");
8
9
  const debug = (0, debug_1.default)('heroku:run:inside');
9
10
  class RunInside extends command_1.Command {
10
11
  async run() {
11
- const { flags, argv } = await this.parse(RunInside);
12
- if (argv.length < 2) {
13
- throw new Error('Usage: heroku run:inside DYNO COMMAND\n\nExample: heroku run:inside web.1 bash');
14
- }
12
+ const { flags, args } = await this.parse(RunInside);
15
13
  const opts = {
16
14
  'exit-code': flags['exit-code'],
17
15
  app: flags.app,
18
- command: (0, helpers_1.buildCommand)(argv.slice(1)),
19
- dyno: argv[0],
16
+ command: (0, helpers_1.buildCommand)([args.COMMAND]),
17
+ dyno: args.DYNO_NAME,
20
18
  heroku: this.heroku,
21
19
  listen: flags.listen,
22
20
  };
@@ -36,15 +34,23 @@ class RunInside extends command_1.Command {
36
34
  }
37
35
  }
38
36
  exports.default = RunInside;
39
- RunInside.description = 'run a one-off process inside an existing heroku dyno';
40
- RunInside.hidden = true;
41
- RunInside.examples = [
42
- '$ heroku run:inside web.1 bash',
43
- ];
37
+ RunInside.description = 'run a one-off process inside an existing heroku dyno (for Fir-generation apps only)';
38
+ RunInside.example = (0, tsheredoc_1.default) `
39
+ Run bash
40
+ $ heroku run:inside web-848cd4f64d-pvpr2 bash
41
+ Run a command supplied by a script
42
+ $ heroku run:inside web-848cd4f64d-pvpr2 -- myscript.sh
43
+ Run a command declared for the worker process type in a Procfile
44
+ $ heroku run:inside worker
45
+ `;
44
46
  RunInside.flags = {
45
47
  app: command_1.flags.app({ required: true }),
46
48
  remote: command_1.flags.remote(),
47
49
  'exit-code': command_1.flags.boolean({ char: 'x', description: 'passthrough the exit code of the remote command' }),
48
50
  listen: command_1.flags.boolean({ description: 'listen on a local port', hidden: true }),
49
51
  };
52
+ RunInside.args = {
53
+ DYNO_NAME: core_1.Args.string({ required: true, description: 'name of the dyno to run command inside' }),
54
+ COMMAND: core_1.Args.string({ required: true, description: 'command to run' }),
55
+ };
50
56
  RunInside.strict = false;
@@ -21,6 +21,20 @@ class Create extends command_1.Command {
21
21
  const dollarAmountMonthly = shield ? '$3000' : '$1000';
22
22
  const dollarAmountHourly = shield ? '$4.17' : '$1.39';
23
23
  const spaceType = shield ? 'Shield' : 'Standard';
24
+ if (generation === 'fir') {
25
+ core_1.ux.warn((0, tsheredoc_1.default) `
26
+ Fir Pilot Features
27
+ Fir is currently a pilot service that is subject to the Beta Services Terms
28
+ (https://www.salesforce.com/company/legal/) or a written Unified Pilot Agreement
29
+ if executed by Customer, and applicable terms in the Product Terms Directory
30
+ (https://ptd.salesforce.com/?_ga=2.247987783.1372150065.1709219475-629000709.1639001992).
31
+ Use of this pilot or beta service is at the Customer's sole discretion.
32
+
33
+ Please note that we’re actively developing and adding new features, and not all
34
+ existing features are currently available. See the Dev Center
35
+ (https://devcenter.heroku.com/articles/generations) for more info.
36
+ `);
37
+ }
24
38
  core_1.ux.action.start(`Creating space ${color_1.default.green(spaceName)} in team ${color_1.default.cyan(team)}`);
25
39
  const { body: space } = await this.heroku.post('/spaces', {
26
40
  headers: {
@@ -3,13 +3,13 @@ export default class Add extends Command {
3
3
  static description: string;
4
4
  static flags: {
5
5
  app: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
+ headers: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
6
7
  space: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
7
8
  signals: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
8
- endpoint: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
9
9
  transport: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
10
  };
11
11
  static args: {
12
- headers: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
12
+ endpoint: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
13
13
  };
14
14
  static example: string;
15
15
  run(): Promise<void>;
@@ -7,8 +7,8 @@ const util_1 = require("../../lib/telemetry/util");
7
7
  class Add extends command_1.Command {
8
8
  async run() {
9
9
  const { flags, args } = await this.parse(Add);
10
- const { app, space, signals, endpoint, transport } = flags;
11
- const { headers } = args;
10
+ const { app, headers, space, signals, transport } = flags;
11
+ const { endpoint } = args;
12
12
  let id;
13
13
  if (app) {
14
14
  const { body: herokuApp } = await this.heroku.get(`/apps/${app}`, {
@@ -20,6 +20,7 @@ class Add extends command_1.Command {
20
20
  const { body: herokuSpace } = await this.heroku.get(`/spaces/${space}`);
21
21
  id = herokuSpace.id;
22
22
  }
23
+ const exporterHeaders = headers || '{}';
23
24
  const drainConfig = {
24
25
  owner: {
25
26
  type: app ? 'app' : 'space',
@@ -29,7 +30,7 @@ class Add extends command_1.Command {
29
30
  exporter: {
30
31
  endpoint,
31
32
  type: `otlp${transport}`,
32
- headers: JSON.parse(headers),
33
+ headers: JSON.parse(exporterHeaders),
33
34
  },
34
35
  };
35
36
  const { body: drain } = await this.heroku.post('/telemetry-drains', {
@@ -45,15 +46,15 @@ exports.default = Add;
45
46
  Add.description = 'Add and configure a new telemetry drain. Defaults to collecting all telemetry unless otherwise specified.';
46
47
  Add.flags = {
47
48
  app: command_1.flags.string({ char: 'a', exactlyOne: ['app', 'space'], description: 'app to add a drain to' }),
49
+ headers: command_1.flags.string({ description: 'custom headers to configure the drain in json format' }),
48
50
  space: command_1.flags.string({ char: 's', description: 'space to add a drain to' }),
49
51
  signals: command_1.flags.string({ default: 'all', description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.' }),
50
- endpoint: command_1.flags.string({ required: true, description: 'drain url' }),
51
- transport: command_1.flags.string({ required: true, options: ['http', 'grpc'], description: 'transport protocol for the drain' }),
52
+ transport: command_1.flags.string({ default: 'http', options: ['http', 'grpc'], description: 'transport protocol for the drain' }),
52
53
  };
53
54
  Add.args = {
54
- headers: core_1.Args.string({ required: true, description: 'custom headers to configure the drain in json format' }),
55
+ endpoint: core_1.Args.string({ required: true, description: 'drain url' }),
55
56
  };
56
57
  Add.example = (0, tsheredoc_1.default)(`
57
58
  Add a telemetry drain to an app to collect logs and traces:
58
- $ heroku telemetry:add --app myapp --signals logs,traces --endpoint https://my-endpoint.com --transport http '{"x-drain-example-team": "API_KEY", "x-drain-example-dataset": "METRICS_DATASET"}'
59
+ $ heroku telemetry:add https://my-endpoint.com --app myapp --signals logs,traces --headers '{"x-drain-example-team": "API_KEY", "x-drain-example-dataset": "METRICS_DATASET"}'
59
60
  `);
@@ -4,11 +4,11 @@ export default class Update extends Command {
4
4
  static description: string;
5
5
  static args: {
6
6
  telemetry_drain_id: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
7
- headers: import("@oclif/core/lib/interfaces/parser").Arg<string | undefined, Record<string, unknown>>;
8
7
  };
9
8
  static flags: {
10
- signals: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
9
  endpoint: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
10
+ headers: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
11
+ signals: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
12
12
  transport: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces/parser").CustomOptions>;
13
13
  };
14
14
  static example: string;
@@ -7,9 +7,9 @@ const util_1 = require("../../lib/telemetry/util");
7
7
  class Update extends command_1.Command {
8
8
  async run() {
9
9
  const { args, flags } = await this.parse(Update);
10
- const { telemetry_drain_id, headers } = args;
11
- const { signals, endpoint, transport } = flags;
12
- if (!(headers || signals || endpoint || transport)) {
10
+ const { telemetry_drain_id } = args;
11
+ const { endpoint, headers, signals, transport } = flags;
12
+ if (!(endpoint || headers || signals || transport)) {
13
13
  core_1.ux.error((0, tsheredoc_1.default)(`
14
14
  Requires either --signals, --endpoint, --transport or HEADERS to be provided.
15
15
  See more help with --help
@@ -48,11 +48,11 @@ Update.topic = 'telemetry';
48
48
  Update.description = 'updates a telemetry drain with provided attributes (attributes not provided remain unchanged)';
49
49
  Update.args = {
50
50
  telemetry_drain_id: core_1.Args.string({ required: true, description: 'ID of the drain to update' }),
51
- headers: core_1.Args.string({ description: 'custom headers to configure the drain in json format' }),
52
51
  };
53
52
  Update.flags = {
54
- signals: command_1.flags.string({ description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.' }),
55
53
  endpoint: command_1.flags.string({ description: 'drain url' }),
54
+ headers: command_1.flags.string({ description: 'custom headers to configure the drain in json format' }),
55
+ signals: command_1.flags.string({ description: 'comma-delimited list of signals to collect (traces, metrics, logs). Use "all" to collect all signals.' }),
56
56
  transport: command_1.flags.string({ options: ['http', 'grpc'], description: 'transport protocol for the drain' }),
57
57
  };
58
58
  Update.example = (0, tsheredoc_1.default)(`
@@ -43,7 +43,7 @@ const provider = new NodeTracerProvider({
43
43
  });
44
44
  const headers = { Authorization: `Bearer ${process.env.IS_HEROKU_TEST_ENV !== 'true' ? getToken() : ''}` };
45
45
  const exporter = new OTLPTraceExporter({
46
- url: isDev ? 'https://backboard-staging.herokuapp.com/otel/v1/traces' : 'https://backboard.heroku.com/otel/v1/traces',
46
+ url: isDev ? 'https://backboard.staging.herokudev.com/otel/v1/traces' : 'https://backboard.heroku.com/otel/v1/traces',
47
47
  headers,
48
48
  compression: 'none',
49
49
  });
@@ -5273,7 +5273,7 @@
5273
5273
  "aliases": [],
5274
5274
  "args": {},
5275
5275
  "description": "adds a git remote to an app repo\nextra arguments will be passed to git remote add\n",
5276
- "examples": "# set git remote heroku to https://git.heroku.com/example.git\n $ heroku git:remote -a example\n\n # set git remote heroku-staging to https://git.heroku.com/example.git\n $ heroku git:remote --remote heroku-staging -a example",
5276
+ "examples": "# set git remote heroku to https://git.heroku.com/example.git\n $ heroku git:remote -a example\n\n # set git remote heroku-staging to https://git.heroku.com/example.git\n $ heroku git:remote --remote heroku-staging -a example-staging",
5277
5277
  "flags": {
5278
5278
  "app": {
5279
5279
  "char": "a",
@@ -5299,7 +5299,7 @@
5299
5299
  "pluginName": "heroku",
5300
5300
  "pluginType": "core",
5301
5301
  "strict": false,
5302
- "example": "# set git remote heroku to https://git.heroku.com/example.git\n $ heroku git:remote -a example\n\n # set git remote heroku-staging to https://git.heroku.com/example.git\n $ heroku git:remote --remote heroku-staging -a example",
5302
+ "example": "# set git remote heroku to https://git.heroku.com/example.git\n $ heroku git:remote -a example\n\n # set git remote heroku-staging to https://git.heroku.com/example.git\n $ heroku git:remote --remote heroku-staging -a example-staging",
5303
5303
  "isESM": false,
5304
5304
  "relativePath": [
5305
5305
  "lib",
@@ -9329,11 +9329,20 @@
9329
9329
  },
9330
9330
  "run:inside": {
9331
9331
  "aliases": [],
9332
- "args": {},
9333
- "description": "run a one-off process inside an existing heroku dyno",
9334
- "examples": [
9335
- "$ heroku run:inside web.1 bash"
9336
- ],
9332
+ "args": {
9333
+ "DYNO_NAME": {
9334
+ "description": "name of the dyno to run command inside",
9335
+ "name": "DYNO_NAME",
9336
+ "required": true
9337
+ },
9338
+ "COMMAND": {
9339
+ "description": "command to run",
9340
+ "name": "COMMAND",
9341
+ "required": true
9342
+ }
9343
+ },
9344
+ "description": "run a one-off process inside an existing heroku dyno (for Fir-generation apps only)",
9345
+ "examples": "Run bash\n $ heroku run:inside web-848cd4f64d-pvpr2 bash\nRun a command supplied by a script\n $ heroku run:inside web-848cd4f64d-pvpr2 -- myscript.sh\nRun a command declared for the worker process type in a Procfile\n $ heroku run:inside worker\n",
9337
9346
  "flags": {
9338
9347
  "app": {
9339
9348
  "char": "a",
@@ -9368,13 +9377,13 @@
9368
9377
  }
9369
9378
  },
9370
9379
  "hasDynamicHelp": false,
9371
- "hidden": true,
9372
9380
  "hiddenAliases": [],
9373
9381
  "id": "run:inside",
9374
9382
  "pluginAlias": "heroku",
9375
9383
  "pluginName": "heroku",
9376
9384
  "pluginType": "core",
9377
9385
  "strict": false,
9386
+ "example": "Run bash\n $ heroku run:inside web-848cd4f64d-pvpr2 bash\nRun a command supplied by a script\n $ heroku run:inside web-848cd4f64d-pvpr2 -- myscript.sh\nRun a command declared for the worker process type in a Procfile\n $ heroku run:inside worker\n",
9378
9387
  "isESM": false,
9379
9388
  "relativePath": [
9380
9389
  "lib",
@@ -9976,14 +9985,14 @@
9976
9985
  "telemetry:add": {
9977
9986
  "aliases": [],
9978
9987
  "args": {
9979
- "headers": {
9980
- "description": "custom headers to configure the drain in json format",
9981
- "name": "headers",
9988
+ "endpoint": {
9989
+ "description": "drain url",
9990
+ "name": "endpoint",
9982
9991
  "required": true
9983
9992
  }
9984
9993
  },
9985
9994
  "description": "Add and configure a new telemetry drain. Defaults to collecting all telemetry unless otherwise specified.",
9986
- "examples": "Add a telemetry drain to an app to collect logs and traces:\n$ heroku telemetry:add --app myapp --signals logs,traces --endpoint https://my-endpoint.com --transport http '{\"x-drain-example-team\": \"API_KEY\", \"x-drain-example-dataset\": \"METRICS_DATASET\"}'\n",
9995
+ "examples": "Add a telemetry drain to an app to collect logs and traces:\n$ heroku telemetry:add https://my-endpoint.com --app myapp --signals logs,traces --headers '{\"x-drain-example-team\": \"API_KEY\", \"x-drain-example-dataset\": \"METRICS_DATASET\"}'\n",
9987
9996
  "flags": {
9988
9997
  "app": {
9989
9998
  "char": "a",
@@ -9993,6 +10002,13 @@
9993
10002
  "multiple": false,
9994
10003
  "type": "option"
9995
10004
  },
10005
+ "headers": {
10006
+ "description": "custom headers to configure the drain in json format",
10007
+ "name": "headers",
10008
+ "hasDynamicHelp": false,
10009
+ "multiple": false,
10010
+ "type": "option"
10011
+ },
9996
10012
  "space": {
9997
10013
  "char": "s",
9998
10014
  "description": "space to add a drain to",
@@ -10009,18 +10025,10 @@
10009
10025
  "multiple": false,
10010
10026
  "type": "option"
10011
10027
  },
10012
- "endpoint": {
10013
- "description": "drain url",
10014
- "name": "endpoint",
10015
- "required": true,
10016
- "hasDynamicHelp": false,
10017
- "multiple": false,
10018
- "type": "option"
10019
- },
10020
10028
  "transport": {
10021
10029
  "description": "transport protocol for the drain",
10022
10030
  "name": "transport",
10023
- "required": true,
10031
+ "default": "http",
10024
10032
  "hasDynamicHelp": false,
10025
10033
  "multiple": false,
10026
10034
  "options": [
@@ -10037,7 +10045,7 @@
10037
10045
  "pluginName": "heroku",
10038
10046
  "pluginType": "core",
10039
10047
  "strict": true,
10040
- "example": "Add a telemetry drain to an app to collect logs and traces:\n$ heroku telemetry:add --app myapp --signals logs,traces --endpoint https://my-endpoint.com --transport http '{\"x-drain-example-team\": \"API_KEY\", \"x-drain-example-dataset\": \"METRICS_DATASET\"}'\n",
10048
+ "example": "Add a telemetry drain to an app to collect logs and traces:\n$ heroku telemetry:add https://my-endpoint.com --app myapp --signals logs,traces --headers '{\"x-drain-example-team\": \"API_KEY\", \"x-drain-example-dataset\": \"METRICS_DATASET\"}'\n",
10041
10049
  "isESM": false,
10042
10050
  "relativePath": [
10043
10051
  "lib",
@@ -10165,25 +10173,28 @@
10165
10173
  "description": "ID of the drain to update",
10166
10174
  "name": "telemetry_drain_id",
10167
10175
  "required": true
10168
- },
10169
- "headers": {
10170
- "description": "custom headers to configure the drain in json format",
10171
- "name": "headers"
10172
10176
  }
10173
10177
  },
10174
10178
  "description": "updates a telemetry drain with provided attributes (attributes not provided remain unchanged)",
10175
10179
  "examples": "$ heroku telemetry:update acde070d-8c4c-4f0d-9d8a-162843c10333 --signals logs,metrics --endpoint https://my-new-endpoint.com\n",
10176
10180
  "flags": {
10177
- "signals": {
10178
- "description": "comma-delimited list of signals to collect (traces, metrics, logs). Use \"all\" to collect all signals.",
10179
- "name": "signals",
10181
+ "endpoint": {
10182
+ "description": "drain url",
10183
+ "name": "endpoint",
10180
10184
  "hasDynamicHelp": false,
10181
10185
  "multiple": false,
10182
10186
  "type": "option"
10183
10187
  },
10184
- "endpoint": {
10185
- "description": "drain url",
10186
- "name": "endpoint",
10188
+ "headers": {
10189
+ "description": "custom headers to configure the drain in json format",
10190
+ "name": "headers",
10191
+ "hasDynamicHelp": false,
10192
+ "multiple": false,
10193
+ "type": "option"
10194
+ },
10195
+ "signals": {
10196
+ "description": "comma-delimited list of signals to collect (traces, metrics, logs). Use \"all\" to collect all signals.",
10197
+ "name": "signals",
10187
10198
  "hasDynamicHelp": false,
10188
10199
  "multiple": false,
10189
10200
  "type": "option"
@@ -14431,5 +14442,5 @@
14431
14442
  ]
14432
14443
  }
14433
14444
  },
14434
- "version": "10.0.0-beta.0"
14445
+ "version": "10.0.0-beta.2"
14435
14446
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "heroku",
3
3
  "description": "CLI to interact with Heroku",
4
- "version": "10.0.0-beta.0",
4
+ "version": "10.0.0-beta.2",
5
5
  "author": "Heroku",
6
6
  "bin": "./bin/run",
7
7
  "bugs": "https://github.com/heroku/cli/issues",
@@ -390,5 +390,5 @@
390
390
  "version": "oclif readme --multi && git add README.md ../../docs"
391
391
  },
392
392
  "types": "lib/index.d.ts",
393
- "gitHead": "8cbc46ca8bde3e883aa79e267fdbd707124a2466"
393
+ "gitHead": "894a01c72314f33c1fa227a97c0e3fe09ebda4e6"
394
394
  }