@code-pushup/cli 0.20.1 → 0.21.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/index.js +7 -22
- package/package.json +1 -1
- package/src/lib/implementation/logging.d.ts +1 -2
package/index.js
CHANGED
|
@@ -906,13 +906,6 @@ function compareIssues(a, b) {
|
|
|
906
906
|
}
|
|
907
907
|
return 0;
|
|
908
908
|
}
|
|
909
|
-
function portalCommitLink(config, commit) {
|
|
910
|
-
const { organization, project, baseUrl } = config;
|
|
911
|
-
return `${baseUrl}/portal/${organization}/${project}/commit/${commit}`;
|
|
912
|
-
}
|
|
913
|
-
function portalCommitDashboardLink(config, commit) {
|
|
914
|
-
return `${portalCommitLink(config, commit)}/dashboard`;
|
|
915
|
-
}
|
|
916
909
|
|
|
917
910
|
// packages/utils/src/lib/execute-process.ts
|
|
918
911
|
var ProcessError = class extends Error {
|
|
@@ -1562,7 +1555,7 @@ var verboseUtils = (verbose = false) => ({
|
|
|
1562
1555
|
|
|
1563
1556
|
// packages/core/package.json
|
|
1564
1557
|
var name = "@code-pushup/core";
|
|
1565
|
-
var version = "0.
|
|
1558
|
+
var version = "0.21.0";
|
|
1566
1559
|
|
|
1567
1560
|
// packages/core/src/lib/implementation/execute-plugin.ts
|
|
1568
1561
|
import chalk5 from "chalk";
|
|
@@ -1992,17 +1985,9 @@ function renderConfigureCategoriesHint() {
|
|
|
1992
1985
|
)
|
|
1993
1986
|
);
|
|
1994
1987
|
}
|
|
1995
|
-
function uploadSuccessfulLog(
|
|
1988
|
+
function uploadSuccessfulLog(url) {
|
|
1996
1989
|
ui().logger.success("Upload successful!");
|
|
1997
|
-
ui().logger.success(
|
|
1998
|
-
link(
|
|
1999
|
-
// @TODO extend config to maintain baseUrl under upload
|
|
2000
|
-
portalCommitDashboardLink(
|
|
2001
|
-
{ ...options2, baseUrl: "<YOUR_PORTAL_URL>" },
|
|
2002
|
-
commit
|
|
2003
|
-
)
|
|
2004
|
-
)
|
|
2005
|
-
);
|
|
1990
|
+
ui().logger.success(link(url));
|
|
2006
1991
|
}
|
|
2007
1992
|
function collectSuccessfulLog() {
|
|
2008
1993
|
ui().logger.success("Collecting report successful!");
|
|
@@ -2093,10 +2078,10 @@ function yargsAutorunCommandObject() {
|
|
|
2093
2078
|
renderConfigureCategoriesHint();
|
|
2094
2079
|
}
|
|
2095
2080
|
if (options2.upload) {
|
|
2096
|
-
await upload(options2);
|
|
2081
|
+
const { url } = await upload(options2);
|
|
2097
2082
|
const commitData = await getLatestCommit();
|
|
2098
2083
|
if (validateCommitData(commitData, { throwError: true })) {
|
|
2099
|
-
uploadSuccessfulLog(
|
|
2084
|
+
uploadSuccessfulLog(url);
|
|
2100
2085
|
}
|
|
2101
2086
|
} else {
|
|
2102
2087
|
ui().logger.warning("Upload skipped because configuration is not set.");
|
|
@@ -2182,10 +2167,10 @@ function yargsUploadCommandObject() {
|
|
|
2182
2167
|
renderIntegratePortalHint();
|
|
2183
2168
|
throw new Error("Upload configuration not set");
|
|
2184
2169
|
}
|
|
2185
|
-
await upload(options2);
|
|
2170
|
+
const { url } = await upload(options2);
|
|
2186
2171
|
const commitData = await getLatestCommit();
|
|
2187
2172
|
if (validateCommitData(commitData, { throwError: true })) {
|
|
2188
|
-
uploadSuccessfulLog(
|
|
2173
|
+
uploadSuccessfulLog(url);
|
|
2189
2174
|
}
|
|
2190
2175
|
}
|
|
2191
2176
|
};
|
package/package.json
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { cliui } from '@poppinss/cliui';
|
|
2
|
-
import { UploadConfig } from '@code-pushup/models';
|
|
3
2
|
export type CliUi = ReturnType<typeof cliui>;
|
|
4
3
|
export declare let singletonUiInstance: CliUi | undefined;
|
|
5
4
|
export declare function ui(): CliUi;
|
|
6
5
|
export declare function renderConfigureCategoriesHint(): void;
|
|
7
|
-
export declare function uploadSuccessfulLog(
|
|
6
|
+
export declare function uploadSuccessfulLog(url: string): void;
|
|
8
7
|
export declare function collectSuccessfulLog(): void;
|
|
9
8
|
export declare function renderIntegratePortalHint(): void;
|