diff --git a/bin/index.ts b/bin/index.ts index 398c184..14d0b5d 100755 --- a/bin/index.ts +++ b/bin/index.ts @@ -2,7 +2,7 @@ import { Command as CommanderCommand } from 'commander' import inquirer from 'inquirer' import inquirerPrompt from 'inquirer-autocomplete-prompt' import chalk from 'chalk' -import packages from '../package.json' +import packages from '../package.json' assert { type: 'json' } import { CommandInvoker, diff --git a/index.ts b/index.ts deleted file mode 100644 index 562bd94..0000000 --- a/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env node - -import('./bin/index') diff --git a/package.json b/package.json index 04143be..5fb7274 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,12 @@ "name": "envolve", "version": "1.1.3", "description": "Envolve CLI is a powerful tool for managing environment variables in your projects. It allows you to easily create, update, compare, and sync environment files across different services.", - "main": "index.ts", + "main": "bin/index.ts", + "type": "module", "scripts": { "build": "tsc", "lint": "tsc --noEmit && eslint \"**/*.{js,ts}\" --quiet --fix", - "serve": "node dist/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" }, diff --git a/tsconfig.json b/tsconfig.json index 64bf7c5..8f445e7 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,10 +1,10 @@ { "compilerOptions": { - "module": "commonjs", + "module": "ESNext", "strictNullChecks": true, "esModuleInterop": true, "allowSyntheticDefaultImports": true, - "target": "es6", + "target": "ES6", "noImplicitAny": true, "moduleResolution": "node", "sourceMap": true,