🐛 fix: update migration script import

This commit is contained in:
Khaled FERJANI
2025-10-15 14:06:37 +02:00
parent 0ec85f226c
commit 33ad0aab0d
2 changed files with 8 additions and 4 deletions
@@ -162,7 +162,9 @@ const purgeIndexesCommand: yargs.CommandModule<unknown, unknown> = {
console.log(`\n✅ File migrated successfully: ${fileObject.name}`);
} else {
console.log(
`[DRY-RUN] Would migrate ${user.email_canonical} for slug ${sanitizeSlug(userId)} file: ${fileObject.name}`,
`[DRY-RUN] Would migrate ${user.email_canonical} for slug ${sanitizeSlug(
userId,
)} file: ${fileObject.name}`,
);
}
} catch (error) {
@@ -3,7 +3,7 @@ import runWithLoggerLevel from "../../utils/run-with-logger-level";
import globalResolver from "../../../services/global-resolver";
import User from "../../../services/user/entities/user";
import yargs from "yargs";
import { createCozyInstance } from "./utils";
import { createCozyInstance, sanitizeSlug } from "./utils";
import { getLDAPUserMobile } from "./utils/ldap";
const migrateUsersCommand: yargs.CommandModule<unknown, unknown> = {
@@ -79,8 +79,10 @@ const migrateUsersCommand: yargs.CommandModule<unknown, unknown> = {
}
} else {
console.log(
`[DRY-RUN] Would create Cozy instance for user ${user.email_canonical} and slug ${sanitizeSlug(userId)} with the following params`,
userObject
`[DRY-RUN] Would create Cozy instance for user ${
user.email_canonical
} and slug ${sanitizeSlug(userId)} with the following params`,
userObject,
);
}
}