From 1f059326821ef237e944727fc36e59ab7320eded Mon Sep 17 00:00:00 2001 From: Kanad Gupta Date: Wed, 20 Sep 2023 17:34:51 -0500 Subject: [PATCH] fix: update bin entrypoint --- package-lock.json | 2 +- packages/api/.eslintrc | 18 +----------------- packages/api/bin/api | 2 -- packages/api/bin/api.js | 2 ++ packages/api/package.json | 2 +- 5 files changed, 5 insertions(+), 21 deletions(-) delete mode 100755 packages/api/bin/api create mode 100755 packages/api/bin/api.js diff --git a/package-lock.json b/package-lock.json index 830bc1c9..f4e96e30 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22216,7 +22216,7 @@ "validate-npm-package-name": "^5.0.0" }, "bin": { - "api": "bin/api" + "api": "bin/api.js" }, "devDependencies": { "@api/test-utils": "file:../test-utils", diff --git a/packages/api/.eslintrc b/packages/api/.eslintrc index df3506ed..7c7a6bd5 100644 --- a/packages/api/.eslintrc +++ b/packages/api/.eslintrc @@ -1,19 +1,3 @@ { - "extends": ["@readme/eslint-config/esm"], - "overrides": [ - { - "files": ["bin/api"], - "rules": { - "import/extensions": "off", - "import/no-unresolved": "off" - } - }, - { - "files": ["example.js"], - "rules": { - "@typescript-eslint/no-var-requires": "off", - "no-console": "off" - } - } - ] + "extends": ["@readme/eslint-config/esm"] } diff --git a/packages/api/bin/api b/packages/api/bin/api deleted file mode 100755 index b1b75c68..00000000 --- a/packages/api/bin/api +++ /dev/null @@ -1,2 +0,0 @@ -#!/usr/bin/env node -require('../dist/bin'); diff --git a/packages/api/bin/api.js b/packages/api/bin/api.js new file mode 100755 index 00000000..3ad45d9b --- /dev/null +++ b/packages/api/bin/api.js @@ -0,0 +1,2 @@ +#!/usr/bin/env node +import '../dist/src/bin.js'; diff --git a/packages/api/package.json b/packages/api/package.json index ea1e4eb2..9cb12b9b 100644 --- a/packages/api/package.json +++ b/packages/api/package.json @@ -3,7 +3,7 @@ "version": "7.0.0-alpha.1", "description": "Magical SDK generation from an OpenAPI definition 🪄", "bin": { - "api": "./bin/api" + "api": "./bin/api.js" }, "scripts": { "build": "tsc",