diff --git a/.DS_Store b/.DS_Store index 710500b..0718a88 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/bin/index.ts b/bin/index.ts index 7bdd24e..fef9f83 100755 --- a/bin/index.ts +++ b/bin/index.ts @@ -5,9 +5,10 @@ import inquirerPrompt from 'inquirer-autocomplete-prompt' import chalk from 'chalk' import packages from '../package.json' assert { type: 'json' } -import CommandFactory from '../lib/command/CommandFactory' -import type Command from '../lib/command/Command' -import CommandInvoker from '../lib/command/CommandInvoker' +import CommandFactory from '../lib/command/commandFactory' + +import type Command from '../lib/command/command' +import CommandInvoker from '../lib/command/commandInvoker' import { CommandTypes } from '../lib/const' const program = new CommanderCommand() diff --git a/lib/command/CommandInvoker.ts b/lib/command/CommandInvoker.ts index 7e77957..581b3ab 100644 --- a/lib/command/CommandInvoker.ts +++ b/lib/command/CommandInvoker.ts @@ -1,4 +1,4 @@ -import type Command from './Command' +import type Command from './command' // eslint-disable-next-line @typescript-eslint/no-extraneous-class export default class CommandInvoker { diff --git a/lib/command/commandFactory.ts b/lib/command/commandFactory.ts index ffa3788..a7ddfb6 100644 --- a/lib/command/commandFactory.ts +++ b/lib/command/commandFactory.ts @@ -1,12 +1,12 @@ import { CommandTypes } from '../const' -import type Command from './Command' -import CompareCommand from './commandTypes/CompareCommand' -import LsCommand from './commandTypes/LsCommand' -import RestoreCommand from './commandTypes/RestoreCommand' -import RevertCommand from './commandTypes/RevertCommand' -import SyncCommand from './commandTypes/SyncCommand' -import UpdateAllCommand from './commandTypes/UpdateAllCommand' -import UpdateCommand from './commandTypes/UpdateCommand' +import type Command from './command' +import CompareCommand from './commandTypes/compareCommand' +import LsCommand from './commandTypes/lsCommand' +import RestoreCommand from './commandTypes/restoreCommand' +import RevertCommand from './commandTypes/revertCommand' +import SyncCommand from './commandTypes/syncCommand' +import UpdateAllCommand from './commandTypes/updateAllCommand' +import UpdateCommand from './commandTypes/updateCommand' export default class CommandFactory { createCommand (commandType: number): Command | null { diff --git a/lib/command/commandTypes/CompareCommand.ts b/lib/command/commandTypes/CompareCommand.ts index 648d814..f3d7185 100644 --- a/lib/command/commandTypes/CompareCommand.ts +++ b/lib/command/commandTypes/CompareCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { compareEnvFiles } from '../../handler/envHandler' import { getEnvFilesRecursively } from '../../handler/fileHandler' import Table from 'cli-table3' diff --git a/lib/command/commandTypes/LsCommand.ts b/lib/command/commandTypes/LsCommand.ts index cb1a1f5..6e4481f 100644 --- a/lib/command/commandTypes/LsCommand.ts +++ b/lib/command/commandTypes/LsCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { getValuesInEnv } from '../../handler/envHandler' import { getEnvFilesRecursively } from '../../handler/fileHandler' import Table from 'cli-table3' diff --git a/lib/command/commandTypes/RestoreCommand.ts b/lib/command/commandTypes/RestoreCommand.ts index d07ee21..ed2ca84 100644 --- a/lib/command/commandTypes/RestoreCommand.ts +++ b/lib/command/commandTypes/RestoreCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { restoreEnvFile } from '../../handler/envHandler' import chalk from 'chalk' import { consola } from 'consola' diff --git a/lib/command/commandTypes/RevertCommand.ts b/lib/command/commandTypes/RevertCommand.ts index 781ab52..3b9bddc 100644 --- a/lib/command/commandTypes/RevertCommand.ts +++ b/lib/command/commandTypes/RevertCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { updateEnvFile, getUniqueEnvNames } from '../../handler/envHandler' import { getEnvFilesRecursively } from '../../handler/fileHandler' import { getEnvVersions } from '../../handler/historyHandler' diff --git a/lib/command/commandTypes/SyncCommand.ts b/lib/command/commandTypes/SyncCommand.ts index 3331498..ee24333 100644 --- a/lib/command/commandTypes/SyncCommand.ts +++ b/lib/command/commandTypes/SyncCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { syncEnvFile } from '../../handler/envHandler' import chalk from 'chalk' import { consola } from 'consola' diff --git a/lib/command/commandTypes/UpdateAllCommand.ts b/lib/command/commandTypes/UpdateAllCommand.ts index 8c65f5e..c4ef8b3 100644 --- a/lib/command/commandTypes/UpdateAllCommand.ts +++ b/lib/command/commandTypes/UpdateAllCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { updateAllEnvFile, promptForEnvVariable } from '../../handler/envHandler' import chalk from 'chalk' import inquirer from 'inquirer' diff --git a/lib/command/commandTypes/UpdateCommand.ts b/lib/command/commandTypes/UpdateCommand.ts index e88580e..9d954ff 100644 --- a/lib/command/commandTypes/UpdateCommand.ts +++ b/lib/command/commandTypes/UpdateCommand.ts @@ -1,4 +1,4 @@ -import Command from '../Command' +import Command from '../command' import { getUniqueEnvNames, updateEnvFile } from '../../handler/envHandler' import { getEnvFilesRecursively } from '../../handler/fileHandler' import chalk from 'chalk' diff --git a/package-lock.json b/package-lock.json index 7766589..410f75e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "table": "^6.8.1" }, "bin": { - "envolve": "node --no-warnings --experimental-specifier-resolution=node dist/bin/index.js" + "envolve": "dist/bin/index.js" }, "devDependencies": { "@types/eslint": "^8.44.6", diff --git a/package.json b/package.json index 2ae36b0..2c676e6 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "scripts": { "build": "tsc", "lint": "tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix", - "serve": "node dist/bin/index.js", + "serve": "node --no-warnings --experimental-specifier-resolution=node dist/bin/index.js", "start": "tsc && npm run serve", "test": "jest --forceExit --verbose --detectOpenHandles --coverage --coverageReporters=text-summary" }, @@ -52,6 +52,6 @@ "typescript": "^5.2.2" }, "bin": { - "envolve": "./dist/bin/index.js" + "envolve": ".start-envolve.sh" } } diff --git a/start-envolve.sh b/start-envolve.sh new file mode 100644 index 0000000..96b3dd3 --- /dev/null +++ b/start-envolve.sh @@ -0,0 +1,2 @@ +#!/bin/bash +exec node --experimental-specifier-resolution=node ./dist/bin/index.js "$@" diff --git a/tsconfig.json b/tsconfig.json index 8f445e7..68f0f59 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -18,6 +18,6 @@ ] } }, - "include": ["lib/**/*.ts", "bin/*.ts", "index.ts", "tests/**/*.ts"], + "include": ["lib/**/*.ts","lib/**/**/*.ts", "bin/*.ts", "index.ts", "tests/**/*.ts"], "exclude": ["node_modules" , "dist"] } \ No newline at end of file