UNPKG

morpheus4j

Version:

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

96 lines 3.63 kB
"use strict"; var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { if (k2 === undefined) k2 = k; var desc = Object.getOwnPropertyDescriptor(m, k); if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { desc = { enumerable: true, get: function() { return m[k]; } }; } Object.defineProperty(o, k2, desc); }) : (function(o, m, k, k2) { if (k2 === undefined) k2 = k; o[k2] = m[k]; })); var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { Object.defineProperty(o, "default", { enumerable: true, value: v }); }) : function(o, v) { o["default"] = v; }); var __importStar = (this && this.__importStar) || function (mod) { if (mod && mod.__esModule) return mod; var result = {}; if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); __setModuleDefault(result, mod); return result; }; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfigFlags = exports.DatabaseFlags = exports.AuthFlags = exports.ConnectionFlags = void 0; const core = __importStar(require("@oclif/core")); const node_path_1 = __importDefault(require("node:path")); const constants_1 = require("./constants"); // Method 1: Sort alphabetically const baseFlags = { configFile: core.Flags.string({ char: 'c', default: node_path_1.default.join(process.cwd(), constants_1.MORPHEUS_FILE_NAME), description: 'Path to the morpheus file (CWD/morpheus.json by default)', }), database: core.Flags.string({ char: 'd', description: `Neo4j database. Env: '${constants_1.EnvKeys.DATABASE}'`, env: constants_1.EnvKeys.DATABASE, }), host: core.Flags.string({ char: 'h', description: `Neo4j host. Env: '${constants_1.EnvKeys.HOST}'`, env: constants_1.EnvKeys.HOST, }), migrationsPath: core.Flags.string({ char: 'm', default: constants_1.DEFAULT_MIGRATIONS_PATH, description: `Migrations path. Env: '${constants_1.EnvKeys.MIGRATIONS_PATH}'`, env: constants_1.EnvKeys.MIGRATIONS_PATH, required: false, }), password: core.Flags.string({ char: 'P', description: `Neo4j password. Env: '${constants_1.EnvKeys.PASSWORD}'`, env: constants_1.EnvKeys.PASSWORD, }), port: core.Flags.integer({ char: 'p', description: `Neo4j port. Env: '${constants_1.EnvKeys.PORT}'`, env: constants_1.EnvKeys.PORT, }), scheme: core.Flags.string({ char: 's', description: `Neo4j scheme. Env: '${constants_1.EnvKeys.SCHEME}'`, env: constants_1.EnvKeys.SCHEME, required: false, }), username: core.Flags.string({ char: 'u', description: `Neo4j username. Env: '${constants_1.EnvKeys.USERNAME}'`, env: constants_1.EnvKeys.USERNAME, }), }; // Method 2: Group flags by purpose and spread them exports.ConnectionFlags = { host: baseFlags.host, port: baseFlags.port, scheme: baseFlags.scheme, }; exports.AuthFlags = { password: baseFlags.password, username: baseFlags.username, }; exports.DatabaseFlags = { database: baseFlags.database, }; exports.ConfigFlags = { configFile: baseFlags.configFile, migrationsPath: baseFlags.migrationsPath, }; //# sourceMappingURL=shared-flags.js.map