Skip to content
This repository has been archived by the owner on Apr 19, 2023. It is now read-only.

Commit

Permalink
Distribute code with ES module syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkoops committed May 2, 2022
1 parent 6bd2729 commit 9eba4ee
Show file tree
Hide file tree
Showing 52 changed files with 296 additions and 315 deletions.
5 changes: 5 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"node-option": [
"loader=ts-node/esm"
]
}
151 changes: 67 additions & 84 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 15 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,48 +2,50 @@
"name": "@keycloak/keycloak-admin-client",
"version": "19.0.0-dev.1",
"description": "keycloak admin client",
"type": "module",
"main": "lib/index.js",
"files": [
"lib"
],
"types": "lib/index.d.ts",
"engines": {
"node": "^12.20.0 || ^14.13.1 || >=16.0.0"
},
"scripts": {
"clean": "rimraf lib",
"lint": "tslint --force --format verbose \"src/**/*.ts\" \"test/*\"",
"build": "npm run clean && tsc -p ./tsconfig.release.json --pretty",
"test": "mocha --require ts-node/register --recursive \"test/**/*.spec.ts\"",
"test:subset": "mocha --require ts-node/register --recursive --",
"test:grep": "mocha --require ts-node/register",
"build": "npm run clean && tsc --pretty",
"test": "TS_NODE_PROJECT=tsconfig.test.json mocha --recursive \"test/**/*.spec.ts\"",
"test:subset": "TS_NODE_PROJECT=tsconfig.test.json mocha --recursive --",
"test:grep": "TS_NODE_PROJECT=tsconfig.test.json mocha",
"coverage": "nyc npm run test",
"watch": "npm run build -- --watch",
"watch:test": "npm run test -- --watch",
"prepublishOnly": "npm run build"
},
"dependencies": {
"axios": "^0.27.2",
"camelize-ts": "^1.0.8",
"camelize-ts": "^2.1.1",
"keycloak-js": "^18.0.0",
"lodash": "^4.17.21",
"lodash-es": "^4.17.21",
"query-string": "^7.0.1",
"url-join": "^4.0.0",
"url-template": "^2.0.8"
"url-join": "^5.0.0",
"url-template": "^3.0.0"
},
"devDependencies": {
"@faker-js/faker": "^6.0.0",
"@faker-js/faker": "^6.3.0",
"@types/chai": "^4.2.14",
"@types/lodash": "^4.14.165",
"@types/lodash-es": "^4.17.5",
"@types/mocha": "^9.0.0",
"@types/node": "^17.0.1",
"@types/url-join": "^4.0.0",
"@types/url-template": "^2.0.28",
"chai": "^4.1.2",
"mocha": "^10.0.0",
"nyc": "^15.1.0",
"prettier": "^2.1.2",
"rimraf": "^3.0.2",
"ts-node": "^10.2.1",
"tslint": "^6.1.3",
"typescript": "^4.0.5"
"typescript": "^4.6.4"
},
"author": "wwwy3y3",
"license": "Apache-2.0",
Expand Down
40 changes: 20 additions & 20 deletions src/client.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
import {getToken, Credentials} from './utils/auth';
import {defaultBaseUrl, defaultRealm} from './utils/constants';
import {Cache} from './resources/cache';
import {Users} from './resources/users';
import {Groups} from './resources/groups';
import {Roles} from './resources/roles';
import {Clients} from './resources/clients';
import {Realms} from './resources/realms';
import {ClientScopes} from './resources/clientScopes';
import {ClientPolicies} from './resources/clientPolicies';
import {IdentityProviders} from './resources/identityProviders';
import {Components} from './resources/components';
import {AuthenticationManagement} from './resources/authenticationManagement';
import {ServerInfo} from './resources/serverInfo';
import {WhoAmI} from './resources/whoAmI';
import {AttackDetection} from './resources/attackDetection';
import {AxiosRequestConfig} from 'axios';

import {Sessions} from './resources/sessions';
import {UserStorageProvider} from './resources/userStorageProvider';
import {getToken, Credentials} from './utils/auth.js';
import {defaultBaseUrl, defaultRealm} from './utils/constants.js';
import {Cache} from './resources/cache.js';
import {Users} from './resources/users.js';
import {Groups} from './resources/groups.js';
import {Roles} from './resources/roles.js';
import {Clients} from './resources/clients.js';
import {Realms} from './resources/realms.js';
import {ClientScopes} from './resources/clientScopes.js';
import {ClientPolicies} from './resources/clientPolicies.js';
import {IdentityProviders} from './resources/identityProviders.js';
import {Components} from './resources/components.js';
import {AuthenticationManagement} from './resources/authenticationManagement.js';
import {ServerInfo} from './resources/serverInfo.js';
import {WhoAmI} from './resources/whoAmI.js';
import {AttackDetection} from './resources/attackDetection.js';
import type {AxiosRequestConfig} from 'axios';

import {Sessions} from './resources/sessions.js';
import {UserStorageProvider} from './resources/userStorageProvider.js';
import type {KeycloakInstance, KeycloakInitOptions, KeycloakConfig} from 'keycloak-js';
import {RequestArgs} from './resources/agent';

Expand Down
2 changes: 1 addition & 1 deletion src/defs/adminEventRepresentation.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import AuthDetailsRepresentation from './authDetailsRepresentation';
import type AuthDetailsRepresentation from './authDetailsRepresentation.js';

export default interface AdminEventRepresentation {
authDetails?: AuthDetailsRepresentation;
Expand Down
Loading

0 comments on commit 9eba4ee

Please sign in to comment.