@code-pushup/cli 0.48.0 → 0.50.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.
Files changed (29) hide show
  1. package/README.md +20 -5
  2. package/index.js +1331 -1276
  3. package/package.json +7 -33
  4. package/src/lib/autorun/autorun-command.d.ts +1 -1
  5. package/src/lib/collect/collect-command.d.ts +1 -1
  6. package/src/lib/commands.d.ts +1 -1
  7. package/src/lib/compare/compare-command.d.ts +1 -2
  8. package/src/lib/history/history.model.d.ts +2 -2
  9. package/src/lib/history/history.options.d.ts +2 -2
  10. package/src/lib/history/utils.d.ts +2 -2
  11. package/src/lib/implementation/compare.model.d.ts +4 -2
  12. package/src/lib/implementation/compare.options.d.ts +1 -1
  13. package/src/lib/implementation/core-config.middleware.d.ts +8 -6
  14. package/src/lib/implementation/core-config.options.d.ts +2 -2
  15. package/src/lib/implementation/formatting.d.ts +11 -0
  16. package/src/lib/implementation/global.model.d.ts +2 -2
  17. package/src/lib/implementation/global.options.d.ts +2 -2
  18. package/src/lib/implementation/merge-diffs.model.d.ts +3 -0
  19. package/src/lib/implementation/merge-diffs.options.d.ts +3 -0
  20. package/src/lib/implementation/only-plugins.middleware.d.ts +1 -1
  21. package/src/lib/implementation/only-plugins.model.d.ts +2 -2
  22. package/src/lib/implementation/only-plugins.options.d.ts +3 -2
  23. package/src/lib/implementation/skip-plugins.middleware.d.ts +1 -1
  24. package/src/lib/implementation/skip-plugins.model.d.ts +2 -2
  25. package/src/lib/implementation/skip-plugins.options.d.ts +3 -2
  26. package/src/lib/merge-diffs/merge-diffs-command.d.ts +6 -0
  27. package/src/lib/middlewares.d.ts +1 -1
  28. package/src/lib/upload/upload-command.d.ts +1 -1
  29. package/src/lib/yargs-cli.d.ts +14 -1
package/package.json CHANGED
@@ -1,19 +1,20 @@
1
1
  {
2
2
  "name": "@code-pushup/cli",
3
- "version": "0.48.0",
3
+ "version": "0.50.0",
4
4
  "license": "MIT",
5
+ "description": "A CLI to run all kinds of code quality measurements to align your team with company goals",
5
6
  "bin": {
6
7
  "code-pushup": "index.js"
7
8
  },
8
9
  "dependencies": {
9
- "@code-pushup/models": "0.48.0",
10
- "@code-pushup/core": "0.48.0",
11
- "@code-pushup/utils": "0.48.0",
10
+ "@code-pushup/models": "0.50.0",
11
+ "@code-pushup/core": "0.50.0",
12
+ "@code-pushup/utils": "0.50.0",
12
13
  "yargs": "^17.7.2",
13
- "chalk": "^5.3.0",
14
+ "ansis": "^3.3.0",
14
15
  "simple-git": "^3.20.0"
15
16
  },
16
- "homepage": "https://github.com/code-pushup/cli#readme",
17
+ "homepage": "code-pushup.dev",
17
18
  "bugs": {
18
19
  "url": "https://github.com/code-pushup/cli/issues"
19
20
  },
@@ -22,33 +23,6 @@
22
23
  "url": "git+https://github.com/code-pushup/cli.git",
23
24
  "directory": "packages/cli"
24
25
  },
25
- "contributors": [
26
- {
27
- "name": "Igor Katsuba",
28
- "email": "igor@katsuba.dev",
29
- "url": "https://katsuba.dev"
30
- },
31
- {
32
- "name": "Kateřina Pilátová",
33
- "email": "katerina.pilatova@flowup.cz",
34
- "url": "https://github.com/Tlacenka"
35
- },
36
- {
37
- "name": "Matěj Chalk",
38
- "email": "matej.chalk@flowup.cz",
39
- "url": "https://github.com/matejchalk"
40
- },
41
- {
42
- "name": "Michael Hladky",
43
- "email": "michael.hladky@push-based.io",
44
- "url": "https://push-based.io"
45
- },
46
- {
47
- "name": "Michael Seredenko",
48
- "email": "misha.seredenko@push-based.io",
49
- "url": "https://github.com/MishaSeredenkoPushBased"
50
- }
51
- ],
52
26
  "type": "module",
53
27
  "main": "./index.js",
54
28
  "types": "./src/index.d.ts"
@@ -1,4 +1,4 @@
1
- import { ArgumentsCamelCase } from 'yargs';
1
+ import type { ArgumentsCamelCase } from 'yargs';
2
2
  export declare function yargsAutorunCommandObject(): {
3
3
  command: string;
4
4
  describe: string;
@@ -1,3 +1,3 @@
1
- import { CommandModule } from 'yargs';
1
+ import type { CommandModule } from 'yargs';
2
2
  export declare function yargsCollectCommandObject(): CommandModule;
3
3
  export declare function renderUploadAutorunHint(): void;
@@ -1,2 +1,2 @@
1
- import { CommandModule } from 'yargs';
1
+ import type { CommandModule } from 'yargs';
2
2
  export declare const commands: CommandModule[];
@@ -1,7 +1,6 @@
1
- import type { CompareOptions } from '../implementation/compare.model';
2
1
  export declare function yargsCompareCommandObject(): {
3
2
  command: string;
4
3
  describe: string;
5
- builder: Record<keyof CompareOptions, import("yargs").Options>;
4
+ builder: Record<"label" | keyof import("@code-pushup/utils").Diff<string>, import("yargs").Options>;
6
5
  handler: (args: unknown) => Promise<void>;
7
6
  };
@@ -1,5 +1,5 @@
1
- import { type LogOptions } from 'simple-git';
2
- import { HistoryOnlyOptions } from '@code-pushup/core';
1
+ import type { LogOptions } from 'simple-git';
2
+ import type { HistoryOnlyOptions } from '@code-pushup/core';
3
3
  export type HistoryCliOptions = {
4
4
  targetBranch?: string;
5
5
  onlySemverTags?: boolean;
@@ -1,3 +1,3 @@
1
- import { Options } from 'yargs';
2
- import { HistoryCliOptions } from './history.model';
1
+ import type { Options } from 'yargs';
2
+ import type { HistoryCliOptions } from './history.model';
3
3
  export declare function yargsHistoryOptionsDefinition(): Record<keyof HistoryCliOptions, Options>;
@@ -1,3 +1,3 @@
1
- import { HistoryOptions } from '@code-pushup/core';
2
- import { HistoryCliOptions } from './history.model';
1
+ import type { HistoryOptions } from '@code-pushup/core';
2
+ import type { HistoryCliOptions } from './history.model';
3
3
  export declare function normalizeHashOptions(processArgs: HistoryCliOptions & HistoryOptions): Promise<HistoryCliOptions & HistoryOptions>;
@@ -1,2 +1,4 @@
1
- import { Diff } from '@code-pushup/utils';
2
- export type CompareOptions = Diff<string>;
1
+ import type { Diff } from '@code-pushup/utils';
2
+ export type CompareOptions = Diff<string> & {
3
+ label?: string;
4
+ };
@@ -1,3 +1,3 @@
1
- import { Options } from 'yargs';
1
+ import type { Options } from 'yargs';
2
2
  import type { CompareOptions } from './compare.model';
3
3
  export declare function yargsCompareOptionsDefinition(): Record<keyof CompareOptions, Options>;
@@ -1,6 +1,8 @@
1
- import { CoreConfig } from '@code-pushup/models';
2
- import { CoreConfigCliOptions } from './core-config.model';
3
- import { GeneralCliOptions } from './global.model';
4
- import { OnlyPluginsOptions } from './only-plugins.model';
5
- import { SkipPluginsOptions } from './skip-plugins.model';
6
- export declare function coreConfigMiddleware<T extends GeneralCliOptions & CoreConfigCliOptions & OnlyPluginsOptions & SkipPluginsOptions>(processArgs: T): Promise<GeneralCliOptions & CoreConfig & OnlyPluginsOptions & SkipPluginsOptions>;
1
+ import { type CoreConfig, type Format } from '@code-pushup/models';
2
+ import type { CoreConfigCliOptions } from './core-config.model';
3
+ import type { GeneralCliOptions } from './global.model';
4
+ import type { OnlyPluginsOptions } from './only-plugins.model';
5
+ import type { SkipPluginsOptions } from './skip-plugins.model';
6
+ export type CoreConfigMiddlewareOptions = GeneralCliOptions & CoreConfigCliOptions & OnlyPluginsOptions & SkipPluginsOptions;
7
+ export declare function coreConfigMiddleware<T extends CoreConfigMiddlewareOptions>(processArgs: T): Promise<GeneralCliOptions & CoreConfig & OnlyPluginsOptions & SkipPluginsOptions>;
8
+ export declare const normalizeFormats: (formats?: string[]) => Format[];
@@ -1,5 +1,5 @@
1
- import { Options } from 'yargs';
2
- import { PersistConfigCliOptions, UploadConfigCliOptions } from './core-config.model';
1
+ import type { Options } from 'yargs';
2
+ import type { PersistConfigCliOptions, UploadConfigCliOptions } from './core-config.model';
3
3
  export declare function yargsCoreConfigOptionsDefinition(): Record<keyof (PersistConfigCliOptions & UploadConfigCliOptions), Options>;
4
4
  export declare function yargsPersistConfigOptionsDefinition(): Record<keyof PersistConfigCliOptions, Options>;
5
5
  export declare function yargsUploadConfigOptionsDefinition(): Record<keyof UploadConfigCliOptions, Options>;
@@ -0,0 +1,11 @@
1
+ export declare function titleStyle(title: string): string;
2
+ export declare function headerStyle(title: string): string;
3
+ export declare function descriptionStyle(title: string): string;
4
+ export declare function formatObjectValue<T>(opts: T, propName: keyof T): T & {
5
+ [x: string]: string;
6
+ };
7
+ export declare function formatNestedValues<T>(options: Record<string, T>, propName: keyof T): {
8
+ [k: string]: T & {
9
+ [x: string]: string;
10
+ };
11
+ };
@@ -1,3 +1,3 @@
1
- import { GlobalOptions } from '@code-pushup/core';
2
- import { ConfigCliOptions } from './core-config.model';
1
+ import type { GlobalOptions } from '@code-pushup/core';
2
+ import type { ConfigCliOptions } from './core-config.model';
3
3
  export type GeneralCliOptions = ConfigCliOptions & GlobalOptions;
@@ -1,3 +1,3 @@
1
- import { Options } from 'yargs';
2
- import { GeneralCliOptions } from './global.model';
1
+ import type { Options } from 'yargs';
2
+ import type { GeneralCliOptions } from './global.model';
3
3
  export declare function yargsGlobalOptionsDefinition(): Record<keyof GeneralCliOptions, Options>;
@@ -0,0 +1,3 @@
1
+ export type MergeDiffsOptions = {
2
+ files: string[];
3
+ };
@@ -0,0 +1,3 @@
1
+ import type { Options } from 'yargs';
2
+ import type { MergeDiffsOptions } from './merge-diffs.model';
3
+ export declare function yargsMergeDiffsOptionsDefinition(): Record<keyof MergeDiffsOptions, Options>;
@@ -1,2 +1,2 @@
1
- import { OnlyPluginsOptions } from './only-plugins.model';
1
+ import type { OnlyPluginsOptions } from './only-plugins.model';
2
2
  export declare function onlyPluginsMiddleware<T extends OnlyPluginsOptions>(originalProcessArgs: T): T;
@@ -1,5 +1,5 @@
1
- import { GlobalOptions } from '@code-pushup/core';
2
- import { CoreConfig } from '@code-pushup/models';
1
+ import type { GlobalOptions } from '@code-pushup/core';
2
+ import type { CoreConfig } from '@code-pushup/models';
3
3
  export type OnlyPluginsCliOptions = {
4
4
  onlyPlugins?: string[];
5
5
  };
@@ -1,3 +1,4 @@
1
- import { Options } from 'yargs';
1
+ import type { Options } from 'yargs';
2
+ import type { OnlyPluginsCliOptions } from './only-plugins.model';
2
3
  export declare const onlyPluginsOption: Options;
3
- export declare function yargsOnlyPluginsOptionsDefinition(): Record<'onlyPlugins', Options>;
4
+ export declare function yargsOnlyPluginsOptionsDefinition(): Record<keyof OnlyPluginsCliOptions, Options>;
@@ -1,2 +1,2 @@
1
- import { SkipPluginsOptions } from './skip-plugins.model';
1
+ import type { SkipPluginsOptions } from './skip-plugins.model';
2
2
  export declare function skipPluginsMiddleware<T extends SkipPluginsOptions>(originalProcessArgs: T): T;
@@ -1,5 +1,5 @@
1
- import { GlobalOptions } from '@code-pushup/core';
2
- import { CoreConfig } from '@code-pushup/models';
1
+ import type { GlobalOptions } from '@code-pushup/core';
2
+ import type { CoreConfig } from '@code-pushup/models';
3
3
  export type SkipPluginsCliOptions = {
4
4
  skipPlugins?: string[];
5
5
  };
@@ -1,3 +1,4 @@
1
- import { Options } from 'yargs';
1
+ import type { Options } from 'yargs';
2
+ import type { SkipPluginsCliOptions } from './skip-plugins.model';
2
3
  export declare const skipPluginsOption: Options;
3
- export declare function yargsSkipPluginsOptionsDefinition(): Record<'skipPlugins', Options>;
4
+ export declare function yargsSkipPluginsOptionsDefinition(): Record<keyof SkipPluginsCliOptions, Options>;
@@ -0,0 +1,6 @@
1
+ export declare function yargsMergeDiffsCommandObject(): {
2
+ command: string;
3
+ describe: string;
4
+ builder: Record<"files", import("yargs").Options>;
5
+ handler: (args: unknown) => Promise<void>;
6
+ };
@@ -1,4 +1,4 @@
1
- import { MiddlewareFunction } from 'yargs';
1
+ import type { MiddlewareFunction } from 'yargs';
2
2
  export declare const middlewares: {
3
3
  middlewareFunction: MiddlewareFunction;
4
4
  applyBeforeValidation: boolean;
@@ -1,4 +1,4 @@
1
- import { ArgumentsCamelCase } from 'yargs';
1
+ import type { ArgumentsCamelCase } from 'yargs';
2
2
  export declare function yargsUploadCommandObject(): {
3
3
  command: string;
4
4
  describe: string;
@@ -1,4 +1,17 @@
1
- import { Argv, CommandModule, Options } from 'yargs';
1
+ import { type Argv, type CommandModule, type Options } from 'yargs';
2
+ export declare const yargsDecorator: {
3
+ 'Commands:': string;
4
+ 'Options:': string;
5
+ 'Examples:': string;
6
+ boolean: string;
7
+ count: string;
8
+ string: string;
9
+ array: string;
10
+ required: string;
11
+ 'default:': string;
12
+ 'choices:': string;
13
+ 'aliases:': string;
14
+ };
2
15
  /**
3
16
  * returns configurable yargs CLI for code-pushup
4
17
  *