@hubspot/cli 7.5.3-beta.1 → 7.5.3-beta.2
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/app/migrate.js +15 -3
- package/package.json +1 -1
package/lib/app/migrate.js
CHANGED
|
@@ -236,9 +236,21 @@ async function beginMigration(derivedAccountId, appId, platformVersion) {
|
|
|
236
236
|
if (Object.values(componentsRequiringUids).length !== 0) {
|
|
237
237
|
for (const [componentId, component] of Object.entries(componentsRequiringUids)) {
|
|
238
238
|
const { componentHint, componentType } = component;
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
239
|
+
// Extract the internal ID from the base64-encoded ComponentExternalId
|
|
240
|
+
let internalId;
|
|
241
|
+
try {
|
|
242
|
+
const decoded = Buffer.from(componentId, 'base64').toString('utf8');
|
|
243
|
+
const parts = decoded.split('$$');
|
|
244
|
+
internalId = parts[1] || componentId;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
247
|
+
// If decoding fails, use the componentId as the internalId
|
|
248
|
+
internalId = componentId;
|
|
249
|
+
}
|
|
250
|
+
const promptText = componentHint
|
|
251
|
+
? `${(0, transform_1.mapToUserFacingType)(componentType)} '${componentHint}' (ID: ${internalId})`
|
|
252
|
+
: `${(0, transform_1.mapToUserFacingType)(componentType)} (ID: ${internalId})`;
|
|
253
|
+
uidMap[componentId] = await (0, promptUtils_1.inputPrompt)(en_1.lib.migrate.prompt.uidForComponent(promptText), {
|
|
242
254
|
validate: (uid) => {
|
|
243
255
|
const result = (0, project_parsing_lib_1.validateUid)(uid);
|
|
244
256
|
return result === undefined ? true : result;
|