dotcom-tool-kit 4.8.1 → 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 +3 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +15 -0
- package/lib/messages.js +3 -3
- package/package.json +2 -2
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
|
package/lib/index.d.ts.map
CHANGED
|
@@ -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;
|
|
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/lib/messages.js
CHANGED
|
@@ -71,7 +71,7 @@ const formatUnusedPluginOptions = (unusedOptions, definedPlugins) => `Options ar
|
|
|
71
71
|
|
|
72
72
|
${unusedOptions.map((optionName) => `- ${logger_1.styles.plugin(optionName)}`).join('\n')}
|
|
73
73
|
|
|
74
|
-
They could be misspelt, or defined by a Tool Kit plugin that isn't
|
|
74
|
+
They could be misspelt, placed at the wrong level of YAML indentation, or defined by a Tool Kit plugin that isn't used by this app.
|
|
75
75
|
|
|
76
76
|
${definedPlugins.length > 0
|
|
77
77
|
? `Plugins that are defined and can have options set are: ${definedPlugins
|
|
@@ -84,7 +84,7 @@ const formatUnusedTaskOptions = (unusedOptions, definedTasks) => `Options are de
|
|
|
84
84
|
|
|
85
85
|
${unusedOptions.map((optionName) => `- ${logger_1.styles.task(optionName)}`).join('\n')}
|
|
86
86
|
|
|
87
|
-
They could be misspelt, or defined by a Tool Kit plugin that isn't
|
|
87
|
+
They could be misspelt, placed at the wrong level of YAML indentation, or defined by a Tool Kit plugin that isn't used by this app.
|
|
88
88
|
|
|
89
89
|
${definedTasks.length > 0
|
|
90
90
|
? `Task that are defined and can have options set are: ${definedTasks
|
|
@@ -97,7 +97,7 @@ const formatUnusedHookOptions = (unusedOptions, definedHooks) => `Options are de
|
|
|
97
97
|
|
|
98
98
|
${unusedOptions.map((optionName) => `- ${logger_1.styles.hook(optionName)}`).join('\n')}
|
|
99
99
|
|
|
100
|
-
They could be misspelt, or defined by a Tool Kit plugin that isn't
|
|
100
|
+
They could be misspelt, placed at the wrong level of YAML indentation, or defined by a Tool Kit plugin that isn't used by this app.
|
|
101
101
|
|
|
102
102
|
${definedHooks.length > 0
|
|
103
103
|
? `Hooks that are defined and can have options set are: ${definedHooks
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dotcom-tool-kit",
|
|
3
|
-
"version": "4.
|
|
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.
|
|
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",
|