UNPKG

morpheus4j

Version:

Morpheus is a migration tool for Neo4j. It aims to be a simple and intuitive way to migrate your database.

29 lines (28 loc) 1.38 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const base_command_1 = require("../base-command"); const connection_1 = require("../neo4j/connection"); const file_service_1 = require("../services/file.service"); const info_service_1 = require("../services/info.service"); const neo4j_repository_1 = require("../services/neo4j.repository"); class Info extends base_command_1.BaseCommand { static description = `Info up migration-related database objects Removes all Morpheus migration metadata including nodes, relationships, and optionally constraints. Use with caution as this will reset the migration history.`; static examples = ['<%= config.bin %> info', '<%= config.bin %> info --config ./custom-config.json']; async run() { try { const config = this.getConfig(); const connection = await (0, connection_1.getDatabaseConnection)(config); const fileService = new file_service_1.FileService(config); const repository = new neo4j_repository_1.Repository(connection); await new info_service_1.InfoService(repository, fileService).getInfo(); await connection.close(); } catch (error) { this.error(error instanceof Error ? error.message : String(error)); } } } exports.default = Info; //# sourceMappingURL=info.js.map