Auto-commit 2026-04-29 16:31
This commit is contained in:
2
node_modules/next-auth/client/__tests__/client-provider.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/client-provider.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=client-provider.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/client-provider.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/client-provider.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"client-provider.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/client-provider.test.js"],"names":[],"mappings":""}
|
||||
2
node_modules/next-auth/client/__tests__/csrf.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/csrf.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=csrf.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/csrf.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/csrf.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"csrf.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/csrf.test.js"],"names":[],"mappings":""}
|
||||
78
node_modules/next-auth/client/__tests__/helpers/mocks.d.ts
generated
vendored
Normal file
78
node_modules/next-auth/client/__tests__/helpers/mocks.d.ts
generated
vendored
Normal file
@@ -0,0 +1,78 @@
|
||||
export namespace mockSession {
|
||||
const ok: boolean;
|
||||
namespace user {
|
||||
const image: null;
|
||||
const name: string;
|
||||
const email: string;
|
||||
}
|
||||
const expires: number;
|
||||
}
|
||||
export namespace mockProviders {
|
||||
const ok_1: boolean;
|
||||
export { ok_1 as ok };
|
||||
export namespace github {
|
||||
export const id: string;
|
||||
const name_1: string;
|
||||
export { name_1 as name };
|
||||
export const type: string;
|
||||
export const signinUrl: string;
|
||||
export const callbackUrl: string;
|
||||
}
|
||||
export namespace credentials {
|
||||
const id_1: string;
|
||||
export { id_1 as id };
|
||||
const name_2: string;
|
||||
export { name_2 as name };
|
||||
const type_1: string;
|
||||
export { type_1 as type };
|
||||
export const authorize: null;
|
||||
const credentials_1: null;
|
||||
export { credentials_1 as credentials };
|
||||
}
|
||||
export namespace email_1 {
|
||||
const id_2: string;
|
||||
export { id_2 as id };
|
||||
const type_2: string;
|
||||
export { type_2 as type };
|
||||
const name_3: string;
|
||||
export { name_3 as name };
|
||||
}
|
||||
export { email_1 as email };
|
||||
}
|
||||
export namespace mockCSRFToken {
|
||||
const ok_2: boolean;
|
||||
export { ok_2 as ok };
|
||||
export const csrfToken: string;
|
||||
}
|
||||
export namespace mockGithubResponse {
|
||||
const ok_3: boolean;
|
||||
export { ok_3 as ok };
|
||||
export const status: number;
|
||||
export const url: string;
|
||||
}
|
||||
export namespace mockCredentialsResponse {
|
||||
const ok_4: boolean;
|
||||
export { ok_4 as ok };
|
||||
const status_1: number;
|
||||
export { status_1 as status };
|
||||
const url_1: string;
|
||||
export { url_1 as url };
|
||||
}
|
||||
export namespace mockEmailResponse {
|
||||
const ok_5: boolean;
|
||||
export { ok_5 as ok };
|
||||
const status_2: number;
|
||||
export { status_2 as status };
|
||||
const url_2: string;
|
||||
export { url_2 as url };
|
||||
}
|
||||
export namespace mockSignOutResponse {
|
||||
const ok_6: boolean;
|
||||
export { ok_6 as ok };
|
||||
const status_3: number;
|
||||
export { status_3 as status };
|
||||
const url_3: string;
|
||||
export { url_3 as url };
|
||||
}
|
||||
export const server: import("msw/lib/glossary-58eca5a8").z;
|
||||
//# sourceMappingURL=mocks.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/helpers/mocks.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/helpers/mocks.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mocks.d.ts","sourceRoot":"","sources":["../../../src/client/__tests__/helpers/mocks.js"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkEA,2DAuBC"}
|
||||
3
node_modules/next-auth/client/__tests__/helpers/utils.d.ts
generated
vendored
Normal file
3
node_modules/next-auth/client/__tests__/helpers/utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
export function getBroadcastEvents(): any;
|
||||
export function printFetchCalls(mockCalls: any): any;
|
||||
//# sourceMappingURL=utils.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/helpers/utils.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/helpers/utils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/client/__tests__/helpers/utils.js"],"names":[],"mappings":"AAAA,0CAOC;AAED,qDAIC"}
|
||||
2
node_modules/next-auth/client/__tests__/providers.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/providers.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=providers.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/providers.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/providers.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"providers.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/providers.test.js"],"names":[],"mappings":""}
|
||||
2
node_modules/next-auth/client/__tests__/session.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/session.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=session.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/session.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/session.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"session.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/session.test.js"],"names":[],"mappings":""}
|
||||
2
node_modules/next-auth/client/__tests__/sign-in.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/sign-in.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=sign-in.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/sign-in.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/sign-in.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sign-in.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/sign-in.test.js"],"names":[],"mappings":""}
|
||||
2
node_modules/next-auth/client/__tests__/sign-out.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/sign-out.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=sign-out.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/sign-out.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/sign-out.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"sign-out.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/sign-out.test.js"],"names":[],"mappings":""}
|
||||
2
node_modules/next-auth/client/__tests__/use-session-hook.test.d.ts
generated
vendored
Normal file
2
node_modules/next-auth/client/__tests__/use-session-hook.test.d.ts
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
export {};
|
||||
//# sourceMappingURL=use-session-hook.test.d.ts.map
|
||||
1
node_modules/next-auth/client/__tests__/use-session-hook.test.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/__tests__/use-session-hook.test.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"use-session-hook.test.d.ts","sourceRoot":"","sources":["../../src/client/__tests__/use-session-hook.test.js"],"names":[],"mappings":""}
|
||||
60
node_modules/next-auth/client/_utils.d.ts
generated
vendored
Normal file
60
node_modules/next-auth/client/_utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,60 @@
|
||||
/// <reference types="node" />
|
||||
import type { IncomingMessage } from "http";
|
||||
import type { LoggerInstance, Session } from "..";
|
||||
export interface AuthClientConfig {
|
||||
baseUrl: string;
|
||||
basePath: string;
|
||||
baseUrlServer: string;
|
||||
basePathServer: string;
|
||||
/** Stores last session response */
|
||||
_session?: Session | null | undefined;
|
||||
/** Used for timestamp since last sycned (in seconds) */
|
||||
_lastSync: number;
|
||||
/**
|
||||
* Stores the `SessionProvider`'s session update method to be able to
|
||||
* trigger session updates from places like `signIn` or `signOut`
|
||||
*/
|
||||
_getSession: (...args: any[]) => any;
|
||||
}
|
||||
export interface CtxOrReq {
|
||||
req?: Partial<IncomingMessage> & {
|
||||
body?: any;
|
||||
};
|
||||
ctx?: {
|
||||
req: Partial<IncomingMessage> & {
|
||||
body?: any;
|
||||
};
|
||||
};
|
||||
}
|
||||
/**
|
||||
* If passed 'appContext' via getInitialProps() in _app.js
|
||||
* then get the req object from ctx and use that for the
|
||||
* req value to allow `fetchData` to
|
||||
* work seemlessly in getInitialProps() on server side
|
||||
* pages *and* in _app.js.
|
||||
*/
|
||||
export declare function fetchData<T = any>(path: string, __NEXTAUTH: AuthClientConfig, logger: LoggerInstance, { ctx, req }?: CtxOrReq): Promise<T | null>;
|
||||
export declare function apiBaseUrl(__NEXTAUTH: AuthClientConfig): string;
|
||||
/** Returns the number of seconds elapsed since January 1, 1970 00:00:00 UTC. */
|
||||
export declare function now(): number;
|
||||
export interface BroadcastMessage {
|
||||
event?: "session";
|
||||
data?: {
|
||||
trigger?: "signout" | "getSession";
|
||||
};
|
||||
clientId: string;
|
||||
timestamp: number;
|
||||
}
|
||||
/**
|
||||
* Inspired by [Broadcast Channel API](https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API)
|
||||
* Only not using it directly, because Safari does not support it.
|
||||
*
|
||||
* https://caniuse.com/?search=broadcastchannel
|
||||
*/
|
||||
export declare function BroadcastChannel(name?: string): {
|
||||
/** Get notified by other tabs/windows. */
|
||||
receive(onReceive: (message: BroadcastMessage) => void): () => void;
|
||||
/** Notify other tabs/windows. */
|
||||
post(message: Record<string, unknown>): void;
|
||||
};
|
||||
//# sourceMappingURL=_utils.d.ts.map
|
||||
1
node_modules/next-auth/client/_utils.d.ts.map
generated
vendored
Normal file
1
node_modules/next-auth/client/_utils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"_utils.d.ts","sourceRoot":"","sources":["../src/client/_utils.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,OAAO,EAAE,MAAM,IAAI,CAAA;AAEjD,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,mCAAmC;IACnC,QAAQ,CAAC,EAAE,OAAO,GAAG,IAAI,GAAG,SAAS,CAAA;IACrC,wDAAwD;IACxD,SAAS,EAAE,MAAM,CAAA;IACjB;;;OAGG;IACH,WAAW,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,GAAG,CAAA;CACrC;AAED,MAAM,WAAW,QAAQ;IACvB,GAAG,CAAC,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG;QAAE,IAAI,CAAC,EAAE,GAAG,CAAA;KAAE,CAAA;IAC/C,GAAG,CAAC,EAAE;QAAE,GAAG,EAAE,OAAO,CAAC,eAAe,CAAC,GAAG;YAAE,IAAI,CAAC,EAAE,GAAG,CAAA;SAAE,CAAA;KAAE,CAAA;CACzD;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,CAAC,GAAG,GAAG,EACrC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,gBAAgB,EAC5B,MAAM,EAAE,cAAc,EACtB,EAAE,GAAG,EAAE,GAAc,EAAE,GAAE,QAAa,GACrC,OAAO,CAAC,CAAC,GAAG,IAAI,CAAC,CAuBnB;AAED,wBAAgB,UAAU,CAAC,UAAU,EAAE,gBAAgB,UAOtD;AAED,gFAAgF;AAChF,wBAAgB,GAAG,WAElB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,CAAC,EAAE,SAAS,CAAA;IACjB,IAAI,CAAC,EAAE;QAAE,OAAO,CAAC,EAAE,SAAS,GAAG,YAAY,CAAA;KAAE,CAAA;IAC7C,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;CAClB;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,SAAqB;IAEtD,0CAA0C;iCACb,gBAAgB,KAAK,IAAI;IAWtD,iCAAiC;kBACnB,OAAO,MAAM,EAAE,OAAO,CAAC;EAgBxC"}
|
||||
113
node_modules/next-auth/client/_utils.js
generated
vendored
Normal file
113
node_modules/next-auth/client/_utils.js
generated
vendored
Normal file
@@ -0,0 +1,113 @@
|
||||
"use strict";
|
||||
|
||||
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.BroadcastChannel = BroadcastChannel;
|
||||
exports.apiBaseUrl = apiBaseUrl;
|
||||
exports.fetchData = fetchData;
|
||||
exports.now = now;
|
||||
var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
|
||||
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
||||
var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
|
||||
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
||||
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
||||
function fetchData(_x, _x2, _x3) {
|
||||
return _fetchData.apply(this, arguments);
|
||||
}
|
||||
function _fetchData() {
|
||||
_fetchData = (0, _asyncToGenerator2.default)(_regenerator.default.mark(function _callee(path, __NEXTAUTH, logger) {
|
||||
var _ref,
|
||||
ctx,
|
||||
_ref$req,
|
||||
req,
|
||||
url,
|
||||
_req$headers,
|
||||
options,
|
||||
res,
|
||||
data,
|
||||
_args = arguments;
|
||||
return _regenerator.default.wrap(function _callee$(_context) {
|
||||
while (1) switch (_context.prev = _context.next) {
|
||||
case 0:
|
||||
_ref = _args.length > 3 && _args[3] !== undefined ? _args[3] : {}, ctx = _ref.ctx, _ref$req = _ref.req, req = _ref$req === void 0 ? ctx === null || ctx === void 0 ? void 0 : ctx.req : _ref$req;
|
||||
url = "".concat(apiBaseUrl(__NEXTAUTH), "/").concat(path);
|
||||
_context.prev = 2;
|
||||
options = {
|
||||
headers: _objectSpread({
|
||||
"Content-Type": "application/json"
|
||||
}, req !== null && req !== void 0 && (_req$headers = req.headers) !== null && _req$headers !== void 0 && _req$headers.cookie ? {
|
||||
cookie: req.headers.cookie
|
||||
} : {})
|
||||
};
|
||||
if (req !== null && req !== void 0 && req.body) {
|
||||
options.body = JSON.stringify(req.body);
|
||||
options.method = "POST";
|
||||
}
|
||||
_context.next = 7;
|
||||
return fetch(url, options);
|
||||
case 7:
|
||||
res = _context.sent;
|
||||
_context.next = 10;
|
||||
return res.json();
|
||||
case 10:
|
||||
data = _context.sent;
|
||||
if (res.ok) {
|
||||
_context.next = 13;
|
||||
break;
|
||||
}
|
||||
throw data;
|
||||
case 13:
|
||||
return _context.abrupt("return", Object.keys(data).length > 0 ? data : null);
|
||||
case 16:
|
||||
_context.prev = 16;
|
||||
_context.t0 = _context["catch"](2);
|
||||
logger.error("CLIENT_FETCH_ERROR", {
|
||||
error: _context.t0,
|
||||
url: url
|
||||
});
|
||||
return _context.abrupt("return", null);
|
||||
case 20:
|
||||
case "end":
|
||||
return _context.stop();
|
||||
}
|
||||
}, _callee, null, [[2, 16]]);
|
||||
}));
|
||||
return _fetchData.apply(this, arguments);
|
||||
}
|
||||
function apiBaseUrl(__NEXTAUTH) {
|
||||
if (typeof window === "undefined") {
|
||||
return "".concat(__NEXTAUTH.baseUrlServer).concat(__NEXTAUTH.basePathServer);
|
||||
}
|
||||
return __NEXTAUTH.basePath;
|
||||
}
|
||||
function now() {
|
||||
return Math.floor(Date.now() / 1000);
|
||||
}
|
||||
function BroadcastChannel() {
|
||||
var name = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : "nextauth.message";
|
||||
return {
|
||||
receive: function receive(onReceive) {
|
||||
var handler = function handler(event) {
|
||||
var _event$newValue;
|
||||
if (event.key !== name) return;
|
||||
var message = JSON.parse((_event$newValue = event.newValue) !== null && _event$newValue !== void 0 ? _event$newValue : "{}");
|
||||
if ((message === null || message === void 0 ? void 0 : message.event) !== "session" || !(message !== null && message !== void 0 && message.data)) return;
|
||||
onReceive(message);
|
||||
};
|
||||
window.addEventListener("storage", handler);
|
||||
return function () {
|
||||
return window.removeEventListener("storage", handler);
|
||||
};
|
||||
},
|
||||
post: function post(message) {
|
||||
if (typeof window === "undefined") return;
|
||||
try {
|
||||
localStorage.setItem(name, JSON.stringify(_objectSpread(_objectSpread({}, message), {}, {
|
||||
timestamp: now()
|
||||
})));
|
||||
} catch (_unused) {}
|
||||
}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user