@hubspot/cli 7.7.16-experimental.7 → 7.7.16-experimental.9

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.
@@ -103,22 +103,24 @@ async function handler(args) {
103
103
  });
104
104
  process.exit(exitCodes_1.EXIT_CODES.ERROR);
105
105
  }
106
- // HACK: The status endpoint sometimes returns an early success status.
107
- // Sleep for an extra 5 seconds to make sure the sync is actually complete.
108
- await new Promise(resolve => setTimeout(resolve, 5000));
109
- try {
110
- // Attempt to generate a new personal access key for the test account now that gate sync is complete.
111
- const { data } = await (0, developerTestAccounts_1.generateDeveloperTestAccountPersonalAccessKey)(derivedAccountId, testAccountId);
112
- if (data.personalAccessKey && data.personalAccessKey) {
113
- jsonOutput.personalAccessKey = data.personalAccessKey;
106
+ if (formatOutputAsJson) {
107
+ // HACK: The status endpoint sometimes returns an early success status.
108
+ // Sleep for an extra 6 minutes to make sure the sync is actually complete.
109
+ await new Promise(resolve => setTimeout(resolve, 360000));
110
+ try {
111
+ // Attempt to generate a new personal access key for the test account now that gate sync is complete.
112
+ const { data } = await (0, developerTestAccounts_1.generateDeveloperTestAccountPersonalAccessKey)(derivedAccountId, testAccountId);
113
+ if (data.personalAccessKey && data.personalAccessKey) {
114
+ jsonOutput.personalAccessKey = data.personalAccessKey;
115
+ }
116
+ }
117
+ catch (err) {
118
+ (0, errorHandlers_1.debugError)(err);
119
+ SpinniesManager_1.default.fail('createTestAccount', {
120
+ text: en_1.commands.testAccount.create.polling.pakFailure,
121
+ });
122
+ process.exit(exitCodes_1.EXIT_CODES.ERROR);
114
123
  }
115
- }
116
- catch (err) {
117
- (0, errorHandlers_1.debugError)(err);
118
- SpinniesManager_1.default.fail('createTestAccount', {
119
- text: en_1.commands.testAccount.create.polling.pakFailure,
120
- });
121
- process.exit(exitCodes_1.EXIT_CODES.ERROR);
122
124
  }
123
125
  SpinniesManager_1.default.succeed('createTestAccount', {
124
126
  text: en_1.commands.testAccount.create.polling.success(testAccountConfig.accountName, testAccountId),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.7.16-experimental.7",
3
+ "version": "7.7.16-experimental.9",
4
4
  "description": "The official CLI for developing on HubSpot",
5
5
  "license": "Apache-2.0",
6
6
  "repository": "https://github.com/HubSpot/hubspot-cli",