diff --git a/package.json b/package.json index b83895d..b2a51f5 100644 --- a/package.json +++ b/package.json @@ -12,16 +12,7 @@ "bugs": { "url": "https://github.com/BorneRecharge/advenir-ts-client/issues" }, - "exports": { - ".": { - "types": "./dist/index.d.ts", - "default": "./dist/index.js" - }, - "./types": { - "types": "./dist/types.d.ts", - "default": "./dist/types.js" - } - }, + "main": "./dist/index.js", "files": [ "dist" ], @@ -43,6 +34,7 @@ "path": "./node_modules/cz-conventional-changelog" } }, + "types": "./dist/index.d.ts", "dependencies": { "cheerio": "^1.0.0-rc.12" }, diff --git a/src/index.ts b/src/index.ts index 4424cd2..e11e1bf 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,6 +10,8 @@ import { } from './types'; import { associate, chunks, extractCookie, extractFromBody } from './lib/utils'; +export * from './types'; + const toOperationBody = ( userId: string, stations: Station[], diff --git a/tsconfig.json b/tsconfig.json index cfa3fe2..da08d6d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,7 +4,7 @@ /* Basic Options */ // "incremental": true, /* Enable incremental compilation */ - "target": "es6" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, + "target": "ES2021" /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019', 'ES2020', or 'ESNEXT'. */, "module": "commonjs" /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', 'es2020', or 'ESNext'. */, // "lib": [], /* Specify library files to be included in the compilation. */ // "allowJs": true, /* Allow javascript files to be compiled. */ @@ -12,13 +12,13 @@ // "jsx": "preserve", /* Specify JSX code generation: 'preserve', 'react-native', 'react', 'react-jsx' or 'react-jsxdev'. */ "declaration": true /* Generates corresponding '.d.ts' file. */, // "declarationMap": true, /* Generates a sourcemap for each corresponding '.d.ts' file. */ - // "sourceMap": true, /* Generates corresponding '.map' file. */ + "sourceMap": true, /* Generates corresponding '.map' file. */ // "outFile": "./", /* Concatenate and emit output to single file. */ "outDir": "./dist/" /* Redirect output structure to the directory. */, - // "rootDir": "./", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ + "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ // "composite": true, /* Enable project compilation */ // "tsBuildInfoFile": "./", /* Specify file to store incremental compilation information */ - // "removeComments": true, /* Do not emit comments to output. */ + "removeComments": true, /* Do not emit comments to output. */ // "noEmit": true, /* Do not emit outputs. */ // "importHelpers": true, /* Import emit helpers from 'tslib'. */ // "downlevelIteration": true, /* Provide full support for iterables in 'for-of', spread, and destructuring when targeting 'ES5' or 'ES3'. */ @@ -68,5 +68,6 @@ "skipLibCheck": true /* Skip type checking of declaration files. */, "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */ }, - "include": ["src", "test"] + "include": ["src", "test"], + "exclude": ["node_modules", "**/*.spec.ts"] }