@heroku-cli/plugin-buildpack-registry 2.0.2 → 3.0.1

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.
@@ -1,8 +1,8 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class Archive extends Command {
3
- static description: string;
4
3
  static args: {
5
- buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
4
+ buildpack: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
5
  };
6
+ static description: string;
7
7
  run(): Promise<void>;
8
8
  }
@@ -1,47 +1,45 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@heroku-cli/command");
4
- const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
5
- const core_1 = require("@oclif/core");
6
- const buildpack_registry_1 = require("@heroku/buildpack-registry");
7
- const true_myth_1 = require("true-myth");
8
- class Archive extends command_1.Command {
9
- static description = 'archive a buildpack';
1
+ import { Command } from '@heroku-cli/command';
2
+ import { BuildpackRegistry } from '@heroku/buildpack-registry';
3
+ import { hux } from '@heroku/heroku-cli-util';
4
+ import { Args } from '@oclif/core';
5
+ import { ux } from '@oclif/core/ux';
6
+ import { Result } from 'true-myth';
7
+ export default class Archive extends Command {
10
8
  static args = {
11
- buildpack: core_1.Args.string({ required: true, description: 'namespace/name of the buildpack' }),
9
+ buildpack: Args.string({ description: 'namespace/name of the buildpack', required: true }),
12
10
  };
11
+ static description = 'archive a buildpack';
13
12
  async run() {
14
13
  const { args } = await this.parse(Archive);
15
- const herokuAuth = this.heroku.auth || '';
14
+ const herokuAuth = await this.heroku.getAuth() || '';
16
15
  if (herokuAuth === '') {
17
- this.error('You need to be logged in to run this command.');
16
+ ux.error('You need to be logged in to run this command.');
18
17
  }
19
- const registry = new buildpack_registry_1.BuildpackRegistry();
20
- true_myth_1.Result.match({
21
- Ok: _ => { },
22
- Err: err => {
23
- this.error(`Could not publish the buildpack.\n${err}`);
18
+ const registry = new BuildpackRegistry();
19
+ Result.match({
20
+ Err(err) {
21
+ ux.error(`Could not publish the buildpack.\n${err}`);
24
22
  },
25
- }, buildpack_registry_1.BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
23
+ Ok(_) { },
24
+ }, BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
26
25
  let secondFactor;
27
26
  if ((await registry.requiresTwoFactor(args.buildpack)).unwrapOr(false) === true) {
28
- secondFactor = await heroku_cli_util_1.hux.prompt('Two-factor code', { type: 'mask' });
27
+ secondFactor = await hux.prompt('Two-factor code', { type: 'password' });
29
28
  }
30
29
  const result = await registry.archive(args.buildpack, herokuAuth, secondFactor);
31
- true_myth_1.Result.match({
32
- Ok: _ => core_1.ux.log(`Archived ${args.buildpack}`),
33
- Err: err => {
30
+ Result.match({
31
+ Err(err) {
34
32
  if (err.status === 404) {
35
- core_1.ux.error(`Buildpack '${args.buildpack}' not found`);
33
+ ux.error(`Buildpack '${args.buildpack}' not found`);
36
34
  }
37
35
  else if (err.status === 401) {
38
- core_1.ux.error(`Do not have permission on '${args.buildpack}'`);
36
+ ux.error(`Do not have permission on '${args.buildpack}'`);
39
37
  }
40
38
  else {
41
- core_1.ux.error(`Could not archive '${args.buildpack}', ${err.status}: ${err.description}`);
39
+ ux.error(`Could not archive '${args.buildpack}', ${err.status}: ${err.description}`);
42
40
  }
43
41
  },
42
+ Ok: _ => ux.stdout(`Archived ${args.buildpack}`),
44
43
  }, result);
45
44
  }
46
45
  }
47
- exports.default = Archive;
@@ -1,12 +1,12 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class Init extends Command {
3
- static description: string;
4
3
  static args: {
5
- name: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
4
+ name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
5
  };
7
- run(): Promise<void>;
8
- existMessage(filename: string): string;
9
- createMessage(filename: string): string;
10
- createFile(filename: string, parent: string, template: string): void;
6
+ static description: string;
11
7
  createDir(dirname: string, parent?: string): void;
8
+ createFile(filename: string, parent: string, template: string): void;
9
+ createMessage(filename: string): string;
10
+ existMessage(filename: string): string;
11
+ run(): Promise<void>;
12
12
  }
@@ -1,10 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const color_1 = tslib_1.__importDefault(require("@heroku-cli/color"));
5
- const command_1 = require("@heroku-cli/command");
6
- const fs = tslib_1.__importStar(require("fs"));
7
- const core_1 = require("@oclif/core");
1
+ import { Command } from '@heroku-cli/command';
2
+ import * as color from '@heroku/heroku-cli-util/color';
3
+ import { Args } from '@oclif/core';
4
+ import { ux } from '@oclif/core/ux';
5
+ import * as fs from 'node:fs';
8
6
  const DETECT = `#!/usr/bin/env bash
9
7
  # bin/detect <build-dir>
10
8
 
@@ -21,35 +19,11 @@ const RELEASE = `
21
19
 
22
20
  echo "--- {}"
23
21
  `;
24
- class Init extends command_1.Command {
25
- static description = 'bootstrap a new buildpack';
22
+ export default class Init extends Command {
26
23
  static args = {
27
- name: core_1.Args.string({ required: true, description: 'name of the buildpack' }),
24
+ name: Args.string({ description: 'name of the buildpack', required: true }),
28
25
  };
29
- async run() {
30
- const { args } = await this.parse(Init);
31
- this.createDir(args.name);
32
- this.createDir('bin', args.name);
33
- this.createFile('bin/detect', args.name, DETECT);
34
- this.createFile('bin/compile', args.name, COMPILE);
35
- this.createFile('bin/release', args.name, RELEASE);
36
- }
37
- existMessage(filename) {
38
- return ` ${color_1.default.blue.bold('exist')} ${filename}`;
39
- }
40
- createMessage(filename) {
41
- return ` ${color_1.default.green.bold('create')} ${filename}`;
42
- }
43
- createFile(filename, parent, template) {
44
- const fullPath = `${parent}/${filename}`;
45
- if (fs.existsSync(fullPath)) {
46
- this.log(this.existMessage(filename));
47
- }
48
- else {
49
- fs.writeFileSync(fullPath, template, { mode: 0o755 });
50
- this.log(this.createMessage(filename));
51
- }
52
- }
26
+ static description = 'bootstrap a new buildpack';
53
27
  createDir(dirname, parent) {
54
28
  let fullPath = '';
55
29
  if (parent === undefined) {
@@ -61,12 +35,35 @@ class Init extends command_1.Command {
61
35
  dirname += '/';
62
36
  }
63
37
  if (fs.existsSync(fullPath)) {
64
- this.log(this.existMessage(dirname));
38
+ ux.stdout(this.existMessage(dirname));
65
39
  }
66
40
  else {
67
41
  fs.mkdirSync(fullPath);
68
- this.log(this.createMessage(dirname));
42
+ ux.stdout(this.createMessage(dirname));
43
+ }
44
+ }
45
+ createFile(filename, parent, template) {
46
+ const fullPath = `${parent}/${filename}`;
47
+ if (fs.existsSync(fullPath)) {
48
+ ux.stdout(this.existMessage(filename));
69
49
  }
50
+ else {
51
+ fs.writeFileSync(fullPath, template, { mode: 0o755 });
52
+ ux.stdout(this.createMessage(filename));
53
+ }
54
+ }
55
+ createMessage(filename) {
56
+ return ` ${color.green(color.bold('create'))} ${filename}`;
57
+ }
58
+ existMessage(filename) {
59
+ return ` ${color.blue(color.bold('exist'))} ${filename}`;
60
+ }
61
+ async run() {
62
+ const { args } = await this.parse(Init);
63
+ this.createDir(args.name);
64
+ this.createDir('bin', args.name);
65
+ this.createFile('bin/detect', args.name, DETECT);
66
+ this.createFile('bin/compile', args.name, COMPILE);
67
+ this.createFile('bin/release', args.name, RELEASE);
70
68
  }
71
69
  }
72
- exports.default = Init;
@@ -1,9 +1,9 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class Publish extends Command {
3
- static description: string;
4
3
  static args: {
5
- buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
6
- tag_or_branch: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
4
+ buildpack: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
5
+ tag_or_branch: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
7
6
  };
7
+ static description: string;
8
8
  run(): Promise<void>;
9
9
  }
@@ -1,60 +1,63 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@heroku-cli/command");
4
- const buildpack_registry_1 = require("@heroku/buildpack-registry");
5
- const core_1 = require("@oclif/core");
6
- const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
7
- const true_myth_1 = require("true-myth");
8
- class Publish extends command_1.Command {
9
- static description = 'publish new revision of buildpack';
1
+ import { Command } from '@heroku-cli/command';
2
+ import { BuildpackRegistry } from '@heroku/buildpack-registry';
3
+ import { hux } from '@heroku/heroku-cli-util';
4
+ import { Args } from '@oclif/core';
5
+ import { ux } from '@oclif/core/ux';
6
+ import { Result } from 'true-myth';
7
+ export default class Publish extends Command {
10
8
  static args = {
11
- buildpack: core_1.Args.string({ required: true, description: 'namespace/name of the buildpack' }),
12
- tag_or_branch: core_1.Args.string({ required: true, description: 'a tag or branch for publishing' }),
9
+ buildpack: Args.string({ description: 'namespace/name of the buildpack', required: true }),
10
+ // eslint-disable-next-line camelcase
11
+ tag_or_branch: Args.string({ description: 'a tag or branch for publishing', required: true }),
13
12
  };
13
+ static description = 'publish new revision of buildpack';
14
14
  async run() {
15
15
  const { args } = await this.parse(Publish);
16
- const herokuAuth = this.heroku.auth || '';
16
+ const herokuAuth = await this.heroku.getAuth() || '';
17
17
  if (herokuAuth === '') {
18
- this.error('You need to be logged in to run this command.');
18
+ ux.error('You need to be logged in to run this command.');
19
19
  }
20
- const registry = new buildpack_registry_1.BuildpackRegistry();
21
- true_myth_1.Result.match({
22
- Ok: _ => { },
23
- Err: err => {
24
- this.error(`Could not find the buildpack.\n${err}`);
20
+ const registry = new BuildpackRegistry();
21
+ Result.match({
22
+ Err(err) {
23
+ ux.error(`Could not find the buildpack.\n${err}`);
25
24
  },
26
- }, buildpack_registry_1.BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
25
+ Ok(_) { },
26
+ }, BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
27
27
  let secondFactor;
28
28
  if ((await registry.requiresTwoFactor(args.buildpack)).unwrapOr(false) === true) {
29
- secondFactor = await heroku_cli_util_1.hux.prompt('Two-factor code', { type: 'mask' });
29
+ secondFactor = await hux.prompt('Two-factor code', { type: 'password' });
30
30
  }
31
31
  const result = await registry.publish(args.buildpack, args.tag_or_branch, herokuAuth, secondFactor);
32
- await true_myth_1.Result.match({
33
- Ok: revision => {
34
- core_1.ux.action.start(`Publishing buildpack ${args.buildpack}`);
32
+ await Result.match({
33
+ Err(err) {
34
+ return err.status === 404
35
+ ? ux.error(`Could not find buildpack '${args.buildpack}'`)
36
+ : ux.error(`Could not publish '${args.buildpack}': ${err.status}, ${err.description}`);
37
+ },
38
+ Ok(revision) {
39
+ ux.action.start(`Publishing buildpack ${args.buildpack}`);
35
40
  return registry.waitForRelease(revision.buildpack_id, revision.id).then((status) => {
36
- core_1.ux.action.stop();
41
+ ux.action.stop();
37
42
  switch (status) {
38
- case 'failed':
39
- core_1.ux.error('Failed to publish buildpack');
43
+ case 'failed': {
44
+ ux.error('Failed to publish buildpack');
40
45
  break;
41
- case 'published':
42
- core_1.ux.log('Publishing buildpack was successful');
46
+ }
47
+ case 'pending': {
48
+ ux.error('Process timed out buildpack revision is still pending');
43
49
  break;
44
- case 'pending':
45
- core_1.ux.error('Process timed out buildpack revision is still pending');
50
+ }
51
+ case 'published': {
52
+ ux.stdout('Publishing buildpack was successful');
46
53
  break;
47
- default:
48
- core_1.ux.error(`Publishing buildpack ended with status: ${status}`);
54
+ }
55
+ default: {
56
+ ux.error(`Publishing buildpack ended with status: ${status}`);
57
+ }
49
58
  }
50
59
  });
51
60
  },
52
- Err: err => {
53
- return err.status === 404 ?
54
- core_1.ux.error(`Could not find buildpack '${args.buildpack}'`) :
55
- core_1.ux.error(`Could not publish '${args.buildpack}': ${err.status}, ${err.description}`);
56
- },
57
61
  }, result);
58
62
  }
59
63
  }
60
- exports.default = Publish;
@@ -1,14 +1,9 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const command_1 = require("@heroku-cli/command");
5
- const open_1 = tslib_1.__importDefault(require("open"));
1
+ import { Command } from '@heroku-cli/command';
2
+ import { hux } from '@heroku/heroku-cli-util';
6
3
  const PARTNER_PORTAL = `https://addons-next.${process.env.HEROKU_HOST || 'heroku.com'}/buildpacks/new`;
7
- class Register extends command_1.Command {
4
+ export default class Register extends Command {
8
5
  static description = 'create a buildpack';
9
6
  async run() {
10
- this.log('Opening the buildpack registration page...');
11
- await (0, open_1.default)(PARTNER_PORTAL);
7
+ await hux.openUrl(PARTNER_PORTAL, undefined, 'register a buildpack');
12
8
  }
13
9
  }
14
- exports.default = Register;
@@ -1,8 +1,8 @@
1
1
  import { Command } from '@heroku-cli/command';
2
2
  export default class Rollback extends Command {
3
- static description: string;
4
3
  static args: {
5
- buildpack: import("@oclif/core/lib/interfaces/parser").Arg<string, Record<string, unknown>>;
4
+ buildpack: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
6
5
  };
6
+ static description: string;
7
7
  run(): Promise<void>;
8
8
  }
@@ -1,59 +1,57 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const command_1 = require("@heroku-cli/command");
4
- const heroku_cli_util_1 = require("@heroku/heroku-cli-util");
5
- const core_1 = require("@oclif/core");
6
- const buildpack_registry_1 = require("@heroku/buildpack-registry");
7
- const true_myth_1 = require("true-myth");
8
- class Rollback extends command_1.Command {
9
- static description = 'rollback to a previous revision of the buildpack';
1
+ import { Command } from '@heroku-cli/command';
2
+ import { BuildpackRegistry } from '@heroku/buildpack-registry';
3
+ import { hux } from '@heroku/heroku-cli-util';
4
+ import { Args } from '@oclif/core';
5
+ import { ux } from '@oclif/core/ux';
6
+ import { Result } from 'true-myth';
7
+ export default class Rollback extends Command {
10
8
  static args = {
11
- buildpack: core_1.Args.string({ required: true, description: 'namespace/name of the buildpack' }),
9
+ buildpack: Args.string({ description: 'namespace/name of the buildpack', required: true }),
12
10
  };
11
+ static description = 'rollback to a previous revision of the buildpack';
13
12
  async run() {
14
13
  const { args } = await this.parse(Rollback);
15
- const registry = new buildpack_registry_1.BuildpackRegistry();
16
- const herokuAuth = this.heroku.auth || '';
14
+ const registry = new BuildpackRegistry();
15
+ const herokuAuth = await this.heroku.getAuth() || '';
17
16
  if (herokuAuth === '') {
18
- this.error('You need to be logged in to run this command.');
17
+ ux.error('You need to be logged in to run this command.');
19
18
  }
20
- true_myth_1.Result.match({
21
- Ok: _ => { },
22
- Err: err => {
23
- this.error(`Could not rollback the buildpack.\n${err}`);
19
+ Result.match({
20
+ Err(err) {
21
+ ux.error(`Could not rollback the buildpack.\n${err}`);
24
22
  },
25
- }, buildpack_registry_1.BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
23
+ Ok(_) { },
24
+ }, BuildpackRegistry.isValidBuildpackSlug(args.buildpack));
26
25
  let secondFactor;
27
26
  if ((await registry.requiresTwoFactor(args.buildpack)).unwrapOr(false) === true) {
28
- secondFactor = await heroku_cli_util_1.hux.prompt('Two-factor code', { type: 'mask' });
27
+ secondFactor = await hux.prompt('Two-factor code', { type: 'password' });
29
28
  }
30
29
  const result = await registry.rollback(args.buildpack, herokuAuth, secondFactor);
31
- await true_myth_1.Result.match({
32
- Ok: revision => {
33
- core_1.ux.action.start(`Rolling back buildpack ${args.buildpack}`);
30
+ await Result.match({
31
+ Err(err) {
32
+ return err.status === 404
33
+ ? ux.error(`Could not find buildpack '${args.buildpack}'`)
34
+ : ux.error(`Could not rollback '${args.buildpack}', ${err.status}: ${err.description}`);
35
+ },
36
+ Ok(revision) {
37
+ ux.action.start(`Rolling back buildpack ${args.buildpack}`);
34
38
  return registry.waitForRelease(revision.buildpack_id, revision.id).then((status) => {
35
- core_1.ux.action.stop();
39
+ ux.action.stop();
36
40
  // eslint-disable-next-line unicorn/prefer-switch
37
41
  if (status === 'failed') {
38
- this.error('Failed to rollback buildpack');
42
+ ux.error('Failed to rollback buildpack');
39
43
  }
40
44
  else if (status === 'published') {
41
- this.log(`Rolling back buildpack to '${revision.ref}' was successful`);
45
+ ux.stdout(`Rolling back buildpack to '${revision.ref}' was successful`);
42
46
  }
43
47
  else if (status === 'pending') {
44
- this.error('Process timed out buildpack revision is still pending');
48
+ ux.error('Process timed out buildpack revision is still pending');
45
49
  }
46
50
  else {
47
- this.error(`Rolling back buildpack ended with status: ${status}`);
51
+ ux.error(`Rolling back buildpack ended with status: ${status}`);
48
52
  }
49
53
  });
50
54
  },
51
- Err: err => {
52
- return err.status === 404 ?
53
- this.error(`Could not find buildpack '${args.buildpack}'`) :
54
- this.error(`Could not rollback '${args.buildpack}', ${err.status}: ${err.description}`);
55
- },
56
55
  }, result);
57
56
  }
58
57
  }
59
- exports.default = Rollback;
package/dist/index.d.ts CHANGED
@@ -1,2 +1 @@
1
- declare const _default: {};
2
- export default _default;
1
+ export { run } from '@oclif/core';
package/dist/index.js CHANGED
@@ -1,3 +1 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = {};
1
+ export { run } from '@oclif/core';
@@ -10,7 +10,15 @@
10
10
  }
11
11
  },
12
12
  "description": "archive a buildpack",
13
- "flags": {},
13
+ "flags": {
14
+ "prompt": {
15
+ "description": "interactively prompt for command arguments and flags",
16
+ "helpGroup": "GLOBAL",
17
+ "name": "prompt",
18
+ "allowNo": false,
19
+ "type": "boolean"
20
+ }
21
+ },
14
22
  "hasDynamicHelp": false,
15
23
  "hiddenAliases": [],
16
24
  "id": "buildpacks:archive",
@@ -18,7 +26,9 @@
18
26
  "pluginName": "@heroku-cli/plugin-buildpack-registry",
19
27
  "pluginType": "core",
20
28
  "strict": true,
21
- "isESM": false,
29
+ "enableJsonFlag": false,
30
+ "promptFlagActive": true,
31
+ "isESM": true,
22
32
  "relativePath": [
23
33
  "dist",
24
34
  "commands",
@@ -36,7 +46,15 @@
36
46
  }
37
47
  },
38
48
  "description": "bootstrap a new buildpack",
39
- "flags": {},
49
+ "flags": {
50
+ "prompt": {
51
+ "description": "interactively prompt for command arguments and flags",
52
+ "helpGroup": "GLOBAL",
53
+ "name": "prompt",
54
+ "allowNo": false,
55
+ "type": "boolean"
56
+ }
57
+ },
40
58
  "hasDynamicHelp": false,
41
59
  "hiddenAliases": [],
42
60
  "id": "buildpacks:init",
@@ -44,7 +62,9 @@
44
62
  "pluginName": "@heroku-cli/plugin-buildpack-registry",
45
63
  "pluginType": "core",
46
64
  "strict": true,
47
- "isESM": false,
65
+ "enableJsonFlag": false,
66
+ "promptFlagActive": true,
67
+ "isESM": true,
48
68
  "relativePath": [
49
69
  "dist",
50
70
  "commands",
@@ -67,7 +87,15 @@
67
87
  }
68
88
  },
69
89
  "description": "publish new revision of buildpack",
70
- "flags": {},
90
+ "flags": {
91
+ "prompt": {
92
+ "description": "interactively prompt for command arguments and flags",
93
+ "helpGroup": "GLOBAL",
94
+ "name": "prompt",
95
+ "allowNo": false,
96
+ "type": "boolean"
97
+ }
98
+ },
71
99
  "hasDynamicHelp": false,
72
100
  "hiddenAliases": [],
73
101
  "id": "buildpacks:publish",
@@ -75,7 +103,9 @@
75
103
  "pluginName": "@heroku-cli/plugin-buildpack-registry",
76
104
  "pluginType": "core",
77
105
  "strict": true,
78
- "isESM": false,
106
+ "enableJsonFlag": false,
107
+ "promptFlagActive": true,
108
+ "isESM": true,
79
109
  "relativePath": [
80
110
  "dist",
81
111
  "commands",
@@ -87,7 +117,15 @@
87
117
  "aliases": [],
88
118
  "args": {},
89
119
  "description": "create a buildpack",
90
- "flags": {},
120
+ "flags": {
121
+ "prompt": {
122
+ "description": "interactively prompt for command arguments and flags",
123
+ "helpGroup": "GLOBAL",
124
+ "name": "prompt",
125
+ "allowNo": false,
126
+ "type": "boolean"
127
+ }
128
+ },
91
129
  "hasDynamicHelp": false,
92
130
  "hiddenAliases": [],
93
131
  "id": "buildpacks:register",
@@ -95,7 +133,9 @@
95
133
  "pluginName": "@heroku-cli/plugin-buildpack-registry",
96
134
  "pluginType": "core",
97
135
  "strict": true,
98
- "isESM": false,
136
+ "enableJsonFlag": false,
137
+ "promptFlagActive": true,
138
+ "isESM": true,
99
139
  "relativePath": [
100
140
  "dist",
101
141
  "commands",
@@ -113,7 +153,15 @@
113
153
  }
114
154
  },
115
155
  "description": "rollback to a previous revision of the buildpack",
116
- "flags": {},
156
+ "flags": {
157
+ "prompt": {
158
+ "description": "interactively prompt for command arguments and flags",
159
+ "helpGroup": "GLOBAL",
160
+ "name": "prompt",
161
+ "allowNo": false,
162
+ "type": "boolean"
163
+ }
164
+ },
117
165
  "hasDynamicHelp": false,
118
166
  "hiddenAliases": [],
119
167
  "id": "buildpacks:rollback",
@@ -121,7 +169,9 @@
121
169
  "pluginName": "@heroku-cli/plugin-buildpack-registry",
122
170
  "pluginType": "core",
123
171
  "strict": true,
124
- "isESM": false,
172
+ "enableJsonFlag": false,
173
+ "promptFlagActive": true,
174
+ "isESM": true,
125
175
  "relativePath": [
126
176
  "dist",
127
177
  "commands",
@@ -130,5 +180,5 @@
130
180
  ]
131
181
  }
132
182
  },
133
- "version": "2.0.2"
183
+ "version": "3.0.1"
134
184
  }
package/package.json CHANGED
@@ -1,7 +1,8 @@
1
1
  {
2
2
  "name": "@heroku-cli/plugin-buildpack-registry",
3
- "version": "2.0.2",
3
+ "version": "3.0.1",
4
4
  "description": "Create and publish buildpacks",
5
+ "type": "module",
5
6
  "main": "dist/index.js",
6
7
  "repository": {
7
8
  "type": "git",
@@ -16,49 +17,43 @@
16
17
  "access": "public"
17
18
  },
18
19
  "scripts": {
19
- "build": "rm -rf dist && tsc -b && oclif manifest && oclif readme",
20
+ "build": "rm -rf dist && tsc && oclif manifest && oclif readme",
20
21
  "lint": "eslint .",
21
- "prepack": "npm run build",
22
- "postpack": "rm -f oclif.manifest.json",
22
+ "postpublish": "rm -f oclif.manifest.json",
23
23
  "posttest": "npm run lint",
24
- "test": "nyc mocha --forbid-only",
25
- "test:local": "nyc mocha",
24
+ "prepare": "npm run build",
25
+ "test": "c8 mocha --forbid-only \"test/**/*.test.ts\"",
26
26
  "version": "oclif readme && git add README.md"
27
27
  },
28
28
  "dependencies": {
29
- "@heroku-cli/color": "^2.0.6",
30
- "@heroku-cli/command": "^11.8.0",
29
+ "@heroku-cli/command": "^13.0.0",
31
30
  "@heroku/buildpack-registry": "^1.0.1",
32
- "@heroku/heroku-cli-util": "^9.0.1",
33
- "@oclif/core": "^2.16.0",
34
- "open": "^8.4.2",
31
+ "@heroku/heroku-cli-util": "10.9.1",
32
+ "@oclif/core": "^4.11.14",
35
33
  "true-myth": "^2.0.0"
36
34
  },
37
35
  "devDependencies": {
38
- "@fancy-test/nock": "^0.1.1",
39
- "@oclif/plugin-help": "^5.0.0",
40
- "@oclif/test": "^2.3.28",
36
+ "@heroku-cli/test-utils": "^1.0.0",
37
+ "@oclif/plugin-help": "^6.2.53",
41
38
  "@types/chai": "^5.2.3",
42
39
  "@types/mocha": "^10.0.6",
43
40
  "@types/node": "22.16.5",
41
+ "c8": "^10.1.3",
44
42
  "chai": "^5.3.3",
45
43
  "eslint": "^9.39.4",
46
44
  "eslint-config-oclif": "^6.0.144",
47
- "eslint-plugin-mocha": "^11.2.0",
48
45
  "mocha": "^11.7.5",
49
- "nock": "^13.5.1",
50
- "nyc": "^17.1.0",
46
+ "nock": "^14.0.1",
51
47
  "oclif": "^4.23.0",
52
- "tmp": "^0.2.5",
53
- "ts-node": "^10.9.2",
54
- "typescript": "^5.0.0"
48
+ "tsx": "^4.21.0",
49
+ "typescript": "^5.9.3"
55
50
  },
56
51
  "engines": {
57
- "node": ">=20"
52
+ "node": ">= 20.0"
58
53
  },
59
54
  "files": [
60
- "/dist",
61
- "oclif.manifest.json"
55
+ "oclif.manifest.json",
56
+ "dist"
62
57
  ],
63
58
  "oclif": {
64
59
  "commands": "./dist/commands",
@@ -70,6 +65,7 @@
70
65
  "-h"
71
66
  ]
72
67
  },
68
+ "//overrides": "serialize-javascript: mocha transitive dep pinned for CVE-2024-11831; diff and uuid pinned to resolve 3pp vulnerabilities",
73
69
  "overrides": {
74
70
  "serialize-javascript": "^7.0.5",
75
71
  "diff": "^8.0.3",
@@ -1 +0,0 @@
1
- {"root":["../src/index.ts","../src/commands/buildpacks/archive.ts","../src/commands/buildpacks/init.ts","../src/commands/buildpacks/publish.ts","../src/commands/buildpacks/register.ts","../src/commands/buildpacks/rollback.ts"],"version":"5.9.3"}