@lage-run/cli 0.26.0 → 0.27.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/CHANGELOG.json CHANGED
@@ -2,7 +2,28 @@
2
2
  "name": "@lage-run/cli",
3
3
  "entries": [
4
4
  {
5
- "date": "Wed, 12 Feb 2025 00:04:19 GMT",
5
+ "date": "Wed, 12 Feb 2025 00:08:19 GMT",
6
+ "version": "0.27.0",
7
+ "tag": "@lage-run/cli_v0.27.0",
8
+ "comments": {
9
+ "minor": [
10
+ {
11
+ "author": "dannyvv@microsoft.com",
12
+ "package": "@lage-run/cli",
13
+ "commit": "b3a12316b89654f42153675b190626aeee6882f4",
14
+ "comment": "Add support to json formatter to pretty print and indent the json when the log level is set to verbose or silly..."
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@lage-run/cli",
19
+ "comment": "Bump @lage-run/reporters to v1.3.0",
20
+ "commit": "not available"
21
+ }
22
+ ]
23
+ }
24
+ },
25
+ {
26
+ "date": "Wed, 12 Feb 2025 00:04:29 GMT",
6
27
  "version": "0.26.0",
7
28
  "tag": "@lage-run/cli_v0.26.0",
8
29
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,21 @@
1
1
  # Change Log - @lage-run/cli
2
2
 
3
- <!-- This log was last generated on Wed, 12 Feb 2025 00:04:19 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Wed, 12 Feb 2025 00:08:19 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 0.27.0
8
+
9
+ Wed, 12 Feb 2025 00:08:19 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Add support to json formatter to pretty print and indent the json when the log level is set to verbose or silly... (dannyvv@microsoft.com)
14
+ - Bump @lage-run/reporters to v1.3.0
15
+
7
16
  ## 0.26.0
8
17
 
9
- Wed, 12 Feb 2025 00:04:19 GMT
18
+ Wed, 12 Feb 2025 00:04:29 GMT
10
19
 
11
20
  ### Minor changes
12
21
 
@@ -19,7 +19,7 @@ function _interop_require_default(obj) {
19
19
  };
20
20
  }
21
21
  function createReporter(reporter, options) {
22
- const { verbose, grouped, logLevel: logLevelName, concurrency, profile, progress, logFile } = options;
22
+ const { verbose, grouped, logLevel: logLevelName, concurrency, profile, progress, logFile, indented } = options;
23
23
  const logLevel = _logger.LogLevel[logLevelName];
24
24
  const root = (0, _workspacetools.findPackageRoot)(__filename);
25
25
  const packageJson = JSON.parse((0, _fs.readFileSync)(_path.default.join(root, "package.json"), "utf-8"));
@@ -32,7 +32,8 @@ function createReporter(reporter, options) {
32
32
  });
33
33
  case "json":
34
34
  return new _reporters.JsonReporter({
35
- logLevel
35
+ logLevel,
36
+ indented: indented ?? false
36
37
  });
37
38
  case "azureDevops":
38
39
  case "adoLog":
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/createReporter.ts"],"sourcesContent":["import { LogLevel } from \"@lage-run/logger\";\nimport {\n JsonReporter,\n AdoReporter,\n LogReporter,\n ProgressReporter,\n VerboseFileLogReporter,\n ChromeTraceEventsReporter,\n} from \"@lage-run/reporters\";\nimport type { ReporterInitOptions } from \"../types/ReporterInitOptions.js\";\nimport { findPackageRoot } from \"workspace-tools\";\nimport { readFileSync } from \"fs\";\nimport path from \"path\";\n\nexport function createReporter(reporter: string, options: ReporterInitOptions) {\n const { verbose, grouped, logLevel: logLevelName, concurrency, profile, progress, logFile } = options;\n const logLevel = LogLevel[logLevelName];\n\n const root = findPackageRoot(__filename)!;\n const packageJson = JSON.parse(readFileSync(path.join(root, \"package.json\"), \"utf-8\"));\n const version = packageJson.version;\n\n switch (reporter) {\n case \"profile\":\n return new ChromeTraceEventsReporter({\n concurrency,\n outputFile: typeof profile === \"string\" ? profile : undefined,\n });\n case \"json\":\n return new JsonReporter({ logLevel });\n case \"azureDevops\":\n case \"adoLog\":\n return new AdoReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n\n case \"npmLog\":\n case \"old\":\n return new LogReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n\n case \"verboseFileLog\":\n case \"vfl\":\n return new VerboseFileLogReporter(logFile);\n\n default:\n if (progress && !(logLevel >= LogLevel.verbose || verbose || grouped)) {\n return new ProgressReporter({ concurrency, version });\n }\n\n return new LogReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n }\n}\n"],"names":["createReporter","reporter","options","verbose","grouped","logLevel","logLevelName","concurrency","profile","progress","logFile","LogLevel","root","findPackageRoot","__filename","packageJson","JSON","parse","readFileSync","path","join","version","ChromeTraceEventsReporter","outputFile","undefined","JsonReporter","AdoReporter","LogReporter","VerboseFileLogReporter","ProgressReporter"],"mappings":";;;;+BAcgBA;;;eAAAA;;;wBAdS;2BAQlB;gCAEyB;oBACH;6DACZ;;;;;;AAEV,SAASA,eAAeC,QAAgB,EAAEC,OAA4B;IAC3E,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,UAAUC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,EAAE,GAAGR;IAC9F,MAAMG,WAAWM,gBAAQ,CAACL,aAAa;IAEvC,MAAMM,OAAOC,IAAAA,+BAAe,EAACC;IAC7B,MAAMC,cAAcC,KAAKC,KAAK,CAACC,IAAAA,gBAAY,EAACC,aAAI,CAACC,IAAI,CAACR,MAAM,iBAAiB;IAC7E,MAAMS,UAAUN,YAAYM,OAAO;IAEnC,OAAQpB;QACN,KAAK;YACH,OAAO,IAAIqB,oCAAyB,CAAC;gBACnCf;gBACAgB,YAAY,OAAOf,YAAY,WAAWA,UAAUgB;YACtD;QACF,KAAK;YACH,OAAO,IAAIC,uBAAY,CAAC;gBAAEpB;YAAS;QACrC,KAAK;QACL,KAAK;YACH,OAAO,IAAIqB,sBAAW,CAAC;gBAAEtB;gBAASC,UAAUF,UAAUQ,gBAAQ,CAACR,OAAO,GAAGE;YAAS;QAEpF,KAAK;QACL,KAAK;YACH,OAAO,IAAIsB,sBAAW,CAAC;gBAAEvB;gBAASC,UAAUF,UAAUQ,gBAAQ,CAACR,OAAO,GAAGE;YAAS;QAEpF,KAAK;QACL,KAAK;YACH,OAAO,IAAIuB,iCAAsB,CAAClB;QAEpC;YACE,IAAID,YAAY,CAAEJ,CAAAA,YAAYM,gBAAQ,CAACR,OAAO,IAAIA,WAAWC,OAAM,GAAI;gBACrE,OAAO,IAAIyB,2BAAgB,CAAC;oBAAEtB;oBAAac;gBAAQ;YACrD;YAEA,OAAO,IAAIM,sBAAW,CAAC;gBAAEvB;gBAASC,UAAUF,UAAUQ,gBAAQ,CAACR,OAAO,GAAGE;YAAS;IACtF;AACF"}
1
+ {"version":3,"sources":["../../src/commands/createReporter.ts"],"sourcesContent":["import { LogLevel } from \"@lage-run/logger\";\nimport {\n JsonReporter,\n AdoReporter,\n LogReporter,\n ProgressReporter,\n VerboseFileLogReporter,\n ChromeTraceEventsReporter,\n} from \"@lage-run/reporters\";\nimport type { ReporterInitOptions } from \"../types/ReporterInitOptions.js\";\nimport { findPackageRoot } from \"workspace-tools\";\nimport { readFileSync } from \"fs\";\nimport path from \"path\";\n\nexport function createReporter(reporter: string, options: ReporterInitOptions) {\n const { verbose, grouped, logLevel: logLevelName, concurrency, profile, progress, logFile, indented } = options;\n const logLevel = LogLevel[logLevelName];\n\n const root = findPackageRoot(__filename)!;\n const packageJson = JSON.parse(readFileSync(path.join(root, \"package.json\"), \"utf-8\"));\n const version = packageJson.version;\n\n switch (reporter) {\n case \"profile\":\n return new ChromeTraceEventsReporter({\n concurrency,\n outputFile: typeof profile === \"string\" ? profile : undefined,\n });\n case \"json\":\n return new JsonReporter({ logLevel, indented: indented ?? false });\n case \"azureDevops\":\n case \"adoLog\":\n return new AdoReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n\n case \"npmLog\":\n case \"old\":\n return new LogReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n\n case \"verboseFileLog\":\n case \"vfl\":\n return new VerboseFileLogReporter(logFile);\n\n default:\n if (progress && !(logLevel >= LogLevel.verbose || verbose || grouped)) {\n return new ProgressReporter({ concurrency, version });\n }\n\n return new LogReporter({ grouped, logLevel: verbose ? LogLevel.verbose : logLevel });\n }\n}\n"],"names":["createReporter","reporter","options","verbose","grouped","logLevel","logLevelName","concurrency","profile","progress","logFile","indented","LogLevel","root","findPackageRoot","__filename","packageJson","JSON","parse","readFileSync","path","join","version","ChromeTraceEventsReporter","outputFile","undefined","JsonReporter","AdoReporter","LogReporter","VerboseFileLogReporter","ProgressReporter"],"mappings":";;;;+BAcgBA;;;eAAAA;;;wBAdS;2BAQlB;gCAEyB;oBACH;6DACZ;;;;;;AAEV,SAASA,eAAeC,QAAgB,EAAEC,OAA4B;IAC3E,MAAM,EAAEC,OAAO,EAAEC,OAAO,EAAEC,UAAUC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,QAAQ,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGT;IACxG,MAAMG,WAAWO,gBAAQ,CAACN,aAAa;IAEvC,MAAMO,OAAOC,IAAAA,+BAAe,EAACC;IAC7B,MAAMC,cAAcC,KAAKC,KAAK,CAACC,IAAAA,gBAAY,EAACC,aAAI,CAACC,IAAI,CAACR,MAAM,iBAAiB;IAC7E,MAAMS,UAAUN,YAAYM,OAAO;IAEnC,OAAQrB;QACN,KAAK;YACH,OAAO,IAAIsB,oCAAyB,CAAC;gBACnChB;gBACAiB,YAAY,OAAOhB,YAAY,WAAWA,UAAUiB;YACtD;QACF,KAAK;YACH,OAAO,IAAIC,uBAAY,CAAC;gBAAErB;gBAAUM,UAAUA,YAAY;YAAM;QAClE,KAAK;QACL,KAAK;YACH,OAAO,IAAIgB,sBAAW,CAAC;gBAAEvB;gBAASC,UAAUF,UAAUS,gBAAQ,CAACT,OAAO,GAAGE;YAAS;QAEpF,KAAK;QACL,KAAK;YACH,OAAO,IAAIuB,sBAAW,CAAC;gBAAExB;gBAASC,UAAUF,UAAUS,gBAAQ,CAACT,OAAO,GAAGE;YAAS;QAEpF,KAAK;QACL,KAAK;YACH,OAAO,IAAIwB,iCAAsB,CAACnB;QAEpC;YACE,IAAID,YAAY,CAAEJ,CAAAA,YAAYO,gBAAQ,CAACT,OAAO,IAAIA,WAAWC,OAAM,GAAI;gBACrE,OAAO,IAAI0B,2BAAgB,CAAC;oBAAEvB;oBAAae;gBAAQ;YACrD;YAEA,OAAO,IAAIM,sBAAW,CAAC;gBAAExB;gBAASC,UAAUF,UAAUS,gBAAQ,CAACT,OAAO,GAAGE;YAAS;IACtF;AACF"}
@@ -7,6 +7,7 @@ declare const optionsWithEnv: {
7
7
  readonly logLevel: Option;
8
8
  readonly logFile: Option;
9
9
  readonly verbose: Option;
10
+ readonly indented: Option;
10
11
  };
11
12
  readonly pool: {
12
13
  readonly concurrency: Option;
@@ -27,7 +27,8 @@ const options = {
27
27
  "silly"
28
28
  ]).conflicts("verbose"),
29
29
  logFile: new _commander.Option("--log-file <file>", "when used with --reporter vfl, writes verbose, ungrouped logs to the specified file"),
30
- verbose: new _commander.Option("--verbose", "verbose output").default(false)
30
+ verbose: new _commander.Option("--verbose", "verbose output").default(false),
31
+ indented: new _commander.Option("--indented", "enabled indentation of the JSON output").default(false)
31
32
  },
32
33
  pool: {
33
34
  concurrency: new _commander.Option("-c|--concurrency <number>", "max jobs to run at a time").argParser((v)=>parseInt(v)),
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/commands/options.ts"],"sourcesContent":["import { Option } from \"commander\";\n\nconst isCI = process.env.CI || process.env.TF_BUILD;\n\nconst options = {\n logger: {\n reporter: new Option(\"--reporter <reporter...>\", \"reporter\"),\n grouped: new Option(\"--grouped\", \"groups the logs\").default(false),\n progress: new Option(\"--progress\").conflicts([\"reporter\", \"grouped\", \"verbose\"]).default(!isCI),\n logLevel: new Option(\"--log-level <level>\", \"log level\").choices([\"info\", \"warn\", \"error\", \"verbose\", \"silly\"]).conflicts(\"verbose\"),\n logFile: new Option(\"--log-file <file>\", \"when used with --reporter vfl, writes verbose, ungrouped logs to the specified file\"),\n verbose: new Option(\"--verbose\", \"verbose output\").default(false),\n },\n pool: {\n concurrency: new Option(\"-c|--concurrency <number>\", \"max jobs to run at a time\").argParser((v) => parseInt(v)),\n continue: new Option(\"--continue\", \"continue running even after encountering an error for one of the targets\"),\n maxWorkersPerTask: new Option(\n \"--max-workers-per-task <maxWorkersPerTarget...>\",\n \"set max worker per task, e.g. --max-workers-per-task build=2 test=4\"\n ).default([]),\n },\n runner: {\n nodeArg: new Option(\n \"-n|--node-arg <arg>\",\n 'node arguments as a string to be passed into node like a NODE_OPTIONS setting, (e.g. --nodearg=\"--max_old_space_size=1234 --heap-prof\")'\n ),\n },\n run: {\n cache: new Option(\"--no-cache\", \"disables the cache\"),\n resetCache: new Option(\"--reset-cache\", \"resets the cache, filling it after a run\"),\n skipLocalCache: new Option(\"--skip-local-cache\", \"skips caching locally (defaults to true in CI environments)\").default(isCI),\n profile: new Option(\"--profile [profile]\", \"writes a run profile into a file that can be processed by Chromium devtool\"),\n continue: new Option(\"--continue\", \"continues the run even on error\"),\n allowNoTargetRuns: new Option(\"--allow-no-target-runs\"),\n watch: new Option(\"--watch\", \"runs in watch mode\"),\n },\n server: {\n server: new Option(\"--server [host:port]\", \"Run targets of type 'worker' on a background service\"),\n tasks: new Option(\"--tasks <tasks...>\", \"A list of tasks to run, separated by space e.g. 'build test'\"),\n timeout: new Option(\"-t|--timeout <seconds>\", \"lage server autoshutoff timeout\").default(5 * 60).argParser((v) => parseInt(v)),\n },\n filter: {\n scope: new Option(\n \"--scope <scope...>\",\n \"scopes the run to a subset of packages (by default, includes the dependencies and dependents as well)\"\n ),\n noDeps: new Option(\"--no-deps|--no-dependents\", \"disables running any dependents of the scoped packages\"),\n includeDependencies: new Option(\n \"--include-dependencies|--dependencies\",\n 'adds the scoped packages dependencies as the \"entry points\" for the target graph run'\n ),\n to: new Option(\"--to <scope...>\", \"runs up to a package (shorthand for --scope=<scope...> --no-dependents)\"),\n since: new Option(\"--since <since>\", \"only runs packages that have changed since the given commit, tag, or branch\"),\n ignore: new Option(\n \"--ignore <ignore...>\",\n \"ignores files when calculating the scope with `--since` in addition to the files specified in lage.config\"\n ).default([]),\n },\n affected: {\n outputFormat: new Option(\n \"--output-format <graph|json|default>\",\n `Generate a report about what packages are affected by the current change (defaults to human readable format) ` +\n `\"graph\" will generate a GraphViz .dot file format`\n ),\n },\n cache: {\n prune: new Option(\"--prune <days>\", \"Prunes cache older than certain number of <days>\").argParser(parseInt).conflicts(\"--clear\"),\n clear: new Option(\"--clear\", \"Clears the cache locally\"),\n },\n} as const;\n\nconst optionsWithEnv = addEnvOptions(options);\n\nfunction addEnvOptions(opts: typeof options) {\n for (const key in opts) {\n for (const [name, option] of Object.entries<Option>(opts[key])) {\n // convert the camel cased name to uppercase with underscores\n const upperCaseSnakeKey = key.replace(/([A-Z])/g, \"_$1\").toUpperCase();\n const upperCaseSnakeName = name.replace(/([A-Z])/g, \"_$1\").toUpperCase();\n option.env(`LAGE_${upperCaseSnakeKey}_${upperCaseSnakeName}`);\n }\n }\n\n return opts;\n}\n\nexport { optionsWithEnv as options };\n"],"names":["options","optionsWithEnv","isCI","process","env","CI","TF_BUILD","logger","reporter","Option","grouped","default","progress","conflicts","logLevel","choices","logFile","verbose","pool","concurrency","argParser","v","parseInt","continue","maxWorkersPerTask","runner","nodeArg","run","cache","resetCache","skipLocalCache","profile","allowNoTargetRuns","watch","server","tasks","timeout","filter","scope","noDeps","includeDependencies","to","since","ignore","affected","outputFormat","prune","clear","addEnvOptions","opts","key","name","option","Object","entries","upperCaseSnakeKey","replace","toUpperCase","upperCaseSnakeName"],"mappings":";;;;+BAsF2BA;;;eAAlBC;;;2BAtFc;AAEvB,MAAMC,OAAOC,QAAQC,GAAG,CAACC,EAAE,IAAIF,QAAQC,GAAG,CAACE,QAAQ;AAEnD,MAAMN,UAAU;IACdO,QAAQ;QACNC,UAAU,IAAIC,iBAAM,CAAC,4BAA4B;QACjDC,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QACNC,OAAO,IAAI7B,iBAAM,CACf,sBACA;QAEF8B,QAAQ,IAAI9B,iBAAM,CAAC,6BAA6B;QAChD+B,qBAAqB,IAAI/B,iBAAM,CAC7B,yCACA;QAEFgC,IAAI,IAAIhC,iBAAM,CAAC,mBAAmB;QAClCiC,OAAO,IAAIjC,iBAAM,CAAC,mBAAmB;QACrCkC,QAAQ,IAAIlC,iBAAM,CAChB,wBACA,6GACAE,OAAO,CAAC,EAAE;IACd;IACAiC,UAAU;QACRC,cAAc,IAAIpC,iBAAM,CACtB,wCACA,CAAC,6GAA6G,CAAC,GAC7G,CAAC,iDAAiD,CAAC;IAEzD;IACAmB,OAAO;QACLkB,OAAO,IAAIrC,iBAAM,CAAC,kBAAkB,oDAAoDW,SAAS,CAACE,UAAUT,SAAS,CAAC;QACtHkC,OAAO,IAAItC,iBAAM,CAAC,WAAW;IAC/B;AACF;AAEA,MAAMR,iBAAiB+C,cAAchD;AAErC,SAASgD,cAAcC,IAAoB;IACzC,IAAK,MAAMC,OAAOD,KAAM;QACtB,KAAK,MAAM,CAACE,MAAMC,OAAO,IAAIC,OAAOC,OAAO,CAASL,IAAI,CAACC,IAAI,EAAG;YAC9D,6DAA6D;YAC7D,MAAMK,oBAAoBL,IAAIM,OAAO,CAAC,YAAY,OAAOC,WAAW;YACpE,MAAMC,qBAAqBP,KAAKK,OAAO,CAAC,YAAY,OAAOC,WAAW;YACtEL,OAAOhD,GAAG,CAAC,CAAC,KAAK,EAAEmD,kBAAkB,CAAC,EAAEG,oBAAoB;QAC9D;IACF;IAEA,OAAOT;AACT"}
1
+ {"version":3,"sources":["../../src/commands/options.ts"],"sourcesContent":["import { Option } from \"commander\";\n\nconst isCI = process.env.CI || process.env.TF_BUILD;\n\nconst options = {\n logger: {\n reporter: new Option(\"--reporter <reporter...>\", \"reporter\"),\n grouped: new Option(\"--grouped\", \"groups the logs\").default(false),\n progress: new Option(\"--progress\").conflicts([\"reporter\", \"grouped\", \"verbose\"]).default(!isCI),\n logLevel: new Option(\"--log-level <level>\", \"log level\").choices([\"info\", \"warn\", \"error\", \"verbose\", \"silly\"]).conflicts(\"verbose\"),\n logFile: new Option(\"--log-file <file>\", \"when used with --reporter vfl, writes verbose, ungrouped logs to the specified file\"),\n verbose: new Option(\"--verbose\", \"verbose output\").default(false),\n indented: new Option(\"--indented\", \"enabled indentation of the JSON output\").default(false),\n },\n pool: {\n concurrency: new Option(\"-c|--concurrency <number>\", \"max jobs to run at a time\").argParser((v) => parseInt(v)),\n continue: new Option(\"--continue\", \"continue running even after encountering an error for one of the targets\"),\n maxWorkersPerTask: new Option(\n \"--max-workers-per-task <maxWorkersPerTarget...>\",\n \"set max worker per task, e.g. --max-workers-per-task build=2 test=4\"\n ).default([]),\n },\n runner: {\n nodeArg: new Option(\n \"-n|--node-arg <arg>\",\n 'node arguments as a string to be passed into node like a NODE_OPTIONS setting, (e.g. --nodearg=\"--max_old_space_size=1234 --heap-prof\")'\n ),\n },\n run: {\n cache: new Option(\"--no-cache\", \"disables the cache\"),\n resetCache: new Option(\"--reset-cache\", \"resets the cache, filling it after a run\"),\n skipLocalCache: new Option(\"--skip-local-cache\", \"skips caching locally (defaults to true in CI environments)\").default(isCI),\n profile: new Option(\"--profile [profile]\", \"writes a run profile into a file that can be processed by Chromium devtool\"),\n continue: new Option(\"--continue\", \"continues the run even on error\"),\n allowNoTargetRuns: new Option(\"--allow-no-target-runs\"),\n watch: new Option(\"--watch\", \"runs in watch mode\"),\n },\n server: {\n server: new Option(\"--server [host:port]\", \"Run targets of type 'worker' on a background service\"),\n tasks: new Option(\"--tasks <tasks...>\", \"A list of tasks to run, separated by space e.g. 'build test'\"),\n timeout: new Option(\"-t|--timeout <seconds>\", \"lage server autoshutoff timeout\").default(5 * 60).argParser((v) => parseInt(v)),\n },\n filter: {\n scope: new Option(\n \"--scope <scope...>\",\n \"scopes the run to a subset of packages (by default, includes the dependencies and dependents as well)\"\n ),\n noDeps: new Option(\"--no-deps|--no-dependents\", \"disables running any dependents of the scoped packages\"),\n includeDependencies: new Option(\n \"--include-dependencies|--dependencies\",\n 'adds the scoped packages dependencies as the \"entry points\" for the target graph run'\n ),\n to: new Option(\"--to <scope...>\", \"runs up to a package (shorthand for --scope=<scope...> --no-dependents)\"),\n since: new Option(\"--since <since>\", \"only runs packages that have changed since the given commit, tag, or branch\"),\n ignore: new Option(\n \"--ignore <ignore...>\",\n \"ignores files when calculating the scope with `--since` in addition to the files specified in lage.config\"\n ).default([]),\n },\n affected: {\n outputFormat: new Option(\n \"--output-format <graph|json|default>\",\n `Generate a report about what packages are affected by the current change (defaults to human readable format) ` +\n `\"graph\" will generate a GraphViz .dot file format`\n ),\n },\n cache: {\n prune: new Option(\"--prune <days>\", \"Prunes cache older than certain number of <days>\").argParser(parseInt).conflicts(\"--clear\"),\n clear: new Option(\"--clear\", \"Clears the cache locally\"),\n },\n} as const;\n\nconst optionsWithEnv = addEnvOptions(options);\n\nfunction addEnvOptions(opts: typeof options) {\n for (const key in opts) {\n for (const [name, option] of Object.entries<Option>(opts[key])) {\n // convert the camel cased name to uppercase with underscores\n const upperCaseSnakeKey = key.replace(/([A-Z])/g, \"_$1\").toUpperCase();\n const upperCaseSnakeName = name.replace(/([A-Z])/g, \"_$1\").toUpperCase();\n option.env(`LAGE_${upperCaseSnakeKey}_${upperCaseSnakeName}`);\n }\n }\n\n return opts;\n}\n\nexport { optionsWithEnv as options };\n"],"names":["options","optionsWithEnv","isCI","process","env","CI","TF_BUILD","logger","reporter","Option","grouped","default","progress","conflicts","logLevel","choices","logFile","verbose","indented","pool","concurrency","argParser","v","parseInt","continue","maxWorkersPerTask","runner","nodeArg","run","cache","resetCache","skipLocalCache","profile","allowNoTargetRuns","watch","server","tasks","timeout","filter","scope","noDeps","includeDependencies","to","since","ignore","affected","outputFormat","prune","clear","addEnvOptions","opts","key","name","option","Object","entries","upperCaseSnakeKey","replace","toUpperCase","upperCaseSnakeName"],"mappings":";;;;+BAuF2BA;;;eAAlBC;;;2BAvFc;AAEv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porterInitOptions {
8
8
  logLevel: keyof typeof LogLevel;
9
9
  profile?: boolean | string;
10
10
  logFile?: string;
11
+ indented?: boolean;
11
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lage-run/cli",
3
- "version": "0.26.0",
3
+ "version": "0.27.0",
4
4
  "description": "Command Line Interface for Lage",
5
5
  "repository": {
6
6
  "type": "git",
@@ -27,7 +27,7 @@
27
27
  "@lage-run/globby": "^14.2.0",
28
28
  "@lage-run/hasher": "^1.6.9",
29
29
  "@lage-run/logger": "^1.3.1",
30
- "@lage-run/reporters": "^1.2.19",
30
+ "@lage-run/reporters": "^1.3.0",
31
31
  "@lage-run/rpc": "^1.2.7",
32
32
  "@lage-run/runners": "^1.2.1",
33
33
  "@lage-run/scheduler": "^1.5.1",