feat: Complete PlatformServiceMixin migration and enhance tooling

- Update migration assessment: All database operations now migrated (60/60 components)
- Enhance validate-migration.sh: Improved pattern detection and reporting
- Upgrade format-markdown.sh: Add parallel processing and CI-friendly output
- Clean up legacy logging patterns in ContactImportView.vue
- Remove unused imports and optimize PlatformServiceMixin
- Streamline deep links service and utility functions

Migration Status: 100% database operations complete, only 4 logging cleanup files remain
This commit is contained in:
Matthew Raymer
2025-07-16 12:28:17 +00:00
parent 06972b9674
commit 5c7f58b5c8
8 changed files with 463 additions and 42 deletions

View File

@@ -34,7 +34,6 @@ import { PlatformServiceFactory } from "../services/PlatformServiceFactory";
import { IIdentifier } from "@veramo/core";
import { DEFAULT_ROOT_DERIVATION_PATH } from "./crypto";
// Self-contained utility functions to replace databaseUtil dependencies
function parseJsonField<T>(value: unknown, defaultValue: T): T {
if (typeof value === "string") {
try {

View File

@@ -147,8 +147,6 @@ export class DeepLinkHandler {
params[routeConfig.paramKey ?? "id"] = pathParams.join("/");
}
// Note: Logging removed to eliminate databaseUtil dependency
// Deep link parsing debug info can be added back using PlatformServiceMixin if needed
return { path: routePath, params, query };
}
@@ -174,7 +172,6 @@ export class DeepLinkHandler {
const validRoute = routeSchema.parse(path) as DeepLinkRoute;
routeName = ROUTE_MAP[validRoute].name;
} catch (error) {
// Log the invalid route attempt - using console.error instead of databaseUtil
console.error(`[DeepLink] Invalid route path: ${path}`);
// Redirect to error page with information about the invalid link
@@ -261,7 +258,6 @@ export class DeepLinkHandler {
await this.validateAndRoute(path, sanitizedParams, query);
} catch (error) {
const deepLinkError = error as DeepLinkError;
// Log the error using console.error instead of databaseUtil
console.error(
`[DeepLink] Error (${deepLinkError.code}): ${deepLinkError.details}`,
);

View File

@@ -124,7 +124,7 @@ export const PlatformServiceMixin = {
/**
* Access to in-memory logs array
* Provides direct access to memoryLogs without requiring databaseUtil import
* Provides direct access to memoryLogs
*/
$memoryLogs(): string[] {
return _memoryLogs;
@@ -159,7 +159,7 @@ export const PlatformServiceMixin = {
methods: {
// =================================================
// SELF-CONTAINED UTILITY METHODS (no databaseUtil dependency)
// SELF-CONTAINED UTILITY METHODS
// =================================================
/**

View File

@@ -1,7 +1,6 @@
/**
* Enhanced logger with self-contained database logging
*
* Eliminates circular dependency with databaseUtil by using direct database access.
* Provides comprehensive logging with console and database output.
*
* @author Matthew Raymer

View File

@@ -256,10 +256,6 @@ import { createNotifyHelpers, TIMEOUTS } from "@/utils/notify";
// TODO: Testing Required - Database Operations + Logging Migration to PlatformServiceMixin
// Priority: Medium | Migrated: 2025-07-06 | Author: Matthew Raymer
//
// MIGRATION DETAILS: Migrated from legacy databaseUtil + logConsoleAndDb to PlatformServiceMixin
// - Replaced logConsoleAndDb() with this.$logAndConsole()
// - Replaced databaseUtil.* calls with mixin methods
// - Removed PlatformServiceFactory direct usage in favor of mixin
//
// TESTING NEEDED: Contact import functionality
// 1. Test contact import via URL: /contact-import?contacts=[{"did":"did:example:123","name":"Alice"}]