diff --git a/changelog.md b/changelog.md index 3ab0937..24acaba 100644 --- a/changelog.md +++ b/changelog.md @@ -6,5 +6,6 @@ ## version - 0.0.2 -- build command added in git-action -- version changed to `0.0.2` \ No newline at end of file +- build command added in git-action & updated in `package.json` file +- version changed to `0.0.2` +- import issue fixed \ No newline at end of file diff --git a/package.json b/package.json index e033212..1235344 100644 --- a/package.json +++ b/package.json @@ -2,11 +2,16 @@ "name": "@presswink/firebase-jwt", "version": "0.0.2", "description": "this package is going to verify firebase access-token without using firebase admin sdk.", - "main": "/dist/index.js", + "main": "./dist/index.js", + "module": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "files": [ + "dist" + ], "type": "commonjs", "scripts": { "test": "mocha --require ts-node/register src/**/*.spec.ts", - "build": "tsc", + "build": "rm -rf ./dist && tsc", "lint": "npx eslint . --fix" }, "repository": { diff --git a/src/index.spec.ts b/src/index.spec.ts index 447bb53..e12e83c 100644 --- a/src/index.spec.ts +++ b/src/index.spec.ts @@ -1,5 +1,5 @@ import Sinon from "sinon"; -import { FirebaseJwt } from "."; +import FirebaseJwt from "."; import jwt, { JwtPayload } from 'jsonwebtoken' import utils from "./utils"; import { expect } from "chai"; diff --git a/src/index.ts b/src/index.ts index 666de35..a342df2 100644 --- a/src/index.ts +++ b/src/index.ts @@ -7,7 +7,7 @@ export interface IFirebaseJwt { decode(jwtString: string):jwt.Jwt | null } -export class FirebaseJwt implements IFirebaseJwt { +export default class FirebaseJwt implements IFirebaseJwt { private projectId: string constructor(projectId: string){