@frontegg/nextjs 7.0.11 → 7.0.12-alpha.5281257968
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/CHANGELOG.md +9 -0
- package/api/index.js +1 -3
- package/api/index.js.map +1 -1
- package/api/utils.d.ts +1 -2
- package/api/utils.js +5 -3
- package/api/utils.js.map +1 -1
- package/common/FronteggBaseProvider.js +7 -6
- package/common/FronteggBaseProvider.js.map +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/sdkVersion.js +1 -1
- package/sdkVersion.js.map +1 -1
- package/utils/fronteggLogger/index.js +1 -1
- package/utils/fronteggLogger/index.js.map +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
## [7.0.12](https://github.com/frontegg/frontegg-nextjs/compare/v7.0.11...v7.0.12) (2023-6-15)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### NextJS Wrapper 7.0.12:
|
|
7
|
+
- FR-12250 - add support to frontegg hooks inside custom components
|
|
8
|
+
- FR-12112 - Fix headers for NodeJS +v18.1
|
|
9
|
+
- FR-11482 - support null for custom component again
|
|
1
10
|
# Change Log
|
|
2
11
|
|
|
3
12
|
## [7.0.11](https://github.com/frontegg/frontegg-nextjs/compare/v7.0.10...v7.0.11) (2023-6-6)
|
package/api/index.js
CHANGED
|
@@ -44,9 +44,7 @@ const refreshTokenHostedLogin = async (headers, refresh_token) => {
|
|
|
44
44
|
grant_type: 'refresh_token',
|
|
45
45
|
refresh_token
|
|
46
46
|
}),
|
|
47
|
-
headers: (0, _utils.buildRequestHeaders)(headers
|
|
48
|
-
cookie: headers['cookie']
|
|
49
|
-
})
|
|
47
|
+
headers: (0, _utils.buildRequestHeaders)(headers)
|
|
50
48
|
});
|
|
51
49
|
};
|
|
52
50
|
|
package/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_config","_interopRequireDefault","require","_urls","_utils","_restApi","loadPublicKey","response","fetch","config","baseUrl","ApiUrls","WellKnown","jwks","cache","data","json","keys","refreshTokenEmbedded","headers","Post","url","refreshToken","embedded","body","credentials","buildRequestHeaders","refreshTokenHostedLogin","refresh_token","hosted","JSON","stringify","grant_type","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_config","_interopRequireDefault","require","_urls","_utils","_restApi","loadPublicKey","response","fetch","config","baseUrl","ApiUrls","WellKnown","jwks","cache","data","json","keys","refreshTokenEmbedded","headers","Post","url","refreshToken","embedded","body","credentials","buildRequestHeaders","refreshTokenHostedLogin","refresh_token","hosted","JSON","stringify","grant_type","getUsers","headersToSend","res","Get","fronteggUsersUrl","parseHttpResponse","exports","getTenants","fronteggTenantsUrl","_default","default"],"sources":["../../../../packages/nextjs/src/api/index.ts"],"sourcesContent":["import config from '../config';\nimport { ApiUrls } from './urls';\nimport { buildRequestHeaders, Get, parseHttpResponse, Post } from './utils';\nimport { fronteggTenantsUrl, fronteggUsersUrl, ILoginResponse, ITenantsResponse } from '@frontegg/rest-api';\n\n/**\n * Send HTTP GET to frontegg domain public route to download the JWT public key\n */\nconst loadPublicKey = async () => {\n const response = await fetch(`${config.baseUrl}${ApiUrls.WellKnown.jwks}`, {\n cache: 'force-cache',\n });\n const data = await response.json();\n return data.keys[0];\n};\n\n/**\n * Send HTTP post request for Frontegg services to refresh token\n * by providing client's fe_ cookies\n */\nconst refreshTokenEmbedded = async (headers: Record<string, string>) => {\n return Post({\n url: `${config.baseUrl}${ApiUrls.refreshToken.embedded}`,\n body: '{}',\n credentials: 'include',\n headers: buildRequestHeaders(headers),\n });\n};\n\n/**\n * Send HTTP post request for Frontegg services to refresh `hosted login` token\n * by providing client's fe_ as body with grant_type.\n */\nconst refreshTokenHostedLogin = async (headers: Record<string, string>, refresh_token: string) => {\n return Post({\n url: `${config.baseUrl}${ApiUrls.refreshToken.hosted}`,\n body: JSON.stringify({\n grant_type: 'refresh_token',\n refresh_token,\n }),\n headers: buildRequestHeaders(headers),\n });\n};\n\n/**\n *\n * @param headers\n */\nexport const getUsers = async (headers: Record<string, string>): Promise<ILoginResponse | undefined> => {\n const headersToSend = buildRequestHeaders(headers);\n const res = await Get({\n url: `${config.baseUrl}/frontegg${fronteggUsersUrl}`,\n headers: headersToSend,\n });\n return parseHttpResponse(res);\n};\n\n/**\n *\n * @param headers\n */\nexport const getTenants = async (headers: Record<string, string>): Promise<ITenantsResponse[] | undefined> => {\n const res = await Get({\n url: `${config.baseUrl}/frontegg${fronteggTenantsUrl}`,\n headers: buildRequestHeaders(headers),\n });\n return parseHttpResponse(res);\n};\n\nexport default {\n loadPublicKey,\n refreshTokenEmbedded,\n refreshTokenHostedLogin,\n getUsers,\n getTenants,\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAEA;AACA;AACA;AACA,MAAMI,aAAa,GAAG,MAAAA,CAAA,KAAY;EAChC,MAAMC,QAAQ,GAAG,MAAMC,KAAK,CAAE,GAAEC,eAAM,CAACC,OAAQ,GAAEC,aAAO,CAACC,SAAS,CAACC,IAAK,EAAC,EAAE;IACzEC,KAAK,EAAE;EACT,CAAC,CAAC;EACF,MAAMC,IAAI,GAAG,MAAMR,QAAQ,CAACS,IAAI,EAAE;EAClC,OAAOD,IAAI,CAACE,IAAI,CAAC,CAAC,CAAC;AACrB,CAAC;;AAED;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAG,MAAOC,OAA+B,IAAK;EACtE,OAAO,IAAAC,WAAI,EAAC;IACVC,GAAG,EAAG,GAAEZ,eAAM,CAACC,OAAQ,GAAEC,aAAO,CAACW,YAAY,CAACC,QAAS,EAAC;IACxDC,IAAI,EAAE,IAAI;IACVC,WAAW,EAAE,SAAS;IACtBN,OAAO,E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oB;EACpBS,uBAAuB;EACvBM,QAAQ;EACRO;AACF,CAAC;AAAAD,OAAA,CAAAI,OAAA,GAAAD,QAAA"}
|
package/api/utils.d.ts
CHANGED
|
@@ -21,9 +21,8 @@ export declare function removeInvalidHeaders(headers: Record<string, string>): {
|
|
|
21
21
|
/**
|
|
22
22
|
* Build fetch request headers, remove invalid http headers
|
|
23
23
|
* @param headers - Incoming request headers
|
|
24
|
-
* @param additionalHeaders - Specify additional headers
|
|
25
24
|
*/
|
|
26
|
-
export declare function buildRequestHeaders(headers: Record<string, any
|
|
25
|
+
export declare function buildRequestHeaders(headers: Record<string, any>): Record<string, string>;
|
|
27
26
|
/**
|
|
28
27
|
* Return parsed json response if http status code = 200
|
|
29
28
|
* @param res
|
package/api/utils.js
CHANGED
|
@@ -65,13 +65,15 @@ function removeInvalidHeaders(headers) {
|
|
|
65
65
|
/**
|
|
66
66
|
* Build fetch request headers, remove invalid http headers
|
|
67
67
|
* @param headers - Incoming request headers
|
|
68
|
-
* @param additionalHeaders - Specify additional headers
|
|
69
68
|
*/
|
|
70
|
-
function buildRequestHeaders(headers
|
|
69
|
+
function buildRequestHeaders(headers) {
|
|
71
70
|
let cookie = headers['cookie'];
|
|
72
71
|
if (cookie != null && typeof cookie === 'string') {
|
|
73
72
|
cookie = cookie.replace(/fe_session-[^=]*=[^;]*$/, '').replace(/fe_session-[^=]*=[^;]*;/, '');
|
|
74
73
|
}
|
|
74
|
+
if (cookie != null && typeof cookie === 'object') {
|
|
75
|
+
cookie = Object.entries(cookie).map(([key, value]) => `${key}=${value}`).join('; ');
|
|
76
|
+
}
|
|
75
77
|
const preparedHeaders = {
|
|
76
78
|
authorization: headers['authorization'],
|
|
77
79
|
'accept-encoding': headers['accept-encoding'],
|
|
@@ -85,7 +87,7 @@ function buildRequestHeaders(headers, additionalHeaders = {}) {
|
|
|
85
87
|
'x-frontegg-framework': `next@${_package.default.version}`,
|
|
86
88
|
'x-frontegg-sdk': `@frontegg/nextjs@${_sdkVersion.default.version}`
|
|
87
89
|
};
|
|
88
|
-
return removeInvalidHeaders((0, _extends2.default)({}, preparedHeaders
|
|
90
|
+
return removeInvalidHeaders((0, _extends2.default)({}, preparedHeaders));
|
|
89
91
|
}
|
|
90
92
|
|
|
91
93
|
/**
|
package/api/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","names":["_config","_interopRequireDefault","require","_sdkVersion","_package","_restApi","_constants","Get","url","credentials","headers","fetch","method","exports","Post","body","removeInvalidHeaders","newHeaders","_extends2","default","Object","keys","forEach","key","val","Array","isArray","headerCharRegex","exec","undefined","length","buildRequestHeaders","
|
|
1
|
+
{"version":3,"file":"utils.js","names":["_config","_interopRequireDefault","require","_sdkVersion","_package","_restApi","_constants","Get","url","credentials","headers","fetch","method","exports","Post","body","removeInvalidHeaders","newHeaders","_extends2","default","Object","keys","forEach","key","val","Array","isArray","headerCharRegex","exec","undefined","length","buildRequestHeaders","cookie","replace","entries","map","value","join","preparedHeaders","authorization","accept","origin","config","baseUrl","nextjsPkg","version","sdkVersion","parseHttpResponse","res","ok","json","isMiddlewarePath","path","isAuthPath","fronteggAuthApiRoutesRegex","find","pathRegex","test","isSocialLoginPath","endsWith"],"sources":["../../../../packages/nextjs/src/api/utils.ts"],"sourcesContent":["import config from '../config';\nimport sdkVersion from '../sdkVersion';\nimport nextjsPkg from 'next/package.json';\nimport { fronteggAuthApiRoutesRegex } from '@frontegg/rest-api';\nimport { headerCharRegex } from '../utils/common/constants';\n\ninterface GetRequestOptions {\n url: string;\n credentials?: RequestCredentials;\n headers?: HeadersInit;\n}\n\nexport const Get = ({ url, credentials = 'include', headers }: GetRequestOptions) =>\n fetch(url, { method: 'GET', credentials, headers });\n\ninterface PostRequestOptions extends GetRequestOptions {\n body: string;\n}\n\nexport const Post = ({ url, credentials = 'include', headers, body }: PostRequestOptions) =>\n fetch(url, { method: 'POST', credentials, headers, body });\n\n/**\n * NodeJS 18 start using undici as http request handler,\n * undici http request does not accept invalid headers\n * for more details see:\n * https://github.com/nodejs/undici/blob/2b260c997ad4efe4ed2064b264b4b546a59e7a67/lib/core/request.js#L282\n * @param headers\n */\nexport function removeInvalidHeaders(headers: Record<string, string>) {\n const newHeaders = { ...headers };\n Object.keys(newHeaders).forEach((key: string) => {\n const val: any = headers[key];\n if (val && typeof val === 'object' && !Array.isArray(val)) {\n delete newHeaders[key];\n } else if (headerCharRegex.exec(val) !== null) {\n delete newHeaders[key];\n } else if (val === undefined || val === null) {\n delete newHeaders[key];\n } else if (key.length === 10 && key === 'connection') {\n delete newHeaders[key];\n }\n });\n return newHeaders;\n}\n\n/**\n * Build fetch request headers, remove invalid http headers\n * @param headers - Incoming request headers\n */\nexport function buildRequestHeaders(headers: Record<string, any>): Record<string, string> {\n let cookie = headers['cookie'];\n if (cookie != null && typeof cookie === 'string') {\n cookie = cookie.replace(/fe_session-[^=]*=[^;]*$/, '').replace(/fe_session-[^=]*=[^;]*;/, '');\n }\n if (cookie != null && typeof cookie === 'object') {\n cookie = Object.entries(cookie)\n .map(([key, value]) => `${key}=${value}`)\n .join('; ');\n }\n\n const preparedHeaders: Record<string, string> = {\n authorization: headers['authorization'],\n 'accept-encoding': headers['accept-encoding'],\n 'accept-language': headers['accept-language'],\n accept: headers['accept'],\n 'content-type': 'application/json',\n origin: config.baseUrl,\n cookie,\n 'user-agent': headers['user-agent'],\n 'cache-control': headers['cache-control'],\n 'x-frontegg-framework': `next@${nextjsPkg.version}`,\n 'x-frontegg-sdk': `@frontegg/nextjs@${sdkVersion.version}`,\n };\n\n return removeInvalidHeaders({ ...preparedHeaders });\n}\n\n/**\n * Return parsed json response if http status code = 200\n * @param res\n */\nexport const parseHttpResponse = async <T>(res: Response): Promise<T | undefined> => {\n if (!res.ok) {\n return undefined;\n }\n return await res.json();\n};\n\n/**\n * Checks if the given path should be forwarded to the Next.js server middleware.\n *\n *\n * @param {string} path - The path to check for authentication API routes.\n * @returns {boolean} Returns true if the path is a frontegg authentication API route or ends with '/postlogin' or '/prelogin'; otherwise, returns false.\n */\nexport function isMiddlewarePath(path: string): boolean {\n let isAuthPath =\n fronteggAuthApiRoutesRegex.find((pathRegex) => {\n if (typeof pathRegex === 'string') {\n return pathRegex === path;\n } else {\n return pathRegex.test(path);\n }\n }) != null;\n\n // if(!isAuthPath){\n // isAuthPath = /^\\/identity\\/resources\\/auth\\/v[0-9]*\\/user\\/sso\\/[^\\/]*\\/postlogin$/g.test(path)\n // }\n // if(!isAuthPath){\n // isAuthPath = /^\\/identity\\/resources\\/auth\\/v[0-9]*\\/passwordless\\/[^\\/]*\\/prelogin$/g.test(path)\n // }\n // if(!isAuthPath){\n // isAuthPath = /^\\/identity\\/resources\\/auth\\/v[0-9]*\\/[^\\/]*\\/prelogin$/g.test(path)\n // }\n\n if (!isAuthPath) {\n const isSocialLoginPath = /^\\/identity\\/resources\\/auth\\/v[0-9]*\\/user\\/sso\\/default\\/[^\\/]*\\/prelogin$/.test(path);\n isAuthPath = (path.endsWith('/postlogin') || path.endsWith('/prelogin')) && !isSocialLoginPath;\n }\n\n return isAuthPath;\n}\n"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,OAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,WAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,QAAA,GAAAH,sBAAA,CAAAC,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AAQO,MAAMK,GAAG,GAAGA,CAAC;EAAEC,GAAG;EAAEC,WAAW,GAAG,SAAS;EAAEC;AAA2B,CAAC,KAC9EC,KAAK,CAACH,GAAG,EAAE;EAAEI,MAAM,EAAE,KAAK;EAAEH,WAAW;EAAEC;AAAQ,CAAC,CAAC;AAACG,OAAA,CAAAN,GAAA,GAAAA,GAAA;AAM/C,MAAMO,IAAI,GAAGA,CAAC;EAAEN,GAAG;EAAEC,WAAW,GAAG,SAAS;EAAEC,OAAO;EAAEK;AAAyB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mCAA0B,CAACC,IAAI,CAAEC,SAAS,IAAK;IAC7C,IAAI,OAAOA,SAAS,KAAK,QAAQ,EAAE;MACjC,OAAOA,SAAS,KAAKJ,IAAI;IAC3B,CAAC,MAAM;MACL,OAAOI,SAAS,CAACC,IAAI,CAACL,IAAI,CAAC;IAC7B;EACF,CAAC,CAAC,IAAI,IAAI;;EAEZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;EAEA,IAAI,CAACC,UAAU,EAAE;IACf,MAAMK,iBAAiB,GAAG,8EAA8E,CAACD,IAAI,CAACL,IAAI,CAAC;IACnHC,UAAU,GAAG,CAACD,IAAI,CAACO,QAAQ,CAAC,YAAY,CAAC,IAAIP,IAAI,CAACO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAACD,iBAAiB;EAChG;EAEA,OAAOL,UAAU;AACnB"}
|
|
@@ -57,16 +57,17 @@ const Connector = _ref => {
|
|
|
57
57
|
tenants,
|
|
58
58
|
session
|
|
59
59
|
});
|
|
60
|
-
return /*#__PURE__*/(0, _jsxRuntime.
|
|
60
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_AppContext.default.Provider, {
|
|
61
61
|
value: app,
|
|
62
|
-
children:
|
|
63
|
-
app: app,
|
|
64
|
-
themeOptions: props.themeOptions
|
|
65
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHooks.FronteggStoreProvider, (0, _extends2.default)({}, (0, _extends2.default)({}, props, {
|
|
62
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHooks.FronteggStoreProvider, (0, _extends2.default)({}, (0, _extends2.default)({}, props, {
|
|
66
63
|
app
|
|
67
64
|
}), {
|
|
65
|
+
alwaysVisibleChildren: !isSSR && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactHooks.CustomComponentRegister, {
|
|
66
|
+
app: app,
|
|
67
|
+
themeOptions: props.themeOptions
|
|
68
|
+
}),
|
|
68
69
|
children: props.children
|
|
69
|
-
}))
|
|
70
|
+
}))
|
|
70
71
|
});
|
|
71
72
|
};
|
|
72
73
|
const FronteggBaseProvider = props => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FronteggBaseProvider.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","FronteggBaseProvider","_extends2","_objectWithoutPropertiesLoose2","_react","_interopRequireWildcard","_reactHooks","_restApi","_AppContext","_initializeFronteggApp","_useRequestAuthorizeSSR","_useOnRedirectTo","_jsxRuntime","_excluded","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Connector","_ref","_props$basename","_props$authOptions","router","appName","props","isSSR","window","user","session","tenants","baseName","basename","ssrStoreHolder","useRef","storeHolder","current","undefined","onRedirectTo","useOnRedirectTo","authOptions","routes","app","useMemo","initializeFronteggApp","options","ContextHolder","setOnRedirectTo","useRequestAuthorizeSSR","
|
|
1
|
+
{"version":3,"file":"FronteggBaseProvider.js","names":["_interopRequireDefault","require","Object","defineProperty","exports","value","FronteggBaseProvider","_extends2","_objectWithoutPropertiesLoose2","_react","_interopRequireWildcard","_reactHooks","_restApi","_AppContext","_initializeFronteggApp","_useRequestAuthorizeSSR","_useOnRedirectTo","_jsxRuntime","_excluded","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","default","cache","has","get","newObj","hasPropertyDescriptor","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","Connector","_ref","_props$basename","_props$authOptions","router","appName","props","isSSR","window","user","session","tenants","baseName","basename","ssrStoreHolder","useRef","storeHolder","current","undefined","onRedirectTo","useOnRedirectTo","authOptions","routes","app","useMemo","initializeFronteggApp","options","ContextHolder","setOnRedirectTo","useRequestAuthorizeSSR","jsx","Provider","children","FronteggStoreProvider","alwaysVisibleChildren","CustomComponentRegister","themeOptions","framework"],"sources":["../../../../packages/nextjs/src/common/FronteggBaseProvider.tsx"],"sourcesContent":["'use client';\n\nimport React, { FC, useMemo, useRef } from 'react';\nimport { FronteggStoreProvider, CustomComponentRegister } from '@frontegg/react-hooks';\nimport { ContextHolder } from '@frontegg/rest-api';\nimport type { FronteggProviderProps } from '../types';\nimport AppContext from './AppContext';\nimport initializeFronteggApp from '../utils/initializeFronteggApp';\nimport useRequestAuthorizeSSR from './useRequestAuthorizeSSR';\nimport useOnRedirectTo from '../utils/useOnRedirectTo';\n\nconst Connector: FC<FronteggProviderProps> = ({ router, appName = 'default', ...props }) => {\n const isSSR = typeof window === 'undefined';\n const { user, session, tenants } = props;\n const baseName = props.basename ?? '';\n const ssrStoreHolder = useRef({});\n const storeHolder = isSSR ? ssrStoreHolder.current : undefined;\n\n const onRedirectTo = useOnRedirectTo(baseName, router, props.authOptions?.routes);\n\n const app = useMemo(\n () =>\n initializeFronteggApp({\n options: { ...props, basename: baseName },\n onRedirectTo,\n appName,\n storeHolder,\n }),\n [props]\n );\n ContextHolder.setOnRedirectTo(onRedirectTo);\n\n // useEffect(() => {\n // if(window.location.pathname == '/account/login') {\n // app.store.dispatch({ type: 'auth/requestAuthorize', payload: true });\n // }\n // }, [app]);\n useRequestAuthorizeSSR({ app, user, tenants, session });\n return (\n <AppContext.Provider value={app}>\n <FronteggStoreProvider\n {...({ ...props, app } as any)}\n alwaysVisibleChildren={!isSSR && <CustomComponentRegister app={app} themeOptions={props.themeOptions} />}\n >\n {props.children}\n </FronteggStoreProvider>\n </AppContext.Provider>\n );\n};\n\nexport const FronteggBaseProvider: FC<FronteggProviderProps> = (props) => {\n return (\n <Connector {...props} framework={'nextjs'}>\n {props.children}\n </Connector>\n );\n};\n"],"mappings":";AAAA,YAAY;;AAAC,IAAAA,sBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,cAAA,CAAAC,OAAA;EAAAC,KAAA;AAAA;AAAAD,OAAA,CAAAE,oBAAA;AAAA,IAAAC,SAAA,GAAAP,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AAC,CACR;EACDqB,sBAAa,CAACC,eAAe,CAACT,YAAY,CAAC;;EAE3C;EACA;EACA;EACA;EACA;EACA,IAAAU,+BAAsB,EAAC;IAAEN,GAAG;IAAEd,IAAI;IAAEE,OAAO;IAAED;EAAQ,CAAC,CAAC;EACvD,oBACE,IAAAhC,WAAA,CAAAoD,GAAA,EAACxD,WAAA,CAAAa,OAAU,CAAC4C,QAAQ;IAACjE,KAAK,EAAEyD,GAAI;IAAAS,QAAA,eAC9B,IAAAtD,WAAA,CAAAoD,GAAA,EAAC1D,WAAA,CAAA6D,qBAAqB,MAAAjE,SAAA,CAAAmB,OAAA,UAAAnB,SAAA,CAAAmB,OAAA,MACVmB,KAAK;MAAEiB;IAAG;MACpBW,qBAAqB,EAAE,CAAC3B,KAAK,iBAAI,IAAA7B,WAAA,CAAAoD,GAAA,EAAC1D,WAAA,CAAA+D,uBAAuB;QAACZ,GAAG,EAAEA,GAAI;QAACa,YAAY,EAAE9B,KAAK,CAAC8B;MAAa,EAAI;MAAAJ,QAAA,EAExG1B,KAAK,CAAC0B;IAAQ;EACO,EACJ;AAE1B,CAAC;AAEM,MAAMjE,oBAA+C,GAAIuC,KAAK,IAAK;EACxE,oBACE,IAAA5B,WAAA,CAAAoD,GAAA,EAAC9B,SAAS,MAAAhC,SAAA,CAAAmB,OAAA,MAAKmB,KAAK;IAAE+B,SAAS,EAAE,QAAS;IAAAL,QAAA,EACvC1B,KAAK,CAAC0B;EAAQ,GACL;AAEhB,CAAC;AAACnE,OAAA,CAAAE,oBAAA,GAAAA,oBAAA"}
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@frontegg/nextjs",
|
|
3
3
|
"libName": "FronteggNextJs",
|
|
4
|
-
"version": "7.0.
|
|
4
|
+
"version": "7.0.12-alpha.5281257968",
|
|
5
5
|
"author": "Frontegg LTD",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"repository": {
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"lint-json": "eslint -c .eslintrc.json -o ./lint-report.json --format json --no-color ./src/**/*.{ts,tsx}"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@frontegg/js": "6.
|
|
31
|
-
"@frontegg/react-hooks": "6.
|
|
30
|
+
"@frontegg/js": "6.106.0",
|
|
31
|
+
"@frontegg/react-hooks": "6.106.0",
|
|
32
32
|
"http-proxy": "^1.18.1",
|
|
33
33
|
"iron-session": "^6.3.1",
|
|
34
34
|
"jose": "^4.12.2"
|
package/sdkVersion.js
CHANGED
package/sdkVersion.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdkVersion.js","names":["version","exports","default","_default"],"sources":["../../../packages/nextjs/src/sdkVersion.ts"],"sourcesContent":["export default { version: '7.0.
|
|
1
|
+
{"version":3,"file":"sdkVersion.js","names":["version","exports","default","_default"],"sources":["../../../packages/nextjs/src/sdkVersion.ts"],"sourcesContent":["export default { version: '7.0.12-alpha.5281257968' };\n"],"mappings":";;;;;;eAAe;EAAEA,OAAO,EAAE;AAA0B,CAAC;AAAAC,OAAA,CAAAC,OAAA,GAAAC,QAAA"}
|
|
@@ -42,7 +42,7 @@ class FronteggLogger {
|
|
|
42
42
|
}
|
|
43
43
|
debug(...args) {
|
|
44
44
|
if (_constants.LEVEL_NAMES[this.level] <= _constants.LEVEL_NAMES.debug) {
|
|
45
|
-
console.
|
|
45
|
+
console.log.apply(console, this.prepare('debug', args));
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
48
|
info(...args) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_constants","require","isGithubRunnerDebugMode","process","env","ACTIONS_STEP_DEBUG","ACTIONS_RUNNER_DEBUG","logLevel","FRONTEGG_LOG_LEVEL","Object","keys","LEVEL_NAMES","indexOf","maxTagLength","repeat","num","Array","map","join","FronteggLogger","constructor","options","_options$level","tag","level","length","slice","prepare","printLevel","args","levelName","LEVELS","Date","toISOString","debug","console","apply","info","warn","error","child","_default","exports","default"],"sources":["../../../../../packages/nextjs/src/utils/fronteggLogger/index.ts"],"sourcesContent":["import { LEVEL_NAMES, LEVELS } from './constants';\n\n/**\n * @see [enabling-debug-logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)\n * in GitHub actions in failed tests for more debugging logs\n */\nconst isGithubRunnerDebugMode =\n process.env.ACTIONS_STEP_DEBUG === 'true' || process.env.ACTIONS_RUNNER_DEBUG === 'true';\n\nlet logLevel: keyof typeof LEVEL_NAMES = 'warn';\nif (process.env.FRONTEGG_LOG_LEVEL) {\n logLevel = process.env.FRONTEGG_LOG_LEVEL as keyof typeof LEVEL_NAMES;\n}\nif (isGithubRunnerDebugMode) {\n logLevel = 'debug';\n}\nif (Object.keys(LEVEL_NAMES).indexOf(logLevel) === -1) {\n logLevel = 'warn';\n}\n\ntype FronteggLoggerOptions = {\n tag: string;\n level?: keyof typeof LEVEL_NAMES;\n};\n\nconst maxTagLength = 25;\n\nfunction repeat(num: number) {\n return [...new Array(num)].map(() => ' ').join('');\n}\n\nclass FronteggLogger {\n private readonly tag: string;\n private readonly level: keyof typeof LEVEL_NAMES;\n\n constructor(options: FronteggLoggerOptions) {\n if (options.tag.length > maxTagLength) {\n this.tag = options.tag.slice(0, 7) + '...' + options.tag.slice(options.tag.length - maxTagLength + 10);\n } else {\n this.tag = repeat(maxTagLength - options.tag.length) + options.tag;\n }\n\n this.level = options.level ?? logLevel;\n }\n\n private prepare(printLevel: keyof typeof LEVEL_NAMES, args: any[]) {\n const levelName = LEVELS[LEVEL_NAMES[printLevel]];\n return [new Date().toISOString(), `|${levelName}| ${this.tag}:`, ...args];\n }\n\n debug(...args: any[]) {\n if (LEVEL_NAMES[this.level] <= LEVEL_NAMES.debug) {\n console.
|
|
1
|
+
{"version":3,"file":"index.js","names":["_constants","require","isGithubRunnerDebugMode","process","env","ACTIONS_STEP_DEBUG","ACTIONS_RUNNER_DEBUG","logLevel","FRONTEGG_LOG_LEVEL","Object","keys","LEVEL_NAMES","indexOf","maxTagLength","repeat","num","Array","map","join","FronteggLogger","constructor","options","_options$level","tag","level","length","slice","prepare","printLevel","args","levelName","LEVELS","Date","toISOString","debug","console","log","apply","info","warn","error","child","_default","exports","default"],"sources":["../../../../../packages/nextjs/src/utils/fronteggLogger/index.ts"],"sourcesContent":["import { LEVEL_NAMES, LEVELS } from './constants';\n\n/**\n * @see [enabling-debug-logging](https://docs.github.com/en/actions/monitoring-and-troubleshooting-workflows/enabling-debug-logging)\n * in GitHub actions in failed tests for more debugging logs\n */\nconst isGithubRunnerDebugMode =\n process.env.ACTIONS_STEP_DEBUG === 'true' || process.env.ACTIONS_RUNNER_DEBUG === 'true';\n\nlet logLevel: keyof typeof LEVEL_NAMES = 'warn';\nif (process.env.FRONTEGG_LOG_LEVEL) {\n logLevel = process.env.FRONTEGG_LOG_LEVEL as keyof typeof LEVEL_NAMES;\n}\nif (isGithubRunnerDebugMode) {\n logLevel = 'debug';\n}\nif (Object.keys(LEVEL_NAMES).indexOf(logLevel) === -1) {\n logLevel = 'warn';\n}\n\ntype FronteggLoggerOptions = {\n tag: string;\n level?: keyof typeof LEVEL_NAMES;\n};\n\nconst maxTagLength = 25;\n\nfunction repeat(num: number) {\n return [...new Array(num)].map(() => ' ').join('');\n}\n\nclass FronteggLogger {\n private readonly tag: string;\n private readonly level: keyof typeof LEVEL_NAMES;\n\n constructor(options: FronteggLoggerOptions) {\n if (options.tag.length > maxTagLength) {\n this.tag = options.tag.slice(0, 7) + '...' + options.tag.slice(options.tag.length - maxTagLength + 10);\n } else {\n this.tag = repeat(maxTagLength - options.tag.length) + options.tag;\n }\n\n this.level = options.level ?? logLevel;\n }\n\n private prepare(printLevel: keyof typeof LEVEL_NAMES, args: any[]) {\n const levelName = LEVELS[LEVEL_NAMES[printLevel]];\n return [new Date().toISOString(), `|${levelName}| ${this.tag}:`, ...args];\n }\n\n debug(...args: any[]) {\n if (LEVEL_NAMES[this.level] <= LEVEL_NAMES.debug) {\n console.log.apply(console, this.prepare('debug', args));\n }\n }\n\n info(...args: any[]) {\n if (LEVEL_NAMES[this.level] <= LEVEL_NAMES.info) {\n console.info.apply(console, this.prepare('info', args));\n }\n }\n\n warn(...args: any[]) {\n if (LEVEL_NAMES[this.level] <= LEVEL_NAMES.warn) {\n console.warn.apply(console, this.prepare('warn', args));\n }\n }\n\n error(...args: any[]) {\n console.error.apply(console, this.prepare('error', args));\n }\n\n static child(options: FronteggLoggerOptions): FronteggLogger {\n return new FronteggLogger(options);\n }\n}\n\nexport default FronteggLogger;\n"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA,MAAMC,uBAAuB,GAC3BC,OAAO,CAACC,GAAG,CAACC,kBAAkB,KAAK,MAAM,IAAIF,OAAO,CAACC,GAAG,CAACE,oBAAoB,KAAK,MAAM;AAE1F,IAAIC,QAAkC,GAAG,MAAM;AAC/C,IAAIJ,OAAO,CAACC,GAAG,CAACI,kBAAkB,EAAE;EAClCD,QAAQ,GAAGJ,OAAO,CAACC,GAAG,CAACI,kBAA8C;AACvE;AACA,IAAIN,uBAAuB,EAAE;EAC3BK,QAAQ,GAAG,OAAO;AACpB;AACA,IAAIE,MAAM,CAACC,IAAI,CAACC,sBAAW,CAAC,CAACC,OAAO,CAACL,QAAQ,CAAC,KAAK,CAAC,CAAC,EAAE;EACrDA,QAAQ,GAAG,MAAM;AACnB;AAOA,MAAMM,YAAY,GAAG,EAAE;AAEvB,SAASC,MAAMA,CAACC,GAAW,EAAE;EAC3B,OAAO,CAAC,GAAG,IAAIC,KAAK,CAACD,GAAG,CAAC,CAAC,CAACE,GAAG,CAAC,MAAM,GAAG,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC;AACpD;AAEA,MAAMC,cAAc,CAAC;EAInBC,WAAWA,CAACC,OAA8B,EAAE;IAAA,IAAAC,cAAA;IAAA,K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