diff --git a/.eslintrc.js b/.eslintrc.js index 31e3bfa06..ae4cd70a4 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -5,6 +5,7 @@ module.exports = { es2017: true, mocha: true, }, + ignorePatterns: ['**/*.mjs'], extends: [ 'eslint:recommended', 'plugin:jsdoc/recommended', diff --git a/package.json b/package.json index 6ba4b5bb5..907388941 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "3.2.0", "description": "SDK for Auth0 API v2", "main": "src/index.js", + "module": "src/index.mjs", "sideEffects": false, "files": [ "src" diff --git a/src/index.mjs b/src/index.mjs new file mode 100644 index 000000000..ed4f486ba --- /dev/null +++ b/src/index.mjs @@ -0,0 +1,11 @@ +import { createRequire } from 'module'; +const require = createRequire(import.meta.url); +/** + * Simple facade for consuming a REST API endpoint. + * + * @external RestClient + * {@link https://github.com/ngonzalvez/rest-facade} + */ +export const ManagementClient = require('./management'); +export const AuthenticationClient = require('./auth'); +export default { ManagementClient, AuthenticationClient }