@netlify/config 20.12.5 → 20.12.6
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/lib/bin/flags.js +2 -0
- package/lib/log/logger.js +7 -1
- package/package.json +2 -2
package/lib/bin/flags.js
CHANGED
|
@@ -5,6 +5,8 @@ import { hideBin } from 'yargs/helpers';
|
|
|
5
5
|
import { normalizeCliFeatureFlags } from '../options/feature_flags.js';
|
|
6
6
|
// Parse CLI flags
|
|
7
7
|
export const parseFlags = function () {
|
|
8
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
9
|
+
// @ts-ignore: `yargs` types are incorrect
|
|
8
10
|
const { featureFlags: cliFeatureFlags = '', ...flags } = yargs(hideBin(process.argv))
|
|
9
11
|
.options(FLAGS)
|
|
10
12
|
.usage(USAGE)
|
package/lib/log/logger.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import figures from 'figures';
|
|
2
2
|
import { serializeObject } from './serialize.js';
|
|
3
3
|
import { THEME } from './theme.js';
|
|
4
|
+
export const logsAreBuffered = (logs) => {
|
|
5
|
+
return logs !== undefined && 'stdout' in logs;
|
|
6
|
+
};
|
|
4
7
|
// When the `buffer` option is true, we return logs instead of printing them
|
|
5
8
|
// on the console. The logs are accumulated in a `logs` array variable.
|
|
6
9
|
export const getBufferLogs = function ({ buffer }) {
|
|
@@ -14,7 +17,10 @@ export const getBufferLogs = function ({ buffer }) {
|
|
|
14
17
|
export const log = function (logs, string, { color } = {}) {
|
|
15
18
|
const stringA = String(string).replace(EMPTY_LINES_REGEXP, EMPTY_LINE);
|
|
16
19
|
const stringB = color === undefined ? stringA : color(stringA);
|
|
17
|
-
if (logs
|
|
20
|
+
if (logs && logs.outputFlusher) {
|
|
21
|
+
logs.outputFlusher.flush();
|
|
22
|
+
}
|
|
23
|
+
if (logsAreBuffered(logs)) {
|
|
18
24
|
// `logs` is a stateful variable
|
|
19
25
|
logs.stderr.push(stringB);
|
|
20
26
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "20.12.
|
|
3
|
+
"version": "20.12.6",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./lib/index.js",
|
|
@@ -94,5 +94,5 @@
|
|
|
94
94
|
"engines": {
|
|
95
95
|
"node": "^14.16.0 || >=16.0.0"
|
|
96
96
|
},
|
|
97
|
-
"gitHead": "
|
|
97
|
+
"gitHead": "cb01c052b7d990ee7d1dffa03afbae70f2cfd71d"
|
|
98
98
|
}
|