@code-pushup/cli 0.8.16 → 0.8.18

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 CHANGED
@@ -1725,7 +1725,7 @@ function auditOutputsCorrelateWithPluginOutput(auditOutputs, pluginConfigAudits)
1725
1725
 
1726
1726
  // packages/core/package.json
1727
1727
  var name = "@code-pushup/core";
1728
- var version = "0.8.16";
1728
+ var version = "0.8.18";
1729
1729
 
1730
1730
  // packages/core/src/lib/implementation/collect.ts
1731
1731
  async function collect(options2) {
@@ -1895,7 +1895,7 @@ async function readCodePushupConfig(filepath) {
1895
1895
  var CLI_NAME = "Code PushUp CLI";
1896
1896
  var CLI_SCRIPT_NAME = "code-pushup";
1897
1897
 
1898
- // packages/cli/src/lib/implementation/only-plugins-options.ts
1898
+ // packages/cli/src/lib/implementation/only-plugins.options.ts
1899
1899
  var onlyPluginsOption = {
1900
1900
  describe: "List of plugins to run. If not set all plugins are run.",
1901
1901
  type: "array",
@@ -1955,7 +1955,7 @@ function yargsCollectCommandObject() {
1955
1955
  };
1956
1956
  }
1957
1957
 
1958
- // packages/cli/src/lib/implementation/filter-kebab-case-keys.ts
1958
+ // packages/cli/src/lib/implementation/global.utils.ts
1959
1959
  function filterKebabCaseKeys(obj) {
1960
1960
  return Object.entries(obj).filter(([key]) => !key.includes("-")).reduce(
1961
1961
  (acc, [key, value]) => typeof value === "string" || typeof value === "object" && Array.isArray(obj[key]) ? { ...acc, [key]: value } : typeof value === "object" && !Array.isArray(value) && value != null ? {
@@ -1965,6 +1965,22 @@ function filterKebabCaseKeys(obj) {
1965
1965
  {}
1966
1966
  );
1967
1967
  }
1968
+ function logErrorBeforeThrow(fn) {
1969
+ return async (...args) => {
1970
+ try {
1971
+ return await fn(...args);
1972
+ } catch (error) {
1973
+ console.error(error);
1974
+ await new Promise((resolve) => process.stdout.write("", resolve));
1975
+ throw error;
1976
+ }
1977
+ };
1978
+ }
1979
+ function coerceArray(param = []) {
1980
+ return [
1981
+ ...new Set(toArray(param).flatMap((f) => f.split(",")) || [])
1982
+ ];
1983
+ }
1968
1984
 
1969
1985
  // packages/cli/src/lib/print-config/print-config-command.ts
1970
1986
  function yargsConfigCommandObject() {
@@ -2014,7 +2030,34 @@ var commands = [
2014
2030
  yargsConfigCommandObject()
2015
2031
  ];
2016
2032
 
2017
- // packages/cli/src/lib/implementation/only-plugins-utils.ts
2033
+ // packages/cli/src/lib/implementation/core-config.middleware.ts
2034
+ async function coreConfigMiddleware(processArgs) {
2035
+ const args = processArgs;
2036
+ const { config, ...cliOptions } = args;
2037
+ const importedRc = await readCodePushupConfig(config);
2038
+ const parsedProcessArgs = {
2039
+ config,
2040
+ ...importedRc,
2041
+ ...cliOptions,
2042
+ upload: {
2043
+ ...importedRc.upload,
2044
+ ...cliOptions.upload
2045
+ },
2046
+ // we can't use a async rc file as yargs does not support it. see: https://github.com/yargs/yargs/issues/2234
2047
+ // therefore this can't live in option defaults as the order would be `config`->`provided options`->default
2048
+ // so we have to manually implement the order
2049
+ persist: {
2050
+ outputDir: cliOptions.persist?.outputDir || importedRc.persist?.outputDir || PERSIST_OUTPUT_DIR,
2051
+ filename: cliOptions.persist?.filename || importedRc.persist?.filename || PERSIST_FILENAME,
2052
+ format: coerceArray(
2053
+ cliOptions.persist?.format ?? importedRc.persist?.format ?? PERSIST_FORMAT
2054
+ )
2055
+ }
2056
+ };
2057
+ return parsedProcessArgs;
2058
+ }
2059
+
2060
+ // packages/cli/src/lib/implementation/only-plugins.utils.ts
2018
2061
  import chalk8 from "chalk";
2019
2062
  function filterPluginsByOnlyPluginsOption(plugins, { onlyPlugins }) {
2020
2063
  if (!onlyPlugins?.length) {
@@ -2057,64 +2100,35 @@ function validateOnlyPluginsOption(plugins, {
2057
2100
  }
2058
2101
  }
2059
2102
 
2060
- // packages/cli/src/lib/implementation/utils.ts
2061
- function logErrorBeforeThrow(fn) {
2062
- return async (...args) => {
2063
- try {
2064
- return await fn(...args);
2065
- } catch (error) {
2066
- console.error(error);
2067
- await new Promise((resolve) => process.stdout.write("", resolve));
2068
- throw error;
2069
- }
2070
- };
2071
- }
2072
- function coerceArray(param = []) {
2073
- return [
2074
- ...new Set(toArray(param).flatMap((f) => f.split(",")) || [])
2075
- ];
2076
- }
2077
-
2078
- // packages/cli/src/lib/implementation/config-middleware.ts
2079
- async function configMiddleware(processArgs) {
2103
+ // packages/cli/src/lib/implementation/only-plugins.middleware.ts
2104
+ function onlyPluginsMiddleware(processArgs) {
2080
2105
  const args = processArgs;
2081
- const { config, ...cliOptions } = args;
2082
- const importedRc = await readCodePushupConfig(config);
2083
- validateOnlyPluginsOption(importedRc.plugins, cliOptions);
2106
+ const cliOptions = args;
2107
+ validateOnlyPluginsOption(cliOptions.plugins, cliOptions);
2084
2108
  const parsedProcessArgs = {
2085
- config,
2086
- progress: cliOptions.progress,
2087
- verbose: cliOptions.verbose,
2088
- upload: {
2089
- ...importedRc.upload,
2090
- ...cliOptions.upload
2091
- },
2092
- // we can't use a async rc file as yargs does not support it. see: https://github.com/yargs/yargs/issues/2234
2093
- // therefore this can't live in option defaults as the order would be `config`->`provided options`->default
2094
- // so we have to manually implement the order
2095
- persist: {
2096
- outputDir: cliOptions.persist?.outputDir || importedRc.persist?.outputDir || PERSIST_OUTPUT_DIR,
2097
- filename: cliOptions.persist?.filename || importedRc.persist?.filename || PERSIST_FILENAME,
2098
- format: coerceArray(
2099
- cliOptions.persist?.format ?? importedRc.persist?.format ?? PERSIST_FORMAT
2100
- )
2101
- },
2102
- plugins: filterPluginsByOnlyPluginsOption(importedRc.plugins, cliOptions),
2109
+ ...cliOptions,
2110
+ plugins: filterPluginsByOnlyPluginsOption(cliOptions.plugins, cliOptions),
2103
2111
  categories: filterCategoryByOnlyPluginsOption(
2104
- importedRc.categories,
2112
+ cliOptions.categories,
2105
2113
  cliOptions
2106
- ),
2107
- onlyPlugins: cliOptions.onlyPlugins
2114
+ )
2108
2115
  };
2109
2116
  return parsedProcessArgs;
2110
2117
  }
2111
2118
 
2112
2119
  // packages/cli/src/lib/middlewares.ts
2113
2120
  var middlewares = [
2114
- { middlewareFunction: configMiddleware }
2121
+ {
2122
+ middlewareFunction: coreConfigMiddleware,
2123
+ applyBeforeValidation: false
2124
+ },
2125
+ {
2126
+ middlewareFunction: onlyPluginsMiddleware,
2127
+ applyBeforeValidation: false
2128
+ }
2115
2129
  ];
2116
2130
 
2117
- // packages/cli/src/lib/implementation/core-config-options.ts
2131
+ // packages/cli/src/lib/implementation/core-config.options.ts
2118
2132
  function yargsCoreConfigOptionsDefinition() {
2119
2133
  return {
2120
2134
  // persist
@@ -2162,7 +2176,7 @@ function yargsUploadConfigOptionsDefinition() {
2162
2176
  };
2163
2177
  }
2164
2178
 
2165
- // packages/cli/src/lib/implementation/global-options.ts
2179
+ // packages/cli/src/lib/implementation/global.options.ts
2166
2180
  function yargsGlobalOptionsDefinition() {
2167
2181
  return {
2168
2182
  progress: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@code-pushup/cli",
3
- "version": "0.8.16",
3
+ "version": "0.8.18",
4
4
  "bin": {
5
5
  "code-pushup": "index.js"
6
6
  },
@@ -0,0 +1,226 @@
1
+ import { CoreConfig } from '@code-pushup/models';
2
+ import { GeneralCliOptions } from './global.model';
3
+ export declare function coreConfigMiddleware<T extends Partial<GeneralCliOptions & CoreConfig>>(processArgs: T): Promise<{
4
+ categories: {
5
+ slug: string;
6
+ refs: {
7
+ slug: string;
8
+ weight: number;
9
+ type: "audit" | "group";
10
+ plugin: string;
11
+ }[];
12
+ title: string;
13
+ description?: string | undefined;
14
+ docsUrl?: string | undefined;
15
+ isBinary?: boolean | undefined;
16
+ }[];
17
+ plugins: {
18
+ slug: string;
19
+ title: string;
20
+ icon: "slug" | "file" | "command" | "search" | "blink" | "key" | "folder-robot" | "folder-src" | "folder-dist" | "folder-css" | "folder-sass" | "folder-images" | "folder-scripts" | "folder-node" | "folder-javascript" | "folder-json" | "folder-font" | "folder-bower" | "folder-test" | "folder-jinja" | "folder-markdown" | "folder-php" | "folder-phpmailer" | "folder-sublime" | "folder-docs" | "folder-git" | "folder-github" | "folder-gitlab" | "folder-vscode" | "folder-views" | "folder-vue" | "folder-vuepress" | "folder-expo" | "folder-config" | "folder-i18n" | "folder-components" | "folder-verdaccio" | "folder-aurelia" | "folder-resource" | "folder-lib" | "folder-theme" | "folder-webpack" | "folder-global" | "folder-public" | "folder-include" | "folder-docker" | "folder-database" | "folder-log" | "folder-target" | "folder-temp" | "folder-aws" | "folder-audio" | "folder-video" | "folder-kubernetes" | "folder-import" | "folder-export" | "folder-wakatime" | "folder-circleci" | "folder-wordpress" | "folder-gradle" | "folder-coverage" | "folder-class" | "folder-other" | "folder-lua" | "folder-typescript" | "folder-graphql" | "folder-routes" | "folder-ci" | "folder-benchmark" | "folder-messages" | "folder-less" | "folder-gulp" | "folder-python" | "folder-mojo" | "folder-moon" | "folder-debug" | "folder-fastlane" | "folder-plugin" | "folder-middleware" | "folder-controller" | "folder-ansible" | "folder-server" | "folder-client" | "folder-tasks" | "folder-android" | "folder-ios" | "folder-upload" | "folder-download" | "folder-tools" | "folder-helper" | "folder-serverless" | "folder-api" | "folder-app" | "folder-apollo" | "folder-archive" | "folder-batch" | "folder-buildkite" | "folder-cluster" | "folder-command" | "folder-constant" | "folder-container" | "folder-content" | "folder-context" | "folder-core" | "folder-delta" | "folder-dump" | "folder-examples" | "folder-environment" | "folder-functions" | "folder-generator" | "folder-hook" | "folder-job" | "folder-keys" | "folder-layout" | "folder-mail" | "folder-mappings" | "folder-meta" | "folder-changesets" | "folder-packages" | "folder-shared" | "folder-shader" | "folder-stack" | "folder-template" | "folder-utils" | "folder-supabase" | "folder-private" | "folder-linux" | "folder-windows" | "folder-macos" | "folder-error" | "folder-event" | "folder-secure" | "folder-custom" | "folder-mock" | "folder-syntax" | "folder-vm" | "folder-stylus" | "folder-flow" | "folder-rules" | "folder-review" | "folder-animation" | "folder-guard" | "folder-prisma" | "folder-pipe" | "folder-svg" | "folder-terraform" | "folder-mobile" | "folder-stencil" | "folder-firebase" | "folder-svelte" | "folder-update" | "folder-intellij" | "folder-azure-pipelines" | "folder-mjml" | "folder-admin" | "folder-scala" | "folder-connection" | "folder-quasar" | "folder-next" | "folder-cobol" | "folder-yarn" | "folder-husky" | "folder-storybook" | "folder-base" | "folder-cart" | "folder-home" | "folder-project" | "folder-interface" | "folder-netlify" | "folder-enum" | "folder-contract" | "folder-queue" | "folder-vercel" | "folder-cypress" | "folder-decorators" | "folder-java" | "folder-resolver" | "folder-angular" | "folder-unity" | "folder-pdf" | "folder-proto" | "folder-plastic" | "folder-gamemaker" | "folder-mercurial" | "folder-godot" | "folder-lottie" | "folder-taskfile" | "folder-robot-open" | "folder-src-open" | "folder-dist-open" | "folder-css-open" | "folder-sass-open" | "folder-images-open" | "folder-scripts-open" | "folder-node-open" | "folder-javascript-open" | "folder-json-open" | "folder-font-open" | "folder-bower-open" | "folder-test-open" | "folder-jinja-open" | "folder-markdown-open" | "folder-php-open" | "folder-phpmailer-open" | "folder-sublime-open" | "folder-docs-open" | "folder-git-open" | "folder-github-open" | "folder-gitlab-open" | "folder-vscode-open" | "folder-views-open" | "folder-vue-open" | "folder-vuepress-open" | "folder-expo-open" | "folder-config-open" | "folder-i18n-open" | "folder-components-open" | "folder-verdaccio-open" | "folder-aurelia-open" | "folder-resource-open" | "folder-lib-open" | "folder-theme-open" | "folder-webpack-open" | "folder-global-open" | "folder-public-open" | "folder-include-open" | "folder-docker-open" | "folder-database-open" | "folder-log-open" | "folder-target-open" | "folder-temp-open" | "folder-aws-open" | "folder-audio-open" | "folder-video-open" | "folder-kubernetes-open" | "folder-import-open" | "folder-export-open" | "folder-wakatime-open" | "folder-circleci-open" | "folder-wordpress-open" | "folder-gradle-open" | "folder-coverage-open" | "folder-class-open" | "folder-other-open" | "folder-lua-open" | "folder-typescript-open" | "folder-graphql-open" | "folder-routes-open" | "folder-ci-open" | "folder-benchmark-open" | "folder-messages-open" | "folder-less-open" | "folder-gulp-open" | "folder-python-open" | "folder-mojo-open" | "folder-moon-open" | "folder-debug-open" | "folder-fastlane-open" | "folder-plugin-open" | "folder-middleware-open" | "folder-controller-open" | "folder-ansible-open" | "folder-server-open" | "folder-client-open" | "folder-tasks-open" | "folder-android-open" | "folder-ios-open" | "folder-upload-open" | "folder-download-open" | "folder-tools-open" | "folder-helper-open" | "folder-serverless-open" | "folder-api-open" | "folder-app-open" | "folder-apollo-open" | "folder-archive-open" | "folder-batch-open" | "folder-buildkite-open" | "folder-cluster-open" | "folder-command-open" | "folder-constant-open" | "folder-container-open" | "folder-content-open" | "folder-context-open" | "folder-core-open" | "folder-delta-open" | "folder-dump-open" | "folder-examples-open" | "folder-environment-open" | "folder-functions-open" | "folder-generator-open" | "folder-hook-open" | "folder-job-open" | "folder-keys-open" | "folder-layout-open" | "folder-mail-open" | "folder-mappings-open" | "folder-meta-open" | "folder-changesets-open" | "folder-packages-open" | "folder-shared-open" | "folder-shader-open" | "folder-stack-open" | "folder-template-open" | "folder-utils-open" | "folder-supabase-open" | "folder-private-open" | "folder-linux-open" | "folder-windows-open" | "folder-macos-open" | "folder-error-open" | "folder-event-open" | "folder-secure-open" | "folder-custom-open" | "folder-mock-open" | "folder-syntax-open" | "folder-vm-open" | "folder-stylus-open" | "folder-flow-open" | "folder-rules-open" | "folder-review-open" | "folder-animation-open" | "folder-guard-open" | "folder-prisma-open" | "folder-pipe-open" | "folder-svg-open" | "folder-terraform-open" | "folder-mobile-open" | "folder-stencil-open" | "folder-firebase-open" | "folder-svelte-open" | "folder-update-open" | "folder-intellij-open" | "folder-azure-pipelines-open" | "folder-mjml-open" | "folder-admin-open" | "folder-scala-open" | "folder-connection-open" | "folder-quasar-open" | "folder-next-open" | "folder-cobol-open" | "folder-yarn-open" | "folder-husky-open" | "folder-storybook-open" | "folder-base-open" | "folder-cart-open" | "folder-home-open" | "folder-project-open" | "folder-interface-open" | "folder-netlify-open" | "folder-enum-open" | "folder-contract-open" | "folder-queue-open" | "folder-vercel-open" | "folder-cypress-open" | "folder-decorators-open" | "folder-java-open" | "folder-resolver-open" | "folder-angular-open" | "folder-unity-open" | "folder-pdf-open" | "folder-proto-open" | "folder-plastic-open" | "folder-gamemaker-open" | "folder-mercurial-open" | "folder-godot-open" | "folder-lottie-open" | "folder-taskfile-open" | "html" | "pug" | "markdown" | "css" | "sass" | "less" | "json" | "hjson" | "jinja" | "proto" | "sublime" | "twine" | "yaml" | "xml" | "image" | "javascript" | "react" | "react_ts" | "routing" | "settings" | "typescript-def" | "markojs" | "astro" | "pdf" | "table" | "vscode" | "visualstudio" | "database" | "kusto" | "csharp" | "qsharp" | "zip" | "vala" | "zig" | "exe" | "hex" | "java" | "jar" | "javaclass" | "c" | "h" | "cpp" | "hpp" | "objective-c" | "objective-cpp" | "rc" | "go" | "python" | "python-misc" | "url" | "console" | "powershell" | "gradle" | "word" | "certificate" | "font" | "lib" | "ruby" | "fsharp" | "swift" | "arduino" | "docker" | "tex" | "powerpoint" | "video" | "virtual" | "email" | "audio" | "coffee" | "document" | "graphql" | "rust" | "raml" | "xaml" | "haskell" | "kotlin" | "otne" | "git" | "lua" | "clojure" | "groovy" | "r" | "dart" | "dart_generated" | "actionscript" | "mxml" | "autohotkey" | "flash" | "swc" | "cmake" | "assembly" | "vue" | "ocaml" | "odin" | "javascript-map" | "css-map" | "lock" | "handlebars" | "perl" | "haxe" | "test-ts" | "test-jsx" | "test-js" | "angular" | "angular-component" | "angular-guard" | "angular-service" | "angular-pipe" | "angular-directive" | "angular-resolver" | "puppet" | "elixir" | "livescript" | "erlang" | "twig" | "julia" | "elm" | "purescript" | "smarty" | "stylus" | "reason" | "bucklescript" | "merlin" | "verilog" | "mathematica" | "wolframlanguage" | "nunjucks" | "robot" | "solidity" | "autoit" | "haml" | "yang" | "mjml" | "terraform" | "laravel" | "applescript" | "cake" | "cucumber" | "nim" | "apiblueprint" | "riot" | "vfl" | "kl" | "postcss" | "todo" | "coldfusion" | "cabal" | "nix" | "slim" | "http" | "restql" | "kivy" | "graphcool" | "sbt" | "android" | "tune" | "gitlab" | "jenkins" | "figma" | "crystal" | "drone" | "cuda" | "log" | "dotjs" | "ejs" | "wakatime" | "processing" | "storybook" | "wepy" | "hcl" | "san" | "django" | "red" | "makefile" | "foxpro" | "i18n" | "webassembly" | "jupyter" | "d" | "mdx" | "mdsvex" | "ballerina" | "racket" | "bazel" | "mint" | "velocity" | "godot" | "godot-assets" | "azure-pipelines" | "azure" | "vagrant" | "prisma" | "razor" | "abc" | "asciidoc" | "edge" | "scheme" | "lisp" | "3d" | "svg" | "svelte" | "vim" | "moonscript" | "advpl_prw" | "advpl_ptm" | "advpl_tlpp" | "advpl_include" | "disc" | "fortran" | "tcl" | "liquid" | "prolog" | "coconut" | "sketch" | "pawn" | "forth" | "uml" | "meson" | "dhall" | "sml" | "opam" | "imba" | "drawio" | "pascal" | "shaderlab" | "sas" | "nuget" | "denizenscript" | "nginx" | "minecraft" | "rescript" | "rescript-interface" | "brainfuck" | "bicep" | "cobol" | "grain" | "lolcode" | "idris" | "pipeline" | "opa" | "windicss" | "scala" | "lilypond" | "vlang" | "chess" | "gemini" | "tsconfig" | "tauri" | "jsconfig" | "ada" | "horusec" | "coala" | "dinophp" | "teal" | "template" | "shader" | "siyuan" | "ndst" | "tobi" | "gleam" | "steadybit" | "tree" | "cadence" | "antlr" | "stylable" | "pinejs" | "taskfile" | "gamemaker" | "tldraw" | "typst" | "mermaid" | "mojo" | "roblox" | "spwn" | "templ" | "chrome" | "stan" | "abap" | "lottie" | "apps-script" | "playwright" | "go-mod" | "gemfile" | "rubocop" | "rspec" | "semgrep" | "vue-config" | "nuxt" | "vercel" | "verdaccio" | "next" | "remix" | "posthtml" | "webpack" | "ionic" | "gulp" | "nodejs" | "npm" | "yarn" | "turborepo" | "babel" | "blitz" | "contributing" | "readme" | "changelog" | "architecture" | "credits" | "authors" | "flow" | "favicon" | "karma" | "bithound" | "svgo" | "appveyor" | "travis" | "codecov" | "sonarcloud" | "protractor" | "fusebox" | "heroku" | "editorconfig" | "bower" | "eslint" | "conduct" | "watchman" | "aurelia" | "auto" | "mocha" | "firebase" | "rollup" | "hack" | "hardhat" | "stylelint" | "code-climate" | "prettier" | "renovate" | "apollo" | "nodemon" | "webhint" | "browserlist" | "snyk" | "sequelize" | "gatsby" | "circleci" | "cloudfoundry" | "grunt" | "jest" | "fastlane" | "helm" | "wallaby" | "stencil" | "semantic-release" | "bitbucket" | "istanbul" | "tailwindcss" | "buildkite" | "netlify" | "nest" | "moon" | "percy" | "gitpod" | "codeowners" | "gcp" | "husky" | "tilt" | "capacitor" | "adonis" | "commitlint" | "buck" | "nrwl" | "dune" | "roadmap" | "stryker" | "modernizr" | "stitches" | "replit" | "snowpack" | "quasar" | "dependabot" | "vite" | "vitest" | "lerna" | "textlint" | "sentry" | "phpunit" | "php-cs-fixer" | "robots" | "maven" | "serverless" | "supabase" | "ember" | "poetry" | "parcel" | "astyle" | "lighthouse" | "svgr" | "rome" | "cypress" | "plop" | "tobimake" | "pnpm" | "gridsome" | "caddy" | "bun" | "nano-staged" | "craco" | "mercurial" | "deno" | "plastic" | "unocss" | "ifanr-cloud" | "concourse" | "werf" | "panda" | "biome" | "esbuild" | "puppeteer" | "kubernetes" | "matlab" | "diff" | "typescript" | "php" | "salesforce" | "blink_light" | "jinja_light" | "crystal_light" | "drone_light" | "wakatime_light" | "hcl_light" | "uml_light" | "chess_light" | "tldraw_light" | "rubocop_light" | "vercel_light" | "next_light" | "remix_light" | "turborepo_light" | "auto_light" | "stylelint_light" | "code-climate_light" | "browserlist_light" | "circleci_light" | "semantic-release_light" | "netlify_light" | "stitches_light" | "snowpack_light" | "pnpm_light" | "bun_light" | "nano-staged_light" | "deno_light" | "folder-jinja_light" | "folder-intellij_light" | "folder-jinja-open_light" | "folder-intellij-open_light" | "folder" | "folder-open" | "folder-root" | "folder-root-open" | "php_elephant" | "php_elephant_pink" | "go_gopher" | "nodejs_alt" | "silverstripe";
21
+ runner: ({
22
+ command: string;
23
+ outputFile: string;
24
+ args?: string[] | undefined;
25
+ outputTransform?: ((args_0: unknown, ...args_1: unknown[]) => {
26
+ slug: string;
27
+ value: number;
28
+ score: number;
29
+ displayValue?: string | undefined;
30
+ details?: {
31
+ issues: {
32
+ message: string;
33
+ severity: "error" | "info" | "warning";
34
+ source?: {
35
+ file: string;
36
+ position?: {
37
+ startLine: number;
38
+ startColumn?: number | undefined;
39
+ endLine?: number | undefined;
40
+ endColumn?: number | undefined;
41
+ } | undefined;
42
+ } | undefined;
43
+ }[];
44
+ } | undefined;
45
+ }[] | Promise<{
46
+ slug: string;
47
+ value: number;
48
+ score: number;
49
+ displayValue?: string | undefined;
50
+ details?: {
51
+ issues: {
52
+ message: string;
53
+ severity: "error" | "info" | "warning";
54
+ source?: {
55
+ file: string;
56
+ position?: {
57
+ startLine: number;
58
+ startColumn?: number | undefined;
59
+ endLine?: number | undefined;
60
+ endColumn?: number | undefined;
61
+ } | undefined;
62
+ } | undefined;
63
+ }[];
64
+ } | undefined;
65
+ }[]>) | undefined;
66
+ } | ((args_0: ((args_0: unknown, ...args_1: unknown[]) => void) | undefined, ...args_1: unknown[]) => {
67
+ slug: string;
68
+ value: number;
69
+ score: number;
70
+ displayValue?: string | undefined;
71
+ details?: {
72
+ issues: {
73
+ message: string;
74
+ severity: "error" | "info" | "warning";
75
+ source?: {
76
+ file: string;
77
+ position?: {
78
+ startLine: number;
79
+ startColumn?: number | undefined;
80
+ endLine?: number | undefined;
81
+ endColumn?: number | undefined;
82
+ } | undefined;
83
+ } | undefined;
84
+ }[];
85
+ } | undefined;
86
+ }[] | Promise<{
87
+ slug: string;
88
+ value: number;
89
+ score: number;
90
+ displayValue?: string | undefined;
91
+ details?: {
92
+ issues: {
93
+ message: string;
94
+ severity: "error" | "info" | "warning";
95
+ source?: {
96
+ file: string;
97
+ position?: {
98
+ startLine: number;
99
+ startColumn?: number | undefined;
100
+ endLine?: number | undefined;
101
+ endColumn?: number | undefined;
102
+ } | undefined;
103
+ } | undefined;
104
+ }[];
105
+ } | undefined;
106
+ }[]>)) & ({
107
+ command: string;
108
+ outputFile: string;
109
+ args?: string[] | undefined;
110
+ outputTransform?: ((args_0: unknown, ...args_1: unknown[]) => {
111
+ slug: string;
112
+ value: number;
113
+ score: number;
114
+ displayValue?: string | undefined;
115
+ details?: {
116
+ issues: {
117
+ message: string;
118
+ severity: "error" | "info" | "warning";
119
+ source?: {
120
+ file: string;
121
+ position?: {
122
+ startLine: number;
123
+ startColumn?: number | undefined;
124
+ endLine?: number | undefined;
125
+ endColumn?: number | undefined;
126
+ } | undefined;
127
+ } | undefined;
128
+ }[];
129
+ } | undefined;
130
+ }[] | Promise<{
131
+ slug: string;
132
+ value: number;
133
+ score: number;
134
+ displayValue?: string | undefined;
135
+ details?: {
136
+ issues: {
137
+ message: string;
138
+ severity: "error" | "info" | "warning";
139
+ source?: {
140
+ file: string;
141
+ position?: {
142
+ startLine: number;
143
+ startColumn?: number | undefined;
144
+ endLine?: number | undefined;
145
+ endColumn?: number | undefined;
146
+ } | undefined;
147
+ } | undefined;
148
+ }[];
149
+ } | undefined;
150
+ }[]>) | undefined;
151
+ } | ((args_0: ((args_0: unknown, ...args_1: unknown[]) => void) | undefined, ...args_1: unknown[]) => {
152
+ slug: string;
153
+ value: number;
154
+ score: number;
155
+ displayValue?: string | undefined;
156
+ details?: {
157
+ issues: {
158
+ message: string;
159
+ severity: "error" | "info" | "warning";
160
+ source?: {
161
+ file: string;
162
+ position?: {
163
+ startLine: number;
164
+ startColumn?: number | undefined;
165
+ endLine?: number | undefined;
166
+ endColumn?: number | undefined;
167
+ } | undefined;
168
+ } | undefined;
169
+ }[];
170
+ } | undefined;
171
+ }[] | Promise<{
172
+ slug: string;
173
+ value: number;
174
+ score: number;
175
+ displayValue?: string | undefined;
176
+ details?: {
177
+ issues: {
178
+ message: string;
179
+ severity: "error" | "info" | "warning";
180
+ source?: {
181
+ file: string;
182
+ position?: {
183
+ startLine: number;
184
+ startColumn?: number | undefined;
185
+ endLine?: number | undefined;
186
+ endColumn?: number | undefined;
187
+ } | undefined;
188
+ } | undefined;
189
+ }[];
190
+ } | undefined;
191
+ }[]>) | undefined);
192
+ audits: {
193
+ slug: string;
194
+ title: string;
195
+ description?: string | undefined;
196
+ docsUrl?: string | undefined;
197
+ }[];
198
+ description?: string | undefined;
199
+ docsUrl?: string | undefined;
200
+ packageName?: string | undefined;
201
+ version?: string | undefined;
202
+ groups?: {
203
+ slug: string;
204
+ refs: {
205
+ slug: string;
206
+ weight: number;
207
+ }[];
208
+ title: string;
209
+ description?: string | undefined;
210
+ docsUrl?: string | undefined;
211
+ }[] | undefined;
212
+ }[];
213
+ persist?: {
214
+ outputDir?: string | undefined;
215
+ filename?: string | undefined;
216
+ format?: ("json" | "md")[] | undefined;
217
+ } | undefined;
218
+ upload?: {
219
+ server: string;
220
+ apiKey: string;
221
+ organization: string;
222
+ project: string;
223
+ } | undefined;
224
+ } & {
225
+ config: string;
226
+ } & import("@code-pushup/core").GlobalOptions>;
@@ -1,8 +1,4 @@
1
- import { GlobalOptions } from '@code-pushup/core';
2
1
  import { Format } from '@code-pushup/models';
3
- export type GeneralCliOptions = {
4
- config: string;
5
- } & GlobalOptions;
6
2
  export type PersistConfigCliOptions = {
7
3
  'persist.outputDir': string;
8
4
  'persist.filename': string;
@@ -15,6 +11,3 @@ export type UploadConfigCliOptions = {
15
11
  'upload.server': string;
16
12
  };
17
13
  export type CoreConfigCliOptions = PersistConfigCliOptions & UploadConfigCliOptions;
18
- export type OnlyPluginsOptions = {
19
- onlyPlugins: string[];
20
- };
@@ -1,5 +1,5 @@
1
1
  import { Options } from 'yargs';
2
- import { CoreConfigCliOptions, PersistConfigCliOptions, UploadConfigCliOptions } from './model';
2
+ import { CoreConfigCliOptions, PersistConfigCliOptions, UploadConfigCliOptions } from './core-config.model';
3
3
  export declare function yargsCoreConfigOptionsDefinition(): Record<keyof CoreConfigCliOptions, Options>;
4
4
  export declare function yargsPersistConfigOptionsDefinition(): Record<keyof PersistConfigCliOptions, Options>;
5
5
  export declare function yargsUploadConfigOptionsDefinition(): Record<keyof UploadConfigCliOptions, Options>;
@@ -0,0 +1,4 @@
1
+ import { GlobalOptions } from '@code-pushup/core';
2
+ export type GeneralCliOptions = {
3
+ config: string;
4
+ } & GlobalOptions;
@@ -1,3 +1,3 @@
1
1
  import { Options } from 'yargs';
2
- import { GeneralCliOptions } from './model';
2
+ import { GeneralCliOptions } from './global.model';
3
3
  export declare function yargsGlobalOptionsDefinition(): Record<keyof GeneralCliOptions, Options>;
@@ -1,2 +1,3 @@
1
+ export declare function filterKebabCaseKeys<T extends Record<string, unknown>>(obj: T): T;
1
2
  export declare function logErrorBeforeThrow<T extends (...args: any[]) => any>(fn: T): T;
2
3
  export declare function coerceArray<T extends string>(param?: T | T[]): T[];
@@ -1,6 +1,7 @@
1
1
  import { CoreConfig } from '@code-pushup/models';
2
- import { GeneralCliOptions, OnlyPluginsOptions } from './model';
3
- export declare function configMiddleware<T extends Partial<GeneralCliOptions & CoreConfig & OnlyPluginsOptions>>(processArgs: T): Promise<{
2
+ import { GeneralCliOptions } from './global.model';
3
+ import { OnlyPluginsOptions } from './only-plugins.model';
4
+ export declare function onlyPluginsMiddleware<T extends Partial<GeneralCliOptions & CoreConfig & OnlyPluginsOptions>>(processArgs: T): {
4
5
  categories: {
5
6
  slug: string;
6
7
  refs: {
@@ -223,4 +224,4 @@ export declare function configMiddleware<T extends Partial<GeneralCliOptions & C
223
224
  } | undefined;
224
225
  } & {
225
226
  config: string;
226
- } & import("@code-pushup/core").GlobalOptions & OnlyPluginsOptions>;
227
+ } & import("@code-pushup/core").GlobalOptions & OnlyPluginsOptions;
@@ -0,0 +1,3 @@
1
+ export type OnlyPluginsOptions = {
2
+ onlyPlugins: string[];
3
+ };
@@ -1,4 +1,5 @@
1
1
  import { MiddlewareFunction } from 'yargs';
2
2
  export declare const middlewares: {
3
3
  middlewareFunction: MiddlewareFunction;
4
+ applyBeforeValidation: boolean;
4
5
  }[];
@@ -7,6 +7,6 @@ export declare const options: {
7
7
  "upload.apiKey": import("yargs").Options;
8
8
  "upload.server": import("yargs").Options;
9
9
  progress: import("yargs").Options;
10
- verbose: import("yargs").Options;
11
10
  config: import("yargs").Options;
11
+ verbose: import("yargs").Options;
12
12
  };
@@ -1 +0,0 @@
1
- export declare function filterKebabCaseKeys<T extends Record<string, unknown>>(obj: T): T;