@automattic/vip 2.35.0 → 2.36.0-dev.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.
Files changed (66) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/CONTRIBUTING.md +1 -1
  3. package/dist/bin/vip-app-list.js +1 -1
  4. package/dist/bin/vip-app.js +1 -0
  5. package/dist/bin/vip-cache-purge-url.js +0 -5
  6. package/dist/bin/vip-cache.js +0 -5
  7. package/dist/bin/vip-config-envvar-delete.js +6 -5
  8. package/dist/bin/vip-config-envvar-get-all.js +6 -5
  9. package/dist/bin/vip-config-envvar-get.js +6 -5
  10. package/dist/bin/vip-config-envvar-list.js +6 -5
  11. package/dist/bin/vip-config-envvar-set.js +0 -5
  12. package/dist/bin/vip-config-envvar.js +0 -5
  13. package/dist/bin/vip-config-software-get.js +0 -5
  14. package/dist/bin/vip-config-software-update.js +2 -5
  15. package/dist/bin/vip-config-software.js +0 -5
  16. package/dist/bin/vip-config.js +2 -0
  17. package/dist/bin/vip-dev-env-create.js +2 -5
  18. package/dist/bin/vip-dev-env-destroy.js +0 -5
  19. package/dist/bin/vip-dev-env-exec.js +2 -5
  20. package/dist/bin/vip-dev-env-import-media.js +0 -5
  21. package/dist/bin/vip-dev-env-import-sql.js +0 -5
  22. package/dist/bin/vip-dev-env-import.js +0 -5
  23. package/dist/bin/vip-dev-env-info.js +0 -5
  24. package/dist/bin/vip-dev-env-list.js +0 -5
  25. package/dist/bin/vip-dev-env-logs.js +1 -1
  26. package/dist/bin/vip-dev-env-shell.js +8 -1
  27. package/dist/bin/vip-dev-env-start.js +0 -5
  28. package/dist/bin/vip-dev-env-stop.js +0 -5
  29. package/dist/bin/vip-dev-env-sync-sql.js +0 -5
  30. package/dist/bin/vip-dev-env-sync.js +0 -5
  31. package/dist/bin/vip-dev-env-update.js +4 -5
  32. package/dist/bin/vip-dev-env.js +0 -5
  33. package/dist/bin/vip-export-sql.js +0 -5
  34. package/dist/bin/vip-import-media-abort.js +0 -5
  35. package/dist/bin/vip-import-media-status.js +0 -5
  36. package/dist/bin/vip-import-media.js +0 -5
  37. package/dist/bin/vip-import-sql-status.js +1 -5
  38. package/dist/bin/vip-import-sql.js +10 -5
  39. package/dist/bin/vip-import-validate-files.js +1 -0
  40. package/dist/bin/vip-import-validate-sql.js +2 -0
  41. package/dist/bin/vip-logs.js +11 -0
  42. package/dist/bin/vip-phpmyadmin.js +53 -0
  43. package/dist/bin/vip-search-replace.js +0 -5
  44. package/dist/bin/vip-slowlogs.js +1 -0
  45. package/dist/bin/vip-sync.js +1 -2
  46. package/dist/bin/vip-validate-preflight.js +13 -0
  47. package/dist/bin/vip-wp.js +1 -2
  48. package/dist/bin/vip.js +8 -1
  49. package/dist/commands/backup-db.js +9 -5
  50. package/dist/commands/dev-env-import-sql.js +4 -5
  51. package/dist/commands/dev-env-sync-sql.js +8 -5
  52. package/dist/commands/export-sql.js +9 -5
  53. package/dist/commands/phpmyadmin.js +91 -0
  54. package/dist/lib/analytics/clients/pendo.js +4 -0
  55. package/dist/lib/analytics/clients/tracks.js +3 -0
  56. package/dist/lib/analytics/index.js +1 -0
  57. package/dist/lib/backup-storage-availability/backup-storage-availability.js +1 -0
  58. package/dist/lib/cli/command.js +11 -1
  59. package/dist/lib/cli/format.js +1 -0
  60. package/dist/lib/cli/progress.js +9 -0
  61. package/dist/lib/keychain/insecure.js +2 -0
  62. package/dist/lib/media-import/progress.js +8 -1
  63. package/dist/lib/token.js +4 -0
  64. package/helpers/prepublishOnly.js +1 -1
  65. package/npm-shrinkwrap.json +22 -175
  66. package/package.json +4 -6
@@ -1,10 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- /**
4
- *
5
- * @format
6
- */
7
-
8
3
  /**
9
4
  * External dependencies
10
5
  */
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  /**
3
4
  * External dependencies
4
5
  */
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  /**
3
4
  * External dependencies
4
5
  */
@@ -33,7 +34,6 @@ const appQuery = `id,name,environments{
33
34
  await (0, _tracker.trackEvent)('sync_command_execute');
34
35
  try {
35
36
  await api.mutate({
36
- // $FlowFixMe: gql template is not supported by flow
37
37
  mutation: (0, _graphqlTag.default)`
38
38
  mutation SyncEnvironmentMutation($input: AppEnvironmentSyncInput) {
39
39
  syncEnvironment(input: $input) {
@@ -105,7 +105,6 @@ const appQuery = `id,name,environments{
105
105
  // Query the API 1/10 of the time (every 1s)
106
106
  // The rest of the iterations are just for moving the spinner
107
107
  api.query({
108
- // $FlowFixMe: gql template is not supported by flow
109
108
  query: (0, _graphqlTag.default)`
110
109
  query App($id: Int, $sync: Int) {
111
110
  app(id: $id) {
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  /**
3
4
  * External dependencies
4
5
  */
@@ -53,6 +54,10 @@ exports.appQuery = appQuery;
53
54
  let suppressOutput = false;
54
55
  let outputJson = false;
55
56
  let harmoniaArgs = [];
57
+
58
+ /**
59
+ * @param {string[]} messages
60
+ */
56
61
  function logToConsole(...messages) {
57
62
  if (suppressOutput) {
58
63
  return;
@@ -110,6 +115,10 @@ async function getBuildConfiguration(application, environment) {
110
115
  }
111
116
  }
112
117
  }
118
+
119
+ /**
120
+ * @param {string} argv
121
+ */
113
122
  async function vipValidatePreflightCommand(arg, opt) {
114
123
  var _opt$env, _opt$env2, _opt$app, _opt$env3;
115
124
  harmoniaArgs = await validateArgs(opt);
@@ -210,6 +219,10 @@ async function vipValidatePreflightCommand(arg, opt) {
210
219
  setupEvents(harmonia);
211
220
  runHarmonia(harmonia);
212
221
  }
222
+
223
+ /**
224
+ * @param {Harmonia} harmonia
225
+ */
213
226
  function setupEvents(harmonia) {
214
227
  // Register some events handlers
215
228
  harmonia.on('ready', () => {
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  /**
3
4
  * External dependencies
4
5
  */
@@ -98,7 +99,6 @@ const bindStreamEvents = ({
98
99
  const getTokenForCommand = async (appId, envId, command) => {
99
100
  const api = await (0, _api.default)();
100
101
  return api.mutate({
101
- // $FlowFixMe: gql template is not supported by flow
102
102
  mutation: (0, _graphqlTag.default)`
103
103
  mutation TriggerWPCLICommandMutation($input: AppEnvironmentTriggerWPCLICommandInput) {
104
104
  triggerWPCLICommandOnAppEnvironment(input: $input) {
@@ -123,7 +123,6 @@ const getTokenForCommand = async (appId, envId, command) => {
123
123
  const cancelCommand = async guid => {
124
124
  const api = await (0, _api.default)();
125
125
  return api.mutate({
126
- // $FlowFixMe: gql template is not supported by flow
127
126
  mutation: (0, _graphqlTag.default)`
128
127
  mutation cancelWPCLICommand($input: CancelWPCLICommandInput) {
129
128
  cancelWPCLICommand(input: $input) {
package/dist/bin/vip.js CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env node
2
+
2
3
  /**
3
4
  * External dependencies
4
5
  */
@@ -28,9 +29,15 @@ if (_config.default && _config.default.environment !== 'production') {
28
29
  const tokenURL = 'https://dashboard.wpvip.com/me/cli/token';
29
30
  const runCmd = async function () {
30
31
  const cmd = (0, _command.default)();
31
- cmd.command('logout', 'Logout from your current session').command('app', 'List and modify your VIP applications').command('backup', 'Generate a backup for VIP applications').command('cache', 'Manage page cache for your VIP applications').command('config', 'Set configuration for your VIP applications').command('dev-env', 'Use local dev-environment').command('export', 'Export data from your VIP application').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('slowlogs', 'Get slowlogs from your VIP applications').command('sync', 'Sync production to a development environment').command('whoami', 'Display details about the currently logged-in user').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
32
+ cmd.command('logout', 'Logout from your current session').command('app', 'List and modify your VIP applications').command('backup', 'Generate a backup for VIP applications').command('cache', 'Manage page cache for your VIP applications').command('config', 'Set configuration for your VIP applications').command('dev-env', 'Use local dev-environment').command('export', 'Export data from your VIP application').command('import', 'Import media or SQL files into your VIP applications').command('logs', 'Get logs from your VIP applications').command('search-replace', 'Perform search and replace tasks on files').command('slowlogs', 'Get slowlogs from your VIP applications').command('phpmyadmin', 'Open PHPMyAdmin console for your VIP application database').command('sync', 'Sync production to a development environment').command('whoami', 'Display details about the currently logged-in user').command('validate', 'Validate your VIP application and environment').command('wp', 'Run WP CLI commands against an environment');
32
33
  cmd.argv(process.argv);
33
34
  };
35
+
36
+ /**
37
+ * @param {any[]} argv
38
+ * @param {any[]} params
39
+ * @returns {boolean}
40
+ */
34
41
  function doesArgvHaveAtLeastOneParam(argv, params) {
35
42
  return argv.some(arg => params.includes(arg));
36
43
  }
@@ -14,11 +14,6 @@ var _format = require("../lib/cli/format");
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
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
17
- /**
18
- *
19
- * @format
20
- */
21
-
22
17
  /**
23
18
  * External dependencies
24
19
  */
@@ -99,10 +94,19 @@ async function createBackupJob(appId, envId) {
99
94
 
100
95
  // Library for a possible command in the future: vip backup db @app.env
101
96
  class BackupDBCommand {
97
+ app;
98
+ env;
99
+ job;
100
+ jobStatus;
101
+ jobAge;
102
+ backupName;
103
+ silent;
102
104
  steps = {
103
105
  PREPARE: 'prepare',
104
106
  GENERATE: 'generate'
105
107
  };
108
+ track;
109
+ progressTracker;
106
110
  constructor(app, env, trackerFn = async () => {}) {
107
111
  this.app = app;
108
112
  this.env = env;
@@ -12,11 +12,6 @@ var _devEnvironmentLando = require("../lib/dev-environment/dev-environment-lando
12
12
  var _userError = _interopRequireDefault(require("../lib/user-error"));
13
13
  var _sql = require("../lib/validations/sql");
14
14
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
15
- /**
16
- *
17
- * @format
18
- */
19
-
20
15
  /**
21
16
  * External dependencies
22
17
  */
@@ -26,6 +21,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
26
21
  */
27
22
 
28
23
  class DevEnvImportSQLCommand {
24
+ fileName;
25
+ options;
26
+ slug;
27
+ trackingInfo;
29
28
  constructor(fileName, options, slug) {
30
29
  this.fileName = fileName;
31
30
  this.options = options;
@@ -1,10 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- /**
4
- *
5
- * @format
6
- */
7
-
8
3
  /**
9
4
  * External dependencies
10
5
  */
@@ -69,6 +64,14 @@ async function extractSiteUrls(sqlFile) {
69
64
  });
70
65
  }
71
66
  class DevEnvSyncSQLCommand {
67
+ app;
68
+ env;
69
+ slug;
70
+ tmpDir;
71
+ siteUrls;
72
+ searchReplaceMap;
73
+ track;
74
+
72
75
  /**
73
76
  * Creates a new instance of the command
74
77
  *
@@ -19,11 +19,6 @@ var _backupStorageAvailability = require("../lib/backup-storage-availability/bac
19
19
  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); }
20
20
  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; }
21
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
- /**
23
- *
24
- * @format
25
- */
26
-
27
22
  /**
28
23
  * External dependencies
29
24
  */
@@ -187,6 +182,13 @@ async function createExportJob(appId, envId, backupId) {
187
182
  * Class representing an export command workflow
188
183
  */
189
184
  class ExportSQLCommand {
185
+ app;
186
+ env;
187
+ downloadLink;
188
+ progressTracker;
189
+ outputFile;
190
+ generateBackup;
191
+ confirmEnoughStorageHook;
190
192
  steps = {
191
193
  PREPARE: 'prepare',
192
194
  CREATE: 'create',
@@ -194,6 +196,8 @@ class ExportSQLCommand {
194
196
  CONFIRM_ENOUGH_STORAGE: 'confirmEnoughStorage',
195
197
  DOWNLOAD: 'download'
196
198
  };
199
+ track;
200
+
197
201
  /**
198
202
  * Creates an instance of SQLExportCommand
199
203
  *
@@ -0,0 +1,91 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PhpMyAdminCommand = exports.GENERATE_PHP_MY_ADMIN_URL_MUTATION = void 0;
7
+ var _graphqlTag = _interopRequireDefault(require("graphql-tag"));
8
+ var _opn = _interopRequireDefault(require("opn"));
9
+ var _api = _interopRequireWildcard(require("../lib/api"));
10
+ var exit = _interopRequireWildcard(require("../lib/cli/exit"));
11
+ 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); }
12
+ 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; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ /**
15
+ * External dependencies
16
+ */
17
+
18
+ /**
19
+ * Internal dependencies
20
+ */
21
+
22
+ const GENERATE_PHP_MY_ADMIN_URL_MUTATION = (0, _graphqlTag.default)`
23
+ mutation GeneratePhpMyAdminAccess($input: GeneratePhpMyAdminAccessInput) {
24
+ generatePHPMyAdminAccess(input: $input) {
25
+ expiresAt
26
+ url
27
+ }
28
+ }
29
+ `;
30
+ exports.GENERATE_PHP_MY_ADMIN_URL_MUTATION = GENERATE_PHP_MY_ADMIN_URL_MUTATION;
31
+ async function generatePhpMyAdminAccess(envId) {
32
+ var _resp$data;
33
+ // Disable global error handling so that we can handle errors ourselves
34
+ (0, _api.disableGlobalGraphQLErrorHandling)();
35
+ const api = await (0, _api.default)();
36
+ const resp = await api.mutate({
37
+ mutation: GENERATE_PHP_MY_ADMIN_URL_MUTATION,
38
+ variables: {
39
+ input: {
40
+ environmentId: envId
41
+ }
42
+ }
43
+ });
44
+
45
+ // Re-enable global error handling
46
+ (0, _api.enableGlobalGraphQLErrorHandling)();
47
+
48
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
49
+ return resp === null || resp === void 0 || (_resp$data = resp.data) === null || _resp$data === void 0 || (_resp$data = _resp$data.generatePHPMyAdminAccess) === null || _resp$data === void 0 ? void 0 : _resp$data.url;
50
+ }
51
+ class PhpMyAdminCommand {
52
+ app;
53
+ env;
54
+ silent;
55
+ track;
56
+ constructor(app, env, trackerFn = async () => {}) {
57
+ this.app = app;
58
+ this.env = env;
59
+ this.track = trackerFn;
60
+ }
61
+ log(msg) {
62
+ if (this.silent) {
63
+ return;
64
+ }
65
+ console.log(msg);
66
+ }
67
+ async run(silent = false) {
68
+ this.silent = silent;
69
+ if (!this.env.id) {
70
+ exit.withError('No environment was specified');
71
+ }
72
+ this.log('Generating PhpMyAdmin URL...');
73
+ let url;
74
+ try {
75
+ url = await generatePhpMyAdminAccess(this.env.id);
76
+ } catch (err) {
77
+ const error = err;
78
+ void this.track('error', {
79
+ error_type: 'generate_pma_url',
80
+ error_message: error.message,
81
+ stack: error.stack
82
+ });
83
+ exit.withError(`Failed to generate PhpMyAdmin URL: ${error.message}`);
84
+ }
85
+ void (0, _opn.default)(url, {
86
+ wait: false
87
+ });
88
+ this.log('PhpMyAdmin is opened in your default browser.');
89
+ }
90
+ }
91
+ exports.PhpMyAdminCommand = PhpMyAdminCommand;
@@ -20,6 +20,10 @@ const debug = (0, _debug.default)('@automattic/vip:analytics:clients:pendo');
20
20
  * Pendo analytics client.
21
21
  */
22
22
  class Pendo {
23
+ eventPrefix;
24
+ userAgent;
25
+ userId;
26
+ context;
23
27
  static ENDPOINT = '/pendo';
24
28
  constructor(options) {
25
29
  this.eventPrefix = options.eventPrefix;
@@ -28,6 +28,9 @@ const validEventOrPropNamePattern = /^[a-z_][a-z0-9_]*$/;
28
28
  // TODO: add batch support (can include multiples in `events` array)
29
29
 
30
30
  class Tracks {
31
+ eventPrefix;
32
+ userAgent;
33
+ baseParams;
31
34
  static ENDPOINT = 'https://public-api.wordpress.com/rest/v1.1/tracks/record';
32
35
  constructor(userId, userType, eventPrefix, env) {
33
36
  this.eventPrefix = eventPrefix;
@@ -27,6 +27,7 @@ const client_info = {
27
27
  /* eslint-enable camelcase */
28
28
 
29
29
  class Analytics {
30
+ clients;
30
31
  constructor(clients) {
31
32
  this.clients = clients;
32
33
  }
@@ -15,6 +15,7 @@ var _dockerMachineNotFoundError = require("./docker-machine-not-found-error");
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
  const oneGiBInBytes = 1024 * 1024 * 1024;
17
17
  class BackupStorageAvailability {
18
+ archiveSize;
18
19
  constructor(archiveSize) {
19
20
  this.archiveSize = archiveSize;
20
21
  }
@@ -27,9 +27,11 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
27
27
  /**
28
28
  * External dependencies
29
29
  */
30
+
30
31
  /**
31
32
  * Internal dependencies
32
33
  */
34
+
33
35
  function uncaughtError(err) {
34
36
  // Error raised when trying to write to an already closed stream
35
37
  if (err.code === 'EPIPE') {
@@ -166,7 +168,6 @@ _args.default.argv = async function (argv, cb) {
166
168
  await (0, _tracker.trackEvent)('command_appcontext_list_fetch');
167
169
  try {
168
170
  res = await api.query({
169
- // $FlowFixMe: gql template is not supported by flow
170
171
  query: (0, _graphqlTag.default)`query Apps( $first: Int, $after: String ) {
171
172
  apps( first: $first, after: $after ) {
172
173
  total
@@ -301,6 +302,7 @@ _args.default.argv = async function (argv, cb) {
301
302
 
302
303
  // Prompt for confirmation if necessary
303
304
  if (_opts.requireConfirm && !options.force) {
305
+ /** @type {Tuple[]} */
304
306
  const info = [];
305
307
  if (options.app) {
306
308
  info.push({
@@ -467,6 +469,10 @@ _args.default.argv = async function (argv, cb) {
467
469
  }
468
470
  return options;
469
471
  };
472
+
473
+ /**
474
+ * @returns {Error|undefined}
475
+ */
470
476
  function validateOpts(opts) {
471
477
  if (opts.app) {
472
478
  if (typeof opts.app !== 'string' && typeof opts.app !== 'number') {
@@ -485,6 +491,10 @@ function validateOpts(opts) {
485
491
  }
486
492
  }
487
493
  }
494
+
495
+ /**
496
+ * @returns {args}
497
+ */
488
498
  function _default(opts) {
489
499
  _opts = Object.assign({
490
500
  appContext: false,
@@ -141,6 +141,7 @@ function capitalize(str) {
141
141
  const RUNNING_SPRITE_GLYPHS = ['⠋', '⠙', '⠹', '⠸', '⠼', '⠴', '⠦', '⠧', '⠇', '⠏'];
142
142
  exports.RUNNING_SPRITE_GLYPHS = RUNNING_SPRITE_GLYPHS;
143
143
  class RunningSprite {
144
+ count;
144
145
  constructor() {
145
146
  this.count = 0;
146
147
  }
@@ -28,13 +28,22 @@ let StepStatus = /*#__PURE__*/function (StepStatus) {
28
28
  exports.StepStatus = StepStatus;
29
29
  const COMPLETED_STEP_SLUGS = [StepStatus.SUCCESS, StepStatus.SKIPPED];
30
30
  class ProgressTracker {
31
+ hasFailure;
32
+ hasPrinted;
33
+ printInterval;
34
+
31
35
  // Track the state of each step
36
+ stepsFromCaller;
37
+ stepsFromServer;
32
38
 
33
39
  // Spinnerz go brrrr
40
+ runningSprite;
34
41
 
35
42
  // This gets printed before the step status
43
+ prefix;
36
44
 
37
45
  // This gets printed after the step status
46
+ suffix;
38
47
 
39
48
  /**
40
49
  * This determines from which step should we display the steps
@@ -15,6 +15,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
15
15
  */
16
16
 
17
17
  class Insecure {
18
+ file;
19
+ configstore;
18
20
  constructor(file) {
19
21
  this.file = file;
20
22
  this.configstore = new _configstore.default(this.file);
@@ -18,12 +18,19 @@ var _format = require("../../lib/cli/format");
18
18
  const PRINT_INTERVAL = process.env.DEBUG ? 5000 : 200; // How often the report is printed. Mainly affects the "spinner" animation.
19
19
 
20
20
  class MediaImportProgressTracker {
21
+ hasFailure;
22
+ hasPrinted;
23
+ printInterval;
24
+ status;
25
+
21
26
  // Spinnerz go brrrr
27
+ runningSprite;
22
28
 
23
29
  // This gets printed before the step status
30
+ prefix;
24
31
 
25
32
  // This gets printed after the step status
26
-
33
+ suffix;
27
34
  constructor(status) {
28
35
  this.runningSprite = new _format.RunningSprite();
29
36
  this.hasFailure = false;
package/dist/lib/token.js CHANGED
@@ -21,6 +21,10 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
21
21
  const SERVICE = 'vip-go-cli';
22
22
  exports.SERVICE = SERVICE;
23
23
  class Token {
24
+ _raw;
25
+ _id;
26
+ iat;
27
+ exp;
24
28
  constructor(token) {
25
29
  if (!token) {
26
30
  return;
@@ -7,7 +7,7 @@ const config = {
7
7
  gitAllowDirty: true,
8
8
  gitEnforceBranch: 'trunk',
9
9
  nodeEnforceVersion: packageJSON.engines.node,
10
- testBeforePublish: true,
10
+ testBeforePublish: process.env.CI !== 'true',
11
11
  };
12
12
 
13
13
  const releaseTag = process.env.npm_config_tag ?? 'latest';