heroku 11.0.0-alpha.1 → 11.0.0-alpha.10
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/README.md +3 -0
- package/lib/commands/local/index.d.ts +19 -0
- package/lib/commands/local/index.js +77 -0
- package/lib/commands/local/run.d.ts +11 -0
- package/lib/commands/local/run.js +37 -0
- package/lib/commands/local/version.d.ts +5 -0
- package/lib/commands/local/version.js +10 -0
- package/lib/commands/members/add.d.ts +13 -0
- package/lib/commands/members/add.js +32 -0
- package/lib/commands/members/index.d.ts +12 -0
- package/lib/commands/members/index.js +80 -0
- package/lib/commands/members/remove.d.ts +10 -0
- package/lib/commands/members/remove.js +43 -0
- package/lib/commands/members/set.d.ts +11 -0
- package/lib/commands/members/set.js +24 -0
- package/lib/commands/pipelines/add.d.ts +14 -0
- package/lib/commands/pipelines/add.js +58 -0
- package/lib/commands/pipelines/connect.d.ts +12 -0
- package/lib/commands/pipelines/connect.js +49 -0
- package/lib/commands/pipelines/create.d.ts +15 -0
- package/lib/commands/pipelines/create.js +89 -0
- package/lib/commands/pipelines/destroy.d.ts +9 -0
- package/lib/commands/pipelines/destroy.js +24 -0
- package/lib/commands/pipelines/diff.d.ts +20 -0
- package/lib/commands/pipelines/diff.js +156 -0
- package/lib/commands/pipelines/index.d.ts +9 -0
- package/lib/commands/pipelines/index.js +25 -0
- package/lib/commands/pipelines/info.d.ts +13 -0
- package/lib/commands/pipelines/info.js +41 -0
- package/lib/lib/local/env-file-validator.d.ts +1 -0
- package/lib/lib/local/env-file-validator.js +10 -0
- package/lib/lib/local/fork-foreman.js +7 -0
- package/lib/lib/local/load-foreman-procfile.d.ts +1 -2
- package/lib/lib/local/load-foreman-procfile.js +5 -1
- package/lib/lib/local/{run-foreman.js → run-foreman.cjs} +2 -1
- package/lib/lib/members/team-invite-utils.d.ts +14 -0
- package/lib/lib/members/team-invite-utils.js +26 -0
- package/lib/lib/pipelines/disambiguate.js +2 -2
- package/lib/lib/pipelines/ownership.d.ts +5 -1
- package/lib/lib/pipelines/ownership.js +33 -44
- package/lib/lib/pipelines/render-pipeline.d.ts +7 -1
- package/lib/lib/pipelines/render-pipeline.js +62 -68
- package/npm-shrinkwrap.json +31675 -0
- package/oclif.manifest.json +7573 -0
- package/package.json +10 -8
- package/lib/lib/members/utils.d.ts +0 -2
- package/lib/lib/members/utils.js +0 -10
- package/lib/oldCommands/local/index.d.ts +0 -1
- package/lib/oldCommands/local/index.js +0 -91
- package/lib/oldCommands/local/run.d.ts +0 -1
- package/lib/oldCommands/local/run.js +0 -54
- package/lib/oldCommands/local/version.d.ts +0 -1
- package/lib/oldCommands/local/version.js +0 -17
- package/lib/oldCommands/members/add.d.ts +0 -1
- package/lib/oldCommands/members/add.js +0 -36
- package/lib/oldCommands/members/index.d.ts +0 -1
- package/lib/oldCommands/members/index.js +0 -92
- package/lib/oldCommands/members/remove.d.ts +0 -1
- package/lib/oldCommands/members/remove.js +0 -70
- package/lib/oldCommands/members/set.d.ts +0 -1
- package/lib/oldCommands/members/set.js +0 -24
- package/lib/oldCommands/pipelines/add.d.ts +0 -1
- package/lib/oldCommands/pipelines/add.js +0 -70
- package/lib/oldCommands/pipelines/connect.d.ts +0 -1
- package/lib/oldCommands/pipelines/connect.js +0 -69
- package/lib/oldCommands/pipelines/create.d.ts +0 -1
- package/lib/oldCommands/pipelines/create.js +0 -105
- package/lib/oldCommands/pipelines/destroy.d.ts +0 -1
- package/lib/oldCommands/pipelines/destroy.js +0 -34
- package/lib/oldCommands/pipelines/diff.d.ts +0 -1
- package/lib/oldCommands/pipelines/diff.js +0 -202
- package/lib/oldCommands/pipelines/index.d.ts +0 -1
- package/lib/oldCommands/pipelines/index.js +0 -34
- package/lib/oldCommands/pipelines/info.d.ts +0 -1
- package/lib/oldCommands/pipelines/info.js +0 -51
- /package/lib/lib/local/{run-foreman.d.ts → run-foreman.d.cts} +0 -0
|
@@ -1,70 +1,64 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
import { color } from '@heroku-cli/color';
|
|
2
|
+
import { ux } from '@oclif/core';
|
|
3
|
+
import { hux } from '@heroku/heroku-cli-util';
|
|
4
|
+
import { getOwner, warnMixedOwnership } from './ownership.js';
|
|
5
|
+
export default async function renderPipeline(heroku, pipeline, pipelineApps,
|
|
6
|
+
// eslint-disable-next-line unicorn/no-object-as-default-parameter
|
|
7
|
+
{ withOwners, showOwnerWarning } = { withOwners: false, showOwnerWarning: false }) {
|
|
8
|
+
hux.styledHeader(pipeline.name);
|
|
9
|
+
let owner;
|
|
10
|
+
if (pipeline.owner) {
|
|
11
|
+
owner = await getOwner(heroku, pipelineApps, pipeline);
|
|
12
|
+
ux.stdout(`owner: ${owner}`);
|
|
13
|
+
}
|
|
14
|
+
ux.stdout('');
|
|
15
|
+
const columns = {
|
|
16
|
+
name: {
|
|
17
|
+
header: 'app name',
|
|
18
|
+
get(row) {
|
|
19
|
+
return color.app(row.name || '');
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
'coupling.stage': {
|
|
23
|
+
header: 'stage',
|
|
24
|
+
get(row) {
|
|
25
|
+
return row.pipelineCoupling.stage;
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
if (withOwners) {
|
|
30
|
+
columns['owner.email'] = {
|
|
31
|
+
header: 'owner',
|
|
32
|
+
get(row) {
|
|
33
|
+
const email = row.owner && row.owner.email;
|
|
34
|
+
if (email) {
|
|
35
|
+
return email.endsWith('@herokumanager.com') ? `${email.split('@')[0]} (team)` : email;
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
const sortByName = (a, b) => {
|
|
41
|
+
const nameA = a.name || '';
|
|
42
|
+
const nameB = b.name || '';
|
|
43
|
+
if (nameA === nameB)
|
|
44
|
+
return 0;
|
|
45
|
+
return nameA < nameB ? -1 : 1;
|
|
46
|
+
};
|
|
47
|
+
const developmentApps = pipelineApps
|
|
48
|
+
.filter(app => app.pipelineCoupling.stage === 'development')
|
|
49
|
+
.sort(sortByName);
|
|
50
|
+
const reviewApps = pipelineApps
|
|
51
|
+
.filter(app => app.pipelineCoupling.stage === 'review')
|
|
52
|
+
.sort(sortByName);
|
|
53
|
+
const stagingApps = pipelineApps
|
|
54
|
+
.filter(app => app.pipelineCoupling.stage === 'staging')
|
|
55
|
+
.sort(sortByName);
|
|
56
|
+
const productionApps = pipelineApps
|
|
57
|
+
.filter(app => app.pipelineCoupling.stage === 'production')
|
|
58
|
+
.sort(sortByName);
|
|
59
|
+
const apps = developmentApps.concat(reviewApps).concat(stagingApps).concat(productionApps);
|
|
60
|
+
hux.table(apps, columns);
|
|
61
|
+
if (showOwnerWarning && pipeline.owner) {
|
|
62
|
+
warnMixedOwnership(pipelineApps, pipeline, owner);
|
|
55
63
|
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
const developmentApps = sortBy(pipelineApps.filter(app => app.pipelineCoupling.stage === 'development'), ['name'])
|
|
59
|
-
const reviewApps = sortBy(pipelineApps.filter(app => app.pipelineCoupling.stage === 'review'), ['name'])
|
|
60
|
-
const stagingApps = sortBy(pipelineApps.filter(app => app.pipelineCoupling.stage === 'staging'), ['name'])
|
|
61
|
-
const productionApps = sortBy(pipelineApps.filter(app => app.pipelineCoupling.stage === 'production'), ['name'])
|
|
62
|
-
const apps = developmentApps.concat(reviewApps).concat(stagingApps).concat(productionApps)
|
|
63
|
-
|
|
64
|
-
hux.table(apps, columns)
|
|
65
|
-
|
|
66
|
-
if (showOwnerWarning && pipeline.owner) {
|
|
67
|
-
warnMixedOwnership(pipelineApps, pipeline, owner)
|
|
68
|
-
}
|
|
69
64
|
}
|
|
70
|
-
*/
|