@hubspot/cli 7.4.6-experimental.0 → 7.4.8-experimental.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/lang/en.lyaml CHANGED
@@ -589,7 +589,6 @@ en:
589
589
  componentsToBeMigrated: "The following component types will be migrated: {{ components }}"
590
590
  componentsThatWillNotBeMigrated: "[NOTE] These component types are not yet supported for migration but will be available later: {{ components }}"
591
591
  errors:
592
- noApps: "No apps found in account {{ accountId }}"
593
592
  noAppsEligible: "No apps in account {{ accountId }} are currently migratable"
594
593
  noAccountConfig: "There is no account associated with {{ accountId }} in the config file. Please choose another account and try again, or authenticate {{ accountId }} using {{ authCommand }}."
595
594
  invalidAccountTypeTitle: "{{#bold}}Developer account not targeted{{/bold}}"
@@ -606,7 +605,6 @@ en:
606
605
  proceed: 'Would you like to proceed?'
607
606
  spinners:
608
607
  beginningMigration: "Beginning migration"
609
- migrationStarted: "Migration started"
610
608
  unableToStartMigration: "Unable to begin migration"
611
609
  finishingMigration: "Wrapping up migration"
612
610
  migrationComplete: "Migration completed"
@@ -42,11 +42,6 @@ async function handleMigrationSetup(derivedAccountId, options) {
42
42
  const { data } = await (0, migrate_1.listAppsForMigration)(derivedAccountId);
43
43
  const { migratableApps, unmigratableApps } = data;
44
44
  const allApps = [...migratableApps, ...unmigratableApps].filter(app => !app.projectName);
45
- if (allApps.length === 0) {
46
- throw new Error((0, lang_1.i18n)(`commands.project.subcommands.migrateApp.errors.noApps`, {
47
- accountId: derivedAccountId,
48
- }));
49
- }
50
45
  if (migratableApps.length === 0) {
51
46
  const reasons = unmigratableApps.map(app => `${chalk_1.default.bold(app.appName)}: ${getUnmigratableReason(app.unmigratableReason)}`);
52
47
  throw new Error(`${(0, lang_1.i18n)(`commands.project.subcommands.migrateApp.errors.noAppsEligible`, {
@@ -132,18 +127,22 @@ async function beginMigration(derivedAccountId, appId, platformVersion) {
132
127
  return;
133
128
  }
134
129
  const { componentsRequiringUids } = pollResponse;
135
- SpinniesManager_1.default.succeed('beginningMigration', {
136
- text: (0, lang_1.i18n)('commands.project.subcommands.migrateApp.spinners.migrationStarted'),
137
- });
130
+ SpinniesManager_1.default.remove('beginningMigration');
138
131
  if (Object.values(componentsRequiringUids).length !== 0) {
139
132
  for (const [componentId, component] of Object.entries(componentsRequiringUids)) {
133
+ const { componentHint, componentType } = component;
140
134
  uidMap[componentId] = await (0, promptUtils_1.inputPrompt)((0, lang_1.i18n)('commands.project.subcommands.migrateApp.prompt.uidForComponent', {
141
- componentName: component.componentHint || component.componentType,
135
+ componentName: componentHint
136
+ ? `${componentHint} [${componentType}]`
137
+ : componentType,
142
138
  }), {
143
139
  validate: (uid) => {
144
140
  const result = (0, project_parsing_lib_1.validateUid)(uid);
145
141
  return result === undefined ? true : result;
146
142
  },
143
+ defaultAnswer: (componentHint || '')
144
+ .toLowerCase()
145
+ .replace(/[^a-z0-9_]/g, ''),
147
146
  });
148
147
  }
149
148
  }
@@ -140,12 +140,7 @@ async function ensureProjectExists(accountId, projectName, { forceCreate = false
140
140
  return { projectExists: !!project, project };
141
141
  }
142
142
  catch (err) {
143
- // @ts-expect-error
144
- logger_1.logger.log('statusCode', err.status);
145
- const isError = (0, index_1.isSpecifiedError)(err, { statusCode: 404 });
146
- logger_1.logger.log('is404', isError);
147
- logger_1.logger.log('isHubspotHttpError', (0, index_1.isHubSpotHttpError)(err));
148
- if (isError) {
143
+ if ((0, index_1.isSpecifiedError)(err, { statusCode: 404 })) {
149
144
  let shouldCreateProject = forceCreate;
150
145
  if (allowCreate && !shouldCreateProject) {
151
146
  const promptKey = uploadCommand ? 'createPromptUpload' : 'createPrompt';
@@ -185,7 +180,7 @@ async function ensureProjectExists(accountId, projectName, { forceCreate = false
185
180
  return { projectExists: false };
186
181
  }
187
182
  }
188
- // logError(err, new ApiErrorContext({ accountId }));
183
+ (0, index_2.logError)(err, new index_2.ApiErrorContext({ accountId }));
189
184
  process.exit(exitCodes_1.EXIT_CODES.ERROR);
190
185
  }
191
186
  }
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@hubspot/cli",
3
- "version": "7.4.6-experimental.0",
3
+ "version": "7.4.8-experimental.0",
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",
7
7
  "dependencies": {
8
- "@hubspot/local-dev-lib": "3.5.1-beta.0",
8
+ "@hubspot/local-dev-lib": "3.5.1",
9
9
  "@hubspot/project-parsing-lib": "0.1.5",
10
10
  "@hubspot/serverless-dev-runtime": "7.0.2",
11
11
  "@hubspot/theme-preview-dev-server": "0.0.10",