dotcom-tool-kit 4.8.2 → 4.9.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/bin/run CHANGED
@@ -23,6 +23,9 @@ async function main() {
23
23
  } else if (argv.printConfig) {
24
24
  const { printConfig } = require('../lib')
25
25
  await printConfig(rootLogger)
26
+ } else if (argv.printMergedOptions) {
27
+ const { printMergedOptions } = require('../lib')
28
+ await printMergedOptions(rootLogger)
26
29
  } else if (argv.help || argv._.length === 0) {
27
30
  const showHelp = require('../lib/help').default
28
31
  await showHelp(rootLogger, argv._)
package/lib/index.d.ts CHANGED
@@ -3,4 +3,5 @@ export { runTasks } from './tasks';
3
3
  export { shouldDisableNativeFetch } from './fetch';
4
4
  export declare function listPlugins(logger: Logger): Promise<void>;
5
5
  export declare function printConfig(logger: Logger): Promise<void>;
6
+ export declare function printMergedOptions(logger: Logger): Promise<void>;
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAIrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/D;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAKrC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAClC,OAAO,EAAE,wBAAwB,EAAE,MAAM,SAAS,CAAA;AAElD,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO/D;AAED,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAI/D;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAkBtE"}
package/lib/index.js CHANGED
@@ -3,10 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.shouldDisableNativeFetch = exports.runTasks = void 0;
4
4
  exports.listPlugins = listPlugins;
5
5
  exports.printConfig = printConfig;
6
+ exports.printMergedOptions = printMergedOptions;
6
7
  const tslib_1 = require("tslib");
7
8
  const config_1 = require("./config");
8
9
  const util_1 = tslib_1.__importDefault(require("util"));
9
10
  const messages_1 = require("./messages");
11
+ const install_1 = require("./install");
10
12
  var tasks_1 = require("./tasks");
11
13
  Object.defineProperty(exports, "runTasks", { enumerable: true, get: function () { return tasks_1.runTasks; } });
12
14
  var fetch_1 = require("./fetch");
@@ -22,3 +24,16 @@ async function printConfig(logger) {
22
24
  const config = await (0, config_1.loadConfig)(logger, { validate: false, root: process.cwd() });
23
25
  logger.info(util_1.default.inspect(config, { depth: null, colors: true }));
24
26
  }
27
+ async function printMergedOptions(logger) {
28
+ const config = await (0, config_1.loadConfig)(logger, { validate: true, root: process.cwd() });
29
+ const hookInstallations = (await (0, install_1.loadHookInstallations)(logger, config)).unwrap('invalid hooks');
30
+ const mergedOptions = {
31
+ hooks: hookInstallations.map((h) => h.options),
32
+ plugins: Object.fromEntries(Object.entries(config.pluginOptions).map(([pluginId, optionsForPlugin]) => [
33
+ pluginId,
34
+ optionsForPlugin.options
35
+ ])),
36
+ tasks: Object.fromEntries(Object.entries(config.taskOptions).map(([taskId, optionsForTask]) => [taskId, optionsForTask.options]))
37
+ };
38
+ logger.info(util_1.default.inspect(mergedOptions, { depth: null, colors: true }));
39
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dotcom-tool-kit",
3
- "version": "4.8.2",
3
+ "version": "4.9.0",
4
4
  "description": "modern, maintainable, modular developer tooling for FT.com projects",
5
5
  "author": "FT.com Platforms Team <platforms-team.customer-products@ft.com>",
6
6
  "license": "MIT",
@@ -22,7 +22,7 @@
22
22
  "devDependencies": {
23
23
  "@jest/globals": "^29.7.0",
24
24
  "@relmify/jest-serializer-strip-ansi": "1.0.2",
25
- "@types/lodash": "^4.17.18",
25
+ "@types/lodash": "^4.17.20",
26
26
  "@types/pluralize": "^0.0.33",
27
27
  "globby": "^10.0.2",
28
28
  "winston": "^3.17.0",