@auditauth/next 0.2.0-beta.1 → 0.2.0-beta.2
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.
- package/dist/facade/createAuditAuth.d.ts +2 -2
- package/dist/facade/createAuditAuth.js +3 -3
- package/dist/facade/index.d.ts +1 -1
- package/dist/facade/index.js +1 -1
- package/dist/guard.js +1 -1
- package/dist/helpers.js +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/index.js +5 -5
- package/dist/request.js +3 -3
- package/dist/sdk.d.ts +2 -2
- package/dist/sdk.js +2 -2
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { NextRequest } from 'next/server';
|
|
2
|
-
import { NextResponse } from 'next/server';
|
|
1
|
+
import type { NextRequest } from 'next/server.js';
|
|
2
|
+
import { NextResponse } from 'next/server.js';
|
|
3
3
|
import type { AuditAuthConfig, SessionUser } from '@auditauth/core';
|
|
4
4
|
import type { AuditAuthTokenPayload } from '@auditauth/node';
|
|
5
5
|
type AuditAuthNextFacade = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { cookies } from 'next/headers';
|
|
2
|
-
import { AuditAuthNext } from '../sdk';
|
|
3
|
-
import { SETTINGS } from '../settings';
|
|
1
|
+
import { cookies } from 'next/headers.js';
|
|
2
|
+
import { AuditAuthNext } from '../sdk.js';
|
|
3
|
+
import { SETTINGS } from '../settings.js';
|
|
4
4
|
function createAuditAuthNext(config) {
|
|
5
5
|
const base = new URL(config.baseUrl);
|
|
6
6
|
async function createInstance() {
|
package/dist/facade/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './createAuditAuth';
|
|
1
|
+
export * from './createAuditAuth.js';
|
package/dist/facade/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './createAuditAuth';
|
|
1
|
+
export * from './createAuditAuth.js';
|
package/dist/guard.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
3
|
import { createContext, useContext, useEffect, useMemo, useState } from "react";
|
|
4
|
-
import { SETTINGS } from
|
|
4
|
+
import { SETTINGS } from './settings.js';
|
|
5
5
|
const AuthContext = createContext(null);
|
|
6
6
|
const useAuditAuth = () => {
|
|
7
7
|
const ctx = useContext(AuthContext);
|
package/dist/helpers.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* -------------------------------------------------------------------------- */
|
|
2
2
|
/* CLIENT SHORTCUTS */
|
|
3
3
|
/* -------------------------------------------------------------------------- */
|
|
4
|
-
import { SETTINGS } from
|
|
4
|
+
import { SETTINGS } from './settings.js';
|
|
5
5
|
const login = () => {
|
|
6
6
|
window.location.href = SETTINGS.bff.paths.login;
|
|
7
7
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { AuditAuthNext } from './sdk';
|
|
2
|
-
export { AuditAuthGuard, useAuditAuth } from './guard';
|
|
3
|
-
export { login, logout, goToPortal } from './helpers';
|
|
4
|
-
export { auditauthFetch } from './request';
|
|
5
|
-
export type * from './types';
|
|
6
|
-
export * from './facade';
|
|
1
|
+
export { AuditAuthNext } from './sdk.js';
|
|
2
|
+
export { AuditAuthGuard, useAuditAuth } from './guard.js';
|
|
3
|
+
export { login, logout, goToPortal } from './helpers.js';
|
|
4
|
+
export { auditauthFetch } from './request.js';
|
|
5
|
+
export type * from './types.js';
|
|
6
|
+
export * from './facade/index.js';
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { AuditAuthNext } from './sdk';
|
|
2
|
-
export { AuditAuthGuard, useAuditAuth } from './guard';
|
|
3
|
-
export { login, logout, goToPortal } from './helpers';
|
|
4
|
-
export { auditauthFetch } from './request';
|
|
5
|
-
export * from './facade';
|
|
1
|
+
export { AuditAuthNext } from './sdk.js';
|
|
2
|
+
export { AuditAuthGuard, useAuditAuth } from './guard.js';
|
|
3
|
+
export { login, logout, goToPortal } from './helpers.js';
|
|
4
|
+
export { auditauthFetch } from './request.js';
|
|
5
|
+
export * from './facade/index.js';
|
package/dist/request.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use server';
|
|
2
|
-
import { cookies } from
|
|
3
|
-
import { SETTINGS } from
|
|
4
|
-
import { headers } from 'next/headers';
|
|
2
|
+
import { cookies } from 'next/headers.js';
|
|
3
|
+
import { SETTINGS } from './settings.js';
|
|
4
|
+
import { headers } from 'next/headers.js';
|
|
5
5
|
import { refreshTokens } from "@auditauth/core";
|
|
6
6
|
const getRequestOrigin = async () => {
|
|
7
7
|
const h = await headers();
|
package/dist/sdk.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from
|
|
2
|
-
import { CookieAdapter } from
|
|
1
|
+
import { NextRequest, NextResponse } from 'next/server.js';
|
|
2
|
+
import type { CookieAdapter } from './types.js';
|
|
3
3
|
import { AuditAuthConfig, SessionUser } from '@auditauth/core';
|
|
4
4
|
import { AuditAuthTokenPayload } from "@auditauth/node";
|
|
5
5
|
declare class AuditAuthNext {
|
package/dist/sdk.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
'use server';
|
|
2
|
-
import { NextResponse } from
|
|
3
|
-
import { SETTINGS } from
|
|
2
|
+
import { NextResponse } from 'next/server.js';
|
|
3
|
+
import { SETTINGS } from './settings.js';
|
|
4
4
|
import { buildAuthUrl, authorizeCode, revokeSession, buildPortalUrl, refreshTokens, sendMetrics, } from '@auditauth/core';
|
|
5
5
|
import { verifyRequest } from "@auditauth/node";
|
|
6
6
|
class AuditAuthNext {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@auditauth/next",
|
|
3
|
-
"version": "0.2.0-beta.
|
|
3
|
+
"version": "0.2.0-beta.2",
|
|
4
4
|
"description": "AuditAuth NextJS SDK",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Nimibyte",
|
|
@@ -48,8 +48,8 @@
|
|
|
48
48
|
"react-dom": ">=18"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@auditauth/core": "^0.2.0-beta.
|
|
52
|
-
"@auditauth/node": "^0.2.0-beta.
|
|
51
|
+
"@auditauth/core": "^0.2.0-beta.2",
|
|
52
|
+
"@auditauth/node": "^0.2.0-beta.2"
|
|
53
53
|
},
|
|
54
54
|
"devDependencies": {
|
|
55
55
|
"typescript": "^5.9.0",
|