@theshelf/authentication 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import type { Session } from './types';
1
+ import type { Session } from './types.js';
2
2
  export interface IdentityProvider {
3
3
  get connected(): boolean;
4
4
  connect(): Promise<void>;
@@ -1,3 +1,3 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class LoginFailed extends AuthenticationError {
3
3
  }
@@ -1,3 +1,3 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class LoginFailed extends AuthenticationError {
3
3
  }
@@ -1,4 +1,4 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class NotConnected extends AuthenticationError {
3
3
  constructor(message?: string);
4
4
  }
@@ -1,4 +1,4 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class NotConnected extends AuthenticationError {
3
3
  constructor(message) {
4
4
  super(message ?? 'Identity provider not connected');
@@ -1,4 +1,4 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class UnknownImplementation extends AuthenticationError {
3
3
  constructor(name: string);
4
4
  }
@@ -1,4 +1,4 @@
1
- import AuthenticationError from './AuthenticationError';
1
+ import AuthenticationError from './AuthenticationError.js';
2
2
  export default class UnknownImplementation extends AuthenticationError {
3
3
  constructor(name) {
4
4
  super(`Unknown authentication implementation: ${name}`);
@@ -1,3 +1,3 @@
1
- import type { IdentityProvider } from './definitions/interfaces';
1
+ import type { IdentityProvider } from './definitions/interfaces.js';
2
2
  declare const _default: IdentityProvider;
3
3
  export default _default;
@@ -1,5 +1,5 @@
1
- import UnknownImplementation from './errors/UnknownImplementation';
2
- import createOpenID from './implementations/openid/create';
1
+ import UnknownImplementation from './errors/UnknownImplementation.js';
2
+ import createOpenID from './implementations/openid/create.js';
3
3
  const implementations = new Map([
4
4
  ['openid', createOpenID],
5
5
  ]);
@@ -1,5 +1,5 @@
1
- import type { IdentityProvider } from '../../definitions/interfaces';
2
- import type { Session } from '../../definitions/types';
1
+ import type { IdentityProvider } from '../../definitions/interfaces.js';
2
+ import type { Session } from '../../definitions/types.js';
3
3
  type OpenIDConfiguration = {
4
4
  issuer: string;
5
5
  clientId: string;
@@ -1,6 +1,6 @@
1
1
  import { allowInsecureRequests, authorizationCodeGrant, buildAuthorizationUrlWithPAR, calculatePKCECodeChallenge, discovery, fetchUserInfo, randomPKCECodeVerifier, refreshTokenGrant, tokenRevocation } from 'openid-client';
2
- import LoginFailed from '../../errors/LoginFailed';
3
- import NotConnected from '../../errors/NotConnected';
2
+ import LoginFailed from '../../errors/LoginFailed.js';
3
+ import NotConnected from '../../errors/NotConnected.js';
4
4
  export default class OpenID {
5
5
  #providerConfiguration;
6
6
  #clientConfiguration;
@@ -1,2 +1,2 @@
1
- import OpenID from './OpenID';
1
+ import OpenID from './OpenID.js';
2
2
  export default function create(): OpenID;
@@ -1,4 +1,4 @@
1
- import OpenID from './OpenID';
1
+ import OpenID from './OpenID.js';
2
2
  export default function create() {
3
3
  const issuer = process.env.OPENID_ISSUER ?? 'undefined';
4
4
  const clientId = process.env.OPENID_CLIENT_ID ?? 'undefined';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from './definitions/interfaces';
2
- export * from './definitions/types';
3
- export { default as AuthenticationError } from './errors/AuthenticationError';
4
- export { default as NotConnected } from './errors/NotConnected';
5
- export { default as UnknownImplementation } from './errors/UnknownImplementation';
6
- export { default } from './implementation';
1
+ export * from './definitions/interfaces.js';
2
+ export * from './definitions/types.js';
3
+ export { default as AuthenticationError } from './errors/AuthenticationError.js';
4
+ export { default as NotConnected } from './errors/NotConnected.js';
5
+ export { default as UnknownImplementation } from './errors/UnknownImplementation.js';
6
+ export { default } from './implementation.js';
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- export * from './definitions/interfaces';
2
- export * from './definitions/types';
3
- export { default as AuthenticationError } from './errors/AuthenticationError';
4
- export { default as NotConnected } from './errors/NotConnected';
5
- export { default as UnknownImplementation } from './errors/UnknownImplementation';
6
- export { default } from './implementation';
1
+ export * from './definitions/interfaces.js';
2
+ export * from './definitions/types.js';
3
+ export { default as AuthenticationError } from './errors/AuthenticationError.js';
4
+ export { default as NotConnected } from './errors/NotConnected.js';
5
+ export { default as UnknownImplementation } from './errors/UnknownImplementation.js';
6
+ export { default } from './implementation.js';
package/package.json CHANGED
@@ -1,8 +1,11 @@
1
1
  {
2
2
  "name": "@theshelf/authentication",
3
3
  "private": false,
4
- "version": "0.0.2",
4
+ "version": "0.0.4",
5
5
  "type": "module",
6
+ "repository": {
7
+ "url": "https://github.com/MaskingTechnology/theshelf"
8
+ },
6
9
  "scripts": {
7
10
  "build": "tsc",
8
11
  "clean": "rimraf dist",