heroku 10.6.2-alpha.0 → 10.7.0-beta.0

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.
package/bin/run CHANGED
@@ -1,15 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- const {Config} = require('@oclif/core')
4
- const root = require.resolve('../package.json')
5
- const config = new Config({root})
6
-
7
3
  process.env.HEROKU_UPDATE_INSTRUCTIONS = process.env.HEROKU_UPDATE_INSTRUCTIONS || 'update with: "npm update -g heroku"'
8
4
 
9
5
  const now = new Date()
10
6
  const cliStartTime = now.getTime()
11
7
  const globalTelemetry = require('../lib/global_telemetry')
12
- const yargs = require('yargs-parser')(process.argv.slice(2))
13
8
 
14
9
  process.once('beforeExit', async code => {
15
10
  // capture as successful exit
@@ -43,37 +38,13 @@ process.on('SIGTERM', async () => {
43
38
  globalTelemetry.initializeInstrumentation()
44
39
 
45
40
  const oclif = require('@oclif/core')
46
- const oclifFlush = require('@oclif/core/flush')
47
- const oclifError = require('@oclif/core/handle')
48
- const {promptUser} = require('./heroku-prompts')
49
- const {herokuRepl} = require('./heroku-repl')
50
-
51
- const main = async () => {
52
- try {
53
- await config.load()
54
- const {_: [commandName, ...args], ...flags} = yargs
55
- if (!commandName && args.length === 0 && Object.keys(flags).length === 0) {
56
- await herokuRepl(config)
57
- return
58
- }
59
-
60
- if (flags.prompt) {
61
- delete flags.prompt
62
- await promptUser(config, commandName, args, flags)
63
- await oclif.run([commandName, ...args], config)
64
- } else {
65
- await oclif.run(undefined, config)
66
- }
67
41
 
68
- await oclifFlush()
69
- } catch (error) {
70
- // capture any errors raised by oclif
71
- const cliError = error
72
- cliError.cliRunDuration = globalTelemetry.computeDuration(cliStartTime)
73
- await globalTelemetry.sendTelemetry(cliError)
42
+ oclif.run().then(require('@oclif/core/flush')).catch(async error => {
43
+ // capture any errors raised by oclif
44
+ const cliError = error
45
+ cliError.cliRunDuration = globalTelemetry.computeDuration(cliStartTime)
46
+ await globalTelemetry.sendTelemetry(cliError)
74
47
 
75
- oclifError(error)
76
- }
77
- }
48
+ return require('@oclif/core/handle')(error)
49
+ })
78
50
 
79
- main()
package/lib/analytics.js CHANGED
@@ -15,8 +15,6 @@ class AnalyticsCommand {
15
15
  }
16
16
  async record(opts) {
17
17
  await this.initialize;
18
- const mcpMode = process.env.HEROKU_MCP_MODE === 'true';
19
- const mcpServerVersion = process.env.HEROKU_MCP_SERVER_VERSION || 'unknown';
20
18
  const plugin = opts.Command.plugin;
21
19
  if (!plugin) {
22
20
  debug('no plugin found for analytics');
@@ -31,7 +29,7 @@ class AnalyticsCommand {
31
29
  cli: this.config.name,
32
30
  command: opts.Command.id,
33
31
  completion: await this._acAnalytics(opts.Command.id),
34
- version: `${this.config.version}${mcpMode ? ` (MCP ${mcpServerVersion})` : ''}`,
32
+ version: this.config.version,
35
33
  plugin: plugin.name,
36
34
  plugin_version: plugin.version,
37
35
  os: this.config.platform,
@@ -49,19 +49,10 @@ class Create extends command_1.Command {
49
49
  const argv = restParse.argv
50
50
  // oclif duplicates specified args in argv
51
51
  .filter(arg => arg !== servicePlan);
52
- const inferenceRegex = /^heroku-inference/;
53
- const isInferenceAddon = inferenceRegex.test(servicePlan);
54
52
  if (restParse.nonExistentFlags && restParse.nonExistentFlags.length > 0) {
55
53
  process.stderr.write(` ${color_1.default.yellow('›')} For example: ${color_1.default.cyan(`heroku addons:create -a ${app} ${restParse.raw[0].input} -- ${restParse.nonExistentFlags.join(' ')}`)}`);
56
54
  process.stderr.write(` ${color_1.default.yellow('›')} See https://devcenter.heroku.com/changelog-items/2925 for more info.\n`);
57
55
  }
58
- if (isInferenceAddon) {
59
- core_1.ux.warn((0, tsheredoc_1.default) `
60
- Heroku Managed Inference and Agent is a pilot or beta service that is subject to the Beta Services Terms at https://www.salesforce.com/company/legal/customer-agreements/ or a written Unified Pilot Agreement if executed by Customer, and the Non-GA Gen AI and Non-GA Credit Consumption terms in the Product Terms Directory at https://ptd.salesforce.com. While use of this pilot or beta service is itself free, such use may consume GA Heroku credits and/or resources for which the Customer may have paid or be charged. Use of this pilot or beta is at the Customer's sole discretion.
61
-
62
- For clarity and without limitation, the various third-party machine learning and generative artificial intelligence (AI) models and applications (each a “Platform”) integrated with the Beta Service are Non-SFDC Applications, as that term is defined in the Beta Services Terms. Note that these third-party Platforms include features that use generative AI technology. Due to the nature of generative AI, the output that a Platform generates may be unpredictable, and may include inaccurate or harmful responses. Before using any generative AI output, Customer is solely responsible for reviewing the output for accuracy, safety, and compliance with applicable laws and third-party acceptable use policies. In addition, Customer’s use of each Platform may be subject to the Platform’s own terms and conditions, compliance with which Customer is solely responsible.
63
- `);
64
- }
65
56
  const config = parseConfig(argv);
66
57
  let addon;
67
58
  try {
@@ -51,7 +51,7 @@ class Add extends command_1.Command {
51
51
  }
52
52
  if (keys.length === 1) {
53
53
  const key = keys[0];
54
- core_1.ux.info(`Found an SSH public key at ${color_1.default.cyan(key)}`);
54
+ core_1.ux.log(`Found an SSH public key at ${color_1.default.cyan(key)}`);
55
55
  if (!flags.yes) {
56
56
  const resp = await confirmPrompt('Would you like to upload it to Heroku?');
57
57
  if (!resp.yes)
@@ -25,7 +25,7 @@ export declare function initializeInstrumentation(): void;
25
25
  export declare function setupTelemetry(config: any, opts: any): {
26
26
  command: any;
27
27
  os: any;
28
- version: string;
28
+ version: any;
29
29
  exitCode: number;
30
30
  exitState: string;
31
31
  cliRunDuration: number;
@@ -57,12 +57,10 @@ function setupTelemetry(config, opts) {
57
57
  const now = new Date();
58
58
  const cmdStartTime = now.getTime();
59
59
  const isRegularCmd = Boolean(opts.Command);
60
- const mcpMode = process.env.HEROKU_MCP_MODE === 'true';
61
- const mcpServerVersion = process.env.HEROKU_MCP_SERVER_VERSION || 'unknown';
62
60
  const irregularTelemetryObject = {
63
61
  command: opts.id,
64
62
  os: config.platform,
65
- version: `${config.version}${mcpMode ? ` (MCP ${mcpServerVersion})` : ''}`,
63
+ version: config.version,
66
64
  exitCode: 0,
67
65
  exitState: 'successful',
68
66
  cliRunDuration: 0,
@@ -2,9 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createSourceBlob = void 0;
4
4
  const fs = require("async-file");
5
- const core_1 = require("@oclif/core");
6
5
  const git = require("./git");
7
6
  const got_1 = require("got");
7
+ const debug_1 = require("debug");
8
+ const ciDebug = (0, debug_1.default)('ci');
8
9
  async function uploadArchive(url, filePath) {
9
10
  const request = got_1.default.stream.put(url, {
10
11
  headers: {
@@ -34,7 +35,7 @@ async function createSourceBlob(ref, command) {
34
35
  }
35
36
  catch (error) {
36
37
  // the commit isn't in the repo, we will package the local git commit instead
37
- core_1.ux.debug(`Commit not found in pipeline repository: ${error}`);
38
+ ciDebug('Commit not found in pipeline repository', error);
38
39
  }
39
40
  const sourceBlob = await prepareSource(ref, command);
40
41
  return sourceBlob.source_blob.get_url;