@heroku-cli/plugin-buildpack-registry 2.0.1 → 3.0.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/dist/commands/buildpacks/archive.d.ts +2 -2
- package/dist/commands/buildpacks/archive.js +24 -26
- package/dist/commands/buildpacks/init.d.ts +6 -6
- package/dist/commands/buildpacks/init.js +34 -37
- package/dist/commands/buildpacks/publish.d.ts +3 -3
- package/dist/commands/buildpacks/publish.js +41 -38
- package/dist/commands/buildpacks/register.js +4 -9
- package/dist/commands/buildpacks/rollback.d.ts +2 -2
- package/dist/commands/buildpacks/rollback.js +31 -33
- package/dist/index.d.ts +1 -2
- package/dist/index.js +1 -3
- package/oclif.manifest.json +61 -11
- package/package.json +31 -43
- package/dist/tsconfig.tsbuildinfo +0 -1
|
@@ -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/
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
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.
|
|
14
|
+
const herokuAuth = await this.heroku.getAuth() || '';
|
|
16
15
|
if (herokuAuth === '') {
|
|
17
|
-
|
|
16
|
+
ux.error('You need to be logged in to run this command.');
|
|
18
17
|
}
|
|
19
|
-
const registry = new
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
27
|
+
secondFactor = await hux.prompt('Two-factor code', { type: 'password' });
|
|
29
28
|
}
|
|
30
29
|
const result = await registry.archive(args.buildpack, herokuAuth, secondFactor);
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
Err: err => {
|
|
30
|
+
Result.match({
|
|
31
|
+
Err(err) {
|
|
34
32
|
if (err.status === 404) {
|
|
35
|
-
|
|
33
|
+
ux.error(`Buildpack '${args.buildpack}' not found`);
|
|
36
34
|
}
|
|
37
35
|
else if (err.status === 401) {
|
|
38
|
-
|
|
36
|
+
ux.error(`Do not have permission on '${args.buildpack}'`);
|
|
39
37
|
}
|
|
40
38
|
else {
|
|
41
|
-
|
|
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/
|
|
4
|
+
name: import("@oclif/core/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
5
|
};
|
|
7
|
-
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
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
|
|
25
|
-
static description = 'bootstrap a new buildpack';
|
|
22
|
+
export default class Init extends Command {
|
|
26
23
|
static args = {
|
|
27
|
-
name:
|
|
24
|
+
name: Args.string({ description: 'name of the buildpack', required: true }),
|
|
28
25
|
};
|
|
29
|
-
|
|
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
|
-
|
|
38
|
+
ux.stdout(this.existMessage(dirname));
|
|
65
39
|
}
|
|
66
40
|
else {
|
|
67
41
|
fs.mkdirSync(fullPath);
|
|
68
|
-
|
|
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/
|
|
6
|
-
tag_or_branch: import("@oclif/core/
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
12
|
-
|
|
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.
|
|
16
|
+
const herokuAuth = await this.heroku.getAuth() || '';
|
|
17
17
|
if (herokuAuth === '') {
|
|
18
|
-
|
|
18
|
+
ux.error('You need to be logged in to run this command.');
|
|
19
19
|
}
|
|
20
|
-
const registry = new
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
33
|
-
|
|
34
|
-
|
|
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
|
-
|
|
41
|
+
ux.action.stop();
|
|
37
42
|
switch (status) {
|
|
38
|
-
case 'failed':
|
|
39
|
-
|
|
43
|
+
case 'failed': {
|
|
44
|
+
ux.error('Failed to publish buildpack');
|
|
40
45
|
break;
|
|
41
|
-
|
|
42
|
-
|
|
46
|
+
}
|
|
47
|
+
case 'pending': {
|
|
48
|
+
ux.error('Process timed out buildpack revision is still pending');
|
|
43
49
|
break;
|
|
44
|
-
|
|
45
|
-
|
|
50
|
+
}
|
|
51
|
+
case 'published': {
|
|
52
|
+
ux.stdout('Publishing buildpack was successful');
|
|
46
53
|
break;
|
|
47
|
-
|
|
48
|
-
|
|
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
|
-
|
|
2
|
-
|
|
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
|
|
4
|
+
export default class Register extends Command {
|
|
8
5
|
static description = 'create a buildpack';
|
|
9
6
|
async run() {
|
|
10
|
-
|
|
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/
|
|
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
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
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:
|
|
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
|
|
16
|
-
const herokuAuth = this.heroku.
|
|
14
|
+
const registry = new BuildpackRegistry();
|
|
15
|
+
const herokuAuth = await this.heroku.getAuth() || '';
|
|
17
16
|
if (herokuAuth === '') {
|
|
18
|
-
|
|
17
|
+
ux.error('You need to be logged in to run this command.');
|
|
19
18
|
}
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
-
|
|
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
|
|
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
|
|
32
|
-
|
|
33
|
-
|
|
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
|
-
|
|
39
|
+
ux.action.stop();
|
|
36
40
|
// eslint-disable-next-line unicorn/prefer-switch
|
|
37
41
|
if (status === 'failed') {
|
|
38
|
-
|
|
42
|
+
ux.error('Failed to rollback buildpack');
|
|
39
43
|
}
|
|
40
44
|
else if (status === 'published') {
|
|
41
|
-
|
|
45
|
+
ux.stdout(`Rolling back buildpack to '${revision.ref}' was successful`);
|
|
42
46
|
}
|
|
43
47
|
else if (status === 'pending') {
|
|
44
|
-
|
|
48
|
+
ux.error('Process timed out buildpack revision is still pending');
|
|
45
49
|
}
|
|
46
50
|
else {
|
|
47
|
-
|
|
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
|
-
|
|
2
|
-
export default _default;
|
|
1
|
+
export { run } from '@oclif/core';
|
package/dist/index.js
CHANGED
package/oclif.manifest.json
CHANGED
|
@@ -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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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
|
-
"
|
|
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": "
|
|
183
|
+
"version": "3.0.0"
|
|
134
184
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@heroku-cli/plugin-buildpack-registry",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"description": "Create and publish buildpacks",
|
|
5
|
+
"type": "module",
|
|
5
6
|
"main": "dist/index.js",
|
|
6
7
|
"repository": {
|
|
7
8
|
"type": "git",
|
|
@@ -16,58 +17,43 @@
|
|
|
16
17
|
"access": "public"
|
|
17
18
|
},
|
|
18
19
|
"scripts": {
|
|
19
|
-
"build": "rm -rf dist && tsc
|
|
20
|
+
"build": "rm -rf dist && tsc && oclif manifest && oclif readme",
|
|
20
21
|
"lint": "eslint .",
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"test": "
|
|
25
|
-
"test:local": "nyc mocha",
|
|
22
|
+
"postpublish": "rm -f oclif.manifest.json",
|
|
23
|
+
"posttest": "npm run lint",
|
|
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/
|
|
30
|
-
"@heroku-cli/command": "^11.6.0",
|
|
29
|
+
"@heroku-cli/command": "^13.0.0",
|
|
31
30
|
"@heroku/buildpack-registry": "^1.0.1",
|
|
32
|
-
"@heroku/heroku-cli-util": "
|
|
33
|
-
"@oclif/core": "^
|
|
34
|
-
"
|
|
35
|
-
"@types/ansi-styles": "^3.2.0",
|
|
36
|
-
"@types/lodash": "^4.14.108",
|
|
37
|
-
"@types/supports-color": "^5.3.0",
|
|
38
|
-
"lodash": "^4.14.0",
|
|
39
|
-
"lodash.findindex": "^4.6.0",
|
|
40
|
-
"open": "^8.4.2",
|
|
41
|
-
"true-myth": "^2.0.0",
|
|
42
|
-
"valid-url": "^1.0.9"
|
|
31
|
+
"@heroku/heroku-cli-util": "10.9.1",
|
|
32
|
+
"@oclif/core": "^4.11.14",
|
|
33
|
+
"true-myth": "^2.0.0"
|
|
43
34
|
},
|
|
44
35
|
"devDependencies": {
|
|
45
|
-
"@
|
|
46
|
-
"@oclif/plugin-help": "^
|
|
47
|
-
"@
|
|
48
|
-
"@types/chai": "^4",
|
|
49
|
-
"@types/glob": "^8.1.0",
|
|
36
|
+
"@heroku-cli/test-utils": "^1.0.0",
|
|
37
|
+
"@oclif/plugin-help": "^6.2.53",
|
|
38
|
+
"@types/chai": "^5.2.3",
|
|
50
39
|
"@types/mocha": "^10.0.6",
|
|
51
|
-
"@types/node": "16.
|
|
52
|
-
"
|
|
53
|
-
"
|
|
40
|
+
"@types/node": "22.16.5",
|
|
41
|
+
"c8": "^10.1.3",
|
|
42
|
+
"chai": "^5.3.3",
|
|
43
|
+
"eslint": "^9.39.4",
|
|
54
44
|
"eslint-config-oclif": "^6.0.144",
|
|
55
|
-
"
|
|
56
|
-
"
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
-
"
|
|
60
|
-
"oclif": "^4.22.81",
|
|
61
|
-
"tmp": "^0.2.5",
|
|
62
|
-
"ts-node": "^10.0.0",
|
|
63
|
-
"typescript": "^5.0.0"
|
|
45
|
+
"mocha": "^11.7.5",
|
|
46
|
+
"nock": "^14.0.1",
|
|
47
|
+
"oclif": "^4.23.0",
|
|
48
|
+
"tsx": "^4.21.0",
|
|
49
|
+
"typescript": "^5.9.3"
|
|
64
50
|
},
|
|
65
51
|
"engines": {
|
|
66
|
-
"node": ">=20"
|
|
52
|
+
"node": ">= 20.0"
|
|
67
53
|
},
|
|
68
54
|
"files": [
|
|
69
|
-
"
|
|
70
|
-
"
|
|
55
|
+
"oclif.manifest.json",
|
|
56
|
+
"dist"
|
|
71
57
|
],
|
|
72
58
|
"oclif": {
|
|
73
59
|
"commands": "./dist/commands",
|
|
@@ -79,8 +65,10 @@
|
|
|
79
65
|
"-h"
|
|
80
66
|
]
|
|
81
67
|
},
|
|
82
|
-
"
|
|
83
|
-
|
|
84
|
-
"
|
|
68
|
+
"//overrides": "serialize-javascript: mocha transitive dep pinned for CVE-2024-11831; diff and uuid pinned to resolve 3pp vulnerabilities",
|
|
69
|
+
"overrides": {
|
|
70
|
+
"serialize-javascript": "^7.0.5",
|
|
71
|
+
"diff": "^8.0.3",
|
|
72
|
+
"uuid": "^11.1.1"
|
|
85
73
|
}
|
|
86
74
|
}
|
|
@@ -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.8.3"}
|