@automattic/vip 2.30.0 → 2.31.0-dev1

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.
Files changed (47) hide show
  1. package/dist/bin/vip-dev-env-sync-sql.js +11 -18
  2. package/dist/bin/vip-export-sql.js +12 -11
  3. package/dist/bin/vip-import-sql.js +2 -2
  4. package/dist/bin/vip-whoami.js +7 -10
  5. package/dist/commands/dev-env-sync-sql.js +29 -15
  6. package/dist/commands/export-sql.js +1 -1
  7. package/dist/lib/analytics/clients/pendo.js +11 -20
  8. package/dist/lib/analytics/clients/tracks.js +12 -12
  9. package/dist/lib/analytics/index.js +9 -12
  10. package/dist/lib/api/app.js +10 -13
  11. package/dist/lib/api/cache-purge.js +3 -10
  12. package/dist/lib/api/feature-flags.js +4 -2
  13. package/dist/lib/api/http.js +10 -18
  14. package/dist/lib/api/user.js +3 -8
  15. package/dist/lib/api.js +11 -14
  16. package/dist/lib/app-logs/app-logs.js +3 -6
  17. package/dist/lib/cli/apiConfig.js +10 -7
  18. package/dist/lib/cli/config.js +2 -3
  19. package/dist/lib/cli/envAlias.js +11 -9
  20. package/dist/lib/cli/exit.js +4 -7
  21. package/dist/lib/cli/format.js +25 -26
  22. package/dist/lib/cli/progress.js +7 -3
  23. package/dist/lib/cli/prompt.js +3 -2
  24. package/dist/lib/client-file-uploader.js +86 -87
  25. package/dist/lib/config/software.js +18 -12
  26. package/dist/lib/env.js +16 -13
  27. package/dist/lib/envvar/api-delete.js +2 -0
  28. package/dist/lib/envvar/api-get-all.js +4 -1
  29. package/dist/lib/envvar/api-get.js +3 -1
  30. package/dist/lib/envvar/api-list.js +8 -3
  31. package/dist/lib/envvar/api-set.js +2 -0
  32. package/dist/lib/envvar/api.js +2 -5
  33. package/dist/lib/envvar/input.js +7 -8
  34. package/dist/lib/envvar/read-file.js +4 -7
  35. package/dist/lib/http/proxy-agent.js +5 -4
  36. package/dist/lib/read-file.js +13 -14
  37. package/dist/lib/search-and-replace.js +17 -26
  38. package/dist/lib/tracker.js +12 -12
  39. package/dist/lib/user-error.js +6 -5
  40. package/dist/lib/utils.js +18 -22
  41. package/dist/lib/vip-import-validate-files.js +23 -22
  42. package/npm-shrinkwrap.json +37 -1003
  43. package/package.json +4 -4
  44. package/tsconfig.json +4 -2
  45. package/dist/lib/analytics/clients/stub.js +0 -16
  46. package/dist/lib/cli/repo.js +0 -61
  47. package/noImplictAnyImportBypass.d.ts +0 -6
package/dist/lib/api.js CHANGED
@@ -15,11 +15,9 @@ var _chalk = _interopRequireDefault(require("chalk"));
15
15
  var _token = _interopRequireDefault(require("./token"));
16
16
  var _env = _interopRequireDefault(require("./env"));
17
17
  var _proxyAgent = require("../lib/http/proxy-agent");
18
+ var _http = _interopRequireDefault(require("./api/http"));
18
19
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
19
- /**
20
- *
21
- * @format
22
- */
20
+ // @format
23
21
 
24
22
  /**
25
23
  * External dependencies
@@ -31,8 +29,9 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
31
29
 
32
30
  // Config
33
31
  const PRODUCTION_API_HOST = 'https://api.wpvip.com';
32
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
34
33
  exports.PRODUCTION_API_HOST = PRODUCTION_API_HOST;
35
- const API_HOST = process.env.API_HOST || PRODUCTION_API_HOST;
34
+ const API_HOST = process.env.API_HOST || PRODUCTION_API_HOST; // NOSONAR
36
35
  exports.API_HOST = API_HOST;
37
36
  const API_URL = `${API_HOST}/graphql`;
38
37
  exports.API_URL = API_URL;
@@ -49,17 +48,17 @@ async function API({
49
48
  const authToken = await _token.default.get();
50
49
  const headers = {
51
50
  'User-Agent': _env.default.userAgent,
52
- Authorization: authToken ? `Bearer ${authToken.raw}` : null
51
+ Authorization: `Bearer ${authToken.raw}`
53
52
  };
54
53
  const errorLink = (0, _error.onError)(({
55
54
  networkError,
56
55
  graphQLErrors
57
56
  }) => {
58
- if (networkError && networkError.statusCode === 401) {
57
+ if (networkError && 'statusCode' in networkError && networkError.statusCode === 401) {
59
58
  console.error(_chalk.default.red('Unauthorized:'), 'You are unauthorized to perform this request, please logout with `vip logout` then try again.');
60
59
  process.exit(1);
61
60
  }
62
- if (graphQLErrors && graphQLErrors.length && globalGraphQLErrorHandlingEnabled) {
61
+ if (graphQLErrors !== null && graphQLErrors !== void 0 && graphQLErrors.length && globalGraphQLErrorHandlingEnabled) {
63
62
  graphQLErrors.forEach(error => {
64
63
  console.error(_chalk.default.red('Error:'), error.message);
65
64
  });
@@ -75,22 +74,20 @@ async function API({
75
74
  };
76
75
  });
77
76
  const authLink = new _core2.ApolloLink((operation, forward) => {
78
- const {
79
- token
80
- } = operation.getContext();
77
+ const ctx = operation.getContext();
78
+ const token = ctx.token;
81
79
  operation.setContext({
82
80
  headers: {
83
- Authorization: token ? `Bearer ${token.raw}` : null
81
+ Authorization: `Bearer ${token.raw}`
84
82
  }
85
83
  });
86
84
  return forward(operation);
87
85
  });
88
86
  const proxyAgent = (0, _proxyAgent.createProxyAgent)(API_URL);
89
- const http = require("./api/http").default;
90
87
  const httpLink = new _core.HttpLink({
91
88
  uri: API_URL,
92
89
  headers,
93
- fetch: http,
90
+ fetch: _http.default,
94
91
  fetchOptions: {
95
92
  agent: proxyAgent
96
93
  }
@@ -8,10 +8,7 @@ exports.getRecentLogs = getRecentLogs;
8
8
  var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
9
9
  var _api = _interopRequireDefault(require("../../lib/api"));
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
- /**
12
- *
13
- * @format
14
- */
11
+ // @format
15
12
 
16
13
  /**
17
14
  * External dependencies
@@ -41,7 +38,7 @@ const QUERY_ENVIRONMENT_LOGS = (0, _graphqlTag.default)`
41
38
  }
42
39
  `;
43
40
  async function getRecentLogs(appId, envId, type, limit, after) {
44
- var _response$data, _response$data$app, _response$data$app$en;
41
+ var _response$data$app, _response$data$app$en, _response$data$app$en2;
45
42
  const api = await (0, _api.default)({
46
43
  exitOnError: false
47
44
  });
@@ -55,7 +52,7 @@ async function getRecentLogs(appId, envId, type, limit, after) {
55
52
  after
56
53
  }
57
54
  });
58
- const logs = response === null || response === void 0 ? void 0 : (_response$data = response.data) === null || _response$data === void 0 ? void 0 : (_response$data$app = _response$data.app) === null || _response$data$app === void 0 ? void 0 : (_response$data$app$en = _response$data$app.environments[0]) === null || _response$data$app$en === void 0 ? void 0 : _response$data$app$en.logs;
55
+ const logs = (_response$data$app = response.data.app) === null || _response$data$app === void 0 ? void 0 : (_response$data$app$en = _response$data$app.environments) === null || _response$data$app$en === void 0 ? void 0 : (_response$data$app$en2 = _response$data$app$en[0]) === null || _response$data$app$en2 === void 0 ? void 0 : _response$data$app$en2.logs;
59
56
  if (!(logs !== null && logs !== void 0 && logs.nodes)) {
60
57
  throw new Error('Unable to query logs');
61
58
  }
@@ -14,12 +14,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
14
14
  function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
15
15
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
16
16
  // @format
17
+
17
18
  /**
18
19
  * External dependencies
19
20
  */
21
+
20
22
  /**
21
23
  * Internal dependencies
22
24
  */
25
+
23
26
  async function checkFeatureEnabled(featureName, exitOnFalse = false) {
24
27
  // TODO: eventually let's look at more feature flags coming from the public api,
25
28
  // for now, let's see if the user of the CLI is VIP
@@ -29,9 +32,9 @@ async function checkFeatureEnabled(featureName, exitOnFalse = false) {
29
32
  });
30
33
  let isVIP;
31
34
  try {
32
- var _res$data, _res$data$me;
35
+ var _res$data$me;
33
36
  const res = await featureFlags.get();
34
- if ((res === null || res === void 0 ? void 0 : (_res$data = res.data) === null || _res$data === void 0 ? void 0 : (_res$data$me = _res$data.me) === null || _res$data$me === void 0 ? void 0 : _res$data$me.isVIP) !== undefined) {
37
+ if ((res === null || res === void 0 ? void 0 : (_res$data$me = res.data.me) === null || _res$data$me === void 0 ? void 0 : _res$data$me.isVIP) !== undefined) {
35
38
  isVIP = res.data.me.isVIP;
36
39
  } else {
37
40
  isVIP = false;
@@ -43,9 +46,9 @@ async function checkFeatureEnabled(featureName, exitOnFalse = false) {
43
46
  exitOnFalse,
44
47
  error: message
45
48
  });
46
- exit.withError('Failed to determine if feature is enabled' + message);
49
+ exit.withError(`Failed to determine if feature is enabled: ${message}`);
47
50
  }
48
- if (exitOnFalse === true && isVIP === false) {
51
+ if (exitOnFalse && isVIP === false) {
49
52
  exit.withError('The feature you are attempting to use is not currently enabled.');
50
53
  }
51
54
  return isVIP === true;
@@ -56,10 +59,10 @@ async function checkFeatureEnabled(featureName, exitOnFalse = false) {
56
59
  // - It is mocked globally in jest.setupMocks.js.
57
60
  async function checkIfUserIsVip() {
58
61
  const token = await _token.default.get();
59
- if (token && token.valid()) {
60
- var _res$data2, _res$data2$me;
62
+ if (token.valid()) {
63
+ var _res$data$me2;
61
64
  const res = await featureFlags.get();
62
- return !!(res !== null && res !== void 0 && (_res$data2 = res.data) !== null && _res$data2 !== void 0 && (_res$data2$me = _res$data2.me) !== null && _res$data2$me !== void 0 && _res$data2$me.isVIP);
65
+ return !!(res !== null && res !== void 0 && (_res$data$me2 = res.data.me) !== null && _res$data$me2 !== void 0 && _res$data$me2.isVIP);
63
66
  }
64
67
  return false;
65
68
  }
@@ -11,7 +11,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
11
11
  */
12
12
 
13
13
  const debug = (0, _debug.default)('@automattic/vip:lib:cli:config');
14
- let configFromFile = {};
14
+ let configFromFile;
15
15
  try {
16
16
  // Get `local` config first; this will only exist in dev as it's npmignore-d.
17
17
  configFromFile = require("../../../config/config.local.json");
@@ -21,6 +21,5 @@ try {
21
21
  configFromFile = require("../../../config/config.publish.json");
22
22
  debug('Loaded config data from config.publish.json');
23
23
  }
24
- const config = Object.assign({}, configFromFile);
25
- var _default = config;
24
+ var _default = configFromFile;
26
25
  exports.default = _default;
@@ -1,8 +1,15 @@
1
1
  "use strict";
2
2
 
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.isAlias = isAlias;
7
+ exports.parseEnvAlias = parseEnvAlias;
8
+ exports.parseEnvAliasFromArgv = parseEnvAliasFromArgv;
3
9
  /**
4
10
  * External dependencies
5
11
  */
12
+
6
13
  function isAlias(alias) {
7
14
  return /^@[A-Za-z0-9.-]+$/.test(alias);
8
15
  }
@@ -12,7 +19,7 @@ function parseEnvAlias(alias) {
12
19
  }
13
20
 
14
21
  // Remove the '@'
15
- const stripped = alias.substr(1).toLowerCase();
22
+ const stripped = alias.slice(1).toLowerCase();
16
23
 
17
24
  // in JS, .split() with a limit discards the extra ones, so can't use it
18
25
  // Also convert to lowercase because mixed case environment names would cause problems
@@ -20,7 +27,7 @@ function parseEnvAlias(alias) {
20
27
  let env;
21
28
 
22
29
  // Rejoin the env on '.' (if present), to handle instance names (env.instance-01)
23
- if (rest && rest.length) {
30
+ if (rest.length) {
24
31
  env = rest.join('.');
25
32
  }
26
33
  return {
@@ -47,7 +54,7 @@ function parseEnvAliasFromArgv(processArgv) {
47
54
  }
48
55
 
49
56
  // If we did have an alias, split it up into app/env
50
- const parsedAlias = module.exports.parseEnvAlias(alias);
57
+ const parsedAlias = parseEnvAlias(alias);
51
58
 
52
59
  // Splice out the alias
53
60
  argv.splice(argv.indexOf(alias), 1);
@@ -55,9 +62,4 @@ function parseEnvAliasFromArgv(processArgv) {
55
62
  argv,
56
63
  ...parsedAlias
57
64
  };
58
- }
59
- module.exports = {
60
- isAlias,
61
- parseEnvAlias,
62
- parseEnvAliasFromArgv
63
- };
65
+ }
@@ -4,13 +4,10 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.withError = withError;
7
- var _chalk = _interopRequireDefault(require("chalk"));
7
+ var _chalk = require("chalk");
8
8
  var _env = _interopRequireDefault(require("../../lib/env"));
9
9
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- /**
11
- *
12
- * @format
13
- */
10
+ // @format
14
11
 
15
12
  /**
16
13
  * External dependencies
@@ -21,11 +18,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
18
  */
22
19
 
23
20
  function withError(message) {
24
- console.error(`${_chalk.default.red('Error: ')} ${message.toString().replace(/^Error:\s*/, '')}`);
21
+ console.error(`${(0, _chalk.red)('Error: ')} ${message.toString().replace(/^Error:\s*/, '')}`);
25
22
 
26
23
  // Debug ouput is printed below error output both for information
27
24
  // hierarchy and to make it more likely that the user copies it to their
28
25
  // clipboard when dragging across output.
29
- console.log(`${_chalk.default.yellow('Debug: ')} VIP-CLI v${_env.default.app.version}, Node ${_env.default.node.version}, ${_env.default.os.name} ${_env.default.os.version}`);
26
+ console.log(`${(0, _chalk.yellow)('Debug: ')} VIP-CLI v${_env.default.app.version}, Node ${_env.default.node.version}, ${_env.default.os.name} ${_env.default.os.version}`);
30
27
  process.exit(1);
31
28
  }
@@ -8,7 +8,7 @@ exports.capitalize = capitalize;
8
8
  exports.formatBytes = void 0;
9
9
  exports.formatData = formatData;
10
10
  exports.formatEnvironment = formatEnvironment;
11
- exports.formatSearchReplaceValues = void 0;
11
+ exports.formatSearchReplaceValues = formatSearchReplaceValues;
12
12
  exports.getGlyphForStatus = getGlyphForStatus;
13
13
  exports.isJson = isJson;
14
14
  exports.isJsonObject = isJsonObject;
@@ -16,13 +16,17 @@ exports.keyValue = keyValue;
16
16
  exports.requoteArgs = requoteArgs;
17
17
  exports.table = table;
18
18
  var _chalk = _interopRequireDefault(require("chalk"));
19
+ var _json2csv = require("json2csv");
20
+ var _cliTable = _interopRequireDefault(require("cli-table"));
19
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
20
- /** @format */
22
+ // @format
23
+
21
24
  /**
22
25
  * External dependencies
23
26
  */
27
+
24
28
  function formatData(data, format) {
25
- if (!data || !data.length) {
29
+ if (!data.length) {
26
30
  return '';
27
31
  }
28
32
  switch (format) {
@@ -50,32 +54,26 @@ function ids(data) {
50
54
  if (0 > fields.indexOf('id')) {
51
55
  return 'No ID field found';
52
56
  }
53
- const id = [];
54
- data.forEach(datum => id.push(datum.id));
57
+ const id = data.map(datum => datum.id);
55
58
  return id.join(' ');
56
59
  }
57
60
  function csv(data) {
58
- const {
59
- Parser
60
- } = require('json2csv');
61
61
  const fields = Object.keys(data[0]);
62
- const parser = new Parser({
62
+ const parser = new _json2csv.Parser({
63
63
  fields: formatFields(fields)
64
64
  });
65
65
  return parser.parse(data);
66
66
  }
67
67
  function table(data) {
68
- const Table = require('cli-table');
69
68
  const fields = Object.keys(data[0]);
70
- const dataTable = new Table({
69
+ const dataTable = new _cliTable.default({
71
70
  head: formatFields(fields),
72
71
  style: {
73
72
  head: ['blueBright']
74
73
  }
75
74
  });
76
75
  data.forEach(datum => {
77
- const row = [];
78
- fields.forEach(field => row.push(datum[field]));
76
+ const row = fields.map(field => datum[field].toString());
79
77
  dataTable.push(row);
80
78
  });
81
79
  return dataTable.toString();
@@ -95,11 +93,15 @@ function keyValue(values) {
95
93
  key,
96
94
  value
97
95
  } of values) {
98
- let formattedValue = value;
96
+ let formattedValue;
99
97
  switch (key.toLowerCase()) {
98
+ // NOSONAR
100
99
  case 'environment':
101
100
  formattedValue = formatEnvironment(value);
102
101
  break;
102
+ default:
103
+ formattedValue = value;
104
+ break;
103
105
  }
104
106
  lines.push(`+ ${key}: ${formattedValue}`);
105
107
  }
@@ -109,7 +111,7 @@ function keyValue(values) {
109
111
  function requoteArgs(args) {
110
112
  return args.map(arg => {
111
113
  if (arg.includes('--') && arg.includes('=') && arg.includes(' ')) {
112
- return arg.replace(/^--(.*)=(.*)$/, '--$1="$2"');
114
+ return arg.replace(/^--([^=]*)=(.*)$/, '--$1="$2"');
113
115
  }
114
116
  if (arg.includes(' ') && !isJsonObject(arg)) {
115
117
  return `"${arg}"`;
@@ -123,10 +125,10 @@ function isJsonObject(str) {
123
125
  function isJson(str) {
124
126
  try {
125
127
  JSON.parse(str);
128
+ return true;
126
129
  } catch (error) {
127
130
  return false;
128
131
  }
129
- return true;
130
132
  }
131
133
  function capitalize(str) {
132
134
  if (typeof str !== 'string' || !str.length) {
@@ -154,8 +156,6 @@ class RunningSprite {
154
156
  exports.RunningSprite = RunningSprite;
155
157
  function getGlyphForStatus(status, runningSprite) {
156
158
  switch (status) {
157
- default:
158
- return '';
159
159
  case 'pending':
160
160
  return '○';
161
161
  case 'running':
@@ -168,24 +168,23 @@ function getGlyphForStatus(status, runningSprite) {
168
168
  return _chalk.default.yellow('✕');
169
169
  case 'skipped':
170
170
  return _chalk.default.green('-');
171
+ default:
172
+ return '';
171
173
  }
172
174
  }
173
175
 
174
176
  // Format Search and Replace values to output
175
- const formatSearchReplaceValues = (values, message) => {
177
+ function formatSearchReplaceValues(values, message) {
176
178
  // Convert single pair S-R values to arrays
177
179
  const searchReplaceValues = typeof values === 'string' ? [values] : values;
178
- const formattedOutput = searchReplaceValues.map(pairs => {
180
+ return searchReplaceValues.map(pairs => {
179
181
  // Turn each S-R pair into its own array, then trim away whitespace
180
182
  const [from, to] = pairs.split(',').map(pair => pair.trim());
181
- const output = message(from, to);
182
- return output;
183
+ return message(from, to);
183
184
  });
184
- return formattedOutput;
185
- };
185
+ }
186
186
 
187
187
  // Format bytes into kilobytes, megabytes, etc based on the size
188
- exports.formatSearchReplaceValues = formatSearchReplaceValues;
189
188
  const formatBytes = (bytes, decimals = 2) => {
190
189
  if (0 === bytes) {
191
190
  return '0 Bytes';
@@ -194,6 +193,6 @@ const formatBytes = (bytes, decimals = 2) => {
194
193
  const dm = decimals < 0 ? 0 : decimals;
195
194
  const sizes = ['bytes', 'KB', 'MB', 'GB', 'TB'];
196
195
  const idx = Math.floor(Math.log(bytes) / Math.log(bytesMultiplier));
197
- return parseFloat((bytes / Math.pow(bytesMultiplier, idx)).toFixed(dm)) + ' ' + sizes[idx];
196
+ return `${parseFloat((bytes / Math.pow(bytesMultiplier, idx)).toFixed(dm))} ${sizes[idx]}`;
198
197
  };
199
198
  exports.formatBytes = formatBytes;
@@ -6,13 +6,16 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.ProgressTracker = void 0;
7
7
  var _singleLineLog = require("single-line-log");
8
8
  var _format = require("../../lib/cli/format");
9
- /** @format */
9
+ // @format
10
+
10
11
  /**
11
12
  * External dependencies
12
13
  */
14
+
13
15
  /**
14
16
  * Internal dependencies
15
17
  */
18
+
16
19
  const PRINT_INTERVAL = process.env.DEBUG ? 5000 : 200; // How often the report is printed. Mainly affects the "spinner" animation.
17
20
  const COMPLETED_STEP_SLUGS = ['success', 'skipped'];
18
21
  class ProgressTracker {
@@ -27,6 +30,7 @@ class ProgressTracker {
27
30
  constructor(steps) {
28
31
  this.runningSprite = new _format.RunningSprite();
29
32
  this.hasFailure = false;
33
+ this.hasPrinted = false;
30
34
  this.stepsFromCaller = this.mapSteps(steps);
31
35
  this.stepsFromServer = new Map();
32
36
  this.prefix = '';
@@ -127,9 +131,9 @@ class ProgressTracker {
127
131
  }
128
132
  }
129
133
  allStepsSucceeded() {
130
- return ![...this.getSteps().values()].some(({
134
+ return [...this.getSteps().values()].every(({
131
135
  status
132
- }) => status !== 'success');
136
+ }) => status === 'success');
133
137
  }
134
138
  setStatusForStepId(stepId, status) {
135
139
  const step = this.stepsFromCaller.get(stepId);
@@ -9,17 +9,18 @@ var _format = require("./format");
9
9
  /**
10
10
  * External dependencies
11
11
  */
12
+
12
13
  /**
13
14
  * Internal dependencies
14
15
  */
16
+
15
17
  async function confirm(values, message, skipPrompt = false) {
16
18
  console.log((0, _format.keyValue)(values));
17
19
  if (!skipPrompt) {
18
20
  const answer = await (0, _enquirer.prompt)({
19
21
  type: 'confirm',
20
22
  name: 'confirm',
21
- message,
22
- default: false
23
+ message
23
24
  });
24
25
  return answer.confirm;
25
26
  }