diff --git a/.gitignore b/.gitignore index 4b6f0072c..7e858c9bb 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,7 @@ apiPassword releasePassword .tmp .idea +build +dist +.env +package-lock.json \ No newline at end of file diff --git a/.npmrc b/.npmrc new file mode 100644 index 000000000..e2a389c32 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +ignore-workspace-root-check=true \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 20abbf353..57e37f63c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ You will need to setup the `supertokens-core` in order to to run the `supertoken ### Prerequisites - OS: Linux or macOS -- Nodejs & npm +- Nodejs & pnpm - IDE: [VSCode](https://code.visualstudio.com/download)(recommended) or equivalent IDE ### Project Setup @@ -30,15 +30,15 @@ You will need to setup the `supertokens-core` in order to to run the `supertoken `supertokens-node` and `supertokens-root` should exist side by side within the same parent directory 3. `cd supertokens-node` 4. Install the project dependencies - `npm i -d` + `pnpm i -d` 5. Add git pre-commit hooks - `npm run set-up-hooks` + `pnpm run set-up-hooks` ## Modifying Code 1. Open the `supertokens-node` project in your IDE and you can start modifying the code 2. After modifying the code, build your project to implement your changes - `npm run build-pretty` + `pnpm run build-pretty` ## Testing @@ -48,7 +48,7 @@ You will need to setup the `supertokens-core` in order to to run the `supertoken 3. Navigate to the `supertokens-node` repository `cd ../supertokens-node/` 4. Run all tests - `INSTALL_PATH=../supertokens-root npm test` + `INSTALL_PATH=../supertokens-root pnpm test` 5. If all tests pass the output should be: ![node tests passing](https://github.com/supertokens/supertokens-logo/blob/master/images/supertokens-node-tests-passing.png) @@ -86,5 +86,5 @@ Additional resources you might find useful: This will generate the API docs in a folder called `docs` ``` -npm run build-docs +pnpm run build-docs ``` diff --git a/framework/awsLambda/index.d.ts b/framework/awsLambda/index.d.ts deleted file mode 100644 index 1b9b0cf57..000000000 --- a/framework/awsLambda/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/awsLambda"; -import * as _default from "../../lib/build/framework/awsLambda"; -export default _default; diff --git a/framework/awsLambda/index.js b/framework/awsLambda/index.js deleted file mode 100644 index 071437185..000000000 --- a/framework/awsLambda/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/awsLambda")); diff --git a/framework/express/index.d.ts b/framework/express/index.d.ts deleted file mode 100644 index e8f390773..000000000 --- a/framework/express/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/express"; -import * as _default from "../../lib/build/framework/express"; -export default _default; diff --git a/framework/express/index.js b/framework/express/index.js deleted file mode 100644 index 895950024..000000000 --- a/framework/express/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/express")); diff --git a/framework/fastify/index.d.ts b/framework/fastify/index.d.ts deleted file mode 100644 index c5449d9d7..000000000 --- a/framework/fastify/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/fastify"; -import * as _default from "../../lib/build/framework/fastify"; -export default _default; diff --git a/framework/fastify/index.js b/framework/fastify/index.js deleted file mode 100644 index b4492ecb8..000000000 --- a/framework/fastify/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/fastify")); diff --git a/framework/hapi/index.d.ts b/framework/hapi/index.d.ts deleted file mode 100644 index 6afcc32c8..000000000 --- a/framework/hapi/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/hapi"; -import * as _default from "../../lib/build/framework/hapi"; -export default _default; diff --git a/framework/hapi/index.js b/framework/hapi/index.js deleted file mode 100644 index 598426958..000000000 --- a/framework/hapi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/hapi")); diff --git a/framework/koa/index.d.ts b/framework/koa/index.d.ts deleted file mode 100644 index d0a190b6d..000000000 --- a/framework/koa/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/koa"; -import * as _default from "../../lib/build/framework/koa"; -export default _default; diff --git a/framework/koa/index.js b/framework/koa/index.js deleted file mode 100644 index cd4ad68b9..000000000 --- a/framework/koa/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/koa")); diff --git a/framework/loopback/index.d.ts b/framework/loopback/index.d.ts deleted file mode 100644 index e87459ac3..000000000 --- a/framework/loopback/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../lib/build/framework/loopback"; -import * as _default from "../../lib/build/framework/loopback"; -export default _default; diff --git a/framework/loopback/index.js b/framework/loopback/index.js deleted file mode 100644 index 4c8ef891c..000000000 --- a/framework/loopback/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/framework/loopback")); diff --git a/lib/build/constants.d.ts b/lib/build/constants.d.ts deleted file mode 100644 index 112aa652a..000000000 --- a/lib/build/constants.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -export declare const HEADER_RID = "rid"; -export declare const HEADER_FDI = "fdi-version"; diff --git a/lib/build/constants.js b/lib/build/constants.js deleted file mode 100644 index ad8a0d0a6..000000000 --- a/lib/build/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HEADER_FDI = exports.HEADER_RID = void 0; -exports.HEADER_RID = "rid"; -exports.HEADER_FDI = "fdi-version"; diff --git a/lib/build/error.d.ts b/lib/build/error.d.ts deleted file mode 100644 index 41083aef0..000000000 --- a/lib/build/error.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-nocheck -export default class SuperTokensError extends Error { - private static errMagic; - static BAD_INPUT_ERROR: "BAD_INPUT_ERROR"; - type: string; - payload: any; - fromRecipe: string | undefined; - private errMagic; - constructor( - options: - | { - message: string; - payload?: any; - type: string; - } - | { - message: string; - type: "BAD_INPUT_ERROR"; - payload: undefined; - } - ); - static isErrorFromSuperTokens(obj: any): obj is SuperTokensError; -} diff --git a/lib/build/error.js b/lib/build/error.js deleted file mode 100644 index ad22000d0..000000000 --- a/lib/build/error.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -class SuperTokensError extends Error { - constructor(options) { - super(options.message); - this.type = options.type; - this.payload = options.payload; - this.errMagic = SuperTokensError.errMagic; - } - static isErrorFromSuperTokens(obj) { - return obj.errMagic === SuperTokensError.errMagic; - } -} -exports.default = SuperTokensError; -SuperTokensError.errMagic = "ndskajfasndlfkj435234krjdsa"; -SuperTokensError.BAD_INPUT_ERROR = "BAD_INPUT_ERROR"; diff --git a/lib/build/framework/awsLambda/framework.d.ts b/lib/build/framework/awsLambda/framework.d.ts deleted file mode 100644 index 44d3f7e39..000000000 --- a/lib/build/framework/awsLambda/framework.d.ts +++ /dev/null @@ -1,91 +0,0 @@ -// @ts-nocheck -import type { - APIGatewayProxyEventV2, - APIGatewayProxyEvent, - APIGatewayProxyResult, - APIGatewayProxyStructuredResultV2, - Handler, -} from "aws-lambda"; -import { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import { SessionContainerInterface } from "../../recipe/session/types"; -import { Framework } from "../types"; -export declare class AWSRequest extends BaseRequest { - private event; - private parsedJSONBody; - private parsedUrlEncodedFormData; - constructor(event: APIGatewayProxyEventV2 | APIGatewayProxyEvent); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -interface SupertokensLambdaEvent extends APIGatewayProxyEvent { - supertokens: { - response: { - headers: { - key: string; - value: boolean | number | string; - allowDuplicateKey: boolean; - }[]; - cookies: string[]; - }; - }; -} -interface SupertokensLambdaEventV2 extends APIGatewayProxyEventV2 { - supertokens: { - response: { - headers: { - key: string; - value: boolean | number | string; - allowDuplicateKey: boolean; - }[]; - cookies: string[]; - }; - }; -} -export declare class AWSResponse extends BaseResponse { - private statusCode; - private event; - private content; - responseSet: boolean; - statusSet: boolean; - constructor(event: SupertokensLambdaEvent | SupertokensLambdaEventV2); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - /** - * @param {number} statusCode - */ - setStatusCode: (statusCode: number) => void; - sendJSONResponse: (content: any) => void; - sendResponse: ( - response?: APIGatewayProxyResult | APIGatewayProxyStructuredResultV2 | undefined - ) => APIGatewayProxyResult | APIGatewayProxyStructuredResultV2; -} -export interface SessionEventV2 extends SupertokensLambdaEventV2 { - session?: SessionContainerInterface; -} -export interface SessionEvent extends SupertokensLambdaEvent { - session?: SessionContainerInterface; -} -export declare const middleware: (handler?: Handler | undefined) => Handler; -export interface AWSFramework extends Framework { - middleware: (handler?: Handler) => Handler; -} -export declare const AWSWrapper: AWSFramework; -export {}; diff --git a/lib/build/framework/awsLambda/framework.js b/lib/build/framework/awsLambda/framework.js deleted file mode 100644 index 36c3dc70e..000000000 --- a/lib/build/framework/awsLambda/framework.js +++ /dev/null @@ -1,318 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.AWSWrapper = exports.middleware = exports.AWSResponse = exports.AWSRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const constants_1 = require("../constants"); -const supertokens_1 = __importDefault(require("../../supertokens")); -const querystring_1 = require("querystring"); -const url_1 = require("url"); -class AWSRequest extends request_1.BaseRequest { - constructor(event) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - if (this.parsedUrlEncodedFormData === undefined) { - if (this.event.body === null || this.event.body === undefined) { - this.parsedUrlEncodedFormData = {}; - } else { - this.parsedUrlEncodedFormData = querystring_1.parse(this.event.body); - if (this.parsedUrlEncodedFormData === undefined) { - this.parsedUrlEncodedFormData = {}; - } - } - } - return this.parsedUrlEncodedFormData; - }); - this.getKeyValueFromQuery = (key) => { - if (this.event.queryStringParameters === undefined || this.event.queryStringParameters === null) { - return undefined; - } - let value = this.event.queryStringParameters[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - if (this.parsedJSONBody === undefined) { - if (this.event.body === null || this.event.body === undefined) { - this.parsedJSONBody = {}; - } else { - this.parsedJSONBody = JSON.parse(this.event.body); - if (this.parsedJSONBody === undefined) { - this.parsedJSONBody = {}; - } - } - } - return this.parsedJSONBody; - }); - this.getMethod = () => { - let rawMethod = this.event.httpMethod; - if (rawMethod !== undefined) { - return utils_1.normaliseHttpMethod(rawMethod); - } - return utils_1.normaliseHttpMethod(this.event.requestContext.http.method); - }; - this.getCookieValue = (key) => { - let cookies = this.event.cookies; - if ( - (this.event.headers === undefined || this.event.headers === null) && - (cookies === undefined || cookies === null) - ) { - return undefined; - } - let value = utils_2.getCookieValueFromHeaders(this.event.headers, key); - if (value === undefined && cookies !== undefined && cookies !== null) { - value = utils_2.getCookieValueFromHeaders( - { - cookie: cookies.join(";"), - }, - key - ); - } - return value; - }; - this.getHeaderValue = (key) => { - if (this.event.headers === undefined || this.event.headers === null) { - return undefined; - } - return utils_2.normalizeHeaderValue(utils_1.getFromObjectCaseInsensitive(key, this.event.headers)); - }; - this.getOriginalURL = () => { - let path = this.event.path; - let queryParams = this.event.queryStringParameters; - if (path === undefined) { - path = this.event.requestContext.http.path; - let stage = this.event.requestContext.stage; - if (stage !== undefined && path.startsWith(`/${stage}`)) { - path = path.slice(stage.length + 1); - } - if (queryParams !== undefined && queryParams !== null) { - let urlString = "https://exmaple.com" + path; - let url = new url_1.URL(urlString); - Object.keys(queryParams).forEach((el) => url.searchParams.append(el, queryParams[el])); - path = url.pathname + url.search; - } - } - return path; - }; - this.original = event; - this.event = event; - this.parsedJSONBody = undefined; - this.parsedUrlEncodedFormData = undefined; - } -} -exports.AWSRequest = AWSRequest; -class AWSResponse extends response_1.BaseResponse { - constructor(event) { - super(); - this.sendHTMLResponse = (html) => { - if (!this.responseSet) { - this.content = html; - this.setHeader("Content-Type", "text/html", false); - this.responseSet = true; - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - this.event.supertokens.response.headers.push({ - key, - value, - allowDuplicateKey, - }); - }; - this.removeHeader = (key) => { - this.event.supertokens.response.headers = this.event.supertokens.response.headers.filter( - (header) => header.key.toLowerCase() !== key.toLowerCase() - ); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - let serialisedCookie = utils_2.serializeCookieValue( - key, - value, - domain, - secure, - httpOnly, - expires, - path, - sameSite - ); - this.event.supertokens.response.cookies.push(serialisedCookie); - }; - /** - * @param {number} statusCode - */ - this.setStatusCode = (statusCode) => { - if (!this.statusSet) { - this.statusCode = statusCode; - this.statusSet = true; - } - }; - this.sendJSONResponse = (content) => { - if (!this.responseSet) { - this.content = JSON.stringify(content); - this.setHeader("Content-Type", "application/json", false); - this.responseSet = true; - } - }; - this.sendResponse = (response) => { - if (response === undefined) { - response = {}; - } - let headers = response.headers; - if (headers === undefined) { - headers = {}; - } - let body = response.body; - let statusCode = response.statusCode; - if (this.responseSet) { - statusCode = this.statusCode; - body = this.content; - } - let supertokensHeaders = this.event.supertokens.response.headers; - let supertokensCookies = this.event.supertokens.response.cookies; - for (let i = 0; i < supertokensHeaders.length; i++) { - let currentValue = undefined; - let currentHeadersSet = Object.keys(headers === undefined ? [] : headers); - for (let j = 0; j < currentHeadersSet.length; j++) { - if (currentHeadersSet[j].toLowerCase() === supertokensHeaders[i].key.toLowerCase()) { - supertokensHeaders[i].key = currentHeadersSet[j]; - currentValue = headers[currentHeadersSet[j]]; - break; - } - } - if (supertokensHeaders[i].allowDuplicateKey && currentValue !== undefined) { - let newValue = `${currentValue}, ${supertokensHeaders[i].value}`; - headers[supertokensHeaders[i].key] = newValue; - } else { - headers[supertokensHeaders[i].key] = supertokensHeaders[i].value; - } - } - if (this.event.version !== undefined) { - let cookies = response.cookies; - if (cookies === undefined) { - cookies = []; - } - cookies.push(...supertokensCookies); - let result = Object.assign(Object.assign({}, response), { cookies, body, statusCode, headers }); - return result; - } else { - let multiValueHeaders = response.multiValueHeaders; - if (multiValueHeaders === undefined) { - multiValueHeaders = {}; - } - let headsersInMultiValueHeaders = Object.keys(multiValueHeaders); - let cookieHeader = headsersInMultiValueHeaders.find( - (h) => h.toLowerCase() === constants_1.COOKIE_HEADER.toLowerCase() - ); - if (cookieHeader === undefined) { - multiValueHeaders[constants_1.COOKIE_HEADER] = supertokensCookies; - } else { - multiValueHeaders[cookieHeader].push(...supertokensCookies); - } - let result = Object.assign(Object.assign({}, response), { - multiValueHeaders, - body: body, - statusCode: statusCode, - headers, - }); - return result; - } - }; - this.original = event; - this.event = event; - this.statusCode = 200; - this.content = JSON.stringify({}); - this.responseSet = false; - this.statusSet = false; - this.event.supertokens = { - response: { - headers: [], - cookies: [], - }, - }; - } -} -exports.AWSResponse = AWSResponse; -const middleware = (handler) => { - return (event, context, callback) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new AWSRequest(event); - let response = new AWSResponse(event); - try { - let result = yield supertokens.middleware(request, response); - if (result) { - return response.sendResponse(); - } - if (handler !== undefined) { - let handlerResult = yield handler(event, context, callback); - return response.sendResponse(handlerResult); - } - /** - * it reaches this point only if the API route was not exposed by - * the SDK and user didn't provide a handler - */ - response.setStatusCode(404); - response.sendJSONResponse({ - error: `The middleware couldn't serve the API path ${request.getOriginalURL()}, method: ${request.getMethod()}. If this is an unexpected behaviour, please create an issue here: https://github.com/supertokens/supertokens-node/issues`, - }); - return response.sendResponse(); - } catch (err) { - yield supertokens.errorHandler(err, request, response); - if (response.responseSet) { - return response.sendResponse(); - } - throw err; - } - }); -}; -exports.middleware = middleware; -exports.AWSWrapper = { - middleware: exports.middleware, - wrapRequest: (unwrapped) => { - return new AWSRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new AWSResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/awsLambda/index.d.ts b/lib/build/framework/awsLambda/index.d.ts deleted file mode 100644 index 1028174f0..000000000 --- a/lib/build/framework/awsLambda/index.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -export type { SessionEvent, SessionEventV2 } from "./framework"; -export declare const middleware: ( - handler?: import("aws-lambda").Handler | undefined -) => import("aws-lambda").Handler; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/awsLambda/index.js b/lib/build/framework/awsLambda/index.js deleted file mode 100644 index 9e86669f5..000000000 --- a/lib/build/framework/awsLambda/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.middleware = void 0; -const framework_1 = require("./framework"); -exports.middleware = framework_1.AWSWrapper.middleware; -exports.wrapRequest = framework_1.AWSWrapper.wrapRequest; -exports.wrapResponse = framework_1.AWSWrapper.wrapResponse; diff --git a/lib/build/framework/constants.d.ts b/lib/build/framework/constants.d.ts deleted file mode 100644 index eb751247f..000000000 --- a/lib/build/framework/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @ts-nocheck -export declare const COOKIE_HEADER = "Set-Cookie"; diff --git a/lib/build/framework/constants.js b/lib/build/framework/constants.js deleted file mode 100644 index 8a7a8ea6c..000000000 --- a/lib/build/framework/constants.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.COOKIE_HEADER = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -exports.COOKIE_HEADER = "Set-Cookie"; diff --git a/lib/build/framework/express/framework.d.ts b/lib/build/framework/express/framework.d.ts deleted file mode 100644 index 864a3cc92..000000000 --- a/lib/build/framework/express/framework.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import type { Request, Response, NextFunction } from "express"; -import type { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import type { Framework } from "../types"; -import type { SessionContainerInterface } from "../../recipe/session/types"; -export declare class ExpressRequest extends BaseRequest { - private request; - private parserChecked; - private formDataParserChecked; - constructor(request: Request); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -export declare class ExpressResponse extends BaseResponse { - private response; - private statusCode; - constructor(response: Response); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - /** - * @param {number} statusCode - */ - setStatusCode: (statusCode: number) => void; - sendJSONResponse: (content: any) => void; -} -export interface SessionRequest extends Request { - session?: SessionContainerInterface; -} -export declare const middleware: () => (req: Request, res: Response, next: NextFunction) => Promise; -export declare const errorHandler: () => (err: any, req: Request, res: Response, next: NextFunction) => Promise; -export interface ExpressFramework extends Framework { - middleware: () => (req: Request, res: Response, next: NextFunction) => Promise; - errorHandler: () => (err: any, req: Request, res: Response, next: NextFunction) => Promise; -} -export declare const ExpressWrapper: ExpressFramework; diff --git a/lib/build/framework/express/framework.js b/lib/build/framework/express/framework.js deleted file mode 100644 index b7201a722..000000000 --- a/lib/build/framework/express/framework.js +++ /dev/null @@ -1,210 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ExpressWrapper = exports.errorHandler = exports.middleware = exports.ExpressResponse = exports.ExpressRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const supertokens_1 = __importDefault(require("../../supertokens")); -class ExpressRequest extends request_1.BaseRequest { - constructor(request) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - if (!this.formDataParserChecked) { - yield utils_2.assertFormDataBodyParserHasBeenUsedForExpressLikeRequest(this.request); - this.formDataParserChecked = true; - } - return this.request.body; - }); - this.getKeyValueFromQuery = (key) => { - if (this.request.query === undefined) { - return undefined; - } - let value = this.request.query[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - if (!this.parserChecked) { - yield utils_2.assertThatBodyParserHasBeenUsedForExpressLikeRequest(this.getMethod(), this.request); - this.parserChecked = true; - } - return this.request.body; - }); - this.getMethod = () => { - return utils_1.normaliseHttpMethod(this.request.method); - }; - this.getCookieValue = (key) => { - return utils_2.getCookieValueFromIncomingMessage(this.request, key); - }; - this.getHeaderValue = (key) => { - return utils_2.getHeaderValueFromIncomingMessage(this.request, key); - }; - this.getOriginalURL = () => { - return this.request.originalUrl || this.request.url; - }; - this.original = request; - this.request = request; - this.parserChecked = false; - this.formDataParserChecked = false; - } -} -exports.ExpressRequest = ExpressRequest; -class ExpressResponse extends response_1.BaseResponse { - constructor(response) { - super(); - this.sendHTMLResponse = (html) => { - if (!this.response.writableEnded) { - /** - * response.set method is not available if response - * is a nextjs response object. setHeader method - * is present on OutgoingMessage which is one of the - * bases used to construct response object for express - * like response as well as nextjs like response - */ - this.response.setHeader("Content-Type", "text/html"); - this.response.status(this.statusCode).send(Buffer.from(html)); - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - utils_2.setHeaderForExpressLikeResponse(this.response, key, value, allowDuplicateKey); - }; - this.removeHeader = (key) => { - this.response.removeHeader(key); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - utils_2.setCookieForServerResponse( - this.response, - key, - value, - domain, - secure, - httpOnly, - expires, - path, - sameSite - ); - }; - /** - * @param {number} statusCode - */ - this.setStatusCode = (statusCode) => { - if (!this.response.writableEnded) { - this.statusCode = statusCode; - } - }; - this.sendJSONResponse = (content) => { - if (!this.response.writableEnded) { - this.response.status(this.statusCode).json(content); - } - }; - this.original = response; - this.response = response; - this.statusCode = 200; - } -} -exports.ExpressResponse = ExpressResponse; -const middleware = () => { - return (req, res, next) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens; - const request = new ExpressRequest(req); - const response = new ExpressResponse(res); - try { - supertokens = supertokens_1.default.getInstanceOrThrowError(); - const result = yield supertokens.middleware(request, response); - if (!result) { - return next(); - } - } catch (err) { - if (supertokens) { - try { - yield supertokens.errorHandler(err, request, response); - } catch (_a) { - next(err); - } - } else { - next(err); - } - } - }); -}; -exports.middleware = middleware; -const errorHandler = () => { - return (err, req, res, next) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new ExpressRequest(req); - let response = new ExpressResponse(res); - try { - yield supertokens.errorHandler(err, request, response); - } catch (err) { - return next(err); - } - }); -}; -exports.errorHandler = errorHandler; -exports.ExpressWrapper = { - middleware: exports.middleware, - errorHandler: exports.errorHandler, - wrapRequest: (unwrapped) => { - return new ExpressRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new ExpressResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/express/index.d.ts b/lib/build/framework/express/index.d.ts deleted file mode 100644 index 9bf873aa2..000000000 --- a/lib/build/framework/express/index.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -export type { SessionRequest } from "./framework"; -export declare const middleware: () => ( - req: import("express").Request, - res: import("express").Response, - next: import("express").NextFunction -) => Promise; -export declare const errorHandler: () => ( - err: any, - req: import("express").Request, - res: import("express").Response, - next: import("express").NextFunction -) => Promise; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/express/index.js b/lib/build/framework/express/index.js deleted file mode 100644 index 238165935..000000000 --- a/lib/build/framework/express/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.errorHandler = exports.middleware = void 0; -const framework_1 = require("./framework"); -exports.middleware = framework_1.ExpressWrapper.middleware; -exports.errorHandler = framework_1.ExpressWrapper.errorHandler; -exports.wrapRequest = framework_1.ExpressWrapper.wrapRequest; -exports.wrapResponse = framework_1.ExpressWrapper.wrapResponse; diff --git a/lib/build/framework/fastify/framework.d.ts b/lib/build/framework/fastify/framework.d.ts deleted file mode 100644 index 0af7536ea..000000000 --- a/lib/build/framework/fastify/framework.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import type { FastifyRequest as OriginalFastifyRequest, FastifyReply, FastifyPluginCallback } from "fastify"; -import type { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import type { Framework } from "../types"; -import type { SessionContainerInterface } from "../../recipe/session/types"; -export declare class FastifyRequest extends BaseRequest { - private request; - constructor(request: OriginalFastifyRequest); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -export declare class FastifyResponse extends BaseResponse { - private response; - private statusCode; - constructor(response: FastifyReply); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - /** - * @param {number} statusCode - */ - setStatusCode: (statusCode: number) => void; - /** - * @param {any} content - */ - sendJSONResponse: (content: any) => void; -} -export interface SessionRequest extends OriginalFastifyRequest { - session?: SessionContainerInterface; -} -export interface FasitfyFramework extends Framework { - plugin: FastifyPluginCallback; - errorHandler: () => (err: any, req: OriginalFastifyRequest, res: FastifyReply) => Promise; -} -export declare const errorHandler: () => (err: any, req: OriginalFastifyRequest, res: FastifyReply) => Promise; -export declare const FastifyWrapper: FasitfyFramework; diff --git a/lib/build/framework/fastify/framework.js b/lib/build/framework/fastify/framework.js deleted file mode 100644 index 8c375f9ea..000000000 --- a/lib/build/framework/fastify/framework.js +++ /dev/null @@ -1,234 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.FastifyWrapper = exports.errorHandler = exports.FastifyResponse = exports.FastifyRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const supertokens_1 = __importDefault(require("../../supertokens")); -const constants_1 = require("../constants"); -class FastifyRequest extends request_1.BaseRequest { - constructor(request) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - return this.request.body; // NOTE: ask user to add require('fastify-formbody') - }); - this.getKeyValueFromQuery = (key) => { - if (this.request.query === undefined) { - return undefined; - } - let value = this.request.query[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - return this.request.body; - }); - this.getMethod = () => { - return utils_1.normaliseHttpMethod(this.request.method); - }; - this.getCookieValue = (key) => { - return utils_2.getCookieValueFromHeaders(this.request.headers, key); - }; - this.getHeaderValue = (key) => { - return utils_2.normalizeHeaderValue(utils_1.getFromObjectCaseInsensitive(key, this.request.headers)); - }; - this.getOriginalURL = () => { - return this.request.url; - }; - this.original = request; - this.request = request; - } -} -exports.FastifyRequest = FastifyRequest; -class FastifyResponse extends response_1.BaseResponse { - constructor(response) { - super(); - this.sendHTMLResponse = (html) => { - if (!this.response.sent) { - this.response.type("text/html"); - this.response.send(html); - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - try { - let existingHeaders = this.response.getHeaders(); - let existingValue = existingHeaders[key.toLowerCase()]; - // we have the this.response.header for compatibility with nextJS - if (existingValue === undefined) { - this.response.header(key, value); - } else if (allowDuplicateKey) { - this.response.header(key, existingValue + ", " + value); - } else { - // we overwrite the current one with the new one - this.response.header(key, value); - } - } catch (err) { - throw new Error("Error while setting header with key: " + key + " and value: " + value); - } - }; - this.removeHeader = (key) => { - this.response.removeHeader(key); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - let serialisedCookie = utils_2.serializeCookieValue( - key, - value, - domain, - secure, - httpOnly, - expires, - path, - sameSite - ); - /** - * lets say if current value is undefined, prev -> undefined - * - * now if add AT, - * cookieValueToSetInHeader -> AT - * response header object will be: - * - * 'set-cookie': AT - * - * now if add RT, - * - * prev -> AT - * cookieValueToSetInHeader -> AT + RT - * and response header object will be: - * - * 'set-cookie': AT + AT + RT - * - * now if add IRT, - * - * prev -> AT + AT + RT - * cookieValueToSetInHeader -> IRT + AT + AT + RT - * and response header object will be: - * - * 'set-cookie': AT + AT + RT + IRT + AT + AT + RT - * - * To avoid this, we no longer get and use the previous value - * - * Old code: - * - * let prev: string | string[] | undefined = this.response.getHeader(COOKIE_HEADER) as - * | string - * | string[] - * | undefined; - * let cookieValueToSetInHeader = getCookieValueToSetInHeader(prev, serialisedCookie, key); - * this.response.header(COOKIE_HEADER, cookieValueToSetInHeader); - */ - this.response.header(constants_1.COOKIE_HEADER, serialisedCookie); - }; - /** - * @param {number} statusCode - */ - this.setStatusCode = (statusCode) => { - if (!this.response.sent) { - this.statusCode = statusCode; - } - }; - /** - * @param {any} content - */ - this.sendJSONResponse = (content) => { - if (!this.response.sent) { - this.response.statusCode = this.statusCode; - this.response.send(content); - } - }; - this.original = response; - this.response = response; - this.statusCode = 200; - } -} -exports.FastifyResponse = FastifyResponse; -function plugin(fastify, _, done) { - fastify.addHook("preHandler", (req, reply) => - __awaiter(this, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new FastifyRequest(req); - let response = new FastifyResponse(reply); - try { - yield supertokens.middleware(request, response); - } catch (err) { - yield supertokens.errorHandler(err, request, response); - } - }) - ); - done(); -} -plugin[Symbol.for("skip-override")] = true; -const errorHandler = () => { - return (err, req, res) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new FastifyRequest(req); - let response = new FastifyResponse(res); - yield supertokens.errorHandler(err, request, response); - }); -}; -exports.errorHandler = errorHandler; -exports.FastifyWrapper = { - plugin, - errorHandler: exports.errorHandler, - wrapRequest: (unwrapped) => { - return new FastifyRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new FastifyResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/fastify/index.d.ts b/lib/build/framework/fastify/index.d.ts deleted file mode 100644 index 3cca3a1a2..000000000 --- a/lib/build/framework/fastify/index.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// @ts-nocheck -/// -export type { SessionRequest } from "./framework"; -export declare const plugin: import("fastify").FastifyPluginCallback, import("http").Server>; -export declare const errorHandler: () => ( - err: any, - req: import("fastify").FastifyRequest< - import("fastify/types/route").RouteGenericInterface, - import("http").Server, - import("http").IncomingMessage - >, - res: import("fastify").FastifyReply< - import("http").Server, - import("http").IncomingMessage, - import("http").ServerResponse, - import("fastify/types/route").RouteGenericInterface, - unknown - > -) => Promise; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/fastify/index.js b/lib/build/framework/fastify/index.js deleted file mode 100644 index 3b855ed7e..000000000 --- a/lib/build/framework/fastify/index.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.errorHandler = exports.plugin = void 0; -const framework_1 = require("./framework"); -exports.plugin = framework_1.FastifyWrapper.plugin; -exports.errorHandler = framework_1.FastifyWrapper.errorHandler; -exports.wrapRequest = framework_1.FastifyWrapper.wrapRequest; -exports.wrapResponse = framework_1.FastifyWrapper.wrapResponse; diff --git a/lib/build/framework/hapi/framework.d.ts b/lib/build/framework/hapi/framework.d.ts deleted file mode 100644 index 5771d86e8..000000000 --- a/lib/build/framework/hapi/framework.d.ts +++ /dev/null @@ -1,63 +0,0 @@ -// @ts-nocheck -import type { Request, ResponseToolkit, Plugin, ResponseObject } from "@hapi/hapi"; -import type { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import type { Framework } from "../types"; -import type { SessionContainerInterface } from "../../recipe/session/types"; -export declare class HapiRequest extends BaseRequest { - private request; - constructor(request: Request); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -export interface ExtendedResponseToolkit extends ResponseToolkit { - lazyHeaderBindings: ( - h: ResponseToolkit, - key: string, - value: string | undefined, - allowDuplicateKey: boolean - ) => void; -} -export declare class HapiResponse extends BaseResponse { - private response; - private statusCode; - private content; - responseSet: boolean; - statusSet: boolean; - constructor(response: ExtendedResponseToolkit); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - /** - * @param {number} statusCode - */ - setStatusCode: (statusCode: number) => void; - /** - * @param {any} content - */ - sendJSONResponse: (content: any) => void; - sendResponse: (overwriteHeaders?: boolean) => ResponseObject; -} -export interface SessionRequest extends Request { - session?: SessionContainerInterface; -} -export interface HapiFramework extends Framework { - plugin: Plugin<{}>; -} -export declare const HapiWrapper: HapiFramework; diff --git a/lib/build/framework/hapi/framework.js b/lib/build/framework/hapi/framework.js deleted file mode 100644 index 08cd1cff8..000000000 --- a/lib/build/framework/hapi/framework.js +++ /dev/null @@ -1,259 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.HapiWrapper = exports.HapiResponse = exports.HapiRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const supertokens_1 = __importDefault(require("../../supertokens")); -class HapiRequest extends request_1.BaseRequest { - constructor(request) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - return this.request.payload === undefined || this.request.payload === null ? {} : this.request.payload; - }); - this.getKeyValueFromQuery = (key) => { - if (this.request.query === undefined) { - return undefined; - } - let value = this.request.query[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - return this.request.payload === undefined || this.request.payload === null ? {} : this.request.payload; - }); - this.getMethod = () => { - return utils_1.normaliseHttpMethod(this.request.method); - }; - this.getCookieValue = (key) => { - return utils_2.getCookieValueFromHeaders(this.request.headers, key); - }; - this.getHeaderValue = (key) => { - return utils_2.normalizeHeaderValue(this.request.headers[key]); - }; - this.getOriginalURL = () => { - return this.request.url.toString(); - }; - this.original = request; - this.request = request; - } -} -exports.HapiRequest = HapiRequest; -class HapiResponse extends response_1.BaseResponse { - constructor(response) { - super(); - this.statusSet = false; - this.sendHTMLResponse = (html) => { - if (!this.responseSet) { - this.content = html; - this.setHeader("Content-Type", "text/html", false); - this.responseSet = true; - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - try { - this.response.lazyHeaderBindings(this.response, key, value, allowDuplicateKey); - } catch (err) { - throw new Error("Error while setting header with key: " + key + " and value: " + value); - } - }; - this.removeHeader = (key) => { - this.response.lazyHeaderBindings(this.response, key, undefined, false); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - let now = Date.now(); - if (expires > now) { - this.response.state(key, value, { - isHttpOnly: httpOnly, - isSecure: secure, - path: path, - domain, - ttl: expires - now, - isSameSite: sameSite === "lax" ? "Lax" : sameSite === "none" ? "None" : "Strict", - }); - } else { - this.response.unstate(key); - } - }; - /** - * @param {number} statusCode - */ - this.setStatusCode = (statusCode) => { - if (!this.statusSet) { - this.statusCode = statusCode; - this.statusSet = true; - } - }; - /** - * @param {any} content - */ - this.sendJSONResponse = (content) => { - if (!this.responseSet) { - this.content = content; - this.responseSet = true; - } - }; - this.sendResponse = (overwriteHeaders = false) => { - if (!overwriteHeaders) { - return this.response.response(this.content).code(this.statusCode).takeover(); - } - return this.response.response(this.content).code(this.statusCode); - }; - this.original = response; - this.response = response; - this.statusCode = 200; - this.content = null; - this.responseSet = false; - } -} -exports.HapiResponse = HapiResponse; -const plugin = { - name: "supertokens-hapi-middleware", - version: "1.0.0", - register: function (server, _) { - return __awaiter(this, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - server.ext("onPreHandler", (req, h) => - __awaiter(this, void 0, void 0, function* () { - let request = new HapiRequest(req); - let response = new HapiResponse(h); - let result = yield supertokens.middleware(request, response); - if (!result) { - return h.continue; - } - return response.sendResponse(); - }) - ); - server.ext("onPreResponse", (request, h) => - __awaiter(this, void 0, void 0, function* () { - (request.app.lazyHeaders || []).forEach(({ key, value, allowDuplicateKey }) => { - if (request.response.isBoom) { - request.response.output.headers[key] = value; - } else { - request.response.header(key, value, { append: allowDuplicateKey }); - } - }); - if (request.response.isBoom) { - let err = request.response.data || request.response; - let req = new HapiRequest(request); - let res = new HapiResponse(h); - if (err !== undefined && err !== null) { - try { - yield supertokens.errorHandler(err, req, res); - if (res.responseSet) { - let resObj = res.sendResponse(true); - (request.app.lazyHeaders || []).forEach(({ key, value, allowDuplicateKey }) => { - resObj.header(key, value, { append: allowDuplicateKey }); - }); - return resObj.takeover(); - } - return h.continue; - } catch (e) { - return h.continue; - } - } - } - return h.continue; - }) - ); - server.decorate("toolkit", "lazyHeaderBindings", function (h, key, value, allowDuplicateKey) { - const anyApp = h.request.app; - anyApp.lazyHeaders = anyApp.lazyHeaders || []; - if (value === undefined) { - anyApp.lazyHeaders = anyApp.lazyHeaders.filter( - (header) => header.key.toLowerCase() !== key.toLowerCase() - ); - } else { - anyApp.lazyHeaders.push({ key, value, allowDuplicateKey }); - } - }); - let supportedRoutes = []; - let routeMethodSet = new Set(); - for (let i = 0; i < supertokens.recipeModules.length; i++) { - let apisHandled = supertokens.recipeModules[i].getAPIsHandled(); - for (let j = 0; j < apisHandled.length; j++) { - let api = apisHandled[j]; - if (!api.disabled) { - let path = `${supertokens.appInfo.apiBasePath.getAsStringDangerous()}${api.pathWithoutApiBasePath.getAsStringDangerous()}`; - let methodAndPath = `${api.method}-${path}`; - if (!routeMethodSet.has(methodAndPath)) { - supportedRoutes.push({ - path, - method: api.method, - handler: (_, h) => { - return h.continue; - }, - }); - routeMethodSet.add(methodAndPath); - } - } - } - } - server.route(supportedRoutes); - }); - }, -}; -exports.HapiWrapper = { - plugin, - wrapRequest: (unwrapped) => { - return new HapiRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new HapiResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/hapi/index.d.ts b/lib/build/framework/hapi/index.d.ts deleted file mode 100644 index ea293f69b..000000000 --- a/lib/build/framework/hapi/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -export type { SessionRequest } from "./framework"; -export declare const plugin: import("@hapi/hapi").Plugin<{}>; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/hapi/index.js b/lib/build/framework/hapi/index.js deleted file mode 100644 index 5aed04807..000000000 --- a/lib/build/framework/hapi/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.plugin = void 0; -const framework_1 = require("./framework"); -exports.plugin = framework_1.HapiWrapper.plugin; -exports.wrapRequest = framework_1.HapiWrapper.wrapRequest; -exports.wrapResponse = framework_1.HapiWrapper.wrapResponse; diff --git a/lib/build/framework/index.d.ts b/lib/build/framework/index.d.ts deleted file mode 100644 index 8fd8891ce..000000000 --- a/lib/build/framework/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @ts-nocheck -export { BaseRequest } from "./request"; -export { BaseResponse } from "./response"; -import * as expressFramework from "./express"; -import * as fastifyFramework from "./fastify"; -import * as hapiFramework from "./hapi"; -import * as loopbackFramework from "./loopback"; -import * as koaFramework from "./koa"; -import * as awsLambdaFramework from "./awsLambda"; -declare const _default: { - express: typeof expressFramework; - fastify: typeof fastifyFramework; - hapi: typeof hapiFramework; - loopback: typeof loopbackFramework; - koa: typeof koaFramework; - awsLambda: typeof awsLambdaFramework; -}; -export default _default; -export declare let express: typeof expressFramework; -export declare let fastify: typeof fastifyFramework; -export declare let hapi: typeof hapiFramework; -export declare let loopback: typeof loopbackFramework; -export declare let koa: typeof koaFramework; -export declare let awsLambda: typeof awsLambdaFramework; diff --git a/lib/build/framework/index.js b/lib/build/framework/index.js deleted file mode 100644 index 28dc9790d..000000000 --- a/lib/build/framework/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.awsLambda = exports.koa = exports.loopback = exports.hapi = exports.fastify = exports.express = exports.BaseResponse = exports.BaseRequest = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var request_1 = require("./request"); -Object.defineProperty(exports, "BaseRequest", { - enumerable: true, - get: function () { - return request_1.BaseRequest; - }, -}); -var response_1 = require("./response"); -Object.defineProperty(exports, "BaseResponse", { - enumerable: true, - get: function () { - return response_1.BaseResponse; - }, -}); -const expressFramework = __importStar(require("./express")); -const fastifyFramework = __importStar(require("./fastify")); -const hapiFramework = __importStar(require("./hapi")); -const loopbackFramework = __importStar(require("./loopback")); -const koaFramework = __importStar(require("./koa")); -const awsLambdaFramework = __importStar(require("./awsLambda")); -exports.default = { - express: expressFramework, - fastify: fastifyFramework, - hapi: hapiFramework, - loopback: loopbackFramework, - koa: koaFramework, - awsLambda: awsLambdaFramework, -}; -exports.express = expressFramework; -exports.fastify = fastifyFramework; -exports.hapi = hapiFramework; -exports.loopback = loopbackFramework; -exports.koa = koaFramework; -exports.awsLambda = awsLambdaFramework; diff --git a/lib/build/framework/koa/framework.d.ts b/lib/build/framework/koa/framework.d.ts deleted file mode 100644 index 96514a08d..000000000 --- a/lib/build/framework/koa/framework.d.ts +++ /dev/null @@ -1,52 +0,0 @@ -// @ts-nocheck -import type { Context, Next } from "koa"; -import type { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import { SessionContainerInterface } from "../../recipe/session/types"; -import { Framework } from "../types"; -export declare class KoaRequest extends BaseRequest { - private ctx; - private parsedJSONBody; - private parsedUrlEncodedFormData; - constructor(ctx: Context); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -export declare class KoaResponse extends BaseResponse { - private ctx; - responseSet: boolean; - statusSet: boolean; - constructor(ctx: Context); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - /** - * @param {number} statusCode - */ - setStatusCode: (statusCode: number) => void; - sendJSONResponse: (content: any) => void; -} -export interface SessionContext extends Context { - session?: SessionContainerInterface; -} -export declare const middleware: () => (ctx: Context, next: Next) => Promise; -export interface KoaFramework extends Framework { - middleware: () => (ctx: Context, next: Next) => Promise; -} -export declare const KoaWrapper: KoaFramework; diff --git a/lib/build/framework/koa/framework.js b/lib/build/framework/koa/framework.js deleted file mode 100644 index ac611bae5..000000000 --- a/lib/build/framework/koa/framework.js +++ /dev/null @@ -1,208 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.KoaWrapper = exports.middleware = exports.KoaResponse = exports.KoaRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const co_body_1 = require("co-body"); -const supertokens_1 = __importDefault(require("../../supertokens")); -class KoaRequest extends request_1.BaseRequest { - constructor(ctx) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - if (this.parsedUrlEncodedFormData === undefined) { - this.parsedUrlEncodedFormData = yield parseURLEncodedFormData(this.ctx); - } - return this.parsedUrlEncodedFormData; - }); - this.getKeyValueFromQuery = (key) => { - if (this.ctx.query === undefined) { - return undefined; - } - let value = this.ctx.request.query[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - if (this.parsedJSONBody === undefined) { - this.parsedJSONBody = yield parseJSONBodyFromRequest(this.ctx); - } - return this.parsedJSONBody === undefined ? {} : this.parsedJSONBody; - }); - this.getMethod = () => { - return utils_1.normaliseHttpMethod(this.ctx.request.method); - }; - this.getCookieValue = (key) => { - return this.ctx.cookies.get(key); - }; - this.getHeaderValue = (key) => { - return utils_2.getHeaderValueFromIncomingMessage(this.ctx.req, key); - }; - this.getOriginalURL = () => { - return this.ctx.originalUrl; - }; - this.original = ctx; - this.ctx = ctx; - this.parsedJSONBody = undefined; - this.parsedUrlEncodedFormData = undefined; - } -} -exports.KoaRequest = KoaRequest; -function parseJSONBodyFromRequest(ctx) { - return __awaiter(this, void 0, void 0, function* () { - if (ctx.body !== undefined) { - return ctx.body; - } - return yield co_body_1.json(ctx); - }); -} -function parseURLEncodedFormData(ctx) { - return __awaiter(this, void 0, void 0, function* () { - if (ctx.body !== undefined) { - return ctx.body; - } - return yield co_body_1.form(ctx); - }); -} -class KoaResponse extends response_1.BaseResponse { - constructor(ctx) { - super(); - this.responseSet = false; - this.statusSet = false; - this.sendHTMLResponse = (html) => { - if (!this.responseSet) { - this.ctx.set("content-type", "text/html"); - this.ctx.body = html; - this.responseSet = true; - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - try { - let existingHeaders = this.ctx.response.headers; - let existingValue = existingHeaders[key.toLowerCase()]; - if (existingValue === undefined) { - this.ctx.set(key, value); - } else if (allowDuplicateKey) { - this.ctx.set(key, existingValue + ", " + value); - } else { - // we overwrite the current one with the new one - this.ctx.set(key, value); - } - } catch (err) { - throw new Error("Error while setting header with key: " + key + " and value: " + value); - } - }; - this.removeHeader = (key) => { - this.ctx.remove(key); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - this.ctx.cookies.set(key, value, { - secure, - sameSite, - httpOnly, - expires: new Date(expires), - domain, - path, - }); - }; - /** - * @param {number} statusCode - */ - this.setStatusCode = (statusCode) => { - if (!this.statusSet) { - this.ctx.status = statusCode; - this.statusSet = true; - } - }; - this.sendJSONResponse = (content) => { - if (!this.responseSet) { - this.ctx.body = content; - this.responseSet = true; - } - }; - this.original = ctx; - this.ctx = ctx; - } -} -exports.KoaResponse = KoaResponse; -const middleware = () => { - return (ctx, next) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new KoaRequest(ctx); - let response = new KoaResponse(ctx); - try { - let result = yield supertokens.middleware(request, response); - if (!result) { - return yield next(); - } - } catch (err) { - return yield supertokens.errorHandler(err, request, response); - } - }); -}; -exports.middleware = middleware; -exports.KoaWrapper = { - middleware: exports.middleware, - wrapRequest: (unwrapped) => { - return new KoaRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new KoaResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/koa/index.d.ts b/lib/build/framework/koa/index.d.ts deleted file mode 100644 index 1d6395964..000000000 --- a/lib/build/framework/koa/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -export type { SessionContext } from "./framework"; -export declare const middleware: () => (ctx: import("koa").Context, next: import("koa").Next) => Promise; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/koa/index.js b/lib/build/framework/koa/index.js deleted file mode 100644 index 4f7150a4f..000000000 --- a/lib/build/framework/koa/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.middleware = void 0; -const framework_1 = require("./framework"); -exports.middleware = framework_1.KoaWrapper.middleware; -exports.wrapRequest = framework_1.KoaWrapper.wrapRequest; -exports.wrapResponse = framework_1.KoaWrapper.wrapResponse; diff --git a/lib/build/framework/loopback/framework.d.ts b/lib/build/framework/loopback/framework.d.ts deleted file mode 100644 index 51907ee8f..000000000 --- a/lib/build/framework/loopback/framework.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -// @ts-nocheck -import type { MiddlewareContext, Response, Middleware } from "@loopback/rest"; -import { SessionContainerInterface } from "../../recipe/session/types"; -import { HTTPMethod } from "../../types"; -import { BaseRequest } from "../request"; -import { BaseResponse } from "../response"; -import type { Framework } from "../types"; -export declare class LoopbackRequest extends BaseRequest { - private request; - private parserChecked; - private formDataParserChecked; - constructor(ctx: MiddlewareContext); - getFormData: () => Promise; - getKeyValueFromQuery: (key: string) => string | undefined; - getJSONBody: () => Promise; - getMethod: () => HTTPMethod; - getCookieValue: (key: string) => string | undefined; - getHeaderValue: (key: string) => string | undefined; - getOriginalURL: () => string; -} -export declare class LoopbackResponse extends BaseResponse { - response: Response; - private statusCode; - constructor(ctx: MiddlewareContext); - sendHTMLResponse: (html: string) => void; - setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - removeHeader: (key: string) => void; - setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - setStatusCode: (statusCode: number) => void; - sendJSONResponse: (content: any) => void; -} -export interface SessionContext extends MiddlewareContext { - session?: SessionContainerInterface; -} -export interface LoopbackFramework extends Framework { - middleware: Middleware; -} -export declare const middleware: Middleware; -export declare const LoopbackWrapper: LoopbackFramework; diff --git a/lib/build/framework/loopback/framework.js b/lib/build/framework/loopback/framework.js deleted file mode 100644 index 7e8db8ee6..000000000 --- a/lib/build/framework/loopback/framework.js +++ /dev/null @@ -1,175 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.LoopbackWrapper = exports.middleware = exports.LoopbackResponse = exports.LoopbackRequest = void 0; -const utils_1 = require("../../utils"); -const request_1 = require("../request"); -const response_1 = require("../response"); -const utils_2 = require("../utils"); -const supertokens_1 = __importDefault(require("../../supertokens")); -class LoopbackRequest extends request_1.BaseRequest { - constructor(ctx) { - super(); - this.getFormData = () => - __awaiter(this, void 0, void 0, function* () { - if (!this.formDataParserChecked) { - yield utils_2.assertFormDataBodyParserHasBeenUsedForExpressLikeRequest(this.request); - this.formDataParserChecked = true; - } - return this.request.body; - }); - this.getKeyValueFromQuery = (key) => { - if (this.request.query === undefined) { - return undefined; - } - let value = this.request.query[key]; - if (value === undefined || typeof value !== "string") { - return undefined; - } - return value; - }; - this.getJSONBody = () => - __awaiter(this, void 0, void 0, function* () { - if (!this.parserChecked) { - yield utils_2.assertThatBodyParserHasBeenUsedForExpressLikeRequest(this.getMethod(), this.request); - this.parserChecked = true; - } - return this.request.body; - }); - this.getMethod = () => { - return utils_1.normaliseHttpMethod(this.request.method); - }; - this.getCookieValue = (key) => { - return utils_2.getCookieValueFromIncomingMessage(this.request, key); - }; - this.getHeaderValue = (key) => { - return utils_2.getHeaderValueFromIncomingMessage(this.request, key); - }; - this.getOriginalURL = () => { - return this.request.originalUrl; - }; - this.original = ctx.request; - this.request = ctx.request; - this.parserChecked = false; - this.formDataParserChecked = false; - } -} -exports.LoopbackRequest = LoopbackRequest; -class LoopbackResponse extends response_1.BaseResponse { - constructor(ctx) { - super(); - this.sendHTMLResponse = (html) => { - if (!this.response.writableEnded) { - this.response.set("Content-Type", "text/html"); - this.response.status(this.statusCode).send(Buffer.from(html)); - } - }; - this.setHeader = (key, value, allowDuplicateKey) => { - utils_2.setHeaderForExpressLikeResponse(this.response, key, value, allowDuplicateKey); - }; - this.removeHeader = (key) => { - this.response.removeHeader(key); - }; - this.setCookie = (key, value, domain, secure, httpOnly, expires, path, sameSite) => { - utils_2.setCookieForServerResponse( - this.response, - key, - value, - domain, - secure, - httpOnly, - expires, - path, - sameSite - ); - }; - this.setStatusCode = (statusCode) => { - if (!this.response.writableEnded) { - this.statusCode = statusCode; - } - }; - this.sendJSONResponse = (content) => { - if (!this.response.writableEnded) { - this.response.status(this.statusCode).json(content); - } - }; - this.original = ctx.response; - this.response = ctx.response; - this.statusCode = 200; - } -} -exports.LoopbackResponse = LoopbackResponse; -const middleware = (ctx, next) => - __awaiter(void 0, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new LoopbackRequest(ctx); - let response = new LoopbackResponse(ctx); - try { - let result = yield supertokens.middleware(request, response); - if (!result) { - return yield next(); - } - return; - } catch (err) { - return yield supertokens.errorHandler(err, request, response); - } - }); -exports.middleware = middleware; -exports.LoopbackWrapper = { - middleware: exports.middleware, - wrapRequest: (unwrapped) => { - return new LoopbackRequest(unwrapped); - }, - wrapResponse: (unwrapped) => { - return new LoopbackResponse(unwrapped); - }, -}; diff --git a/lib/build/framework/loopback/index.d.ts b/lib/build/framework/loopback/index.d.ts deleted file mode 100644 index 4074a2fd5..000000000 --- a/lib/build/framework/loopback/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -export type { SessionContext } from "./framework"; -export declare const middleware: import("@loopback/rest").Middleware; -export declare const wrapRequest: (unwrapped: any) => import("..").BaseRequest; -export declare const wrapResponse: (unwrapped: any) => import("..").BaseResponse; diff --git a/lib/build/framework/loopback/index.js b/lib/build/framework/loopback/index.js deleted file mode 100644 index ae5cb6ad4..000000000 --- a/lib/build/framework/loopback/index.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.wrapResponse = exports.wrapRequest = exports.middleware = void 0; -const framework_1 = require("./framework"); -exports.middleware = framework_1.LoopbackWrapper.middleware; -exports.wrapRequest = framework_1.LoopbackWrapper.wrapRequest; -exports.wrapResponse = framework_1.LoopbackWrapper.wrapResponse; diff --git a/lib/build/framework/request.d.ts b/lib/build/framework/request.d.ts deleted file mode 100644 index 17513cb35..000000000 --- a/lib/build/framework/request.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -import { HTTPMethod } from "../types"; -export declare abstract class BaseRequest { - wrapperUsed: boolean; - original: any; - constructor(); - abstract getKeyValueFromQuery: (key: string) => string | undefined; - abstract getJSONBody: () => Promise; - abstract getMethod: () => HTTPMethod; - abstract getCookieValue: (key_: string) => string | undefined; - abstract getHeaderValue: (key: string) => string | undefined; - abstract getOriginalURL: () => string; - abstract getFormData: () => Promise; -} diff --git a/lib/build/framework/request.js b/lib/build/framework/request.js deleted file mode 100644 index d3d8773e6..000000000 --- a/lib/build/framework/request.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseRequest = void 0; -class BaseRequest { - constructor() { - this.wrapperUsed = true; - } -} -exports.BaseRequest = BaseRequest; diff --git a/lib/build/framework/response.d.ts b/lib/build/framework/response.d.ts deleted file mode 100644 index 8cf7a67d3..000000000 --- a/lib/build/framework/response.d.ts +++ /dev/null @@ -1,21 +0,0 @@ -// @ts-nocheck -export declare abstract class BaseResponse { - wrapperUsed: boolean; - original: any; - constructor(); - abstract setHeader: (key: string, value: string, allowDuplicateKey: boolean) => void; - abstract removeHeader: (key: string) => void; - abstract setCookie: ( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" - ) => void; - abstract setStatusCode: (statusCode: number) => void; - abstract sendJSONResponse: (content: any) => void; - abstract sendHTMLResponse: (html: string) => void; -} diff --git a/lib/build/framework/response.js b/lib/build/framework/response.js deleted file mode 100644 index d634020ad..000000000 --- a/lib/build/framework/response.js +++ /dev/null @@ -1,23 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BaseResponse = void 0; -class BaseResponse { - constructor() { - this.wrapperUsed = true; - } -} -exports.BaseResponse = BaseResponse; diff --git a/lib/build/framework/types.d.ts b/lib/build/framework/types.d.ts deleted file mode 100644 index f685b5e0a..000000000 --- a/lib/build/framework/types.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -export declare type TypeFramework = "express" | "fastify" | "hapi" | "loopback" | "koa" | "awsLambda"; -import { BaseRequest, BaseResponse } from "."; -export declare let SchemaFramework: { - type: string; - enum: string[]; -}; -export interface Framework { - wrapRequest: (unwrapped: any) => BaseRequest; - wrapResponse: (unwrapped: any) => BaseResponse; -} diff --git a/lib/build/framework/types.js b/lib/build/framework/types.js deleted file mode 100644 index 282217eef..000000000 --- a/lib/build/framework/types.js +++ /dev/null @@ -1,7 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SchemaFramework = void 0; -exports.SchemaFramework = { - type: "string", - enum: ["express", "fastify", "hapi", "loopback", "koa", "awsLambda"], -}; diff --git a/lib/build/framework/utils.d.ts b/lib/build/framework/utils.d.ts deleted file mode 100644 index c9e1a80c1..000000000 --- a/lib/build/framework/utils.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -// @ts-nocheck -/// -import type { Request, Response } from "express"; -import type { IncomingMessage } from "http"; -import { ServerResponse } from "http"; -import type { HTTPMethod } from "../types"; -import { NextApiRequest } from "next"; -export declare function getCookieValueFromHeaders(headers: any, key: string): string | undefined; -export declare function getCookieValueFromIncomingMessage(request: IncomingMessage, key: string): string | undefined; -export declare function getHeaderValueFromIncomingMessage(request: IncomingMessage, key: string): string | undefined; -export declare function normalizeHeaderValue(value: string | string[] | undefined): string | undefined; -export declare function assertThatBodyParserHasBeenUsedForExpressLikeRequest( - method: HTTPMethod, - request: (Request | NextApiRequest) & { - __supertokensFromNextJS?: true; - } -): Promise; -export declare function assertFormDataBodyParserHasBeenUsedForExpressLikeRequest( - request: (Request | NextApiRequest) & { - __supertokensFromNextJS?: true; - } -): Promise; -export declare function setHeaderForExpressLikeResponse( - res: Response, - key: string, - value: string, - allowDuplicateKey: boolean -): void; -/** - * - * @param res - * @param name - * @param value - * @param domain - * @param secure - * @param httpOnly - * @param expires - * @param path - */ -export declare function setCookieForServerResponse( - res: ServerResponse, - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" -): ServerResponse; -export declare function getCookieValueToSetInHeader( - prev: string | string[] | undefined, - val: string | string[], - key: string -): string | string[]; -export declare function serializeCookieValue( - key: string, - value: string, - domain: string | undefined, - secure: boolean, - httpOnly: boolean, - expires: number, - path: string, - sameSite: "strict" | "lax" | "none" -): string; diff --git a/lib/build/framework/utils.js b/lib/build/framework/utils.js deleted file mode 100644 index ee94f30de..000000000 --- a/lib/build/framework/utils.js +++ /dev/null @@ -1,315 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.serializeCookieValue = exports.getCookieValueToSetInHeader = exports.setCookieForServerResponse = exports.setHeaderForExpressLikeResponse = exports.assertFormDataBodyParserHasBeenUsedForExpressLikeRequest = exports.assertThatBodyParserHasBeenUsedForExpressLikeRequest = exports.normalizeHeaderValue = exports.getHeaderValueFromIncomingMessage = exports.getCookieValueFromIncomingMessage = exports.getCookieValueFromHeaders = void 0; -const cookie_1 = require("cookie"); -const body_parser_1 = require("body-parser"); -const http_1 = require("http"); -const error_1 = __importDefault(require("../error")); -const constants_1 = require("./constants"); -const utils_1 = require("../utils"); -function getCookieValueFromHeaders(headers, key) { - if (headers === undefined || headers === null) { - return undefined; - } - let cookies = headers.cookie || headers.Cookie; - if (cookies === undefined) { - return undefined; - } - cookies = cookie_1.parse(cookies); - // parse JSON cookies - cookies = JSONCookies(cookies); - return cookies[key]; -} -exports.getCookieValueFromHeaders = getCookieValueFromHeaders; -function getCookieValueFromIncomingMessage(request, key) { - if (request.cookies) { - return request.cookies[key]; - } - return getCookieValueFromHeaders(request.headers, key); -} -exports.getCookieValueFromIncomingMessage = getCookieValueFromIncomingMessage; -function getHeaderValueFromIncomingMessage(request, key) { - return normalizeHeaderValue(utils_1.getFromObjectCaseInsensitive(key, request.headers)); -} -exports.getHeaderValueFromIncomingMessage = getHeaderValueFromIncomingMessage; -function normalizeHeaderValue(value) { - if (value === undefined) { - return undefined; - } - if (Array.isArray(value)) { - return value[0]; - } - return value; -} -exports.normalizeHeaderValue = normalizeHeaderValue; -/** - * Parse JSON cookie string. - * - * @param {String} str - * @return {Object} Parsed object or undefined if not json cookie - * @public - */ -function JSONCookie(str) { - if (typeof str !== "string" || str.substr(0, 2) !== "j:") { - return undefined; - } - try { - return JSON.parse(str.slice(2)); - } catch (err) { - return undefined; - } -} -/** - * Parse JSON cookies. - * - * @param {Object} obj - * @return {Object} - * @public - */ -function JSONCookies(obj) { - let cookies = Object.keys(obj); - let key; - let val; - for (let i = 0; i < cookies.length; i++) { - key = cookies[i]; - val = JSONCookie(obj[key]); - if (val) { - obj[key] = val; - } - } - return obj; -} -function assertThatBodyParserHasBeenUsedForExpressLikeRequest(method, request) { - return __awaiter(this, void 0, void 0, function* () { - // according to https://github.com/supertokens/supertokens-node/issues/33 - if (method === "post" || method === "put") { - if (typeof request.body === "string") { - try { - request.body = JSON.parse(request.body); - } catch (err) { - if (request.body === "") { - request.body = {}; - } else { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "API input error: Please make sure to pass a valid JSON input in the request body", - }); - } - } - } else if ( - request.body === undefined || - Buffer.isBuffer(request.body) || - Object.keys(request.body).length === 0 - ) { - // parsing it again to make sure that the request is parsed atleast once by a json parser - let jsonParser = body_parser_1.json(); - let err = yield new Promise((resolve) => { - let resolvedCalled = false; - if (request.readable) { - jsonParser(request, new http_1.ServerResponse(request), (e) => { - if (!resolvedCalled) { - resolvedCalled = true; - resolve(e); - } - }); - } else { - resolve(undefined); - } - }); - if (err !== undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "API input error: Please make sure to pass a valid JSON input in the request body", - }); - } - } - } else if (method === "delete" || method === "get") { - if (request.query === undefined) { - let parser = body_parser_1.urlencoded({ extended: true }); - let err = yield new Promise((resolve) => parser(request, new http_1.ServerResponse(request), resolve)); - if (err !== undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "API input error: Please make sure to pass valid url encoded form in the request body", - }); - } - } - } - }); -} -exports.assertThatBodyParserHasBeenUsedForExpressLikeRequest = assertThatBodyParserHasBeenUsedForExpressLikeRequest; -function assertFormDataBodyParserHasBeenUsedForExpressLikeRequest(request) { - return __awaiter(this, void 0, void 0, function* () { - let parser = body_parser_1.urlencoded({ extended: true }); - let err = yield new Promise((resolve) => { - if (request.readable) { - parser(request, new http_1.ServerResponse(request), (e) => { - resolve(e); - }); - } else { - resolve(undefined); - } - }); - if (err !== undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "API input error: Please make sure to pass valid url encoded form in the request body", - }); - } - }); -} -exports.assertFormDataBodyParserHasBeenUsedForExpressLikeRequest = assertFormDataBodyParserHasBeenUsedForExpressLikeRequest; -function setHeaderForExpressLikeResponse(res, key, value, allowDuplicateKey) { - try { - let existingHeaders = res.getHeaders(); - let existingValue = existingHeaders[key.toLowerCase()]; - // we have the res.header for compatibility with nextJS - if (existingValue === undefined) { - if (res.header !== undefined) { - res.header(key, value); - } else { - res.setHeader(key, value); - } - } else if (allowDuplicateKey) { - if (res.header !== undefined) { - res.header(key, existingValue + ", " + value); - } else { - res.setHeader(key, existingValue + ", " + value); - } - } else { - // we overwrite the current one with the new one - if (res.header !== undefined) { - res.header(key, value); - } else { - res.setHeader(key, value); - } - } - } catch (err) { - throw new Error("Error while setting header with key: " + key + " and value: " + value); - } -} -exports.setHeaderForExpressLikeResponse = setHeaderForExpressLikeResponse; -/** - * - * @param res - * @param name - * @param value - * @param domain - * @param secure - * @param httpOnly - * @param expires - * @param path - */ -function setCookieForServerResponse(res, key, value, domain, secure, httpOnly, expires, path, sameSite) { - return appendToServerResponse( - res, - constants_1.COOKIE_HEADER, - serializeCookieValue(key, value, domain, secure, httpOnly, expires, path, sameSite), - key - ); -} -exports.setCookieForServerResponse = setCookieForServerResponse; -/** - * Append additional header `field` with value `val`. - * - * Example: - * - * res.append('Set-Cookie', 'foo=bar; Path=/; HttpOnly'); - * - * @param {ServerResponse} res - * @param {string} field - * @param {string| string[]} val - */ -function appendToServerResponse(res, field, val, key) { - let prev = res.getHeader(field); - res.setHeader(field, getCookieValueToSetInHeader(prev, val, key)); - return res; -} -function getCookieValueToSetInHeader(prev, val, key) { - let value = val; - if (prev !== undefined) { - // removing existing cookie with the same name - if (Array.isArray(prev)) { - let removedDuplicate = []; - for (let i = 0; i < prev.length; i++) { - let curr = prev[i]; - if (!curr.startsWith(key)) { - removedDuplicate.push(curr); - } - } - prev = removedDuplicate; - } else { - if (prev.startsWith(key)) { - prev = undefined; - } - } - if (prev !== undefined) { - value = Array.isArray(prev) ? prev.concat(val) : Array.isArray(val) ? [prev].concat(val) : [prev, val]; - } - } - value = Array.isArray(value) ? value.map(String) : String(value); - return value; -} -exports.getCookieValueToSetInHeader = getCookieValueToSetInHeader; -function serializeCookieValue(key, value, domain, secure, httpOnly, expires, path, sameSite) { - let opts = { - domain, - secure, - httpOnly, - expires: new Date(expires), - path, - sameSite, - }; - return cookie_1.serialize(key, value, opts); -} -exports.serializeCookieValue = serializeCookieValue; diff --git a/lib/build/index.d.ts b/lib/build/index.d.ts deleted file mode 100644 index 96373acef..000000000 --- a/lib/build/index.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -// @ts-nocheck -import SuperTokens from "./supertokens"; -import SuperTokensError from "./error"; -export default class SuperTokensWrapper { - static init: typeof SuperTokens.init; - static Error: typeof SuperTokensError; - static getAllCORSHeaders(): string[]; - static getUserCount(includeRecipeIds?: string[]): Promise; - static getUsersOldestFirst(input?: { - limit?: number; - paginationToken?: string; - includeRecipeIds?: string[]; - query?: object; - }): Promise<{ - users: { - recipeId: string; - user: any; - }[]; - nextPaginationToken?: string; - }>; - static getUsersNewestFirst(input?: { - limit?: number; - paginationToken?: string; - includeRecipeIds?: string[]; - query?: object; - }): Promise<{ - users: { - recipeId: string; - user: any; - }[]; - nextPaginationToken?: string; - }>; - static deleteUser( - userId: string - ): Promise<{ - status: "OK"; - }>; - static createUserIdMapping(input: { - superTokensUserId: string; - externalUserId: string; - externalUserIdInfo?: string; - force?: boolean; - }): Promise< - | { - status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR"; - } - | { - status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR"; - doesSuperTokensUserIdExist: boolean; - doesExternalUserIdExist: boolean; - } - >; - static getUserIdMapping(input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - }): Promise< - | { - status: "OK"; - superTokensUserId: string; - externalUserId: string; - externalUserIdInfo: string | undefined; - } - | { - status: "UNKNOWN_MAPPING_ERROR"; - } - >; - static deleteUserIdMapping(input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - force?: boolean; - }): Promise<{ - status: "OK"; - didMappingExist: boolean; - }>; - static updateOrDeleteUserIdMappingInfo(input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - externalUserIdInfo?: string; - }): Promise<{ - status: "OK" | "UNKNOWN_MAPPING_ERROR"; - }>; -} -export declare let init: typeof SuperTokens.init; -export declare let getAllCORSHeaders: typeof SuperTokensWrapper.getAllCORSHeaders; -export declare let getUserCount: typeof SuperTokensWrapper.getUserCount; -export declare let getUsersOldestFirst: typeof SuperTokensWrapper.getUsersOldestFirst; -export declare let getUsersNewestFirst: typeof SuperTokensWrapper.getUsersNewestFirst; -export declare let deleteUser: typeof SuperTokensWrapper.deleteUser; -export declare let createUserIdMapping: typeof SuperTokensWrapper.createUserIdMapping; -export declare let getUserIdMapping: typeof SuperTokensWrapper.getUserIdMapping; -export declare let deleteUserIdMapping: typeof SuperTokensWrapper.deleteUserIdMapping; -export declare let updateOrDeleteUserIdMappingInfo: typeof SuperTokensWrapper.updateOrDeleteUserIdMappingInfo; -export declare let Error: typeof SuperTokensError; diff --git a/lib/build/index.js b/lib/build/index.js deleted file mode 100644 index d55623038..000000000 --- a/lib/build/index.js +++ /dev/null @@ -1,74 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Error = exports.updateOrDeleteUserIdMappingInfo = exports.deleteUserIdMapping = exports.getUserIdMapping = exports.createUserIdMapping = exports.deleteUser = exports.getUsersNewestFirst = exports.getUsersOldestFirst = exports.getUserCount = exports.getAllCORSHeaders = exports.init = void 0; -const supertokens_1 = __importDefault(require("./supertokens")); -const error_1 = __importDefault(require("./error")); -// For Express -class SuperTokensWrapper { - static getAllCORSHeaders() { - return supertokens_1.default.getInstanceOrThrowError().getAllCORSHeaders(); - } - static getUserCount(includeRecipeIds) { - return supertokens_1.default.getInstanceOrThrowError().getUserCount(includeRecipeIds); - } - static getUsersOldestFirst(input) { - return supertokens_1.default - .getInstanceOrThrowError() - .getUsers(Object.assign({ timeJoinedOrder: "ASC" }, input)); - } - static getUsersNewestFirst(input) { - return supertokens_1.default - .getInstanceOrThrowError() - .getUsers(Object.assign({ timeJoinedOrder: "DESC" }, input)); - } - static deleteUser(userId) { - return supertokens_1.default.getInstanceOrThrowError().deleteUser({ - userId, - }); - } - static createUserIdMapping(input) { - return supertokens_1.default.getInstanceOrThrowError().createUserIdMapping(input); - } - static getUserIdMapping(input) { - return supertokens_1.default.getInstanceOrThrowError().getUserIdMapping(input); - } - static deleteUserIdMapping(input) { - return supertokens_1.default.getInstanceOrThrowError().deleteUserIdMapping(input); - } - static updateOrDeleteUserIdMappingInfo(input) { - return supertokens_1.default.getInstanceOrThrowError().updateOrDeleteUserIdMappingInfo(input); - } -} -exports.default = SuperTokensWrapper; -SuperTokensWrapper.init = supertokens_1.default.init; -SuperTokensWrapper.Error = error_1.default; -exports.init = SuperTokensWrapper.init; -exports.getAllCORSHeaders = SuperTokensWrapper.getAllCORSHeaders; -exports.getUserCount = SuperTokensWrapper.getUserCount; -exports.getUsersOldestFirst = SuperTokensWrapper.getUsersOldestFirst; -exports.getUsersNewestFirst = SuperTokensWrapper.getUsersNewestFirst; -exports.deleteUser = SuperTokensWrapper.deleteUser; -exports.createUserIdMapping = SuperTokensWrapper.createUserIdMapping; -exports.getUserIdMapping = SuperTokensWrapper.getUserIdMapping; -exports.deleteUserIdMapping = SuperTokensWrapper.deleteUserIdMapping; -exports.updateOrDeleteUserIdMappingInfo = SuperTokensWrapper.updateOrDeleteUserIdMappingInfo; -exports.Error = SuperTokensWrapper.Error; diff --git a/lib/build/ingredients/emaildelivery/index.d.ts b/lib/build/ingredients/emaildelivery/index.d.ts deleted file mode 100644 index bfa1e8fd9..000000000 --- a/lib/build/ingredients/emaildelivery/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { TypeInputWithService, EmailDeliveryInterface } from "./types"; -export default class EmailDelivery { - ingredientInterfaceImpl: EmailDeliveryInterface; - constructor(config: TypeInputWithService); -} diff --git a/lib/build/ingredients/emaildelivery/index.js b/lib/build/ingredients/emaildelivery/index.js deleted file mode 100644 index 958cd35a2..000000000 --- a/lib/build/ingredients/emaildelivery/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -class EmailDelivery { - constructor(config) { - let builder = new supertokens_js_override_1.default(config.service); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.ingredientInterfaceImpl = builder.build(); - } -} -exports.default = EmailDelivery; diff --git a/lib/build/ingredients/emaildelivery/services/smtp.d.ts b/lib/build/ingredients/emaildelivery/services/smtp.d.ts deleted file mode 100644 index 43a3c5437..000000000 --- a/lib/build/ingredients/emaildelivery/services/smtp.d.ts +++ /dev/null @@ -1,34 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -export interface SMTPServiceConfig { - host: string; - from: { - name: string; - email: string; - }; - port: number; - secure?: boolean; - authUsername?: string; - password: string; -} -export interface GetContentResult { - body: string; - isHtml: boolean; - subject: string; - toEmail: string; -} -export declare type TypeInputSendRawEmail = GetContentResult & { - userContext: any; -}; -export declare type ServiceInterface = { - sendRawEmail: (input: TypeInputSendRawEmail) => Promise; - getContent: ( - input: T & { - userContext: any; - } - ) => Promise; -}; -export declare type TypeInput = { - smtpSettings: SMTPServiceConfig; - override?: (oI: ServiceInterface, builder: OverrideableBuilder>) => ServiceInterface; -}; diff --git a/lib/build/ingredients/emaildelivery/services/smtp.js b/lib/build/ingredients/emaildelivery/services/smtp.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/ingredients/emaildelivery/services/smtp.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/ingredients/emaildelivery/types.d.ts b/lib/build/ingredients/emaildelivery/types.d.ts deleted file mode 100644 index 494e9f4cd..000000000 --- a/lib/build/ingredients/emaildelivery/types.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -export declare type EmailDeliveryInterface = { - sendEmail: ( - input: T & { - userContext: any; - } - ) => Promise; -}; -/** - * config class parameter when parent Recipe create a new EmailDeliveryIngredient object via constructor - */ -export interface TypeInput { - service?: EmailDeliveryInterface; - override?: ( - originalImplementation: EmailDeliveryInterface, - builder: OverrideableBuilder> - ) => EmailDeliveryInterface; -} -export interface TypeInputWithService { - service: EmailDeliveryInterface; - override?: ( - originalImplementation: EmailDeliveryInterface, - builder: OverrideableBuilder> - ) => EmailDeliveryInterface; -} diff --git a/lib/build/ingredients/emaildelivery/types.js b/lib/build/ingredients/emaildelivery/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/ingredients/emaildelivery/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/ingredients/smsdelivery/index.d.ts b/lib/build/ingredients/smsdelivery/index.d.ts deleted file mode 100644 index 80e9f60a6..000000000 --- a/lib/build/ingredients/smsdelivery/index.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { TypeInputWithService, SmsDeliveryInterface } from "./types"; -export default class SmsDelivery { - ingredientInterfaceImpl: SmsDeliveryInterface; - constructor(config: TypeInputWithService); -} diff --git a/lib/build/ingredients/smsdelivery/index.js b/lib/build/ingredients/smsdelivery/index.js deleted file mode 100644 index a52608dc0..000000000 --- a/lib/build/ingredients/smsdelivery/index.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -class SmsDelivery { - constructor(config) { - let builder = new supertokens_js_override_1.default(config.service); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.ingredientInterfaceImpl = builder.build(); - } -} -exports.default = SmsDelivery; diff --git a/lib/build/ingredients/smsdelivery/services/supertokens.d.ts b/lib/build/ingredients/smsdelivery/services/supertokens.d.ts deleted file mode 100644 index 1196903bb..000000000 --- a/lib/build/ingredients/smsdelivery/services/supertokens.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @ts-nocheck -export declare const SUPERTOKENS_SMS_SERVICE_URL = "https://api.supertokens.com/0/services/sms"; diff --git a/lib/build/ingredients/smsdelivery/services/supertokens.js b/lib/build/ingredients/smsdelivery/services/supertokens.js deleted file mode 100644 index 2689f25fb..000000000 --- a/lib/build/ingredients/smsdelivery/services/supertokens.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SUPERTOKENS_SMS_SERVICE_URL = void 0; -exports.SUPERTOKENS_SMS_SERVICE_URL = "https://api.supertokens.com/0/services/sms"; diff --git a/lib/build/ingredients/smsdelivery/services/twilio.d.ts b/lib/build/ingredients/smsdelivery/services/twilio.d.ts deleted file mode 100644 index d2d0dabae..000000000 --- a/lib/build/ingredients/smsdelivery/services/twilio.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -import { ClientOpts } from "twilio/lib/base/BaseTwilio"; -/** - * only one of "from" and "messagingServiceSid" should be passed. - * if both are passed, we should throw error to the user - * saying that only one of them should be set. this is because - * both parameters can't be passed while calling twilio API. - * if none of "from" and "messagingServiceSid" is passed, error - * should be thrown. - */ -export declare type TwilioServiceConfig = - | { - accountSid: string; - authToken: string; - from: string; - opts?: ClientOpts; - } - | { - accountSid: string; - authToken: string; - messagingServiceSid: string; - opts?: ClientOpts; - }; -export interface GetContentResult { - body: string; - toPhoneNumber: string; -} -export declare type TypeInputSendRawSms = GetContentResult & { - userContext: any; -} & ( - | { - from: string; - } - | { - messagingServiceSid: string; - } - ); -export declare type ServiceInterface = { - sendRawSms: (input: TypeInputSendRawSms) => Promise; - getContent: ( - input: T & { - userContext: any; - } - ) => Promise; -}; -export declare type TypeInput = { - twilioSettings: TwilioServiceConfig; - override?: (oI: ServiceInterface, builder: OverrideableBuilder>) => ServiceInterface; -}; -export declare function normaliseUserInputConfig(input: TypeInput): TypeInput; diff --git a/lib/build/ingredients/smsdelivery/services/twilio.js b/lib/build/ingredients/smsdelivery/services/twilio.js deleted file mode 100644 index 73876eb37..000000000 --- a/lib/build/ingredients/smsdelivery/services/twilio.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.normaliseUserInputConfig = void 0; -function normaliseUserInputConfig(input) { - let from = "from" in input.twilioSettings ? input.twilioSettings.from : undefined; - let messagingServiceSid = - "messagingServiceSid" in input.twilioSettings ? input.twilioSettings.messagingServiceSid : undefined; - if ( - (from === undefined && messagingServiceSid === undefined) || - (from !== undefined && messagingServiceSid !== undefined) - ) { - throw Error(`Please pass exactly one of "from" and "messagingServiceSid" config for twilioSettings.`); - } - return input; -} -exports.normaliseUserInputConfig = normaliseUserInputConfig; diff --git a/lib/build/ingredients/smsdelivery/types.d.ts b/lib/build/ingredients/smsdelivery/types.d.ts deleted file mode 100644 index f45dc8f2a..000000000 --- a/lib/build/ingredients/smsdelivery/types.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -export declare type SmsDeliveryInterface = { - sendSms: ( - input: T & { - userContext: any; - } - ) => Promise; -}; -/** - * config class parameter when parent Recipe create a new SmsDeliveryIngredient object via constructor - */ -export interface TypeInput { - service?: SmsDeliveryInterface; - override?: ( - originalImplementation: SmsDeliveryInterface, - builder: OverrideableBuilder> - ) => SmsDeliveryInterface; -} -export interface TypeInputWithService { - service: SmsDeliveryInterface; - override?: ( - originalImplementation: SmsDeliveryInterface, - builder: OverrideableBuilder> - ) => SmsDeliveryInterface; -} diff --git a/lib/build/ingredients/smsdelivery/types.js b/lib/build/ingredients/smsdelivery/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/ingredients/smsdelivery/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/logger.d.ts b/lib/build/logger.d.ts deleted file mode 100644 index 1a3a6aef6..000000000 --- a/lib/build/logger.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -declare function logDebugMessage(message: string): void; -export { logDebugMessage }; diff --git a/lib/build/logger.js b/lib/build/logger.js deleted file mode 100644 index 520e67fc5..000000000 --- a/lib/build/logger.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.logDebugMessage = void 0; -const debug_1 = __importDefault(require("debug")); -const version_1 = require("./version"); -const SUPERTOKENS_DEBUG_NAMESPACE = "com.supertokens"; -/* - The debug logger below can be used to log debug messages in the following format - com.supertokens {t: "2022-03-18T11:15:24.608Z", message: Your message, file: "/home/supertokens-node/lib/build/supertokens.js:231:18" sdkVer: "9.2.0"} +0m -*/ -function logDebugMessage(message) { - if (debug_1.default.enabled(SUPERTOKENS_DEBUG_NAMESPACE)) { - debug_1.default(SUPERTOKENS_DEBUG_NAMESPACE)( - `{t: "${new Date().toISOString()}", message: \"${message}\", file: \"${getFileLocation()}\" sdkVer: "${ - version_1.version - }"}` - ); - console.log(); - } -} -exports.logDebugMessage = logDebugMessage; -let getFileLocation = () => { - let errorObject = new Error(); - if (errorObject.stack === undefined) { - // should not come here - return "N/A"; - } - // split the error stack into an array with new line as the separator - let errorStack = errorObject.stack.split("\n"); - // find return the first trace which doesnt have the logger.js file - for (let i = 1; i < errorStack.length; i++) { - if (!errorStack[i].includes("logger.js")) { - // retrieve the string between the parenthesis - return errorStack[i].match(/(?<=\().+?(?=\))/g); - } - } - return "N/A"; -}; diff --git a/lib/build/nextjs.d.ts b/lib/build/nextjs.d.ts deleted file mode 100644 index 195a81422..000000000 --- a/lib/build/nextjs.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -export default class NextJS { - static superTokensNextWrapper( - middleware: (next: (middlewareError?: any) => void) => Promise, - request: any, - response: any - ): Promise; -} -export declare let superTokensNextWrapper: typeof NextJS.superTokensNextWrapper; diff --git a/lib/build/nextjs.js b/lib/build/nextjs.js deleted file mode 100644 index 97f8e2bad..000000000 --- a/lib/build/nextjs.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.superTokensNextWrapper = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const express_1 = require("./framework/express"); -function next(request, response, resolve, reject) { - return function (middlewareError) { - return __awaiter(this, void 0, void 0, function* () { - if (middlewareError === undefined) { - return resolve(); - } - yield express_1.errorHandler()(middlewareError, request, response, (errorHandlerError) => { - if (errorHandlerError !== undefined) { - return reject(errorHandlerError); - } - // do nothing, error handler does not resolve the promise. - }); - }); - }; -} -class NextJS { - static superTokensNextWrapper(middleware, request, response) { - return __awaiter(this, void 0, void 0, function* () { - return new Promise((resolve, reject) => - __awaiter(this, void 0, void 0, function* () { - request.__supertokensFromNextJS = true; - try { - let callbackCalled = false; - const result = yield middleware((err) => { - callbackCalled = true; - next(request, response, resolve, reject)(err); - }); - if (!callbackCalled && !response.finished && !response.headersSent) { - return resolve(result); - } - } catch (err) { - yield express_1.errorHandler()(err, request, response, (errorHandlerError) => { - if (errorHandlerError !== undefined) { - return reject(errorHandlerError); - } - // do nothing, error handler does not resolve the promise. - }); - } - }) - ); - }); - } -} -exports.default = NextJS; -exports.superTokensNextWrapper = NextJS.superTokensNextWrapper; diff --git a/lib/build/normalisedURLDomain.d.ts b/lib/build/normalisedURLDomain.d.ts deleted file mode 100644 index b75c15d4b..000000000 --- a/lib/build/normalisedURLDomain.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -export default class NormalisedURLDomain { - private value; - constructor(url: string); - getAsStringDangerous: () => string; -} diff --git a/lib/build/normalisedURLDomain.js b/lib/build/normalisedURLDomain.js deleted file mode 100644 index e4a69f7f8..000000000 --- a/lib/build/normalisedURLDomain.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const url_1 = require("url"); -const utils_1 = require("./utils"); -class NormalisedURLDomain { - constructor(url) { - this.getAsStringDangerous = () => { - return this.value; - }; - this.value = normaliseURLDomainOrThrowError(url); - } -} -exports.default = NormalisedURLDomain; -function normaliseURLDomainOrThrowError(input, ignoreProtocol = false) { - input = input.trim().toLowerCase(); - try { - if (!input.startsWith("http://") && !input.startsWith("https://") && !input.startsWith("supertokens://")) { - throw new Error("converting to proper URL"); - } - let urlObj = new url_1.URL(input); - if (ignoreProtocol) { - if (urlObj.hostname.startsWith("localhost") || utils_1.isAnIpAddress(urlObj.hostname)) { - input = "http://" + urlObj.host; - } else { - input = "https://" + urlObj.host; - } - } else { - input = urlObj.protocol + "//" + urlObj.host; - } - return input; - } catch (err) {} - // not a valid URL - if (input.startsWith("/")) { - throw Error("Please provide a valid domain name"); - } - if (input.indexOf(".") === 0) { - input = input.substr(1); - } - // If the input contains a . it means they have given a domain name. - // So we try assuming that they have given a domain name - if ( - (input.indexOf(".") !== -1 || input.startsWith("localhost")) && - !input.startsWith("http://") && - !input.startsWith("https://") - ) { - input = "https://" + input; - // at this point, it should be a valid URL. So we test that before doing a recursive call - try { - new url_1.URL(input); - return normaliseURLDomainOrThrowError(input, true); - } catch (err) {} - } - throw Error("Please provide a valid domain name"); -} diff --git a/lib/build/normalisedURLPath.d.ts b/lib/build/normalisedURLPath.d.ts deleted file mode 100644 index db7787bb4..000000000 --- a/lib/build/normalisedURLPath.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @ts-nocheck -export default class NormalisedURLPath { - private value; - constructor(url: string); - startsWith: (other: NormalisedURLPath) => boolean; - appendPath: (other: NormalisedURLPath) => NormalisedURLPath; - getAsStringDangerous: () => string; - equals: (other: NormalisedURLPath) => boolean; - isARecipePath: () => boolean; -} diff --git a/lib/build/normalisedURLPath.js b/lib/build/normalisedURLPath.js deleted file mode 100644 index c254d8349..000000000 --- a/lib/build/normalisedURLPath.js +++ /dev/null @@ -1,89 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -const url_1 = require("url"); -class NormalisedURLPath { - constructor(url) { - this.startsWith = (other) => { - return this.value.startsWith(other.value); - }; - this.appendPath = (other) => { - return new NormalisedURLPath(this.value + other.value); - }; - this.getAsStringDangerous = () => { - return this.value; - }; - this.equals = (other) => { - return this.value === other.value; - }; - this.isARecipePath = () => { - return this.value === "/recipe" || this.value.startsWith("/recipe/"); - }; - this.value = normaliseURLPathOrThrowError(url); - } -} -exports.default = NormalisedURLPath; -function normaliseURLPathOrThrowError(input) { - input = input.trim().toLowerCase(); - try { - if (!input.startsWith("http://") && !input.startsWith("https://")) { - throw new Error("converting to proper URL"); - } - let urlObj = new url_1.URL(input); - input = urlObj.pathname; - if (input.charAt(input.length - 1) === "/") { - return input.substr(0, input.length - 1); - } - return input; - } catch (err) {} - // not a valid URL - // If the input contains a . it means they have given a domain name. - // So we try assuming that they have given a domain name + path - if ( - (domainGiven(input) || input.startsWith("localhost")) && - !input.startsWith("http://") && - !input.startsWith("https://") - ) { - input = "http://" + input; - return normaliseURLPathOrThrowError(input); - } - if (input.charAt(0) !== "/") { - input = "/" + input; - } - // at this point, we should be able to convert it into a fake URL and recursively call this function. - try { - // test that we can convert this to prevent an infinite loop - new url_1.URL("http://example.com" + input); - return normaliseURLPathOrThrowError("http://example.com" + input); - } catch (err) { - throw Error("Please provide a valid URL path"); - } -} -function domainGiven(input) { - // If no dot, return false. - if (input.indexOf(".") === -1 || input.startsWith("/")) { - return false; - } - try { - let url = new url_1.URL(input); - return url.hostname.indexOf(".") !== -1; - } catch (ignored) {} - try { - let url = new url_1.URL("http://" + input); - return url.hostname.indexOf(".") !== -1; - } catch (ignored) {} - return false; -} diff --git a/lib/build/postSuperTokensInitCallbacks.d.ts b/lib/build/postSuperTokensInitCallbacks.d.ts deleted file mode 100644 index 6eef30adb..000000000 --- a/lib/build/postSuperTokensInitCallbacks.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -export declare class PostSuperTokensInitCallbacks { - static postInitCallbacks: (() => void)[]; - static addPostInitCallback(cb: () => void): void; - static runPostInitCallbacks(): void; -} diff --git a/lib/build/postSuperTokensInitCallbacks.js b/lib/build/postSuperTokensInitCallbacks.js deleted file mode 100644 index a58af9157..000000000 --- a/lib/build/postSuperTokensInitCallbacks.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PostSuperTokensInitCallbacks = void 0; -class PostSuperTokensInitCallbacks { - static addPostInitCallback(cb) { - PostSuperTokensInitCallbacks.postInitCallbacks.push(cb); - } - static runPostInitCallbacks() { - for (const cb of PostSuperTokensInitCallbacks.postInitCallbacks) { - cb(); - } - PostSuperTokensInitCallbacks.postInitCallbacks = []; - } -} -exports.PostSuperTokensInitCallbacks = PostSuperTokensInitCallbacks; -PostSuperTokensInitCallbacks.postInitCallbacks = []; diff --git a/lib/build/processState.d.ts b/lib/build/processState.d.ts deleted file mode 100644 index 9decf8458..000000000 --- a/lib/build/processState.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @ts-nocheck -export declare enum PROCESS_STATE { - CALLING_SERVICE_IN_VERIFY = 0, - CALLING_SERVICE_IN_GET_API_VERSION = 1, - CALLING_SERVICE_IN_REQUEST_HELPER = 2, - MULTI_JWKS_VALIDATION = 3, -} -export declare class ProcessState { - history: PROCESS_STATE[]; - private static instance; - private constructor(); - static getInstance(): ProcessState; - addState: (state: PROCESS_STATE) => void; - private getEventByLastEventByName; - reset: () => void; - waitForEvent: (state: PROCESS_STATE, timeInMS?: number) => Promise; -} diff --git a/lib/build/processState.js b/lib/build/processState.js deleted file mode 100644 index 847a97b15..000000000 --- a/lib/build/processState.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.ProcessState = exports.PROCESS_STATE = void 0; -var PROCESS_STATE; -(function (PROCESS_STATE) { - PROCESS_STATE[(PROCESS_STATE["CALLING_SERVICE_IN_VERIFY"] = 0)] = "CALLING_SERVICE_IN_VERIFY"; - PROCESS_STATE[(PROCESS_STATE["CALLING_SERVICE_IN_GET_API_VERSION"] = 1)] = "CALLING_SERVICE_IN_GET_API_VERSION"; - PROCESS_STATE[(PROCESS_STATE["CALLING_SERVICE_IN_REQUEST_HELPER"] = 2)] = "CALLING_SERVICE_IN_REQUEST_HELPER"; - PROCESS_STATE[(PROCESS_STATE["MULTI_JWKS_VALIDATION"] = 3)] = "MULTI_JWKS_VALIDATION"; -})((PROCESS_STATE = exports.PROCESS_STATE || (exports.PROCESS_STATE = {}))); -class ProcessState { - constructor() { - this.history = []; - this.addState = (state) => { - if (process.env.TEST_MODE === "testing") { - this.history.push(state); - } - }; - this.getEventByLastEventByName = (state) => { - for (let i = this.history.length - 1; i >= 0; i--) { - if (this.history[i] === state) { - return this.history[i]; - } - } - return undefined; - }; - this.reset = () => { - this.history = []; - }; - this.waitForEvent = (state, timeInMS = 7000) => - __awaiter(this, void 0, void 0, function* () { - let startTime = Date.now(); - return new Promise((resolve) => { - let actualThis = this; - function tryAndGet() { - let result = actualThis.getEventByLastEventByName(state); - if (result === undefined) { - if (Date.now() - startTime > timeInMS) { - resolve(undefined); - } else { - setTimeout(tryAndGet, 1000); - } - } else { - resolve(result); - } - } - tryAndGet(); - }); - }); - } - static getInstance() { - if (ProcessState.instance === undefined) { - ProcessState.instance = new ProcessState(); - } - return ProcessState.instance; - } -} -exports.ProcessState = ProcessState; diff --git a/lib/build/querier.d.ts b/lib/build/querier.d.ts deleted file mode 100644 index d6140e86e..000000000 --- a/lib/build/querier.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @ts-nocheck -import NormalisedURLDomain from "./normalisedURLDomain"; -import NormalisedURLPath from "./normalisedURLPath"; -export declare class Querier { - private static initCalled; - private static hosts; - private static apiKey; - private static apiVersion; - private static lastTriedIndex; - private static hostsAliveForTesting; - private __hosts; - private rIdToCore; - private constructor(); - getAPIVersion: () => Promise; - static reset(): void; - getHostsAliveForTesting: () => Set; - static getNewInstanceOrThrowError(rIdToCore?: string): Querier; - static init( - hosts?: { - domain: NormalisedURLDomain; - basePath: NormalisedURLPath; - }[], - apiKey?: string - ): void; - sendPostRequest: (path: NormalisedURLPath, body: any) => Promise; - sendDeleteRequest: (path: NormalisedURLPath, body: any, params?: any) => Promise; - sendGetRequest: (path: NormalisedURLPath, params: any) => Promise; - sendPutRequest: (path: NormalisedURLPath, body: any) => Promise; - getAllCoreUrlsForPath(path: string): string[]; - private sendRequestHelper; -} diff --git a/lib/build/querier.js b/lib/build/querier.js deleted file mode 100644 index 267e3f830..000000000 --- a/lib/build/querier.js +++ /dev/null @@ -1,318 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.Querier = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const axios_1 = __importDefault(require("axios")); -const utils_1 = require("./utils"); -const version_1 = require("./version"); -const normalisedURLPath_1 = __importDefault(require("./normalisedURLPath")); -const processState_1 = require("./processState"); -class Querier { - // we have rIdToCore so that recipes can force change the rId sent to core. This is a hack until the core is able - // to support multiple rIds per API - constructor(hosts, rIdToCore) { - this.getAPIVersion = () => - __awaiter(this, void 0, void 0, function* () { - var _a; - if (Querier.apiVersion !== undefined) { - return Querier.apiVersion; - } - processState_1.ProcessState.getInstance().addState( - processState_1.PROCESS_STATE.CALLING_SERVICE_IN_GET_API_VERSION - ); - let response = yield this.sendRequestHelper( - new normalisedURLPath_1.default("/apiversion"), - "GET", - (url) => { - let headers = {}; - if (Querier.apiKey !== undefined) { - headers = { - "api-key": Querier.apiKey, - }; - } - return axios_1.default.get(url, { - headers, - }); - }, - ((_a = this.__hosts) === null || _a === void 0 ? void 0 : _a.length) || 0 - ); - let cdiSupportedByServer = response.versions; - let supportedVersion = utils_1.getLargestVersionFromIntersection( - cdiSupportedByServer, - version_1.cdiSupported - ); - if (supportedVersion === undefined) { - throw Error( - "The running SuperTokens core version is not compatible with this NodeJS SDK. Please visit https://supertokens.io/docs/community/compatibility to find the right versions" - ); - } - Querier.apiVersion = supportedVersion; - return Querier.apiVersion; - }); - this.getHostsAliveForTesting = () => { - if (process.env.TEST_MODE !== "testing") { - throw Error("calling testing function in non testing env"); - } - return Querier.hostsAliveForTesting; - }; - // path should start with "/" - this.sendPostRequest = (path, body) => - __awaiter(this, void 0, void 0, function* () { - var _b; - return this.sendRequestHelper( - path, - "POST", - (url) => - __awaiter(this, void 0, void 0, function* () { - let apiVersion = yield this.getAPIVersion(); - let headers = { - "cdi-version": apiVersion, - "content-type": "application/json; charset=utf-8", - }; - if (Querier.apiKey !== undefined) { - headers = Object.assign(Object.assign({}, headers), { "api-key": Querier.apiKey }); - } - if (path.isARecipePath() && this.rIdToCore !== undefined) { - headers = Object.assign(Object.assign({}, headers), { rid: this.rIdToCore }); - } - return yield axios_1.default({ - method: "POST", - url, - data: body, - headers, - }); - }), - ((_b = this.__hosts) === null || _b === void 0 ? void 0 : _b.length) || 0 - ); - }); - // path should start with "/" - this.sendDeleteRequest = (path, body, params) => - __awaiter(this, void 0, void 0, function* () { - var _c; - return this.sendRequestHelper( - path, - "DELETE", - (url) => - __awaiter(this, void 0, void 0, function* () { - let apiVersion = yield this.getAPIVersion(); - let headers = { "cdi-version": apiVersion }; - if (Querier.apiKey !== undefined) { - headers = Object.assign(Object.assign({}, headers), { - "api-key": Querier.apiKey, - "content-type": "application/json; charset=utf-8", - }); - } - if (path.isARecipePath() && this.rIdToCore !== undefined) { - headers = Object.assign(Object.assign({}, headers), { rid: this.rIdToCore }); - } - return yield axios_1.default({ - method: "DELETE", - url, - data: body, - headers, - params, - }); - }), - ((_c = this.__hosts) === null || _c === void 0 ? void 0 : _c.length) || 0 - ); - }); - // path should start with "/" - this.sendGetRequest = (path, params) => - __awaiter(this, void 0, void 0, function* () { - var _d; - return this.sendRequestHelper( - path, - "GET", - (url) => - __awaiter(this, void 0, void 0, function* () { - let apiVersion = yield this.getAPIVersion(); - let headers = { "cdi-version": apiVersion }; - if (Querier.apiKey !== undefined) { - headers = Object.assign(Object.assign({}, headers), { "api-key": Querier.apiKey }); - } - if (path.isARecipePath() && this.rIdToCore !== undefined) { - headers = Object.assign(Object.assign({}, headers), { rid: this.rIdToCore }); - } - return yield axios_1.default.get(url, { - params, - headers, - }); - }), - ((_d = this.__hosts) === null || _d === void 0 ? void 0 : _d.length) || 0 - ); - }); - // path should start with "/" - this.sendPutRequest = (path, body) => - __awaiter(this, void 0, void 0, function* () { - var _e; - return this.sendRequestHelper( - path, - "PUT", - (url) => - __awaiter(this, void 0, void 0, function* () { - let apiVersion = yield this.getAPIVersion(); - let headers = { - "cdi-version": apiVersion, - "content-type": "application/json; charset=utf-8", - }; - if (Querier.apiKey !== undefined) { - headers = Object.assign(Object.assign({}, headers), { "api-key": Querier.apiKey }); - } - if (path.isARecipePath() && this.rIdToCore !== undefined) { - headers = Object.assign(Object.assign({}, headers), { rid: this.rIdToCore }); - } - return yield axios_1.default({ - method: "PUT", - url, - data: body, - headers, - }); - }), - ((_e = this.__hosts) === null || _e === void 0 ? void 0 : _e.length) || 0 - ); - }); - // path should start with "/" - this.sendRequestHelper = (path, method, axiosFunction, numberOfTries) => - __awaiter(this, void 0, void 0, function* () { - if (this.__hosts === undefined) { - throw Error( - "No SuperTokens core available to query. Please pass supertokens > connectionURI to the init function, or override all the functions of the recipe you are using." - ); - } - if (numberOfTries === 0) { - throw Error("No SuperTokens core available to query"); - } - let currentDomain = this.__hosts[Querier.lastTriedIndex].domain.getAsStringDangerous(); - let currentBasePath = this.__hosts[Querier.lastTriedIndex].basePath.getAsStringDangerous(); - const url = currentDomain + currentBasePath + path.getAsStringDangerous(); - Querier.lastTriedIndex++; - Querier.lastTriedIndex = Querier.lastTriedIndex % this.__hosts.length; - try { - processState_1.ProcessState.getInstance().addState( - processState_1.PROCESS_STATE.CALLING_SERVICE_IN_REQUEST_HELPER - ); - let response = yield axiosFunction(url); - if (process.env.TEST_MODE === "testing") { - Querier.hostsAliveForTesting.add(currentDomain + currentBasePath); - } - if (response.status !== 200) { - throw response; - } - return response.data; - } catch (err) { - if (err.message !== undefined && err.message.includes("ECONNREFUSED")) { - return yield this.sendRequestHelper(path, method, axiosFunction, numberOfTries - 1); - } - if ( - err.response !== undefined && - err.response.status !== undefined && - err.response.data !== undefined - ) { - throw new Error( - "SuperTokens core threw an error for a " + - method + - " request to path: '" + - path.getAsStringDangerous() + - "' with status code: " + - err.response.status + - " and message: " + - err.response.data - ); - } else { - throw err; - } - } - }); - this.__hosts = hosts; - this.rIdToCore = rIdToCore; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw Error("calling testing function in non testing env"); - } - Querier.initCalled = false; - } - static getNewInstanceOrThrowError(rIdToCore) { - if (!Querier.initCalled) { - throw Error("Please call the supertokens.init function before using SuperTokens"); - } - return new Querier(Querier.hosts, rIdToCore); - } - static init(hosts, apiKey) { - if (!Querier.initCalled) { - Querier.initCalled = true; - Querier.hosts = hosts; - Querier.apiKey = apiKey; - Querier.apiVersion = undefined; - Querier.lastTriedIndex = 0; - Querier.hostsAliveForTesting = new Set(); - } - } - getAllCoreUrlsForPath(path) { - if (this.__hosts === undefined) { - return []; - } - const normalisedPath = new normalisedURLPath_1.default(path); - return this.__hosts.map((h) => { - const currentDomain = h.domain.getAsStringDangerous(); - const currentBasePath = h.basePath.getAsStringDangerous(); - return currentDomain + currentBasePath + normalisedPath.getAsStringDangerous(); - }); - } -} -exports.Querier = Querier; -Querier.initCalled = false; -Querier.hosts = undefined; -Querier.apiKey = undefined; -Querier.apiVersion = undefined; -Querier.lastTriedIndex = 0; -Querier.hostsAliveForTesting = new Set(); diff --git a/lib/build/recipe/dashboard/api/analytics.d.ts b/lib/build/recipe/dashboard/api/analytics.d.ts deleted file mode 100644 index 32bbb6d19..000000000 --- a/lib/build/recipe/dashboard/api/analytics.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export declare type Response = { - status: "OK"; -}; -export default function analyticsPost(_: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/analytics.js b/lib/build/recipe/dashboard/api/analytics.js deleted file mode 100644 index 0da73942f..000000000 --- a/lib/build/recipe/dashboard/api/analytics.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_1 = __importDefault(require("../../../supertokens")); -const querier_1 = require("../../../querier"); -const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath")); -const version_1 = require("../../../version"); -const error_1 = __importDefault(require("../../../error")); -const axios_1 = __importDefault(require("axios")); -function analyticsPost(_, options) { - return __awaiter(this, void 0, void 0, function* () { - // If telemetry is disabled, dont send any event - if (!supertokens_1.default.getInstanceOrThrowError().telemetryEnabled) { - return { - status: "OK", - }; - } - const { email, dashboardVersion } = yield options.req.getJSONBody(); - if (email === undefined) { - throw new error_1.default({ - message: "Missing required property 'email'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (dashboardVersion === undefined) { - throw new error_1.default({ - message: "Missing required property 'dashboardVersion'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let telemetryId; - let numberOfUsers; - try { - let querier = querier_1.Querier.getNewInstanceOrThrowError(options.recipeId); - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/telemetry"), {}); - if (response.exists) { - telemetryId = response.telemetryId; - } - numberOfUsers = yield supertokens_1.default.getInstanceOrThrowError().getUserCount(); - } catch (_) { - // If either telemetry id API or user count fetch fails, no event should be sent - return { - status: "OK", - }; - } - const { apiDomain, websiteDomain, appName } = options.appInfo; - const data = { - websiteDomain: websiteDomain.getAsStringDangerous(), - apiDomain: apiDomain.getAsStringDangerous(), - appName, - sdk: "node", - sdkVersion: version_1.version, - telemetryId, - numberOfUsers, - email, - dashboardVersion, - }; - try { - yield axios_1.default({ - url: "https://api.supertokens.com/0/st/telemetry", - method: "POST", - data, - headers: { - "api-version": 3, - }, - }); - } catch (e) { - // Ignored - } - return { - status: "OK", - }; - }); -} -exports.default = analyticsPost; diff --git a/lib/build/recipe/dashboard/api/apiKeyProtector.d.ts b/lib/build/recipe/dashboard/api/apiKeyProtector.d.ts deleted file mode 100644 index ccb15887b..000000000 --- a/lib/build/recipe/dashboard/api/apiKeyProtector.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIFunction, APIInterface, APIOptions } from "../types"; -export default function apiKeyProtector( - apiImplementation: APIInterface, - options: APIOptions, - apiFunction: APIFunction -): Promise; diff --git a/lib/build/recipe/dashboard/api/apiKeyProtector.js b/lib/build/recipe/dashboard/api/apiKeyProtector.js deleted file mode 100644 index 14f446112..000000000 --- a/lib/build/recipe/dashboard/api/apiKeyProtector.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const utils_1 = require("../../../utils"); -const utils_2 = require("../utils"); -function apiKeyProtector(apiImplementation, options, apiFunction) { - return __awaiter(this, void 0, void 0, function* () { - const shouldAllowAccess = yield options.recipeImplementation.shouldAllowAccess({ - req: options.req, - config: options.config, - userContext: utils_1.makeDefaultUserContextFromAPI(options.req), - }); - if (!shouldAllowAccess) { - utils_2.sendUnauthorisedAccess(options.res); - return true; - } - const response = yield apiFunction(apiImplementation, options); - options.res.sendJSONResponse(response); - return true; - }); -} -exports.default = apiKeyProtector; diff --git a/lib/build/recipe/dashboard/api/dashboard.d.ts b/lib/build/recipe/dashboard/api/dashboard.d.ts deleted file mode 100644 index f6bd1a1bf..000000000 --- a/lib/build/recipe/dashboard/api/dashboard.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function dashboard(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/dashboard.js b/lib/build/recipe/dashboard/api/dashboard.js deleted file mode 100644 index 5d61bede0..000000000 --- a/lib/build/recipe/dashboard/api/dashboard.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -function dashboard(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.dashboardGET === undefined) { - return false; - } - const htmlString = yield apiImplementation.dashboardGET({ - options, - userContext: utils_1.makeDefaultUserContextFromAPI(options.req), - }); - options.res.sendHTMLResponse(htmlString); - return true; - }); -} -exports.default = dashboard; diff --git a/lib/build/recipe/dashboard/api/implementation.d.ts b/lib/build/recipe/dashboard/api/implementation.d.ts deleted file mode 100644 index 0218549fa..000000000 --- a/lib/build/recipe/dashboard/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../types"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/dashboard/api/implementation.js b/lib/build/recipe/dashboard/api/implementation.js deleted file mode 100644 index 730bcc1b0..000000000 --- a/lib/build/recipe/dashboard/api/implementation.js +++ /dev/null @@ -1,110 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLDomain_1 = __importDefault(require("../../../normalisedURLDomain")); -const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath")); -const querier_1 = require("../../../querier"); -const supertokens_1 = __importDefault(require("../../../supertokens")); -const utils_1 = require("../../../utils"); -const constants_1 = require("../constants"); -function getAPIImplementation() { - return { - dashboardGET: function (input) { - return __awaiter(this, void 0, void 0, function* () { - const bundleBasePathString = yield input.options.recipeImplementation.getDashboardBundleLocation({ - userContext: input.userContext, - }); - const bundleDomain = - new normalisedURLDomain_1.default(bundleBasePathString).getAsStringDangerous() + - new normalisedURLPath_1.default(bundleBasePathString).getAsStringDangerous(); - let connectionURI = ""; - const superTokensInstance = supertokens_1.default.getInstanceOrThrowError(); - const authMode = input.options.config.authMode; - if (superTokensInstance.supertokens !== undefined) { - connectionURI = superTokensInstance.supertokens.connectionURI; - } - let isSearchEnabled = false; - const cdiVersion = yield querier_1.Querier.getNewInstanceOrThrowError( - input.options.recipeId - ).getAPIVersion(); - if (utils_1.maxVersion("2.20", cdiVersion) === cdiVersion) { - // Only enable search if CDI version is 2.20 or above - isSearchEnabled = true; - } - return ` - - - - - - - - - - -
- - - `; - }); - }, - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/dashboard/api/search/tagsGet.d.ts b/lib/build/recipe/dashboard/api/search/tagsGet.d.ts deleted file mode 100644 index a8a374452..000000000 --- a/lib/build/recipe/dashboard/api/search/tagsGet.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type TagsResponse = { - status: "OK"; - tags: string[]; -}; -export declare const getSearchTags: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/search/tagsGet.js b/lib/build/recipe/dashboard/api/search/tagsGet.js deleted file mode 100644 index 60d752f92..000000000 --- a/lib/build/recipe/dashboard/api/search/tagsGet.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getSearchTags = void 0; -const querier_1 = require("../../../../querier"); -const normalisedURLPath_1 = __importDefault(require("../../../../normalisedURLPath")); -const getSearchTags = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(options.recipeId); - let tagsResponse = yield querier.sendGetRequest(new normalisedURLPath_1.default("/user/search/tags"), {}); - return tagsResponse; - }); -exports.getSearchTags = getSearchTags; diff --git a/lib/build/recipe/dashboard/api/signIn.d.ts b/lib/build/recipe/dashboard/api/signIn.d.ts deleted file mode 100644 index 899d506d9..000000000 --- a/lib/build/recipe/dashboard/api/signIn.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function signIn(_: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/signIn.js b/lib/build/recipe/dashboard/api/signIn.js deleted file mode 100644 index e78ba8aa4..000000000 --- a/lib/build/recipe/dashboard/api/signIn.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../../../error")); -const querier_1 = require("../../../querier"); -const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath")); -function signIn(_, options) { - return __awaiter(this, void 0, void 0, function* () { - const { email, password } = yield options.req.getJSONBody(); - if (email === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'email'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (password === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'password'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - const signInResponse = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/dashboard/signin"), - { - email, - password, - } - ); - utils_1.send200Response(options.res, signInResponse); - return true; - }); -} -exports.default = signIn; diff --git a/lib/build/recipe/dashboard/api/signOut.d.ts b/lib/build/recipe/dashboard/api/signOut.d.ts deleted file mode 100644 index c9c5018d2..000000000 --- a/lib/build/recipe/dashboard/api/signOut.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function signOut(_: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/signOut.js b/lib/build/recipe/dashboard/api/signOut.js deleted file mode 100644 index 929caddbe..000000000 --- a/lib/build/recipe/dashboard/api/signOut.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const querier_1 = require("../../../querier"); -const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath")); -function signOut(_, options) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - if (options.config.authMode === "api-key") { - utils_1.send200Response(options.res, { status: "OK" }); - } else { - const sessionIdFormAuthHeader = - (_a = options.req.getHeaderValue("authorization")) === null || _a === void 0 - ? void 0 - : _a.split(" ")[1]; - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - const sessionDeleteResponse = yield querier.sendDeleteRequest( - new normalisedURLPath_1.default("/recipe/dashboard/session"), - {}, - { sessionId: sessionIdFormAuthHeader } - ); - utils_1.send200Response(options.res, sessionDeleteResponse); - } - return true; - }); -} -exports.default = signOut; diff --git a/lib/build/recipe/dashboard/api/userdetails/userDelete.d.ts b/lib/build/recipe/dashboard/api/userdetails/userDelete.d.ts deleted file mode 100644 index c184332e6..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userDelete.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = { - status: "OK"; -}; -export declare const userDelete: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userDelete.js b/lib/build/recipe/dashboard/api/userdetails/userDelete.js deleted file mode 100644 index 0e53cb3d1..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userDelete.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userDelete = void 0; -const supertokens_1 = __importDefault(require("../../../../supertokens")); -const error_1 = __importDefault(require("../../../../error")); -const userDelete = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const userId = options.req.getKeyValueFromQuery("userId"); - if (userId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'userId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - yield supertokens_1.default.getInstanceOrThrowError().deleteUser({ - userId, - }); - return { - status: "OK", - }; - }); -exports.userDelete = userDelete; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.d.ts b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.d.ts deleted file mode 100644 index ba6da64a6..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIFunction } from "../../types"; -export declare const userEmailverifyGet: APIFunction; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.js b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.js deleted file mode 100644 index e835966b6..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyGet.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userEmailverifyGet = void 0; -const error_1 = __importDefault(require("../../../../error")); -const recipe_1 = __importDefault(require("../../../emailverification/recipe")); -const emailverification_1 = __importDefault(require("../../../emailverification")); -const userEmailverifyGet = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const req = options.req; - const userId = req.getKeyValueFromQuery("userId"); - if (userId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'userId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - try { - recipe_1.default.getInstanceOrThrowError(); - } catch (e) { - return { - status: "FEATURE_NOT_ENABLED_ERROR", - }; - } - const response = yield emailverification_1.default.isEmailVerified(userId); - return { - status: "OK", - isVerified: response, - }; - }); -exports.userEmailverifyGet = userEmailverifyGet; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.d.ts b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.d.ts deleted file mode 100644 index 055c3cb89..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = { - status: "OK"; -}; -export declare const userEmailVerifyPut: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.js b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.js deleted file mode 100644 index 6e8e0ed1d..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyPut.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userEmailVerifyPut = void 0; -const error_1 = __importDefault(require("../../../../error")); -const emailverification_1 = __importDefault(require("../../../emailverification")); -const userEmailVerifyPut = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const userId = requestBody.userId; - const verified = requestBody.verified; - if (userId === undefined || typeof userId !== "string") { - throw new error_1.default({ - message: "Required parameter 'userId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (verified === undefined || typeof verified !== "boolean") { - throw new error_1.default({ - message: "Required parameter 'verified' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (verified) { - const tokenResponse = yield emailverification_1.default.createEmailVerificationToken(userId); - if (tokenResponse.status === "EMAIL_ALREADY_VERIFIED_ERROR") { - return { - status: "OK", - }; - } - const verifyResponse = yield emailverification_1.default.verifyEmailUsingToken(tokenResponse.token); - if (verifyResponse.status === "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR") { - // This should never happen because we consume the token immediately after creating it - throw new Error("Should not come here"); - } - } else { - yield emailverification_1.default.unverifyEmail(userId); - } - return { - status: "OK", - }; - }); -exports.userEmailVerifyPut = userEmailVerifyPut; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.d.ts b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.d.ts deleted file mode 100644 index 50b925c62..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = { - status: "OK" | "EMAIL_ALREADY_VERIFIED_ERROR"; -}; -export declare const userEmailVerifyTokenPost: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.js b/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.js deleted file mode 100644 index e24cd65eb..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userEmailVerifyTokenPost.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userEmailVerifyTokenPost = void 0; -const error_1 = __importDefault(require("../../../../error")); -const emailverification_1 = __importDefault(require("../../../emailverification")); -const recipe_1 = __importDefault(require("../../../emailverification/recipe")); -const utils_1 = require("../../../emailverification/utils"); -const userEmailVerifyTokenPost = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const userId = requestBody.userId; - if (userId === undefined || typeof userId !== "string") { - throw new error_1.default({ - message: "Required parameter 'userId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let emailResponse = yield recipe_1.default.getInstanceOrThrowError().getEmailForUserId(userId, {}); - if (emailResponse.status !== "OK") { - throw new Error("Should never come here"); - } - let emailVerificationToken = yield emailverification_1.default.createEmailVerificationToken(userId); - if (emailVerificationToken.status === "EMAIL_ALREADY_VERIFIED_ERROR") { - return { - status: "EMAIL_ALREADY_VERIFIED_ERROR", - }; - } - let emailVerifyLink = utils_1.getEmailVerifyLink({ - appInfo: options.appInfo, - token: emailVerificationToken.token, - recipeId: recipe_1.default.RECIPE_ID, - }); - yield emailverification_1.default.sendEmail({ - type: "EMAIL_VERIFICATION", - user: { - id: userId, - email: emailResponse.email, - }, - emailVerifyLink, - }); - return { - status: "OK", - }; - }); -exports.userEmailVerifyTokenPost = userEmailVerifyTokenPost; diff --git a/lib/build/recipe/dashboard/api/userdetails/userGet.d.ts b/lib/build/recipe/dashboard/api/userdetails/userGet.d.ts deleted file mode 100644 index dd04c1ee3..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userGet.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIFunction } from "../../types"; -export declare const userGet: APIFunction; diff --git a/lib/build/recipe/dashboard/api/userdetails/userGet.js b/lib/build/recipe/dashboard/api/userdetails/userGet.js deleted file mode 100644 index e5d02516a..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userGet.js +++ /dev/null @@ -1,102 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userGet = void 0; -const error_1 = __importDefault(require("../../../../error")); -const utils_1 = require("../../utils"); -const recipe_1 = __importDefault(require("../../../usermetadata/recipe")); -const usermetadata_1 = __importDefault(require("../../../usermetadata")); -const userGet = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const userId = options.req.getKeyValueFromQuery("userId"); - const recipeId = options.req.getKeyValueFromQuery("recipeId"); - if (userId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'userId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (recipeId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'recipeId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (!utils_1.isValidRecipeId(recipeId)) { - throw new error_1.default({ - message: "Invalid recipe id", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (!utils_1.isRecipeInitialised(recipeId)) { - return { - status: "RECIPE_NOT_INITIALISED", - }; - } - let user = (yield utils_1.getUserForRecipeId(userId, recipeId)).user; - if (user === undefined) { - return { - status: "NO_USER_FOUND_ERROR", - }; - } - try { - recipe_1.default.getInstanceOrThrowError(); - } catch (_) { - user = Object.assign(Object.assign({}, user), { - firstName: "FEATURE_NOT_ENABLED", - lastName: "FEATURE_NOT_ENABLED", - }); - return { - status: "OK", - recipeId: recipeId, - user, - }; - } - const userMetaData = yield usermetadata_1.default.getUserMetadata(userId); - const { first_name, last_name } = userMetaData.metadata; - user = Object.assign(Object.assign({}, user), { - firstName: first_name === undefined ? "" : first_name, - lastName: last_name === undefined ? "" : last_name, - }); - return { - status: "OK", - recipeId: recipeId, - user, - }; - }); -exports.userGet = userGet; diff --git a/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.d.ts b/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.d.ts deleted file mode 100644 index f2ba7687d..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIFunction } from "../../types"; -export declare const userMetaDataGet: APIFunction; diff --git a/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.js b/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.js deleted file mode 100644 index dd7165022..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userMetadataGet.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userMetaDataGet = void 0; -const error_1 = __importDefault(require("../../../../error")); -const recipe_1 = __importDefault(require("../../../usermetadata/recipe")); -const usermetadata_1 = __importDefault(require("../../../usermetadata")); -const userMetaDataGet = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const userId = options.req.getKeyValueFromQuery("userId"); - if (userId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'userId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - try { - recipe_1.default.getInstanceOrThrowError(); - } catch (e) { - return { - status: "FEATURE_NOT_ENABLED_ERROR", - }; - } - const metaDataResponse = usermetadata_1.default.getUserMetadata(userId); - return { - status: "OK", - data: (yield metaDataResponse).metadata, - }; - }); -exports.userMetaDataGet = userMetaDataGet; diff --git a/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.d.ts b/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.d.ts deleted file mode 100644 index 0bbbe8a65..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = { - status: "OK"; -}; -export declare const userMetadataPut: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.js b/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.js deleted file mode 100644 index 2510e32fb..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userMetadataPut.js +++ /dev/null @@ -1,97 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userMetadataPut = void 0; -const recipe_1 = __importDefault(require("../../../usermetadata/recipe")); -const usermetadata_1 = __importDefault(require("../../../usermetadata")); -const error_1 = __importDefault(require("../../../../error")); -const userMetadataPut = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const userId = requestBody.userId; - const data = requestBody.data; - // This is to throw an error early in case the recipe has not been initialised - recipe_1.default.getInstanceOrThrowError(); - if (userId === undefined || typeof userId !== "string") { - throw new error_1.default({ - message: "Required parameter 'userId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (data === undefined || typeof data !== "string") { - throw new error_1.default({ - message: "Required parameter 'data' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - // Make sure that data is a valid JSON, this will throw - try { - let parsedData = JSON.parse(data); - if (typeof parsedData !== "object") { - throw new Error(); - } - if (Array.isArray(parsedData)) { - throw new Error(); - } - if (parsedData === null) { - throw new Error(); - } - } catch (e) { - throw new error_1.default({ - message: "'data' must be a valid JSON body", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - /** - * This API is meant to set the user metadata of a user. We delete the existing data - * before updating it because we want to make sure that shallow merging does not result - * in the data being incorrect - * - * For example if the old data is {test: "test", test2: "test2"} and the user wants to delete - * test2 from the data simply calling updateUserMetadata with {test: "test"} would not remove - * test2 because of shallow merging. - * - * Removing first ensures that the final data is exactly what the user wanted it to be - */ - yield usermetadata_1.default.clearUserMetadata(userId); - yield usermetadata_1.default.updateUserMetadata(userId, JSON.parse(data)); - return { - status: "OK", - }; - }); -exports.userMetadataPut = userMetadataPut; diff --git a/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.d.ts b/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.d.ts deleted file mode 100644 index d9381e6b6..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = - | { - status: "OK"; - } - | { - status: "INVALID_PASSWORD_ERROR"; - error: string; - }; -export declare const userPasswordPut: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.js b/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.js deleted file mode 100644 index c23cb5299..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userPasswordPut.js +++ /dev/null @@ -1,131 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userPasswordPut = void 0; -const error_1 = __importDefault(require("../../../../error")); -const recipe_1 = __importDefault(require("../../../emailpassword/recipe")); -const emailpassword_1 = __importDefault(require("../../../emailpassword")); -const recipe_2 = __importDefault(require("../../../thirdpartyemailpassword/recipe")); -const thirdpartyemailpassword_1 = __importDefault(require("../../../thirdpartyemailpassword")); -const constants_1 = require("../../../emailpassword/constants"); -const userPasswordPut = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const userId = requestBody.userId; - const newPassword = requestBody.newPassword; - if (userId === undefined || typeof userId !== "string") { - throw new error_1.default({ - message: "Required parameter 'userId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (newPassword === undefined || typeof newPassword !== "string") { - throw new error_1.default({ - message: "Required parameter 'newPassword' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let recipeToUse; - try { - recipe_1.default.getInstanceOrThrowError(); - recipeToUse = "emailpassword"; - } catch (_) {} - if (recipeToUse === undefined) { - try { - recipe_2.default.getInstanceOrThrowError(); - recipeToUse = "thirdpartyemailpassword"; - } catch (_) {} - } - if (recipeToUse === undefined) { - // This means that neither emailpassword or thirdpartyemailpassword is initialised - throw new Error("Should never come here"); - } - if (recipeToUse === "emailpassword") { - let passwordFormFields = recipe_1.default - .getInstanceOrThrowError() - .config.signUpFeature.formFields.filter((field) => field.id === constants_1.FORM_FIELD_PASSWORD_ID); - let passwordValidationError = yield passwordFormFields[0].validate(newPassword); - if (passwordValidationError !== undefined) { - return { - status: "INVALID_PASSWORD_ERROR", - error: passwordValidationError, - }; - } - const passwordResetToken = yield emailpassword_1.default.createResetPasswordToken(userId); - if (passwordResetToken.status === "UNKNOWN_USER_ID_ERROR") { - // Techincally it can but its an edge case so we assume that it wont - throw new Error("Should never come here"); - } - const passwordResetResponse = yield emailpassword_1.default.resetPasswordUsingToken( - passwordResetToken.token, - newPassword - ); - if (passwordResetResponse.status === "RESET_PASSWORD_INVALID_TOKEN_ERROR") { - throw new Error("Should never come here"); - } - return { - status: "OK", - }; - } - let passwordFormFields = recipe_2.default - .getInstanceOrThrowError() - .config.signUpFeature.formFields.filter((field) => field.id === constants_1.FORM_FIELD_PASSWORD_ID); - let passwordValidationError = yield passwordFormFields[0].validate(newPassword); - if (passwordValidationError !== undefined) { - return { - status: "INVALID_PASSWORD_ERROR", - error: passwordValidationError, - }; - } - const passwordResetToken = yield thirdpartyemailpassword_1.default.createResetPasswordToken(userId); - if (passwordResetToken.status === "UNKNOWN_USER_ID_ERROR") { - // Techincally it can but its an edge case so we assume that it wont - throw new Error("Should never come here"); - } - const passwordResetResponse = yield thirdpartyemailpassword_1.default.resetPasswordUsingToken( - passwordResetToken.token, - newPassword - ); - if (passwordResetResponse.status === "RESET_PASSWORD_INVALID_TOKEN_ERROR") { - throw new Error("Should never come here"); - } - return { - status: "OK", - }; - }); -exports.userPasswordPut = userPasswordPut; diff --git a/lib/build/recipe/dashboard/api/userdetails/userPut.d.ts b/lib/build/recipe/dashboard/api/userdetails/userPut.d.ts deleted file mode 100644 index ba250bb3d..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userPut.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = - | { - status: "OK"; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - | { - status: "INVALID_EMAIL_ERROR"; - error: string; - } - | { - status: "PHONE_ALREADY_EXISTS_ERROR"; - } - | { - status: "INVALID_PHONE_ERROR"; - error: string; - }; -export declare const userPut: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userPut.js b/lib/build/recipe/dashboard/api/userdetails/userPut.js deleted file mode 100644 index 85907607a..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userPut.js +++ /dev/null @@ -1,365 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userPut = void 0; -const error_1 = __importDefault(require("../../../../error")); -const recipe_1 = __importDefault(require("../../../emailpassword/recipe")); -const recipe_2 = __importDefault(require("../../../thirdpartyemailpassword/recipe")); -const recipe_3 = __importDefault(require("../../../passwordless/recipe")); -const recipe_4 = __importDefault(require("../../../thirdpartypasswordless/recipe")); -const emailpassword_1 = __importDefault(require("../../../emailpassword")); -const passwordless_1 = __importDefault(require("../../../passwordless")); -const thirdpartyemailpassword_1 = __importDefault(require("../../../thirdpartyemailpassword")); -const thirdpartypasswordless_1 = __importDefault(require("../../../thirdpartypasswordless")); -const utils_1 = require("../../utils"); -const recipe_5 = __importDefault(require("../../../usermetadata/recipe")); -const usermetadata_1 = __importDefault(require("../../../usermetadata")); -const constants_1 = require("../../../emailpassword/constants"); -const utils_2 = require("../../../passwordless/utils"); -const updateEmailForRecipeId = (recipeId, userId, email) => - __awaiter(void 0, void 0, void 0, function* () { - if (recipeId === "emailpassword") { - let emailFormFields = recipe_1.default - .getInstanceOrThrowError() - .config.signUpFeature.formFields.filter((field) => field.id === constants_1.FORM_FIELD_EMAIL_ID); - let validationError = yield emailFormFields[0].validate(email); - if (validationError !== undefined) { - return { - status: "INVALID_EMAIL_ERROR", - error: validationError, - }; - } - const emailUpdateResponse = yield emailpassword_1.default.updateEmailOrPassword({ - userId, - email, - }); - if (emailUpdateResponse.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } - return { - status: "OK", - }; - } - if (recipeId === "thirdpartyemailpassword") { - let emailFormFields = recipe_2.default - .getInstanceOrThrowError() - .config.signUpFeature.formFields.filter((field) => field.id === constants_1.FORM_FIELD_EMAIL_ID); - let validationError = yield emailFormFields[0].validate(email); - if (validationError !== undefined) { - return { - status: "INVALID_EMAIL_ERROR", - error: validationError, - }; - } - const emailUpdateResponse = yield thirdpartyemailpassword_1.default.updateEmailOrPassword({ - userId, - email, - }); - if (emailUpdateResponse.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } - if (emailUpdateResponse.status === "UNKNOWN_USER_ID_ERROR") { - throw new Error("Should never come here"); - } - return { - status: "OK", - }; - } - if (recipeId === "passwordless") { - let isValidEmail = true; - let validationError = ""; - const passwordlessConfig = recipe_3.default.getInstanceOrThrowError().config; - if (passwordlessConfig.contactMethod === "PHONE") { - const validationResult = yield utils_2.defaultValidateEmail(email); - if (validationResult !== undefined) { - isValidEmail = false; - validationError = validationResult; - } - } else { - const validationResult = yield passwordlessConfig.validateEmailAddress(email); - if (validationResult !== undefined) { - isValidEmail = false; - validationError = validationResult; - } - } - if (!isValidEmail) { - return { - status: "INVALID_EMAIL_ERROR", - error: validationError, - }; - } - const updateResult = yield passwordless_1.default.updateUser({ - userId, - email, - }); - if (updateResult.status === "UNKNOWN_USER_ID_ERROR") { - throw new Error("Should never come here"); - } - if (updateResult.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } - return { - status: "OK", - }; - } - if (recipeId === "thirdpartypasswordless") { - let isValidEmail = true; - let validationError = ""; - const passwordlessConfig = recipe_4.default.getInstanceOrThrowError().passwordlessRecipe.config; - if (passwordlessConfig.contactMethod === "PHONE") { - const validationResult = yield utils_2.defaultValidateEmail(email); - if (validationResult !== undefined) { - isValidEmail = false; - validationError = validationResult; - } - } else { - const validationResult = yield passwordlessConfig.validateEmailAddress(email); - if (validationResult !== undefined) { - isValidEmail = false; - validationError = validationResult; - } - } - if (!isValidEmail) { - return { - status: "INVALID_EMAIL_ERROR", - error: validationError, - }; - } - const updateResult = yield thirdpartypasswordless_1.default.updatePasswordlessUser({ - userId, - email, - }); - if (updateResult.status === "UNKNOWN_USER_ID_ERROR") { - throw new Error("Should never come here"); - } - if (updateResult.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } - return { - status: "OK", - }; - } - /** - * If it comes here then the user is a third party user in which case the UI should not have allowed this - */ - throw new Error("Should never come here"); - }); -const updatePhoneForRecipeId = (recipeId, userId, phone) => - __awaiter(void 0, void 0, void 0, function* () { - if (recipeId === "passwordless") { - let isValidPhone = true; - let validationError = ""; - const passwordlessConfig = recipe_3.default.getInstanceOrThrowError().config; - if (passwordlessConfig.contactMethod === "EMAIL") { - const validationResult = yield utils_2.defaultValidatePhoneNumber(phone); - if (validationResult !== undefined) { - isValidPhone = false; - validationError = validationResult; - } - } else { - const validationResult = yield passwordlessConfig.validatePhoneNumber(phone); - if (validationResult !== undefined) { - isValidPhone = false; - validationError = validationResult; - } - } - if (!isValidPhone) { - return { - status: "INVALID_PHONE_ERROR", - error: validationError, - }; - } - const updateResult = yield passwordless_1.default.updateUser({ - userId, - phoneNumber: phone, - }); - if (updateResult.status === "UNKNOWN_USER_ID_ERROR") { - throw new Error("Should never come here"); - } - if (updateResult.status === "PHONE_NUMBER_ALREADY_EXISTS_ERROR") { - return { - status: "PHONE_ALREADY_EXISTS_ERROR", - }; - } - return { - status: "OK", - }; - } - if (recipeId === "thirdpartypasswordless") { - let isValidPhone = true; - let validationError = ""; - const passwordlessConfig = recipe_4.default.getInstanceOrThrowError().passwordlessRecipe.config; - if (passwordlessConfig.contactMethod === "EMAIL") { - const validationResult = yield utils_2.defaultValidatePhoneNumber(phone); - if (validationResult !== undefined) { - isValidPhone = false; - validationError = validationResult; - } - } else { - const validationResult = yield passwordlessConfig.validatePhoneNumber(phone); - if (validationResult !== undefined) { - isValidPhone = false; - validationError = validationResult; - } - } - if (!isValidPhone) { - return { - status: "INVALID_PHONE_ERROR", - error: validationError, - }; - } - const updateResult = yield thirdpartypasswordless_1.default.updatePasswordlessUser({ - userId, - phoneNumber: phone, - }); - if (updateResult.status === "UNKNOWN_USER_ID_ERROR") { - throw new Error("Should never come here"); - } - if (updateResult.status === "PHONE_NUMBER_ALREADY_EXISTS_ERROR") { - return { - status: "PHONE_ALREADY_EXISTS_ERROR", - }; - } - return { - status: "OK", - }; - } - /** - * If it comes here then the user is a not a passwordless user in which case the UI should not have allowed this - */ - throw new Error("Should never come here"); - }); -const userPut = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const userId = requestBody.userId; - const recipeId = requestBody.recipeId; - const firstName = requestBody.firstName; - const lastName = requestBody.lastName; - const email = requestBody.email; - const phone = requestBody.phone; - if (userId === undefined || typeof userId !== "string") { - throw new error_1.default({ - message: "Required parameter 'userId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (recipeId === undefined || typeof recipeId !== "string") { - throw new error_1.default({ - message: "Required parameter 'recipeId' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (!utils_1.isValidRecipeId(recipeId)) { - throw new error_1.default({ - message: "Invalid recipe id", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (firstName === undefined || typeof firstName !== "string") { - throw new error_1.default({ - message: "Required parameter 'firstName' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (lastName === undefined || typeof lastName !== "string") { - throw new error_1.default({ - message: "Required parameter 'lastName' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (email === undefined || typeof email !== "string") { - throw new error_1.default({ - message: "Required parameter 'email' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - if (phone === undefined || typeof phone !== "string") { - throw new error_1.default({ - message: "Required parameter 'phone' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let userResponse = yield utils_1.getUserForRecipeId(userId, recipeId); - if (userResponse.user === undefined || userResponse.recipe === undefined) { - throw new Error("Should never come here"); - } - if (firstName.trim() !== "" || lastName.trim() !== "") { - let isRecipeInitialised = false; - try { - recipe_5.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) { - // no op - } - if (isRecipeInitialised) { - let metaDataUpdate = {}; - if (firstName.trim() !== "") { - metaDataUpdate["first_name"] = firstName.trim(); - } - if (lastName.trim() !== "") { - metaDataUpdate["last_name"] = lastName.trim(); - } - yield usermetadata_1.default.updateUserMetadata(userId, metaDataUpdate); - } - } - if (email.trim() !== "") { - const emailUpdateResponse = yield updateEmailForRecipeId(userResponse.recipe, userId, email.trim()); - if (emailUpdateResponse.status !== "OK") { - return emailUpdateResponse; - } - } - if (phone.trim() !== "") { - const phoneUpdateResponse = yield updatePhoneForRecipeId(userResponse.recipe, userId, phone.trim()); - if (phoneUpdateResponse.status !== "OK") { - return phoneUpdateResponse; - } - } - return { - status: "OK", - }; - }); -exports.userPut = userPut; diff --git a/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.d.ts b/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.d.ts deleted file mode 100644 index 34a18f080..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIFunction } from "../../types"; -export declare const userSessionsGet: APIFunction; diff --git a/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.js b/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.js deleted file mode 100644 index cd343c187..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userSessionsGet.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userSessionsGet = void 0; -const error_1 = __importDefault(require("../../../../error")); -const session_1 = __importDefault(require("../../../session")); -const userSessionsGet = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const userId = options.req.getKeyValueFromQuery("userId"); - if (userId === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'userId'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - const response = yield session_1.default.getAllSessionHandlesForUser(userId); - let sessions = []; - let sessionInfoPromises = []; - for (let i = 0; i < response.length; i++) { - sessionInfoPromises.push( - new Promise((res, rej) => - __awaiter(void 0, void 0, void 0, function* () { - try { - const sessionResponse = yield session_1.default.getSessionInformation(response[i]); - if (sessionResponse !== undefined) { - const accessTokenPayload = sessionResponse.customClaimsInAccessTokenPayload; - delete sessionResponse.customClaimsInAccessTokenPayload; - sessions[i] = Object.assign(Object.assign({}, sessionResponse), { accessTokenPayload }); - } - res(); - } catch (e) { - rej(e); - } - }) - ) - ); - } - yield Promise.all(sessionInfoPromises); - return { - status: "OK", - sessions, - }; - }); -exports.userSessionsGet = userSessionsGet; diff --git a/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.d.ts b/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.d.ts deleted file mode 100644 index 2a5a7eeb7..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../../types"; -declare type Response = { - status: "OK"; -}; -export declare const userSessionsPost: (_: APIInterface, options: APIOptions) => Promise; -export {}; diff --git a/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.js b/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.js deleted file mode 100644 index a65859ca9..000000000 --- a/lib/build/recipe/dashboard/api/userdetails/userSessionsPost.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.userSessionsPost = void 0; -const error_1 = __importDefault(require("../../../../error")); -const session_1 = __importDefault(require("../../../session")); -const userSessionsPost = (_, options) => - __awaiter(void 0, void 0, void 0, function* () { - const requestBody = yield options.req.getJSONBody(); - const sessionHandles = requestBody.sessionHandles; - if (sessionHandles === undefined || !Array.isArray(sessionHandles)) { - throw new error_1.default({ - message: "Required parameter 'sessionHandles' is missing or has an invalid type", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - yield session_1.default.revokeMultipleSessions(sessionHandles); - return { - status: "OK", - }; - }); -exports.userSessionsPost = userSessionsPost; diff --git a/lib/build/recipe/dashboard/api/usersCountGet.d.ts b/lib/build/recipe/dashboard/api/usersCountGet.d.ts deleted file mode 100644 index 9291de948..000000000 --- a/lib/build/recipe/dashboard/api/usersCountGet.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export declare type Response = { - status: "OK"; - count: number; -}; -export default function usersCountGet(_: APIInterface, __: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/usersCountGet.js b/lib/build/recipe/dashboard/api/usersCountGet.js deleted file mode 100644 index 59b8f8f74..000000000 --- a/lib/build/recipe/dashboard/api/usersCountGet.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_1 = __importDefault(require("../../../supertokens")); -function usersCountGet(_, __) { - return __awaiter(this, void 0, void 0, function* () { - const count = yield supertokens_1.default.getInstanceOrThrowError().getUserCount(); - return { - status: "OK", - count, - }; - }); -} -exports.default = usersCountGet; diff --git a/lib/build/recipe/dashboard/api/usersGet.d.ts b/lib/build/recipe/dashboard/api/usersGet.d.ts deleted file mode 100644 index 8d445cb5b..000000000 --- a/lib/build/recipe/dashboard/api/usersGet.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export declare type Response = { - status: "OK"; - nextPaginationToken?: string; - users: { - recipeId: string; - user: { - id: string; - timeJoined: number; - firstName?: string; - lastName?: string; - } & ( - | { - email: string; - } - | { - email: string; - thirdParty: { - id: string; - userId: string; - }; - } - | { - email?: string; - phoneNumber?: string; - } - ); - }[]; -}; -export default function usersGet(_: APIInterface, options: APIOptions): Promise; -export declare function getSearchParamsFromURL( - path: string -): { - [key: string]: string; -}; diff --git a/lib/build/recipe/dashboard/api/usersGet.js b/lib/build/recipe/dashboard/api/usersGet.js deleted file mode 100644 index 3c1708c6f..000000000 --- a/lib/build/recipe/dashboard/api/usersGet.js +++ /dev/null @@ -1,159 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getSearchParamsFromURL = void 0; -const error_1 = __importDefault(require("../../../error")); -const supertokens_1 = __importDefault(require("../../../supertokens")); -const recipe_1 = __importDefault(require("../../usermetadata/recipe")); -const usermetadata_1 = __importDefault(require("../../usermetadata")); -function usersGet(_, options) { - return __awaiter(this, void 0, void 0, function* () { - const req = options.req; - const limit = options.req.getKeyValueFromQuery("limit"); - if (limit === undefined) { - throw new error_1.default({ - message: "Missing required parameter 'limit'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let timeJoinedOrder = req.getKeyValueFromQuery("timeJoinedOrder"); - if (timeJoinedOrder === undefined) { - timeJoinedOrder = "DESC"; - } - if (timeJoinedOrder !== "ASC" && timeJoinedOrder !== "DESC") { - throw new error_1.default({ - message: "Invalid value recieved for 'timeJoinedOrder'", - type: error_1.default.BAD_INPUT_ERROR, - }); - } - let paginationToken = options.req.getKeyValueFromQuery("paginationToken"); - const query = getSearchParamsFromURL(options.req.getOriginalURL()); - let usersResponse = yield supertokens_1.default.getInstanceOrThrowError().getUsers({ - query, - timeJoinedOrder: timeJoinedOrder, - limit: parseInt(limit), - paginationToken, - }); - // If the UserMetaData recipe has been initialised, fetch first and last name - try { - recipe_1.default.getInstanceOrThrowError(); - } catch (e) { - // Recipe has not been initialised, return without first name and last name - return { - status: "OK", - users: usersResponse.users, - nextPaginationToken: usersResponse.nextPaginationToken, - }; - } - let updatedUsersArray = []; - let metaDataFetchPromises = []; - for (let i = 0; i < usersResponse.users.length; i++) { - const userObj = usersResponse.users[i]; - metaDataFetchPromises.push( - () => - new Promise((resolve, reject) => - __awaiter(this, void 0, void 0, function* () { - try { - const userMetaDataResponse = yield usermetadata_1.default.getUserMetadata( - userObj.user.id - ); - const { first_name, last_name } = userMetaDataResponse.metadata; - updatedUsersArray[i] = { - recipeId: userObj.recipeId, - user: Object.assign(Object.assign({}, userObj.user), { - firstName: first_name, - lastName: last_name, - }), - }; - resolve(true); - } catch (e) { - // Something went wrong when fetching user meta data - reject(e); - } - }) - ) - ); - } - let promiseArrayStartPosition = 0; - let batchSize = 5; - while (promiseArrayStartPosition < metaDataFetchPromises.length) { - /** - * We want to query only 5 in parallel at a time - * - * First we check if the the array has enough elements to iterate - * promiseArrayStartPosition + 4 (5 elements including current) - */ - let promiseArrayEndPosition = promiseArrayStartPosition + (batchSize - 1); - // If the end position is higher than the arrays length, we need to adjust it - if (promiseArrayEndPosition >= metaDataFetchPromises.length) { - /** - * For example if the array has 7 elements [A, B, C, D, E, F, G], when you run - * the second batch [startPosition = 5], this will result in promiseArrayEndPosition - * to be equal to 6 [5 + ((7 - 1) - 5)] and will then iterate over indexes [5] and [6] - */ - promiseArrayEndPosition = - promiseArrayStartPosition + (metaDataFetchPromises.length - 1 - promiseArrayStartPosition); - } - let promisesToCall = []; - for (let j = promiseArrayStartPosition; j <= promiseArrayEndPosition; j++) { - promisesToCall.push(metaDataFetchPromises[j]); - } - yield Promise.all(promisesToCall.map((p) => p())); - promiseArrayStartPosition += batchSize; - } - usersResponse = Object.assign(Object.assign({}, usersResponse), { users: updatedUsersArray }); - return { - status: "OK", - users: usersResponse.users, - nextPaginationToken: usersResponse.nextPaginationToken, - }; - }); -} -exports.default = usersGet; -function getSearchParamsFromURL(path) { - const URLObject = new URL("https://exmaple.com" + path); - const params = new URLSearchParams(URLObject.search); - const searchQuery = {}; - for (const [key, value] of params) { - if (!["limit", "timeJoinedOrder", "paginationToken"].includes(key)) { - searchQuery[key] = value; - } - } - return searchQuery; -} -exports.getSearchParamsFromURL = getSearchParamsFromURL; diff --git a/lib/build/recipe/dashboard/api/validateKey.d.ts b/lib/build/recipe/dashboard/api/validateKey.d.ts deleted file mode 100644 index 39fa8c2a0..000000000 --- a/lib/build/recipe/dashboard/api/validateKey.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function validateKey(_: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/dashboard/api/validateKey.js b/lib/build/recipe/dashboard/api/validateKey.js deleted file mode 100644 index 482e51bac..000000000 --- a/lib/build/recipe/dashboard/api/validateKey.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("../utils"); -function validateKey(_, options) { - return __awaiter(this, void 0, void 0, function* () { - const input = { - req: options.req, - config: options.config, - userContext: utils_1.makeDefaultUserContextFromAPI(options.req), - }; - if (yield utils_2.validateApiKey(input)) { - options.res.sendJSONResponse({ - status: "OK", - }); - } else { - utils_2.sendUnauthorisedAccess(options.res); - } - return true; - }); -} -exports.default = validateKey; diff --git a/lib/build/recipe/dashboard/constants.d.ts b/lib/build/recipe/dashboard/constants.d.ts deleted file mode 100644 index 7b0c33787..000000000 --- a/lib/build/recipe/dashboard/constants.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -export declare const DASHBOARD_API = "/dashboard"; -export declare const SIGN_IN_API = "/api/signin"; -export declare const SIGN_OUT_API = "/api/signout"; -export declare const VALIDATE_KEY_API = "/api/key/validate"; -export declare const USERS_LIST_GET_API = "/api/users"; -export declare const USERS_COUNT_API = "/api/users/count"; -export declare const USER_API = "/api/user"; -export declare const USER_EMAIL_VERIFY_API = "/api/user/email/verify"; -export declare const USER_METADATA_API = "/api/user/metadata"; -export declare const USER_SESSIONS_API = "/api/user/sessions"; -export declare const USER_PASSWORD_API = "/api/user/password"; -export declare const USER_EMAIL_VERIFY_TOKEN_API = "/api/user/email/verify/token"; -export declare const SEARCH_TAGS_API = "/api/search/tags"; -export declare const DASHBOARD_ANALYTICS_API = "/api/analytics"; diff --git a/lib/build/recipe/dashboard/constants.js b/lib/build/recipe/dashboard/constants.js deleted file mode 100644 index 9cf1620dc..000000000 --- a/lib/build/recipe/dashboard/constants.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DASHBOARD_ANALYTICS_API = exports.SEARCH_TAGS_API = exports.USER_EMAIL_VERIFY_TOKEN_API = exports.USER_PASSWORD_API = exports.USER_SESSIONS_API = exports.USER_METADATA_API = exports.USER_EMAIL_VERIFY_API = exports.USER_API = exports.USERS_COUNT_API = exports.USERS_LIST_GET_API = exports.VALIDATE_KEY_API = exports.SIGN_OUT_API = exports.SIGN_IN_API = exports.DASHBOARD_API = void 0; -exports.DASHBOARD_API = "/dashboard"; -exports.SIGN_IN_API = "/api/signin"; -exports.SIGN_OUT_API = "/api/signout"; -exports.VALIDATE_KEY_API = "/api/key/validate"; -exports.USERS_LIST_GET_API = "/api/users"; -exports.USERS_COUNT_API = "/api/users/count"; -exports.USER_API = "/api/user"; -exports.USER_EMAIL_VERIFY_API = "/api/user/email/verify"; -exports.USER_METADATA_API = "/api/user/metadata"; -exports.USER_SESSIONS_API = "/api/user/sessions"; -exports.USER_PASSWORD_API = "/api/user/password"; -exports.USER_EMAIL_VERIFY_TOKEN_API = "/api/user/email/verify/token"; -exports.SEARCH_TAGS_API = "/api/search/tags"; -exports.DASHBOARD_ANALYTICS_API = "/api/analytics"; diff --git a/lib/build/recipe/dashboard/index.d.ts b/lib/build/recipe/dashboard/index.d.ts deleted file mode 100644 index 3fc17a34f..000000000 --- a/lib/build/recipe/dashboard/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { RecipeInterface, APIOptions, APIInterface } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; -} -export declare let init: typeof Recipe.init; -export type { RecipeInterface, APIOptions, APIInterface }; diff --git a/lib/build/recipe/dashboard/index.js b/lib/build/recipe/dashboard/index.js deleted file mode 100644 index 7ad60228f..000000000 --- a/lib/build/recipe/dashboard/index.js +++ /dev/null @@ -1,27 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.init = void 0; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("./recipe")); -class Wrapper {} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -exports.init = Wrapper.init; diff --git a/lib/build/recipe/dashboard/recipe.d.ts b/lib/build/recipe/dashboard/recipe.d.ts deleted file mode 100644 index d393f7047..000000000 --- a/lib/build/recipe/dashboard/recipe.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { APIHandled, HTTPMethod, NormalisedAppinfo, RecipeListFunction } from "../../types"; -import { APIInterface, RecipeInterface, TypeInput, TypeNormalisedInput } from "./types"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import error from "../../error"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): Recipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - __: NormalisedURLPath, - ___: HTTPMethod - ) => Promise; - handleError: (err: error, _: BaseRequest, __: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is error; - returnAPIIdIfCanHandleRequest: (path: NormalisedURLPath, method: HTTPMethod) => string | undefined; -} diff --git a/lib/build/recipe/dashboard/recipe.js b/lib/build/recipe/dashboard/recipe.js deleted file mode 100644 index 3b24127e7..000000000 --- a/lib/build/recipe/dashboard/recipe.js +++ /dev/null @@ -1,385 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const utils_1 = require("./utils"); -const constants_1 = require("./constants"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const dashboard_1 = __importDefault(require("./api/dashboard")); -const error_1 = __importDefault(require("../../error")); -const validateKey_1 = __importDefault(require("./api/validateKey")); -const apiKeyProtector_1 = __importDefault(require("./api/apiKeyProtector")); -const usersGet_1 = __importDefault(require("./api/usersGet")); -const usersCountGet_1 = __importDefault(require("./api/usersCountGet")); -const userGet_1 = require("./api/userdetails/userGet"); -const userEmailVerifyGet_1 = require("./api/userdetails/userEmailVerifyGet"); -const userMetadataGet_1 = require("./api/userdetails/userMetadataGet"); -const userSessionsGet_1 = require("./api/userdetails/userSessionsGet"); -const userDelete_1 = require("./api/userdetails/userDelete"); -const userEmailVerifyPut_1 = require("./api/userdetails/userEmailVerifyPut"); -const userMetadataPut_1 = require("./api/userdetails/userMetadataPut"); -const userPasswordPut_1 = require("./api/userdetails/userPasswordPut"); -const userPut_1 = require("./api/userdetails/userPut"); -const userEmailVerifyTokenPost_1 = require("./api/userdetails/userEmailVerifyTokenPost"); -const userSessionsPost_1 = require("./api/userdetails/userSessionsPost"); -const signIn_1 = __importDefault(require("./api/signIn")); -const signOut_1 = __importDefault(require("./api/signOut")); -const tagsGet_1 = require("./api/search/tagsGet"); -const analytics_1 = __importDefault(require("./api/analytics")); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - // abstract instance functions below............... - this.getAPIsHandled = () => { - /** - * Normally this array is used by the SDK to decide whether or not the recipe - * handles a specific API path and method and then returns the ID. - * - * For the dashboard recipe this logic is fully custom and handled inside the - * `returnAPIIdIfCanHandleRequest` method of this class. - * - * For most frameworks this array is redundant because the `returnAPIIdIfCanHandleRequest` is used. - * But for frameworks such as Hapi that require all APIs to be declared up front, this array is used - * to make sure that the framework does not return a 404 - */ - return [ - { - id: constants_1.DASHBOARD_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.DASHBOARD_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.SIGN_IN_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.SIGN_IN_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.VALIDATE_KEY_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.VALIDATE_KEY_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.SIGN_OUT_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.SIGN_OUT_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.USERS_LIST_GET_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USERS_LIST_GET_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USERS_COUNT_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USERS_COUNT_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USER_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USER_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.USER_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_API) - ), - disabled: false, - method: "delete", - }, - { - id: constants_1.USER_EMAIL_VERIFY_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_EMAIL_VERIFY_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USER_EMAIL_VERIFY_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_EMAIL_VERIFY_API) - ), - disabled: false, - method: "put", - }, - { - id: constants_1.USER_METADATA_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_METADATA_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USER_METADATA_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_METADATA_API) - ), - disabled: false, - method: "put", - }, - { - id: constants_1.USER_SESSIONS_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_SESSIONS_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.USER_SESSIONS_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_SESSIONS_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.USER_PASSWORD_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_PASSWORD_API) - ), - disabled: false, - method: "put", - }, - { - id: constants_1.USER_EMAIL_VERIFY_TOKEN_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.USER_EMAIL_VERIFY_TOKEN_API) - ), - disabled: false, - method: "post", - }, - { - id: constants_1.SEARCH_TAGS_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.SEARCH_TAGS_API) - ), - disabled: false, - method: "get", - }, - { - id: constants_1.DASHBOARD_ANALYTICS_API, - pathWithoutApiBasePath: new normalisedURLPath_1.default( - utils_1.getApiPathWithDashboardBase(constants_1.DASHBOARD_ANALYTICS_API) - ), - disabled: false, - method: "post", - }, - ]; - }; - this.handleAPIRequest = (id, req, res, __, ___) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - isInServerlessEnv: this.isInServerlessEnv, - appInfo: this.getAppInfo(), - }; - // For these APIs we dont need API key validation - if (id === constants_1.DASHBOARD_API) { - return yield dashboard_1.default(this.apiImpl, options); - } - if (id === constants_1.SIGN_IN_API) { - return yield signIn_1.default(this.apiImpl, options); - } - if (id === constants_1.VALIDATE_KEY_API) { - return yield validateKey_1.default(this.apiImpl, options); - } - // Do API key validation for the remaining APIs - let apiFunction; - if (id === constants_1.USERS_LIST_GET_API) { - apiFunction = usersGet_1.default; - } else if (id === constants_1.USERS_COUNT_API) { - apiFunction = usersCountGet_1.default; - } else if (id === constants_1.USER_API) { - if (req.getMethod() === "get") { - apiFunction = userGet_1.userGet; - } - if (req.getMethod() === "delete") { - apiFunction = userDelete_1.userDelete; - } - if (req.getMethod() === "put") { - apiFunction = userPut_1.userPut; - } - } else if (id === constants_1.USER_EMAIL_VERIFY_API) { - if (req.getMethod() === "get") { - apiFunction = userEmailVerifyGet_1.userEmailverifyGet; - } - if (req.getMethod() === "put") { - apiFunction = userEmailVerifyPut_1.userEmailVerifyPut; - } - } else if (id === constants_1.USER_METADATA_API) { - if (req.getMethod() === "get") { - apiFunction = userMetadataGet_1.userMetaDataGet; - } - if (req.getMethod() === "put") { - apiFunction = userMetadataPut_1.userMetadataPut; - } - } else if (id === constants_1.USER_SESSIONS_API) { - if (req.getMethod() === "get") { - apiFunction = userSessionsGet_1.userSessionsGet; - } - if (req.getMethod() === "post") { - apiFunction = userSessionsPost_1.userSessionsPost; - } - } else if (id === constants_1.USER_PASSWORD_API) { - apiFunction = userPasswordPut_1.userPasswordPut; - } else if (id === constants_1.USER_EMAIL_VERIFY_TOKEN_API) { - apiFunction = userEmailVerifyTokenPost_1.userEmailVerifyTokenPost; - } else if (id === constants_1.SEARCH_TAGS_API) { - apiFunction = tagsGet_1.getSearchTags; - } else if (id === constants_1.SIGN_OUT_API) { - apiFunction = signOut_1.default; - } else if (id === constants_1.DASHBOARD_ANALYTICS_API && req.getMethod() === "post") { - apiFunction = analytics_1.default; - } - // If the id doesnt match any APIs return false - if (apiFunction === undefined) { - return false; - } - return yield apiKeyProtector_1.default(this.apiImpl, options, apiFunction); - }); - this.handleError = (err, _, __) => - __awaiter(this, void 0, void 0, function* () { - throw err; - }); - this.getAllCORSHeaders = () => { - return []; - }; - this.isErrorFromThisRecipe = (err) => { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - }; - this.returnAPIIdIfCanHandleRequest = (path, method) => { - const dashboardBundlePath = this.getAppInfo().apiBasePath.appendPath( - new normalisedURLPath_1.default(constants_1.DASHBOARD_API) - ); - if (utils_1.isApiPath(path, this.getAppInfo())) { - return utils_1.getApiIdIfMatched(path, method); - } - if (path.startsWith(dashboardBundlePath)) { - return constants_1.DASHBOARD_API; - } - return undefined; - }; - this.config = utils_1.validateAndNormaliseUserInput(config); - this.isInServerlessEnv = isInServerlessEnv; - { - let builder = new supertokens_js_override_1.default(recipeImplementation_1.default()); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return Recipe.instance; - } else { - throw new Error("Dashboard recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "dashboard"; diff --git a/lib/build/recipe/dashboard/recipeImplementation.d.ts b/lib/build/recipe/dashboard/recipeImplementation.d.ts deleted file mode 100644 index 881866f94..000000000 --- a/lib/build/recipe/dashboard/recipeImplementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "./types"; -export default function getRecipeImplementation(): RecipeInterface; diff --git a/lib/build/recipe/dashboard/recipeImplementation.js b/lib/build/recipe/dashboard/recipeImplementation.js deleted file mode 100644 index a3e948462..000000000 --- a/lib/build/recipe/dashboard/recipeImplementation.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const querier_1 = require("../../querier"); -const version_1 = require("../../version"); -const utils_1 = require("./utils"); -function getRecipeImplementation() { - return { - getDashboardBundleLocation: function () { - return __awaiter(this, void 0, void 0, function* () { - return `https://cdn.jsdelivr.net/gh/supertokens/dashboard@v${version_1.dashboardVersion}/build/`; - }); - }, - shouldAllowAccess: function (input) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - // For cases where we're not using the API key, the JWT is being used; we allow their access by default - if (!input.config.apiKey) { - // make the check for the API endpoint here with querier - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - const authHeaderValue = - (_a = input.req.getHeaderValue("authorization")) === null || _a === void 0 - ? void 0 - : _a.split(" ")[1]; - const sessionVerificationResponse = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/dashboard/session/verify"), - { - sessionId: authHeaderValue, - } - ); - return sessionVerificationResponse.status === "OK"; - } - return yield utils_1.validateApiKey(input); - }); - }, - }; -} -exports.default = getRecipeImplementation; diff --git a/lib/build/recipe/dashboard/types.d.ts b/lib/build/recipe/dashboard/types.d.ts deleted file mode 100644 index 0168613aa..000000000 --- a/lib/build/recipe/dashboard/types.d.ts +++ /dev/null @@ -1,65 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -import { BaseRequest, BaseResponse } from "../../framework"; -import { NormalisedAppinfo } from "../../types"; -export declare type TypeInput = { - apiKey?: string; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - apiKey?: string; - authMode: AuthMode; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - getDashboardBundleLocation(input: { userContext: any }): Promise; - shouldAllowAccess(input: { req: BaseRequest; config: TypeNormalisedInput; userContext: any }): Promise; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - config: TypeNormalisedInput; - recipeId: string; - req: BaseRequest; - res: BaseResponse; - isInServerlessEnv: boolean; - appInfo: NormalisedAppinfo; -}; -export declare type APIInterface = { - dashboardGET: undefined | ((input: { options: APIOptions; userContext: any }) => Promise); -}; -export declare type APIFunction = (apiImplementation: APIInterface, options: APIOptions) => Promise; -export declare type RecipeIdForUser = "emailpassword" | "thirdparty" | "passwordless"; -export declare type AuthMode = "api-key" | "email-password"; -declare type CommonUserInformation = { - id: string; - timeJoined: number; - firstName: string; - lastName: string; -}; -export declare type EmailPasswordUser = CommonUserInformation & { - email: string; -}; -export declare type ThirdPartyUser = CommonUserInformation & { - email: string; - thirdParty: { - id: string; - userId: string; - }; -}; -export declare type PasswordlessUser = CommonUserInformation & { - email?: string; - phone?: string; -}; -export {}; diff --git a/lib/build/recipe/dashboard/types.js b/lib/build/recipe/dashboard/types.js deleted file mode 100644 index a7bb3574b..000000000 --- a/lib/build/recipe/dashboard/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/dashboard/utils.d.ts b/lib/build/recipe/dashboard/utils.d.ts deleted file mode 100644 index 6d9e1b78f..000000000 --- a/lib/build/recipe/dashboard/utils.d.ts +++ /dev/null @@ -1,37 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { HTTPMethod, NormalisedAppinfo } from "../../types"; -import { - EmailPasswordUser, - PasswordlessUser, - RecipeIdForUser, - ThirdPartyUser, - TypeInput, - TypeNormalisedInput, -} from "./types"; -export declare function validateAndNormaliseUserInput(config?: TypeInput): TypeNormalisedInput; -export declare function isApiPath(path: NormalisedURLPath, appInfo: NormalisedAppinfo): boolean; -export declare function getApiIdIfMatched(path: NormalisedURLPath, method: HTTPMethod): string | undefined; -export declare function sendUnauthorisedAccess(res: BaseResponse): void; -export declare function isValidRecipeId(recipeId: string): recipeId is RecipeIdForUser; -export declare function getUserForRecipeId( - userId: string, - recipeId: string -): Promise<{ - user: EmailPasswordUser | ThirdPartyUser | PasswordlessUser | undefined; - recipe: - | "emailpassword" - | "thirdparty" - | "passwordless" - | "thirdpartyemailpassword" - | "thirdpartypasswordless" - | undefined; -}>; -export declare function isRecipeInitialised(recipeId: RecipeIdForUser): boolean; -export declare function validateApiKey(input: { - req: BaseRequest; - config: TypeNormalisedInput; - userContext: any; -}): Promise; -export declare function getApiPathWithDashboardBase(path: string): string; diff --git a/lib/build/recipe/dashboard/utils.js b/lib/build/recipe/dashboard/utils.js deleted file mode 100644 index 8033d9a9a..000000000 --- a/lib/build/recipe/dashboard/utils.js +++ /dev/null @@ -1,309 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getApiPathWithDashboardBase = exports.validateApiKey = exports.isRecipeInitialised = exports.getUserForRecipeId = exports.isValidRecipeId = exports.sendUnauthorisedAccess = exports.getApiIdIfMatched = exports.isApiPath = exports.validateAndNormaliseUserInput = void 0; -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const utils_1 = require("../../utils"); -const constants_1 = require("./constants"); -const recipe_1 = __importDefault(require("../emailpassword/recipe")); -const recipe_2 = __importDefault(require("../thirdparty/recipe")); -const recipe_3 = __importDefault(require("../passwordless/recipe")); -const emailpassword_1 = __importDefault(require("../emailpassword")); -const thirdparty_1 = __importDefault(require("../thirdparty")); -const passwordless_1 = __importDefault(require("../passwordless")); -const thirdpartyemailpassword_1 = __importDefault(require("../thirdpartyemailpassword")); -const recipe_4 = __importDefault(require("../thirdpartyemailpassword/recipe")); -const thirdpartypasswordless_1 = __importDefault(require("../thirdpartypasswordless")); -const recipe_5 = __importDefault(require("../thirdpartypasswordless/recipe")); -function validateAndNormaliseUserInput(config) { - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === undefined ? {} : config.override - ); - return Object.assign(Object.assign({}, config), { - override, - authMode: config !== undefined && config.apiKey ? "api-key" : "email-password", - }); -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function isApiPath(path, appInfo) { - const dashboardRecipeBasePath = appInfo.apiBasePath.appendPath( - new normalisedURLPath_1.default(constants_1.DASHBOARD_API) - ); - if (!path.startsWith(dashboardRecipeBasePath)) { - return false; - } - let pathWithoutDashboardPath = path.getAsStringDangerous().split(constants_1.DASHBOARD_API)[1]; - if (pathWithoutDashboardPath.charAt(0) === "/") { - pathWithoutDashboardPath = pathWithoutDashboardPath.substring(1, pathWithoutDashboardPath.length); - } - if (pathWithoutDashboardPath.split("/")[0] === "api") { - return true; - } - return false; -} -exports.isApiPath = isApiPath; -function getApiIdIfMatched(path, method) { - if (path.getAsStringDangerous().endsWith(constants_1.VALIDATE_KEY_API) && method === "post") { - return constants_1.VALIDATE_KEY_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.SIGN_IN_API) && method === "post") { - return constants_1.SIGN_IN_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.SIGN_OUT_API) && method === "post") { - return constants_1.SIGN_OUT_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.USERS_LIST_GET_API) && method === "get") { - return constants_1.USERS_LIST_GET_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.USERS_COUNT_API) && method === "get") { - return constants_1.USERS_COUNT_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_API)) { - if (method === "get" || method === "delete" || method === "put") { - return constants_1.USER_API; - } - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_EMAIL_VERIFY_API)) { - if (method === "get" || method === "put") { - return constants_1.USER_EMAIL_VERIFY_API; - } - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_METADATA_API)) { - if (method === "get" || method === "put") { - return constants_1.USER_METADATA_API; - } - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_SESSIONS_API)) { - if (method === "get" || method === "post") { - return constants_1.USER_SESSIONS_API; - } - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_PASSWORD_API) && method === "put") { - return constants_1.USER_PASSWORD_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_EMAIL_VERIFY_TOKEN_API) && method === "post") { - return constants_1.USER_EMAIL_VERIFY_TOKEN_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.USER_PASSWORD_API) && method === "put") { - return constants_1.USER_PASSWORD_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.SEARCH_TAGS_API) && method === "get") { - return constants_1.SEARCH_TAGS_API; - } - if (path.getAsStringDangerous().endsWith(constants_1.DASHBOARD_ANALYTICS_API) && method === "post") { - return constants_1.DASHBOARD_ANALYTICS_API; - } - return undefined; -} -exports.getApiIdIfMatched = getApiIdIfMatched; -function sendUnauthorisedAccess(res) { - utils_1.sendNon200ResponseWithMessage(res, "Unauthorised access", 401); -} -exports.sendUnauthorisedAccess = sendUnauthorisedAccess; -function isValidRecipeId(recipeId) { - return recipeId === "emailpassword" || recipeId === "thirdparty" || recipeId === "passwordless"; -} -exports.isValidRecipeId = isValidRecipeId; -function getUserForRecipeId(userId, recipeId) { - return __awaiter(this, void 0, void 0, function* () { - let user; - let recipe; - if (recipeId === recipe_1.default.RECIPE_ID) { - try { - const userResponse = yield emailpassword_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "emailpassword"; - } - } catch (e) { - // No - op - } - if (user === undefined) { - try { - const userResponse = yield thirdpartyemailpassword_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "thirdpartyemailpassword"; - } - } catch (e) { - // No - op - } - } - } else if (recipeId === recipe_2.default.RECIPE_ID) { - try { - const userResponse = yield thirdparty_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "thirdparty"; - } - } catch (e) { - // No - op - } - if (user === undefined) { - try { - const userResponse = yield thirdpartyemailpassword_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "thirdpartyemailpassword"; - } - } catch (e) { - // No - op - } - } - if (user === undefined) { - try { - const userResponse = yield thirdpartypasswordless_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "thirdpartypasswordless"; - } - } catch (e) { - // No - op - } - } - } else if (recipeId === recipe_3.default.RECIPE_ID) { - try { - const userResponse = yield passwordless_1.default.getUserById({ - userId, - }); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "passwordless"; - } - } catch (e) { - // No - op - } - if (user === undefined) { - try { - const userResponse = yield thirdpartypasswordless_1.default.getUserById(userId); - if (userResponse !== undefined) { - user = Object.assign(Object.assign({}, userResponse), { firstName: "", lastName: "" }); - recipe = "thirdpartypasswordless"; - } - } catch (e) { - // No - op - } - } - } - return { - user, - recipe, - }; - }); -} -exports.getUserForRecipeId = getUserForRecipeId; -function isRecipeInitialised(recipeId) { - let isRecipeInitialised = false; - if (recipeId === "emailpassword") { - try { - recipe_1.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - if (!isRecipeInitialised) { - try { - recipe_4.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - } - } else if (recipeId === "passwordless") { - try { - recipe_3.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - if (!isRecipeInitialised) { - try { - recipe_5.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - } - } else if (recipeId === "thirdparty") { - try { - recipe_2.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - if (!isRecipeInitialised) { - try { - recipe_4.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - } - if (!isRecipeInitialised) { - try { - recipe_5.default.getInstanceOrThrowError(); - isRecipeInitialised = true; - } catch (_) {} - } - } - return isRecipeInitialised; -} -exports.isRecipeInitialised = isRecipeInitialised; -function validateApiKey(input) { - return __awaiter(this, void 0, void 0, function* () { - let apiKeyHeaderValue = input.req.getHeaderValue("authorization"); - // We receieve the api key as `Bearer API_KEY`, this retrieves just the key - apiKeyHeaderValue = - apiKeyHeaderValue === null || apiKeyHeaderValue === void 0 ? void 0 : apiKeyHeaderValue.split(" ")[1]; - if (apiKeyHeaderValue === undefined) { - return false; - } - return apiKeyHeaderValue === input.config.apiKey; - }); -} -exports.validateApiKey = validateApiKey; -function getApiPathWithDashboardBase(path) { - return constants_1.DASHBOARD_API + path; -} -exports.getApiPathWithDashboardBase = getApiPathWithDashboardBase; diff --git a/lib/build/recipe/emailpassword/api/emailExists.d.ts b/lib/build/recipe/emailpassword/api/emailExists.d.ts deleted file mode 100644 index 74f301a87..000000000 --- a/lib/build/recipe/emailpassword/api/emailExists.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function emailExists(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/emailpassword/api/emailExists.js b/lib/build/recipe/emailpassword/api/emailExists.js deleted file mode 100644 index 2c99dc317..000000000 --- a/lib/build/recipe/emailpassword/api/emailExists.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -function emailExists(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/47#issue-751571692 - if (apiImplementation.emailExistsGET === undefined) { - return false; - } - let email = options.req.getKeyValueFromQuery("email"); - if (email === undefined || typeof email !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the email as a GET param", - }); - } - let result = yield apiImplementation.emailExistsGET({ - email, - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = emailExists; diff --git a/lib/build/recipe/emailpassword/api/generatePasswordResetToken.d.ts b/lib/build/recipe/emailpassword/api/generatePasswordResetToken.d.ts deleted file mode 100644 index 866cf3c64..000000000 --- a/lib/build/recipe/emailpassword/api/generatePasswordResetToken.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function generatePasswordResetToken( - apiImplementation: APIInterface, - options: APIOptions -): Promise; diff --git a/lib/build/recipe/emailpassword/api/generatePasswordResetToken.js b/lib/build/recipe/emailpassword/api/generatePasswordResetToken.js deleted file mode 100644 index 3fa0fad07..000000000 --- a/lib/build/recipe/emailpassword/api/generatePasswordResetToken.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("./utils"); -const utils_3 = require("../../../utils"); -function generatePasswordResetToken(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/22#issuecomment-710512442 - if (apiImplementation.generatePasswordResetTokenPOST === undefined) { - return false; - } - // step 1 - let formFields = yield utils_2.validateFormFieldsOrThrowError( - options.config.resetPasswordUsingTokenFeature.formFieldsForGenerateTokenForm, - (yield options.req.getJSONBody()).formFields - ); - let result = yield apiImplementation.generatePasswordResetTokenPOST({ - formFields, - options, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = generatePasswordResetToken; diff --git a/lib/build/recipe/emailpassword/api/implementation.d.ts b/lib/build/recipe/emailpassword/api/implementation.d.ts deleted file mode 100644 index 402db9918..000000000 --- a/lib/build/recipe/emailpassword/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/emailpassword/api/implementation.js b/lib/build/recipe/emailpassword/api/implementation.js deleted file mode 100644 index 805c123c0..000000000 --- a/lib/build/recipe/emailpassword/api/implementation.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const logger_1 = require("../../../logger"); -const session_1 = __importDefault(require("../../session")); -function getAPIImplementation() { - return { - emailExistsGET: function ({ email, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield options.recipeImplementation.getUserByEmail({ email, userContext }); - return { - status: "OK", - exists: user !== undefined, - }; - }); - }, - generatePasswordResetTokenPOST: function ({ formFields, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let email = formFields.filter((f) => f.id === "email")[0].value; - let user = yield options.recipeImplementation.getUserByEmail({ email, userContext }); - if (user === undefined) { - return { - status: "OK", - }; - } - let response = yield options.recipeImplementation.createResetPasswordToken({ - userId: user.id, - userContext, - }); - if (response.status === "UNKNOWN_USER_ID_ERROR") { - logger_1.logDebugMessage(`Password reset email not sent, unknown user id: ${user.id}`); - return { - status: "OK", - }; - } - let passwordResetLink = - options.appInfo.websiteDomain.getAsStringDangerous() + - options.appInfo.websiteBasePath.getAsStringDangerous() + - "/reset-password?token=" + - response.token + - "&rid=" + - options.recipeId; - logger_1.logDebugMessage(`Sending password reset email to ${email}`); - yield options.emailDelivery.ingredientInterfaceImpl.sendEmail({ - type: "PASSWORD_RESET", - user, - passwordResetLink, - userContext, - }); - return { - status: "OK", - }; - }); - }, - passwordResetPOST: function ({ formFields, token, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let newPassword = formFields.filter((f) => f.id === "password")[0].value; - let response = yield options.recipeImplementation.resetPasswordUsingToken({ - token, - newPassword, - userContext, - }); - return response; - }); - }, - signInPOST: function ({ formFields, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let email = formFields.filter((f) => f.id === "email")[0].value; - let password = formFields.filter((f) => f.id === "password")[0].value; - let response = yield options.recipeImplementation.signIn({ email, password, userContext }); - if (response.status === "WRONG_CREDENTIALS_ERROR") { - return response; - } - let user = response.user; - let session = yield session_1.default.createNewSession( - options.req, - options.res, - user.id, - {}, - {}, - userContext - ); - return { - status: "OK", - session, - user, - }; - }); - }, - signUpPOST: function ({ formFields, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let email = formFields.filter((f) => f.id === "email")[0].value; - let password = formFields.filter((f) => f.id === "password")[0].value; - let response = yield options.recipeImplementation.signUp({ email, password, userContext }); - if (response.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return response; - } - let user = response.user; - let session = yield session_1.default.createNewSession( - options.req, - options.res, - user.id, - {}, - {}, - userContext - ); - return { - status: "OK", - session, - user, - }; - }); - }, - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/emailpassword/api/passwordReset.d.ts b/lib/build/recipe/emailpassword/api/passwordReset.d.ts deleted file mode 100644 index 4b5e6641c..000000000 --- a/lib/build/recipe/emailpassword/api/passwordReset.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function passwordReset(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/emailpassword/api/passwordReset.js b/lib/build/recipe/emailpassword/api/passwordReset.js deleted file mode 100644 index dc8c29d4f..000000000 --- a/lib/build/recipe/emailpassword/api/passwordReset.js +++ /dev/null @@ -1,98 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("./utils"); -const error_1 = __importDefault(require("../error")); -const utils_3 = require("../../../utils"); -function passwordReset(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/22#issuecomment-710512442 - if (apiImplementation.passwordResetPOST === undefined) { - return false; - } - // step 1 - let formFields = yield utils_2.validateFormFieldsOrThrowError( - options.config.resetPasswordUsingTokenFeature.formFieldsForPasswordResetForm, - (yield options.req.getJSONBody()).formFields - ); - let token = (yield options.req.getJSONBody()).token; - if (token === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the password reset token", - }); - } - if (typeof token !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "The password reset token must be a string", - }); - } - let result = yield apiImplementation.passwordResetPOST({ - formFields, - token, - options, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response( - options.res, - result.status === "OK" - ? { - status: "OK", - } - : result - ); - return true; - }); -} -exports.default = passwordReset; diff --git a/lib/build/recipe/emailpassword/api/signin.d.ts b/lib/build/recipe/emailpassword/api/signin.d.ts deleted file mode 100644 index 6ca49c1fc..000000000 --- a/lib/build/recipe/emailpassword/api/signin.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function signInAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/emailpassword/api/signin.js b/lib/build/recipe/emailpassword/api/signin.js deleted file mode 100644 index 971c51911..000000000 --- a/lib/build/recipe/emailpassword/api/signin.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("./utils"); -const utils_3 = require("../../../utils"); -function signInAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/20#issuecomment-710346362 - if (apiImplementation.signInPOST === undefined) { - return false; - } - // step 1 - let formFields = yield utils_2.validateFormFieldsOrThrowError( - options.config.signInFeature.formFields, - (yield options.req.getJSONBody()).formFields - ); - let result = yield apiImplementation.signInPOST({ - formFields, - options, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - if (result.status === "OK") { - utils_1.send200Response(options.res, { - status: "OK", - user: result.user, - }); - } else { - utils_1.send200Response(options.res, result); - } - return true; - }); -} -exports.default = signInAPI; diff --git a/lib/build/recipe/emailpassword/api/signup.d.ts b/lib/build/recipe/emailpassword/api/signup.d.ts deleted file mode 100644 index bd1fa2e88..000000000 --- a/lib/build/recipe/emailpassword/api/signup.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function signUpAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/emailpassword/api/signup.js b/lib/build/recipe/emailpassword/api/signup.js deleted file mode 100644 index 986be1fe2..000000000 --- a/lib/build/recipe/emailpassword/api/signup.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("./utils"); -const error_1 = __importDefault(require("../error")); -const utils_3 = require("../../../utils"); -function signUpAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/21#issuecomment-710423536 - if (apiImplementation.signUpPOST === undefined) { - return false; - } - // step 1 - let formFields = yield utils_2.validateFormFieldsOrThrowError( - options.config.signUpFeature.formFields, - (yield options.req.getJSONBody()).formFields - ); - let result = yield apiImplementation.signUpPOST({ - formFields, - options, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - if (result.status === "OK") { - utils_1.send200Response(options.res, { - status: "OK", - user: result.user, - }); - } else if (result.status === "GENERAL_ERROR") { - utils_1.send200Response(options.res, result); - } else { - throw new error_1.default({ - type: error_1.default.FIELD_ERROR, - payload: [ - { - id: "email", - error: "This email already exists. Please sign in instead.", - }, - ], - message: "Error in input formFields", - }); - } - return true; - }); -} -exports.default = signUpAPI; diff --git a/lib/build/recipe/emailpassword/api/utils.d.ts b/lib/build/recipe/emailpassword/api/utils.d.ts deleted file mode 100644 index 5579f71cc..000000000 --- a/lib/build/recipe/emailpassword/api/utils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { NormalisedFormField } from "../types"; -export declare function validateFormFieldsOrThrowError( - configFormFields: NormalisedFormField[], - formFieldsRaw: any -): Promise< - { - id: string; - value: string; - }[] ->; diff --git a/lib/build/recipe/emailpassword/api/utils.js b/lib/build/recipe/emailpassword/api/utils.js deleted file mode 100644 index bbf03c787..000000000 --- a/lib/build/recipe/emailpassword/api/utils.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateFormFieldsOrThrowError = void 0; -const error_1 = __importDefault(require("../error")); -const constants_1 = require("../constants"); -function validateFormFieldsOrThrowError(configFormFields, formFieldsRaw) { - return __awaiter(this, void 0, void 0, function* () { - // first we check syntax ---------------------------- - if (formFieldsRaw === undefined) { - throw newBadRequestError("Missing input param: formFields"); - } - if (!Array.isArray(formFieldsRaw)) { - throw newBadRequestError("formFields must be an array"); - } - let formFields = []; - for (let i = 0; i < formFieldsRaw.length; i++) { - let curr = formFieldsRaw[i]; - if (typeof curr !== "object" || curr === null) { - throw newBadRequestError("All elements of formFields must be an object"); - } - if (typeof curr.id !== "string" || curr.value === undefined) { - throw newBadRequestError("All elements of formFields must contain an 'id' and 'value' field"); - } - formFields.push(curr); - } - // we trim the email: https://github.com/supertokens/supertokens-core/issues/99 - formFields = formFields.map((field) => { - if (field.id === constants_1.FORM_FIELD_EMAIL_ID) { - return Object.assign(Object.assign({}, field), { value: field.value.trim() }); - } - return field; - }); - // then run validators through them----------------------- - yield validateFormOrThrowError(formFields, configFormFields); - return formFields; - }); -} -exports.validateFormFieldsOrThrowError = validateFormFieldsOrThrowError; -function newBadRequestError(message) { - return new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message, - }); -} -// We check that the number of fields in input and config form field is the same. -// We check that each item in the config form field is also present in the input form field -function validateFormOrThrowError(inputs, configFormFields) { - return __awaiter(this, void 0, void 0, function* () { - let validationErrors = []; - if (configFormFields.length !== inputs.length) { - throw newBadRequestError("Are you sending too many / too few formFields?"); - } - // Loop through all form fields. - for (let i = 0; i < configFormFields.length; i++) { - const field = configFormFields[i]; - // Find corresponding input value. - const input = inputs.find((i) => i.id === field.id); - // Absent or not optional empty field - if (input === undefined || (input.value === "" && !field.optional)) { - validationErrors.push({ - error: "Field is not optional", - id: field.id, - }); - } else { - // Otherwise, use validate function. - const error = yield field.validate(input.value); - // If error, add it. - if (error !== undefined) { - validationErrors.push({ - error, - id: field.id, - }); - } - } - } - if (validationErrors.length !== 0) { - throw new error_1.default({ - type: error_1.default.FIELD_ERROR, - payload: validationErrors, - message: "Error in input formFields", - }); - } - }); -} diff --git a/lib/build/recipe/emailpassword/constants.d.ts b/lib/build/recipe/emailpassword/constants.d.ts deleted file mode 100644 index 9b58b697a..000000000 --- a/lib/build/recipe/emailpassword/constants.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-nocheck -export declare const FORM_FIELD_PASSWORD_ID = "password"; -export declare const FORM_FIELD_EMAIL_ID = "email"; -export declare const SIGN_UP_API = "/signup"; -export declare const SIGN_IN_API = "/signin"; -export declare const GENERATE_PASSWORD_RESET_TOKEN_API = "/user/password/reset/token"; -export declare const PASSWORD_RESET_API = "/user/password/reset"; -export declare const SIGNUP_EMAIL_EXISTS_API = "/signup/email/exists"; diff --git a/lib/build/recipe/emailpassword/constants.js b/lib/build/recipe/emailpassword/constants.js deleted file mode 100644 index 465baa718..000000000 --- a/lib/build/recipe/emailpassword/constants.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SIGNUP_EMAIL_EXISTS_API = exports.PASSWORD_RESET_API = exports.GENERATE_PASSWORD_RESET_TOKEN_API = exports.SIGN_IN_API = exports.SIGN_UP_API = exports.FORM_FIELD_EMAIL_ID = exports.FORM_FIELD_PASSWORD_ID = void 0; -exports.FORM_FIELD_PASSWORD_ID = "password"; -exports.FORM_FIELD_EMAIL_ID = "email"; -exports.SIGN_UP_API = "/signup"; -exports.SIGN_IN_API = "/signin"; -exports.GENERATE_PASSWORD_RESET_TOKEN_API = "/user/password/reset/token"; -exports.PASSWORD_RESET_API = "/user/password/reset"; -exports.SIGNUP_EMAIL_EXISTS_API = "/signup/email/exists"; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index 77620015d..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -// @ts-nocheck -import { TypeEmailPasswordEmailDeliveryInput, User, RecipeInterface } from "../../../types"; -import { NormalisedAppinfo } from "../../../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class BackwardCompatibilityService - implements EmailDeliveryInterface { - private recipeInterfaceImpl; - private isInServerlessEnv; - private appInfo; - private resetPasswordUsingTokenFeature; - constructor( - recipeInterfaceImpl: RecipeInterface, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - resetPasswordUsingTokenFeature?: { - createAndSendCustomEmail?: ( - user: User, - passwordResetURLWithToken: string, - userContext: any - ) => Promise; - } - ); - sendEmail: ( - input: TypeEmailPasswordEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.js b/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.js deleted file mode 100644 index 96f394f0d..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const passwordResetFunctions_1 = require("../../../passwordResetFunctions"); -class BackwardCompatibilityService { - constructor(recipeInterfaceImpl, appInfo, isInServerlessEnv, resetPasswordUsingTokenFeature) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - let user = yield this.recipeInterfaceImpl.getUserById({ - userId: input.user.id, - userContext: input.userContext, - }); - if (user === undefined) { - throw Error("this should never come here"); - } - // we add this here cause the user may have overridden the sendEmail function - // to change the input email and if we don't do this, the input email - // will get reset by the getUserById call above. - user.email = input.user.email; - try { - if (!this.isInServerlessEnv) { - this.resetPasswordUsingTokenFeature - .createAndSendCustomEmail(user, input.passwordResetLink, input.userContext) - .catch((_) => {}); - } else { - // see https://github.com/supertokens/supertokens-node/pull/135 - yield this.resetPasswordUsingTokenFeature.createAndSendCustomEmail( - user, - input.passwordResetLink, - input.userContext - ); - } - } catch (_) {} - }); - this.recipeInterfaceImpl = recipeInterfaceImpl; - this.isInServerlessEnv = isInServerlessEnv; - this.appInfo = appInfo; - { - let inputCreateAndSendCustomEmail = - resetPasswordUsingTokenFeature === null || resetPasswordUsingTokenFeature === void 0 - ? void 0 - : resetPasswordUsingTokenFeature.createAndSendCustomEmail; - this.resetPasswordUsingTokenFeature = - inputCreateAndSendCustomEmail !== undefined - ? { - createAndSendCustomEmail: inputCreateAndSendCustomEmail, - } - : { - createAndSendCustomEmail: passwordResetFunctions_1.createAndSendCustomEmail(this.appInfo), - }; - } - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/index.d.ts b/lib/build/recipe/emailpassword/emaildelivery/services/index.d.ts deleted file mode 100644 index 4de04d983..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import SMTP from "./smtp"; -export declare let SMTPService: typeof SMTP; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/index.js b/lib/build/recipe/emailpassword/emaildelivery/services/index.js deleted file mode 100644 index 91700aeaf..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMTPService = void 0; -const smtp_1 = __importDefault(require("./smtp")); -exports.SMTPService = smtp_1.default; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.d.ts b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.d.ts deleted file mode 100644 index e17ccea3d..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { ServiceInterface, TypeInput } from "../../../../../ingredients/emaildelivery/services/smtp"; -import { TypeEmailPasswordEmailDeliveryInput } from "../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class SMTPService implements EmailDeliveryInterface { - serviceImpl: ServiceInterface; - constructor(config: TypeInput); - sendEmail: ( - input: TypeEmailPasswordEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.js b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.js deleted file mode 100644 index e917fb0fe..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/index.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const nodemailer_1 = require("nodemailer"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const serviceImplementation_1 = require("./serviceImplementation"); -class SMTPService { - constructor(config) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - let content = yield this.serviceImpl.getContent(input); - yield this.serviceImpl.sendRawEmail( - Object.assign(Object.assign({}, content), { userContext: input.userContext }) - ); - }); - const transporter = nodemailer_1.createTransport({ - host: config.smtpSettings.host, - port: config.smtpSettings.port, - auth: { - user: config.smtpSettings.authUsername || config.smtpSettings.from.email, - pass: config.smtpSettings.password, - }, - secure: config.smtpSettings.secure, - }); - let builder = new supertokens_js_override_1.default( - serviceImplementation_1.getServiceImplementation(transporter, config.smtpSettings.from) - ); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.serviceImpl = builder.build(); - } -} -exports.default = SMTPService; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.d.ts b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.d.ts deleted file mode 100644 index 34240509a..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { TypeEmailPasswordPasswordResetEmailDeliveryInput } from "../../../types"; -import { GetContentResult } from "../../../../../ingredients/emaildelivery/services/smtp"; -export default function getPasswordResetEmailContent( - input: TypeEmailPasswordPasswordResetEmailDeliveryInput -): GetContentResult; -export declare function getPasswordResetEmailHTML(appName: string, email: string, resetLink: string): string; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.js b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.js deleted file mode 100644 index 9a6b9d98b..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/passwordReset.js +++ /dev/null @@ -1,931 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPasswordResetEmailHTML = void 0; -const supertokens_1 = __importDefault(require("../../../../../supertokens")); -function getPasswordResetEmailContent(input) { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - let body = getPasswordResetEmailHTML(appName, input.user.email, input.passwordResetLink); - return { - body, - toEmail: input.user.email, - subject: "Password reset instructions", - isHtml: true, - }; -} -exports.default = getPasswordResetEmailContent; -function getPasswordResetEmailHTML(appName, email, resetLink) { - return ` - - - - - - - - *|MC:SUBJECT|* - - - - - - - - - -
- - - - -
- - - - - - - - - - - -
- - - - - -
- -
- - - - - -
- - - - - - -
- - -
-
- -

- A password reset request for your account on - ${appName} has been received. -

- - -
-
-

- Alternatively, you can directly paste this link - in your browser
- ${resetLink} -

-
-
- - - - -
- - - - - - -
-

- This email is meant for ${email} -

-
-
- -
- - - - - -
- -
- -
-
- - - - `; -} -exports.getPasswordResetEmailHTML = getPasswordResetEmailHTML; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.d.ts b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.d.ts deleted file mode 100644 index 95fdbda32..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { TypeEmailPasswordEmailDeliveryInput } from "../../../../types"; -import { Transporter } from "nodemailer"; -import { ServiceInterface } from "../../../../../../ingredients/emaildelivery/services/smtp"; -export declare function getServiceImplementation( - transporter: Transporter, - from: { - name: string; - email: string; - } -): ServiceInterface; diff --git a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.js b/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.js deleted file mode 100644 index f4ebb5266..000000000 --- a/lib/build/recipe/emailpassword/emaildelivery/services/smtp/serviceImplementation/index.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getServiceImplementation = void 0; -const passwordReset_1 = __importDefault(require("../passwordReset")); -function getServiceImplementation(transporter, from) { - return { - sendRawEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (input.isHtml) { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - html: input.body, - }); - } else { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - text: input.body, - }); - } - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return passwordReset_1.default(input); - }); - }, - }; -} -exports.getServiceImplementation = getServiceImplementation; diff --git a/lib/build/recipe/emailpassword/error.d.ts b/lib/build/recipe/emailpassword/error.d.ts deleted file mode 100644 index d4dc2cf9b..000000000 --- a/lib/build/recipe/emailpassword/error.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class SessionError extends STError { - static FIELD_ERROR: "FIELD_ERROR"; - constructor( - options: - | { - type: "FIELD_ERROR"; - payload: { - id: string; - error: string; - }[]; - message: string; - } - | { - type: "BAD_INPUT_ERROR"; - message: string; - } - ); -} diff --git a/lib/build/recipe/emailpassword/error.js b/lib/build/recipe/emailpassword/error.js deleted file mode 100644 index ce0b25647..000000000 --- a/lib/build/recipe/emailpassword/error.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class SessionError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "emailpassword"; - } -} -exports.default = SessionError; -SessionError.FIELD_ERROR = "FIELD_ERROR"; diff --git a/lib/build/recipe/emailpassword/index.d.ts b/lib/build/recipe/emailpassword/index.d.ts deleted file mode 100644 index 2097f1a0e..000000000 --- a/lib/build/recipe/emailpassword/index.d.ts +++ /dev/null @@ -1,92 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { RecipeInterface, User, APIOptions, APIInterface, TypeEmailPasswordEmailDeliveryInput } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static signUp( - email: string, - password: string, - userContext?: any - ): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - >; - static signIn( - email: string, - password: string, - userContext?: any - ): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - >; - static getUserById(userId: string, userContext?: any): Promise; - static getUserByEmail(email: string, userContext?: any): Promise; - static createResetPasswordToken( - userId: string, - userContext?: any - ): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "UNKNOWN_USER_ID_ERROR"; - } - >; - static resetPasswordUsingToken( - token: string, - newPassword: string, - userContext?: any - ): Promise< - | { - status: "OK"; - userId?: string | undefined; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - >; - static updateEmailOrPassword(input: { - userId: string; - email?: string; - password?: string; - userContext?: any; - applyPasswordPolicy?: boolean; - }): Promise< - | { - status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR"; - } - | { - status: "PASSWORD_POLICY_VIOLATED_ERROR"; - failureReason: string; - } - >; - static sendEmail( - input: TypeEmailPasswordEmailDeliveryInput & { - userContext?: any; - } - ): Promise; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let signUp: typeof Wrapper.signUp; -export declare let signIn: typeof Wrapper.signIn; -export declare let getUserById: typeof Wrapper.getUserById; -export declare let getUserByEmail: typeof Wrapper.getUserByEmail; -export declare let createResetPasswordToken: typeof Wrapper.createResetPasswordToken; -export declare let resetPasswordUsingToken: typeof Wrapper.resetPasswordUsingToken; -export declare let updateEmailOrPassword: typeof Wrapper.updateEmailOrPassword; -export type { RecipeInterface, User, APIOptions, APIInterface }; -export declare let sendEmail: typeof Wrapper.sendEmail; diff --git a/lib/build/recipe/emailpassword/index.js b/lib/build/recipe/emailpassword/index.js deleted file mode 100644 index 83b11ce9c..000000000 --- a/lib/build/recipe/emailpassword/index.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sendEmail = exports.updateEmailOrPassword = exports.resetPasswordUsingToken = exports.createResetPasswordToken = exports.getUserByEmail = exports.getUserById = exports.signIn = exports.signUp = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -class Wrapper { - static signUp(email, password, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.signUp({ - email, - password, - userContext: userContext === undefined ? {} : userContext, - }); - } - static signIn(email, password, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.signIn({ - email, - password, - userContext: userContext === undefined ? {} : userContext, - }); - } - static getUserById(userId, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserById({ - userId, - userContext: userContext === undefined ? {} : userContext, - }); - } - static getUserByEmail(email, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserByEmail({ - email, - userContext: userContext === undefined ? {} : userContext, - }); - } - static createResetPasswordToken(userId, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.createResetPasswordToken({ - userId, - userContext: userContext === undefined ? {} : userContext, - }); - } - static resetPasswordUsingToken(token, newPassword, userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.resetPasswordUsingToken({ - token, - newPassword, - userContext: userContext === undefined ? {} : userContext, - }); - } - static updateEmailOrPassword(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.updateEmailOrPassword(Object.assign({ userContext: {} }, input)); - } - static sendEmail(input) { - return __awaiter(this, void 0, void 0, function* () { - let recipeInstance = recipe_1.default.getInstanceOrThrowError(); - return yield recipeInstance.emailDelivery.ingredientInterfaceImpl.sendEmail( - Object.assign({ userContext: {} }, input) - ); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.signUp = Wrapper.signUp; -exports.signIn = Wrapper.signIn; -exports.getUserById = Wrapper.getUserById; -exports.getUserByEmail = Wrapper.getUserByEmail; -exports.createResetPasswordToken = Wrapper.createResetPasswordToken; -exports.resetPasswordUsingToken = Wrapper.resetPasswordUsingToken; -exports.updateEmailOrPassword = Wrapper.updateEmailOrPassword; -exports.sendEmail = Wrapper.sendEmail; diff --git a/lib/build/recipe/emailpassword/passwordResetFunctions.d.ts b/lib/build/recipe/emailpassword/passwordResetFunctions.d.ts deleted file mode 100644 index 56b10c948..000000000 --- a/lib/build/recipe/emailpassword/passwordResetFunctions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { User } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function createAndSendCustomEmail( - appInfo: NormalisedAppinfo -): (user: User, passwordResetURLWithToken: string) => Promise; diff --git a/lib/build/recipe/emailpassword/passwordResetFunctions.js b/lib/build/recipe/emailpassword/passwordResetFunctions.js deleted file mode 100644 index 535499e39..000000000 --- a/lib/build/recipe/emailpassword/passwordResetFunctions.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createAndSendCustomEmail = void 0; -const axios_1 = __importDefault(require("axios")); -const logger_1 = require("../../logger"); -function createAndSendCustomEmail(appInfo) { - return (user, passwordResetURLWithToken) => - __awaiter(this, void 0, void 0, function* () { - // related issue: https://github.com/supertokens/supertokens-node/issues/38 - if (process.env.TEST_MODE === "testing") { - return; - } - try { - yield axios_1.default({ - method: "POST", - url: "https://api.supertokens.io/0/st/auth/password/reset", - data: { - email: user.email, - appName: appInfo.appName, - passwordResetURL: passwordResetURLWithToken, - }, - headers: { - "api-version": 0, - }, - }); - logger_1.logDebugMessage(`Password reset email sent to ${user.email}`); - } catch (error) { - logger_1.logDebugMessage("Error sending password reset email"); - if (axios_1.default.isAxiosError(error)) { - const err = error; - if (err.response) { - logger_1.logDebugMessage(`Error status: ${err.response.status}`); - logger_1.logDebugMessage(`Error response: ${JSON.stringify(err.response.data)}`); - } else { - logger_1.logDebugMessage(`Error: ${err.message}`); - } - } else { - logger_1.logDebugMessage(`Error: ${JSON.stringify(error)}`); - } - logger_1.logDebugMessage("Logging the input below:"); - logger_1.logDebugMessage( - JSON.stringify( - { - email: user.email, - appName: appInfo.appName, - passwordResetURL: passwordResetURLWithToken, - }, - null, - 2 - ) - ); - } - }); -} -exports.createAndSendCustomEmail = createAndSendCustomEmail; diff --git a/lib/build/recipe/emailpassword/recipe.d.ts b/lib/build/recipe/emailpassword/recipe.d.ts deleted file mode 100644 index f2bd86c2c..000000000 --- a/lib/build/recipe/emailpassword/recipe.d.ts +++ /dev/null @@ -1,43 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { TypeInput, TypeNormalisedInput, RecipeInterface, APIInterface } from "./types"; -import { NormalisedAppinfo, APIHandled, HTTPMethod, RecipeListFunction } from "../../types"; -import STError from "./error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { TypeEmailPasswordEmailDeliveryInput } from "./types"; -import { GetEmailForUserIdFunc } from "../emailverification/types"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - emailDelivery: EmailDeliveryIngredient; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput | undefined, - ingredients: { - emailDelivery: EmailDeliveryIngredient | undefined; - } - ); - static getInstanceOrThrowError(): Recipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - _path: NormalisedURLPath, - _method: HTTPMethod - ) => Promise; - handleError: (err: STError, _request: BaseRequest, response: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; - getEmailForUserId: GetEmailForUserIdFunc; -} diff --git a/lib/build/recipe/emailpassword/recipe.js b/lib/build/recipe/emailpassword/recipe.js deleted file mode 100644 index 8b446ac28..000000000 --- a/lib/build/recipe/emailpassword/recipe.js +++ /dev/null @@ -1,231 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const constants_1 = require("./constants"); -const signup_1 = __importDefault(require("./api/signup")); -const signin_1 = __importDefault(require("./api/signin")); -const generatePasswordResetToken_1 = __importDefault(require("./api/generatePasswordResetToken")); -const passwordReset_1 = __importDefault(require("./api/passwordReset")); -const utils_2 = require("../../utils"); -const emailExists_1 = __importDefault(require("./api/emailExists")); -const recipe_1 = __importDefault(require("../emailverification/recipe")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const emaildelivery_1 = __importDefault(require("../../ingredients/emaildelivery")); -const postSuperTokensInitCallbacks_1 = require("../../postSuperTokensInitCallbacks"); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, ingredients) { - super(recipeId, appInfo); - // abstract instance functions below............... - this.getAPIsHandled = () => { - return [ - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.SIGN_UP_API), - id: constants_1.SIGN_UP_API, - disabled: this.apiImpl.signUpPOST === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.SIGN_IN_API), - id: constants_1.SIGN_IN_API, - disabled: this.apiImpl.signInPOST === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default( - constants_1.GENERATE_PASSWORD_RESET_TOKEN_API - ), - id: constants_1.GENERATE_PASSWORD_RESET_TOKEN_API, - disabled: this.apiImpl.generatePasswordResetTokenPOST === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.PASSWORD_RESET_API), - id: constants_1.PASSWORD_RESET_API, - disabled: this.apiImpl.passwordResetPOST === undefined, - }, - { - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.SIGNUP_EMAIL_EXISTS_API), - id: constants_1.SIGNUP_EMAIL_EXISTS_API, - disabled: this.apiImpl.emailExistsGET === undefined, - }, - ]; - }; - this.handleAPIRequest = (id, req, res, _path, _method) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - emailDelivery: this.emailDelivery, - appInfo: this.getAppInfo(), - }; - if (id === constants_1.SIGN_UP_API) { - return yield signup_1.default(this.apiImpl, options); - } else if (id === constants_1.SIGN_IN_API) { - return yield signin_1.default(this.apiImpl, options); - } else if (id === constants_1.GENERATE_PASSWORD_RESET_TOKEN_API) { - return yield generatePasswordResetToken_1.default(this.apiImpl, options); - } else if (id === constants_1.PASSWORD_RESET_API) { - return yield passwordReset_1.default(this.apiImpl, options); - } else if (id === constants_1.SIGNUP_EMAIL_EXISTS_API) { - return yield emailExists_1.default(this.apiImpl, options); - } - return false; - }); - this.handleError = (err, _request, response) => - __awaiter(this, void 0, void 0, function* () { - if (err.fromRecipe === Recipe.RECIPE_ID) { - if (err.type === error_1.default.FIELD_ERROR) { - return utils_2.send200Response(response, { - status: "FIELD_ERROR", - formFields: err.payload, - }); - } else { - throw err; - } - } else { - throw err; - } - }); - this.getAllCORSHeaders = () => { - return []; - }; - this.isErrorFromThisRecipe = (err) => { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - }; - // extra instance functions below............... - this.getEmailForUserId = (userId, userContext) => - __awaiter(this, void 0, void 0, function* () { - let userInfo = yield this.recipeInterfaceImpl.getUserById({ userId, userContext }); - if (userInfo !== undefined) { - return { - status: "OK", - email: userInfo.email, - }; - } - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - }); - this.isInServerlessEnv = isInServerlessEnv; - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - { - const getEmailPasswordConfig = () => this.config; - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default( - querier_1.Querier.getNewInstanceOrThrowError(recipeId), - getEmailPasswordConfig - ) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - /** - * emailDelivery will always needs to be declared after isInServerlessEnv - * and recipeInterfaceImpl values are set - */ - this.emailDelivery = - ingredients.emailDelivery === undefined - ? new emaildelivery_1.default( - this.config.getEmailDeliveryConfig(this.recipeInterfaceImpl, this.isInServerlessEnv) - ) - : ingredients.emailDelivery; - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.addPostInitCallback(() => { - const emailVerificationRecipe = recipe_1.default.getInstance(); - if (emailVerificationRecipe !== undefined) { - emailVerificationRecipe.addGetEmailForUserIdFunc(this.getEmailForUserId.bind(this)); - } - }); - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config, { - emailDelivery: undefined, - }); - return Recipe.instance; - } else { - throw new Error("Emailpassword recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "emailpassword"; diff --git a/lib/build/recipe/emailpassword/recipeImplementation.d.ts b/lib/build/recipe/emailpassword/recipeImplementation.d.ts deleted file mode 100644 index cfb8e6ad0..000000000 --- a/lib/build/recipe/emailpassword/recipeImplementation.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { RecipeInterface, TypeNormalisedInput } from "./types"; -import { Querier } from "../../querier"; -export default function getRecipeInterface( - querier: Querier, - getEmailPasswordConfig: () => TypeNormalisedInput -): RecipeInterface; diff --git a/lib/build/recipe/emailpassword/recipeImplementation.js b/lib/build/recipe/emailpassword/recipeImplementation.js deleted file mode 100644 index 73715abc2..000000000 --- a/lib/build/recipe/emailpassword/recipeImplementation.js +++ /dev/null @@ -1,169 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const constants_1 = require("./constants"); -function getRecipeInterface(querier, getEmailPasswordConfig) { - return { - signUp: function ({ email, password }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/signup"), { - email, - password, - }); - if (response.status === "OK") { - return response; - } else { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } - }); - }, - signIn: function ({ email, password }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/signin"), { - email, - password, - }); - if (response.status === "OK") { - return response; - } else { - return { - status: "WRONG_CREDENTIALS_ERROR", - }; - } - }); - }, - getUserById: function ({ userId }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user"), { - userId, - }); - if (response.status === "OK") { - return Object.assign({}, response.user); - } else { - return undefined; - } - }); - }, - getUserByEmail: function ({ email }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user"), { - email, - }); - if (response.status === "OK") { - return Object.assign({}, response.user); - } else { - return undefined; - } - }); - }, - createResetPasswordToken: function ({ userId }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/user/password/reset/token"), - { - userId, - } - ); - if (response.status === "OK") { - return { - status: "OK", - token: response.token, - }; - } else { - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - } - }); - }, - resetPasswordUsingToken: function ({ token, newPassword }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/user/password/reset"), - { - method: "token", - token, - newPassword, - } - ); - return response; - }); - }, - updateEmailOrPassword: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (input.applyPasswordPolicy || input.applyPasswordPolicy === undefined) { - let formFields = getEmailPasswordConfig().signUpFeature.formFields; - if (input.password !== undefined) { - const passwordField = formFields.filter( - (el) => el.id === constants_1.FORM_FIELD_PASSWORD_ID - )[0]; - const error = yield passwordField.validate(input.password); - if (error !== undefined) { - return { - status: "PASSWORD_POLICY_VIOLATED_ERROR", - failureReason: error, - }; - } - } - } - let response = yield querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/user"), { - userId: input.userId, - email: input.email, - password: input.password, - }); - if (response.status === "OK") { - return { - status: "OK", - }; - } else if (response.status === "EMAIL_ALREADY_EXISTS_ERROR") { - return { - status: "EMAIL_ALREADY_EXISTS_ERROR", - }; - } else { - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - } - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/emailpassword/types.d.ts b/lib/build/recipe/emailpassword/types.d.ts deleted file mode 100644 index a4c268ee0..000000000 --- a/lib/build/recipe/emailpassword/types.d.ts +++ /dev/null @@ -1,259 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import OverrideableBuilder from "supertokens-js-override"; -import { SessionContainerInterface } from "../session/types"; -import { - TypeInput as EmailDeliveryTypeInput, - TypeInputWithService as EmailDeliveryTypeInputWithService, -} from "../../ingredients/emaildelivery/types"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { GeneralErrorResponse, NormalisedAppinfo } from "../../types"; -export declare type TypeNormalisedInput = { - signUpFeature: TypeNormalisedInputSignUp; - signInFeature: TypeNormalisedInputSignIn; - getEmailDeliveryConfig: ( - recipeImpl: RecipeInterface, - isInServerlessEnv: boolean - ) => EmailDeliveryTypeInputWithService; - resetPasswordUsingTokenFeature: TypeNormalisedInputResetPasswordUsingTokenFeature; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeInputFormField = { - id: string; - validate?: (value: any) => Promise; - optional?: boolean; -}; -export declare type TypeFormField = { - id: string; - value: any; -}; -export declare type TypeInputSignUp = { - formFields?: TypeInputFormField[]; -}; -export declare type NormalisedFormField = { - id: string; - validate: (value: any) => Promise; - optional: boolean; -}; -export declare type TypeNormalisedInputSignUp = { - formFields: NormalisedFormField[]; -}; -export declare type TypeNormalisedInputSignIn = { - formFields: NormalisedFormField[]; -}; -export declare type TypeInputResetPasswordUsingTokenFeature = { - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: (user: User, passwordResetURLWithToken: string, userContext: any) => Promise; -}; -export declare type TypeNormalisedInputResetPasswordUsingTokenFeature = { - formFieldsForGenerateTokenForm: NormalisedFormField[]; - formFieldsForPasswordResetForm: NormalisedFormField[]; -}; -export declare type User = { - id: string; - email: string; - timeJoined: number; -}; -export declare type TypeInput = { - signUpFeature?: TypeInputSignUp; - emailDelivery?: EmailDeliveryTypeInput; - resetPasswordUsingTokenFeature?: TypeInputResetPasswordUsingTokenFeature; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - signUp(input: { - email: string; - password: string; - userContext: any; - }): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - >; - signIn(input: { - email: string; - password: string; - userContext: any; - }): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - >; - getUserById(input: { userId: string; userContext: any }): Promise; - getUserByEmail(input: { email: string; userContext: any }): Promise; - createResetPasswordToken(input: { - userId: string; - userContext: any; - }): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "UNKNOWN_USER_ID_ERROR"; - } - >; - resetPasswordUsingToken(input: { - token: string; - newPassword: string; - userContext: any; - }): Promise< - | { - status: "OK"; - /** - * The id of the user whose password was reset. - * Defined for Core versions 3.9 or later - */ - userId?: string; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - >; - updateEmailOrPassword(input: { - userId: string; - email?: string; - password?: string; - userContext: any; - applyPasswordPolicy?: boolean; - }): Promise< - | { - status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR"; - } - | { - status: "PASSWORD_POLICY_VIOLATED_ERROR"; - failureReason: string; - } - >; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - appInfo: NormalisedAppinfo; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - req: BaseRequest; - res: BaseResponse; - emailDelivery: EmailDeliveryIngredient; -}; -export declare type APIInterface = { - emailExistsGET: - | undefined - | ((input: { - email: string; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >); - generatePasswordResetTokenPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - } - | GeneralErrorResponse - >); - passwordResetPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - token: string; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - userId?: string; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - | GeneralErrorResponse - >); - signInPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - user: User; - session: SessionContainerInterface; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - | GeneralErrorResponse - >); - signUpPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - user: User; - session: SessionContainerInterface; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - | GeneralErrorResponse - >); -}; -export declare type TypeEmailPasswordPasswordResetEmailDeliveryInput = { - type: "PASSWORD_RESET"; - user: { - id: string; - email: string; - }; - passwordResetLink: string; -}; -export declare type TypeEmailPasswordEmailDeliveryInput = TypeEmailPasswordPasswordResetEmailDeliveryInput; diff --git a/lib/build/recipe/emailpassword/types.js b/lib/build/recipe/emailpassword/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/recipe/emailpassword/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/emailpassword/utils.d.ts b/lib/build/recipe/emailpassword/utils.d.ts deleted file mode 100644 index c48cdc96d..000000000 --- a/lib/build/recipe/emailpassword/utils.d.ts +++ /dev/null @@ -1,23 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput, NormalisedFormField, TypeInputFormField } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function validateAndNormaliseUserInput( - recipeInstance: Recipe, - appInfo: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; -export declare function normaliseSignUpFormFields(formFields?: TypeInputFormField[]): NormalisedFormField[]; -export declare function defaultPasswordValidator( - value: any -): Promise< - | "Development bug: Please make sure the password field yields a string" - | "Password must contain at least 8 characters, including a number" - | "Password's length must be lesser than 100 characters" - | "Password must contain at least one alphabet" - | "Password must contain at least one number" - | undefined ->; -export declare function defaultEmailValidator( - value: any -): Promise<"Development bug: Please make sure the email field yields a string" | "Email is invalid" | undefined>; diff --git a/lib/build/recipe/emailpassword/utils.js b/lib/build/recipe/emailpassword/utils.js deleted file mode 100644 index e50c8f7bb..000000000 --- a/lib/build/recipe/emailpassword/utils.js +++ /dev/null @@ -1,258 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultEmailValidator = exports.defaultPasswordValidator = exports.normaliseSignUpFormFields = exports.validateAndNormaliseUserInput = void 0; -const constants_1 = require("./constants"); -const backwardCompatibility_1 = __importDefault(require("./emaildelivery/services/backwardCompatibility")); -function validateAndNormaliseUserInput(recipeInstance, appInfo, config) { - let signUpFeature = validateAndNormaliseSignupConfig( - recipeInstance, - appInfo, - config === undefined ? undefined : config.signUpFeature - ); - let signInFeature = validateAndNormaliseSignInConfig(recipeInstance, appInfo, signUpFeature); - let resetPasswordUsingTokenFeature = validateAndNormaliseResetPasswordUsingTokenConfig(signUpFeature); - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - function getEmailDeliveryConfig(recipeImpl, isInServerlessEnv) { - var _a; - let emailService = - (_a = config === null || config === void 0 ? void 0 : config.emailDelivery) === null || _a === void 0 - ? void 0 - : _a.service; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomEmail config. If the user - * has not passed even that config, we use the default - * createAndSendCustomEmail implementation which calls our supertokens API - */ - if (emailService === undefined) { - emailService = new backwardCompatibility_1.default( - recipeImpl, - appInfo, - isInServerlessEnv, - config === null || config === void 0 ? void 0 : config.resetPasswordUsingTokenFeature - ); - } - return Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.emailDelivery), { - /** - * if we do - * let emailDelivery = { - * service: emailService, - * ...config.emailDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: emailService, - }); - } - return { - signUpFeature, - signInFeature, - resetPasswordUsingTokenFeature, - override, - getEmailDeliveryConfig, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function validateAndNormaliseResetPasswordUsingTokenConfig(signUpConfig) { - let formFieldsForPasswordResetForm = signUpConfig.formFields - .filter((filter) => filter.id === constants_1.FORM_FIELD_PASSWORD_ID) - .map((field) => { - return { - id: field.id, - validate: field.validate, - optional: false, - }; - }); - let formFieldsForGenerateTokenForm = signUpConfig.formFields - .filter((filter) => filter.id === constants_1.FORM_FIELD_EMAIL_ID) - .map((field) => { - return { - id: field.id, - validate: field.validate, - optional: false, - }; - }); - return { - formFieldsForPasswordResetForm, - formFieldsForGenerateTokenForm, - }; -} -function normaliseSignInFormFields(formFields) { - return formFields - .filter( - (filter) => - filter.id === constants_1.FORM_FIELD_EMAIL_ID || filter.id === constants_1.FORM_FIELD_PASSWORD_ID - ) - .map((field) => { - return { - id: field.id, - // see issue: https://github.com/supertokens/supertokens-node/issues/36 - validate: field.id === constants_1.FORM_FIELD_EMAIL_ID ? field.validate : defaultValidator, - optional: false, - }; - }); -} -function validateAndNormaliseSignInConfig(_, __, signUpConfig) { - let formFields = normaliseSignInFormFields(signUpConfig.formFields); - return { - formFields, - }; -} -function normaliseSignUpFormFields(formFields) { - let normalisedFormFields = []; - if (formFields !== undefined) { - formFields.forEach((field) => { - if (field.id === constants_1.FORM_FIELD_PASSWORD_ID) { - normalisedFormFields.push({ - id: field.id, - validate: field.validate === undefined ? defaultPasswordValidator : field.validate, - optional: false, - }); - } else if (field.id === constants_1.FORM_FIELD_EMAIL_ID) { - normalisedFormFields.push({ - id: field.id, - validate: field.validate === undefined ? defaultEmailValidator : field.validate, - optional: false, - }); - } else { - normalisedFormFields.push({ - id: field.id, - validate: field.validate === undefined ? defaultValidator : field.validate, - optional: field.optional === undefined ? false : field.optional, - }); - } - }); - } - if (normalisedFormFields.filter((field) => field.id === constants_1.FORM_FIELD_PASSWORD_ID).length === 0) { - // no password field give by user - normalisedFormFields.push({ - id: constants_1.FORM_FIELD_PASSWORD_ID, - validate: defaultPasswordValidator, - optional: false, - }); - } - if (normalisedFormFields.filter((field) => field.id === constants_1.FORM_FIELD_EMAIL_ID).length === 0) { - // no email field give by user - normalisedFormFields.push({ - id: constants_1.FORM_FIELD_EMAIL_ID, - validate: defaultEmailValidator, - optional: false, - }); - } - return normalisedFormFields; -} -exports.normaliseSignUpFormFields = normaliseSignUpFormFields; -function validateAndNormaliseSignupConfig(_, __, config) { - let formFields = normaliseSignUpFormFields(config === undefined ? undefined : config.formFields); - return { - formFields, - }; -} -function defaultValidator(_) { - return __awaiter(this, void 0, void 0, function* () { - return undefined; - }); -} -function defaultPasswordValidator(value) { - return __awaiter(this, void 0, void 0, function* () { - // length >= 8 && < 100 - // must have a number and a character - // as per https://github.com/supertokens/supertokens-auth-react/issues/5#issuecomment-709512438 - if (typeof value !== "string") { - return "Development bug: Please make sure the password field yields a string"; - } - if (value.length < 8) { - return "Password must contain at least 8 characters, including a number"; - } - if (value.length >= 100) { - return "Password's length must be lesser than 100 characters"; - } - if (value.match(/^.*[A-Za-z]+.*$/) === null) { - return "Password must contain at least one alphabet"; - } - if (value.match(/^.*[0-9]+.*$/) === null) { - return "Password must contain at least one number"; - } - return undefined; - }); -} -exports.defaultPasswordValidator = defaultPasswordValidator; -function defaultEmailValidator(value) { - return __awaiter(this, void 0, void 0, function* () { - // We check if the email syntax is correct - // As per https://github.com/supertokens/supertokens-auth-react/issues/5#issuecomment-709512438 - // Regex from https://stackoverflow.com/a/46181/3867175 - if (typeof value !== "string") { - return "Development bug: Please make sure the email field yields a string"; - } - if ( - value.match( - /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ - ) === null - ) { - return "Email is invalid"; - } - return undefined; - }); -} -exports.defaultEmailValidator = defaultEmailValidator; diff --git a/lib/build/recipe/emailverification/api/emailVerify.d.ts b/lib/build/recipe/emailverification/api/emailVerify.d.ts deleted file mode 100644 index bd6b5b6c4..000000000 --- a/lib/build/recipe/emailverification/api/emailVerify.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function emailVerify(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/emailverification/api/emailVerify.js b/lib/build/recipe/emailverification/api/emailVerify.js deleted file mode 100644 index ef258de97..000000000 --- a/lib/build/recipe/emailverification/api/emailVerify.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -const session_1 = __importDefault(require("../../session")); -function emailVerify(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - let result; - const userContext = utils_2.makeDefaultUserContextFromAPI(options.req); - if (utils_1.normaliseHttpMethod(options.req.getMethod()) === "post") { - // Logic according to Logic as per https://github.com/supertokens/supertokens-node/issues/62#issuecomment-751616106 - if (apiImplementation.verifyEmailPOST === undefined) { - return false; - } - let token = (yield options.req.getJSONBody()).token; - if (token === undefined || token === null) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the email verification token", - }); - } - if (typeof token !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "The email verification token must be a string", - }); - } - const session = yield session_1.default.getSession( - options.req, - options.res, - { overrideGlobalClaimValidators: () => [], sessionRequired: false }, - userContext - ); - let response = yield apiImplementation.verifyEmailPOST({ - token, - options, - session, - userContext, - }); - if (response.status === "OK") { - result = { status: "OK" }; - } else { - result = response; - } - } else { - if (apiImplementation.isEmailVerifiedGET === undefined) { - return false; - } - const session = yield session_1.default.getSession( - options.req, - options.res, - { overrideGlobalClaimValidators: () => [] }, - userContext - ); - result = yield apiImplementation.isEmailVerifiedGET({ - options, - session: session, - userContext, - }); - } - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = emailVerify; diff --git a/lib/build/recipe/emailverification/api/generateEmailVerifyToken.d.ts b/lib/build/recipe/emailverification/api/generateEmailVerifyToken.d.ts deleted file mode 100644 index 0bea1d2c2..000000000 --- a/lib/build/recipe/emailverification/api/generateEmailVerifyToken.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function generateEmailVerifyToken( - apiImplementation: APIInterface, - options: APIOptions -): Promise; diff --git a/lib/build/recipe/emailverification/api/generateEmailVerifyToken.js b/lib/build/recipe/emailverification/api/generateEmailVerifyToken.js deleted file mode 100644 index a1c6f3784..000000000 --- a/lib/build/recipe/emailverification/api/generateEmailVerifyToken.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("../../../utils"); -const session_1 = __importDefault(require("../../session")); -function generateEmailVerifyToken(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/62#issuecomment-751616106 - if (apiImplementation.generateEmailVerifyTokenPOST === undefined) { - return false; - } - const userContext = utils_2.makeDefaultUserContextFromAPI(options.req); - const session = yield session_1.default.getSession( - options.req, - options.res, - { overrideGlobalClaimValidators: () => [] }, - userContext - ); - const result = yield apiImplementation.generateEmailVerifyTokenPOST({ - options, - session: session, - userContext, - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = generateEmailVerifyToken; diff --git a/lib/build/recipe/emailverification/api/implementation.d.ts b/lib/build/recipe/emailverification/api/implementation.d.ts deleted file mode 100644 index dd40e7025..000000000 --- a/lib/build/recipe/emailverification/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIInterface(): APIInterface; diff --git a/lib/build/recipe/emailverification/api/implementation.js b/lib/build/recipe/emailverification/api/implementation.js deleted file mode 100644 index 0c0e84cf7..000000000 --- a/lib/build/recipe/emailverification/api/implementation.js +++ /dev/null @@ -1,166 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const logger_1 = require("../../../logger"); -const recipe_1 = __importDefault(require("../recipe")); -const emailVerificationClaim_1 = require("../emailVerificationClaim"); -const error_1 = __importDefault(require("../../session/error")); -const utils_1 = require("../utils"); -function getAPIInterface() { - return { - verifyEmailPOST: function ({ token, options, session, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - const res = yield options.recipeImplementation.verifyEmailUsingToken({ token, userContext }); - if (res.status === "OK" && session !== undefined) { - try { - yield session.fetchAndSetClaim(emailVerificationClaim_1.EmailVerificationClaim, userContext); - } catch (err) { - // This should never happen, since we've just set the status above. - if (err.message === "UNKNOWN_USER_ID") { - throw new error_1.default({ - type: error_1.default.UNAUTHORISED, - message: "Unknown User ID provided", - }); - } - throw err; - } - } - return res; - }); - }, - isEmailVerifiedGET: function ({ userContext, session }) { - return __awaiter(this, void 0, void 0, function* () { - if (session === undefined) { - throw new Error("Session is undefined. Should not come here."); - } - try { - yield session.fetchAndSetClaim(emailVerificationClaim_1.EmailVerificationClaim, userContext); - } catch (err) { - if (err.message === "UNKNOWN_USER_ID") { - throw new error_1.default({ - type: error_1.default.UNAUTHORISED, - message: "Unknown User ID provided", - }); - } - throw err; - } - const isVerified = yield session.getClaimValue( - emailVerificationClaim_1.EmailVerificationClaim, - userContext - ); - if (isVerified === undefined) { - throw new Error("Should never come here: EmailVerificationClaim failed to set value"); - } - return { - status: "OK", - isVerified, - }; - }); - }, - generateEmailVerifyTokenPOST: function ({ options, userContext, session }) { - return __awaiter(this, void 0, void 0, function* () { - if (session === undefined) { - throw new Error("Session is undefined. Should not come here."); - } - const userId = session.getUserId(); - const emailInfo = yield recipe_1.default - .getInstanceOrThrowError() - .getEmailForUserId(userId, userContext); - if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - logger_1.logDebugMessage( - `Email verification email not sent to user ${userId} because it doesn't have an email address.` - ); - return { - status: "EMAIL_ALREADY_VERIFIED_ERROR", - }; - } else if (emailInfo.status === "OK") { - let response = yield options.recipeImplementation.createEmailVerificationToken({ - userId, - email: emailInfo.email, - userContext, - }); - if (response.status === "EMAIL_ALREADY_VERIFIED_ERROR") { - if ((yield session.getClaimValue(emailVerificationClaim_1.EmailVerificationClaim)) !== true) { - // this can happen if the email was verified in another browser - // and this session is still outdated - and the user has not - // called the get email verification API yet. - yield session.fetchAndSetClaim( - emailVerificationClaim_1.EmailVerificationClaim, - userContext - ); - } - logger_1.logDebugMessage( - `Email verification email not sent to ${emailInfo.email} because it is already verified.` - ); - return response; - } - if ((yield session.getClaimValue(emailVerificationClaim_1.EmailVerificationClaim)) !== false) { - // this can happen if the email was unverified in another browser - // and this session is still outdated - and the user has not - // called the get email verification API yet. - yield session.fetchAndSetClaim(emailVerificationClaim_1.EmailVerificationClaim, userContext); - } - let emailVerifyLink = utils_1.getEmailVerifyLink({ - appInfo: options.appInfo, - token: response.token, - recipeId: options.recipeId, - }); - logger_1.logDebugMessage(`Sending email verification email to ${emailInfo}`); - yield options.emailDelivery.ingredientInterfaceImpl.sendEmail({ - type: "EMAIL_VERIFICATION", - user: { - id: userId, - email: emailInfo.email, - }, - emailVerifyLink, - userContext, - }); - return { - status: "OK", - }; - } else { - throw new error_1.default({ - type: error_1.default.UNAUTHORISED, - message: "Unknown User ID provided", - }); - } - }); - }, - }; -} -exports.default = getAPIInterface; diff --git a/lib/build/recipe/emailverification/constants.d.ts b/lib/build/recipe/emailverification/constants.d.ts deleted file mode 100644 index 7d50fa860..000000000 --- a/lib/build/recipe/emailverification/constants.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -export declare const GENERATE_EMAIL_VERIFY_TOKEN_API = "/user/email/verify/token"; -export declare const EMAIL_VERIFY_API = "/user/email/verify"; diff --git a/lib/build/recipe/emailverification/constants.js b/lib/build/recipe/emailverification/constants.js deleted file mode 100644 index b40f50dbc..000000000 --- a/lib/build/recipe/emailverification/constants.js +++ /dev/null @@ -1,19 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EMAIL_VERIFY_API = exports.GENERATE_EMAIL_VERIFY_TOKEN_API = void 0; -exports.GENERATE_EMAIL_VERIFY_TOKEN_API = "/user/email/verify/token"; -exports.EMAIL_VERIFY_API = "/user/email/verify"; diff --git a/lib/build/recipe/emailverification/emailVerificationClaim.d.ts b/lib/build/recipe/emailverification/emailVerificationClaim.d.ts deleted file mode 100644 index d29302506..000000000 --- a/lib/build/recipe/emailverification/emailVerificationClaim.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { BooleanClaim } from "../session/claims"; -import { SessionClaimValidator } from "../session"; -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -export declare class EmailVerificationClaimClass extends BooleanClaim { - constructor(); - validators: BooleanClaim["validators"] & { - isVerified: (refetchTimeOnFalseInSeconds?: number, maxAgeInSeconds?: number) => SessionClaimValidator; - }; -} -export declare const EmailVerificationClaim: EmailVerificationClaimClass; diff --git a/lib/build/recipe/emailverification/emailVerificationClaim.js b/lib/build/recipe/emailverification/emailVerificationClaim.js deleted file mode 100644 index b7375ac7a..000000000 --- a/lib/build/recipe/emailverification/emailVerificationClaim.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmailVerificationClaim = exports.EmailVerificationClaimClass = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const claims_1 = require("../session/claims"); -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -class EmailVerificationClaimClass extends claims_1.BooleanClaim { - constructor() { - super({ - key: "st-ev", - fetchValue(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipe = recipe_1.default.getInstanceOrThrowError(); - let emailInfo = yield recipe.getEmailForUserId(userId, userContext); - if (emailInfo.status === "OK") { - return recipe.recipeInterfaceImpl.isEmailVerified({ - userId, - email: emailInfo.email, - userContext, - }); - } else if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - // We consider people without email addresses as validated - return true; - } else { - throw new Error("UNKNOWN_USER_ID"); - } - }); - }, - defaultMaxAgeInSeconds: 300, - }); - this.validators = Object.assign(Object.assign({}, this.validators), { - isVerified: (refetchTimeOnFalseInSeconds = 10, maxAgeInSeconds = 300) => - Object.assign(Object.assign({}, this.validators.hasValue(true, maxAgeInSeconds)), { - shouldRefetch: (payload, userContext) => { - const value = this.getValueFromPayload(payload, userContext); - return ( - value === undefined || - this.getLastRefetchTime(payload, userContext) < Date.now() - maxAgeInSeconds * 1000 || - (value === false && - this.getLastRefetchTime(payload, userContext) < - Date.now() - refetchTimeOnFalseInSeconds * 1000) - ); - }, - }), - }); - } -} -exports.EmailVerificationClaimClass = EmailVerificationClaimClass; -exports.EmailVerificationClaim = new EmailVerificationClaimClass(); diff --git a/lib/build/recipe/emailverification/emailVerificationFunctions.d.ts b/lib/build/recipe/emailverification/emailVerificationFunctions.d.ts deleted file mode 100644 index f09fbc85b..000000000 --- a/lib/build/recipe/emailverification/emailVerificationFunctions.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { User } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function createAndSendCustomEmail( - appInfo: NormalisedAppinfo -): (user: User, emailVerifyURLWithToken: string) => Promise; diff --git a/lib/build/recipe/emailverification/emailVerificationFunctions.js b/lib/build/recipe/emailverification/emailVerificationFunctions.js deleted file mode 100644 index 29b7b92a2..000000000 --- a/lib/build/recipe/emailverification/emailVerificationFunctions.js +++ /dev/null @@ -1,104 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createAndSendCustomEmail = void 0; -const axios_1 = __importDefault(require("axios")); -const logger_1 = require("../../logger"); -function createAndSendCustomEmail(appInfo) { - return (user, emailVerifyURLWithToken) => - __awaiter(this, void 0, void 0, function* () { - if (process.env.TEST_MODE === "testing") { - return; - } - try { - yield axios_1.default({ - method: "POST", - url: "https://api.supertokens.io/0/st/auth/email/verify", - data: { - email: user.email, - appName: appInfo.appName, - emailVerifyURL: emailVerifyURLWithToken, - }, - headers: { - "api-version": 0, - }, - }); - logger_1.logDebugMessage(`Email sent to ${user.email}`); - } catch (error) { - logger_1.logDebugMessage("Error sending verification email"); - if (axios_1.default.isAxiosError(error)) { - const err = error; - if (err.response) { - logger_1.logDebugMessage(`Error status: ${err.response.status}`); - logger_1.logDebugMessage(`Error response: ${JSON.stringify(err.response.data)}`); - } else { - logger_1.logDebugMessage(`Error: ${err.message}`); - } - } else { - logger_1.logDebugMessage(`Error: ${JSON.stringify(error)}`); - } - logger_1.logDebugMessage("Logging the input below:"); - logger_1.logDebugMessage( - JSON.stringify( - { - email: user.email, - appName: appInfo.appName, - emailVerifyURL: emailVerifyURLWithToken, - }, - null, - 2 - ) - ); - } - }); -} -exports.createAndSendCustomEmail = createAndSendCustomEmail; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index 6a681f11d..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @ts-nocheck -import { TypeEmailVerificationEmailDeliveryInput, User } from "../../../types"; -import { NormalisedAppinfo } from "../../../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class BackwardCompatibilityService - implements EmailDeliveryInterface { - private appInfo; - private isInServerlessEnv; - private createAndSendCustomEmail; - constructor( - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - createAndSendCustomEmail?: ( - user: User, - emailVerificationURLWithToken: string, - userContext: any - ) => Promise - ); - sendEmail: ( - input: TypeEmailVerificationEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.js b/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.js deleted file mode 100644 index 67e5311b1..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,60 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const emailVerificationFunctions_1 = require("../../../emailVerificationFunctions"); -class BackwardCompatibilityService { - constructor(appInfo, isInServerlessEnv, createAndSendCustomEmail) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - try { - if (!this.isInServerlessEnv) { - this.createAndSendCustomEmail( - input.user, - input.emailVerifyLink, - input.userContext - ).catch((_) => {}); - } else { - // see https://github.com/supertokens/supertokens-node/pull/135 - yield this.createAndSendCustomEmail(input.user, input.emailVerifyLink, input.userContext); - } - } catch (_) {} - }); - this.appInfo = appInfo; - this.isInServerlessEnv = isInServerlessEnv; - this.createAndSendCustomEmail = - createAndSendCustomEmail === undefined - ? emailVerificationFunctions_1.createAndSendCustomEmail(this.appInfo) - : createAndSendCustomEmail; - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/index.d.ts b/lib/build/recipe/emailverification/emaildelivery/services/index.d.ts deleted file mode 100644 index 4de04d983..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import SMTP from "./smtp"; -export declare let SMTPService: typeof SMTP; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/index.js b/lib/build/recipe/emailverification/emaildelivery/services/index.js deleted file mode 100644 index 91700aeaf..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMTPService = void 0; -const smtp_1 = __importDefault(require("./smtp")); -exports.SMTPService = smtp_1.default; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.d.ts b/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.d.ts deleted file mode 100644 index c28581ed2..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import { TypeEmailVerificationEmailDeliveryInput } from "../../../types"; -import { GetContentResult } from "../../../../../ingredients/emaildelivery/services/smtp"; -export default function getEmailVerifyEmailContent(input: TypeEmailVerificationEmailDeliveryInput): GetContentResult; -export declare function getEmailVerifyEmailHTML(appName: string, email: string, verificationLink: string): string; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.js b/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.js deleted file mode 100644 index 521c0735f..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/emailVerify.js +++ /dev/null @@ -1,933 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEmailVerifyEmailHTML = void 0; -const supertokens_1 = __importDefault(require("../../../../../supertokens")); -function getEmailVerifyEmailContent(input) { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - let body = getEmailVerifyEmailHTML(appName, input.user.email, input.emailVerifyLink); - return { - body, - toEmail: input.user.email, - subject: "Email verification instructions", - isHtml: true, - }; -} -exports.default = getEmailVerifyEmailContent; -function getEmailVerifyEmailHTML(appName, email, verificationLink) { - return ` - - - - - - - - *|MC:SUBJECT|* - - - - - - - - - -
- - - - -
- - - - - - - - - - - -
- - - - - -
- -
- - - - - -
- - - - - - -
- - -
-
- -

- Please verify your email address for ${appName} - by clicking the button below.

- - -
-
-

- Alternatively, you can directly paste this link - in your browser
- ${verificationLink} -

-
-
- - - - -
-
- -
- - - - - -
- - - - - - -
- - -

- This email is meant for ${email} -

-
-
- -
- -
-
- - - - `; -} -exports.getEmailVerifyEmailHTML = getEmailVerifyEmailHTML; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.d.ts b/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.d.ts deleted file mode 100644 index c3030da4e..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -import { ServiceInterface, TypeInput } from "../../../../../ingredients/emaildelivery/services/smtp"; -import { TypeEmailVerificationEmailDeliveryInput } from "../../../types"; -export default class SMTPService implements EmailDeliveryInterface { - serviceImpl: ServiceInterface; - constructor(config: TypeInput); - sendEmail: ( - input: TypeEmailVerificationEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.js b/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.js deleted file mode 100644 index e917fb0fe..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/index.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const nodemailer_1 = require("nodemailer"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const serviceImplementation_1 = require("./serviceImplementation"); -class SMTPService { - constructor(config) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - let content = yield this.serviceImpl.getContent(input); - yield this.serviceImpl.sendRawEmail( - Object.assign(Object.assign({}, content), { userContext: input.userContext }) - ); - }); - const transporter = nodemailer_1.createTransport({ - host: config.smtpSettings.host, - port: config.smtpSettings.port, - auth: { - user: config.smtpSettings.authUsername || config.smtpSettings.from.email, - pass: config.smtpSettings.password, - }, - secure: config.smtpSettings.secure, - }); - let builder = new supertokens_js_override_1.default( - serviceImplementation_1.getServiceImplementation(transporter, config.smtpSettings.from) - ); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.serviceImpl = builder.build(); - } -} -exports.default = SMTPService; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.d.ts b/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.d.ts deleted file mode 100644 index 3f668725f..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { TypeEmailVerificationEmailDeliveryInput } from "../../../types"; -import { Transporter } from "nodemailer"; -import { ServiceInterface } from "../../../../../ingredients/emaildelivery/services/smtp"; -export declare function getServiceImplementation( - transporter: Transporter, - from: { - name: string; - email: string; - } -): ServiceInterface; diff --git a/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.js b/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.js deleted file mode 100644 index 8efb6167a..000000000 --- a/lib/build/recipe/emailverification/emaildelivery/services/smtp/serviceImplementation.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getServiceImplementation = void 0; -const emailVerify_1 = __importDefault(require("./emailVerify")); -function getServiceImplementation(transporter, from) { - return { - sendRawEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (input.isHtml) { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - html: input.body, - }); - } else { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - text: input.body, - }); - } - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return emailVerify_1.default(input); - }); - }, - }; -} -exports.getServiceImplementation = getServiceImplementation; diff --git a/lib/build/recipe/emailverification/error.d.ts b/lib/build/recipe/emailverification/error.d.ts deleted file mode 100644 index 486758b61..000000000 --- a/lib/build/recipe/emailverification/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class SessionError extends STError { - constructor(options: { type: "BAD_INPUT_ERROR"; message: string }); -} diff --git a/lib/build/recipe/emailverification/error.js b/lib/build/recipe/emailverification/error.js deleted file mode 100644 index b0baf2c94..000000000 --- a/lib/build/recipe/emailverification/error.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class SessionError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "emailverification"; - } -} -exports.default = SessionError; diff --git a/lib/build/recipe/emailverification/index.d.ts b/lib/build/recipe/emailverification/index.d.ts deleted file mode 100644 index 9262ec6ec..000000000 --- a/lib/build/recipe/emailverification/index.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { RecipeInterface, APIOptions, APIInterface, User, TypeEmailVerificationEmailDeliveryInput } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static EmailVerificationClaim: import("./emailVerificationClaim").EmailVerificationClaimClass; - static createEmailVerificationToken( - userId: string, - email?: string, - userContext?: any - ): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "EMAIL_ALREADY_VERIFIED_ERROR"; - } - >; - static verifyEmailUsingToken( - token: string, - userContext?: any - ): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"; - } - >; - static isEmailVerified(userId: string, email?: string, userContext?: any): Promise; - static revokeEmailVerificationTokens( - userId: string, - email?: string, - userContext?: any - ): Promise<{ - status: string; - }>; - static unverifyEmail( - userId: string, - email?: string, - userContext?: any - ): Promise<{ - status: string; - }>; - static sendEmail( - input: TypeEmailVerificationEmailDeliveryInput & { - userContext?: any; - } - ): Promise; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let createEmailVerificationToken: typeof Wrapper.createEmailVerificationToken; -export declare let verifyEmailUsingToken: typeof Wrapper.verifyEmailUsingToken; -export declare let isEmailVerified: typeof Wrapper.isEmailVerified; -export declare let revokeEmailVerificationTokens: typeof Wrapper.revokeEmailVerificationTokens; -export declare let unverifyEmail: typeof Wrapper.unverifyEmail; -export type { RecipeInterface, APIOptions, APIInterface, User }; -export declare let sendEmail: typeof Wrapper.sendEmail; -export { EmailVerificationClaim } from "./emailVerificationClaim"; diff --git a/lib/build/recipe/emailverification/index.js b/lib/build/recipe/emailverification/index.js deleted file mode 100644 index 162e73e33..000000000 --- a/lib/build/recipe/emailverification/index.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.EmailVerificationClaim = exports.sendEmail = exports.unverifyEmail = exports.revokeEmailVerificationTokens = exports.isEmailVerified = exports.verifyEmailUsingToken = exports.createEmailVerificationToken = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -const emailVerificationClaim_1 = require("./emailVerificationClaim"); -class Wrapper { - static createEmailVerificationToken(userId, email, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - if (email === undefined) { - const emailInfo = yield recipeInstance.getEmailForUserId(userId, userContext); - if (emailInfo.status === "OK") { - email = emailInfo.email; - } else if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - return { - status: "EMAIL_ALREADY_VERIFIED_ERROR", - }; - } else { - throw new global.Error("Unknown User ID provided without email"); - } - } - return yield recipeInstance.recipeInterfaceImpl.createEmailVerificationToken({ - userId, - email: email, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static verifyEmailUsingToken(token, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.verifyEmailUsingToken({ - token, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static isEmailVerified(userId, email, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - if (email === undefined) { - const emailInfo = yield recipeInstance.getEmailForUserId(userId, userContext); - if (emailInfo.status === "OK") { - email = emailInfo.email; - } else if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - return true; - } else { - throw new global.Error("Unknown User ID provided without email"); - } - } - return yield recipeInstance.recipeInterfaceImpl.isEmailVerified({ - userId, - email: email, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static revokeEmailVerificationTokens(userId, email, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - // If the dev wants to delete the tokens for an old email address of the user they can pass the address - // but redeeming those tokens would have no effect on isEmailVerified called without the old address - // so in general that is not necessary either. - if (email === undefined) { - const emailInfo = yield recipeInstance.getEmailForUserId(userId, userContext); - if (emailInfo.status === "OK") { - email = emailInfo.email; - } else if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - // This only happens for phone based passwordless users (or if the user added a custom getEmailForUserId) - // We can return OK here, since there is no way to create an email verification token - // if getEmailForUserId returns EMAIL_DOES_NOT_EXIST_ERROR. - return { - status: "OK", - }; - } else { - throw new global.Error("Unknown User ID provided without email"); - } - } - return yield recipeInstance.recipeInterfaceImpl.revokeEmailVerificationTokens({ - userId, - email: email, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static unverifyEmail(userId, email, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - if (email === undefined) { - const emailInfo = yield recipeInstance.getEmailForUserId(userId, userContext); - if (emailInfo.status === "OK") { - email = emailInfo.email; - } else if (emailInfo.status === "EMAIL_DOES_NOT_EXIST_ERROR") { - // Here we are returning OK since that's how it used to work, but a later call to isVerified will still return true - return { - status: "OK", - }; - } else { - throw new global.Error("Unknown User ID provided without email"); - } - } - return yield recipeInstance.recipeInterfaceImpl.unverifyEmail({ - userId, - email: email, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static sendEmail(input) { - return __awaiter(this, void 0, void 0, function* () { - let recipeInstance = recipe_1.default.getInstanceOrThrowError(); - return yield recipeInstance.emailDelivery.ingredientInterfaceImpl.sendEmail( - Object.assign({ userContext: {} }, input) - ); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -Wrapper.EmailVerificationClaim = emailVerificationClaim_1.EmailVerificationClaim; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.createEmailVerificationToken = Wrapper.createEmailVerificationToken; -exports.verifyEmailUsingToken = Wrapper.verifyEmailUsingToken; -exports.isEmailVerified = Wrapper.isEmailVerified; -exports.revokeEmailVerificationTokens = Wrapper.revokeEmailVerificationTokens; -exports.unverifyEmail = Wrapper.unverifyEmail; -exports.sendEmail = Wrapper.sendEmail; -var emailVerificationClaim_2 = require("./emailVerificationClaim"); -Object.defineProperty(exports, "EmailVerificationClaim", { - enumerable: true, - get: function () { - return emailVerificationClaim_2.EmailVerificationClaim; - }, -}); diff --git a/lib/build/recipe/emailverification/recipe.d.ts b/lib/build/recipe/emailverification/recipe.d.ts deleted file mode 100644 index 6cb431f31..000000000 --- a/lib/build/recipe/emailverification/recipe.d.ts +++ /dev/null @@ -1,45 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { TypeInput, TypeNormalisedInput, RecipeInterface, APIInterface, GetEmailForUserIdFunc } from "./types"; -import { NormalisedAppinfo, APIHandled, RecipeListFunction, HTTPMethod } from "../../types"; -import STError from "./error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { TypeEmailVerificationEmailDeliveryInput } from "./types"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - emailDelivery: EmailDeliveryIngredient; - getEmailForUserIdFuncsFromOtherRecipes: GetEmailForUserIdFunc[]; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput, - ingredients: { - emailDelivery: EmailDeliveryIngredient | undefined; - } - ); - static getInstanceOrThrowError(): Recipe; - static getInstance(): Recipe | undefined; - static init(config: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - _: NormalisedURLPath, - __: HTTPMethod - ) => Promise; - handleError: (err: STError, _: BaseRequest, __: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; - getEmailForUserId: GetEmailForUserIdFunc; - addGetEmailForUserIdFunc: (func: GetEmailForUserIdFunc) => void; -} diff --git a/lib/build/recipe/emailverification/recipe.js b/lib/build/recipe/emailverification/recipe.js deleted file mode 100644 index 398fef214..000000000 --- a/lib/build/recipe/emailverification/recipe.js +++ /dev/null @@ -1,211 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const constants_1 = require("./constants"); -const generateEmailVerifyToken_1 = __importDefault(require("./api/generateEmailVerifyToken")); -const emailVerify_1 = __importDefault(require("./api/emailVerify")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const emaildelivery_1 = __importDefault(require("../../ingredients/emaildelivery")); -const postSuperTokensInitCallbacks_1 = require("../../postSuperTokensInitCallbacks"); -const recipe_1 = __importDefault(require("../session/recipe")); -const emailVerificationClaim_1 = require("./emailVerificationClaim"); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, ingredients) { - super(recipeId, appInfo); - this.getEmailForUserIdFuncsFromOtherRecipes = []; - // abstract instance functions below............... - this.getAPIsHandled = () => { - return [ - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default( - constants_1.GENERATE_EMAIL_VERIFY_TOKEN_API - ), - id: constants_1.GENERATE_EMAIL_VERIFY_TOKEN_API, - disabled: this.apiImpl.generateEmailVerifyTokenPOST === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.EMAIL_VERIFY_API), - id: constants_1.EMAIL_VERIFY_API, - disabled: this.apiImpl.verifyEmailPOST === undefined, - }, - { - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.EMAIL_VERIFY_API), - id: constants_1.EMAIL_VERIFY_API, - disabled: this.apiImpl.isEmailVerifiedGET === undefined, - }, - ]; - }; - this.handleAPIRequest = (id, req, res, _, __) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - emailDelivery: this.emailDelivery, - appInfo: this.getAppInfo(), - }; - if (id === constants_1.GENERATE_EMAIL_VERIFY_TOKEN_API) { - return yield generateEmailVerifyToken_1.default(this.apiImpl, options); - } else { - return yield emailVerify_1.default(this.apiImpl, options); - } - }); - this.handleError = (err, _, __) => - __awaiter(this, void 0, void 0, function* () { - throw err; - }); - this.getAllCORSHeaders = () => { - return []; - }; - this.isErrorFromThisRecipe = (err) => { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - }; - this.getEmailForUserId = (userId, userContext) => - __awaiter(this, void 0, void 0, function* () { - if (this.config.getEmailForUserId !== undefined) { - const userRes = yield this.config.getEmailForUserId(userId, userContext); - if (userRes.status !== "UNKNOWN_USER_ID_ERROR") { - return userRes; - } - } - for (const getEmailForUserId of this.getEmailForUserIdFuncsFromOtherRecipes) { - const res = yield getEmailForUserId(userId, userContext); - if (res.status !== "UNKNOWN_USER_ID_ERROR") { - return res; - } - } - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - }); - this.addGetEmailForUserIdFunc = (func) => { - this.getEmailForUserIdFuncsFromOtherRecipes.push(func); - }; - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(querier_1.Querier.getNewInstanceOrThrowError(recipeId)) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - /** - * emailDelivery will always needs to be declared after isInServerlessEnv - * and recipeInterfaceImpl values are set - */ - this.emailDelivery = - ingredients.emailDelivery === undefined - ? new emaildelivery_1.default(this.config.getEmailDeliveryConfig(this.isInServerlessEnv)) - : ingredients.emailDelivery; - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static getInstance() { - return Recipe.instance; - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config, { - emailDelivery: undefined, - }); - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.addPostInitCallback(() => { - recipe_1.default - .getInstanceOrThrowError() - .addClaimFromOtherRecipe(emailVerificationClaim_1.EmailVerificationClaim); - if (config.mode === "REQUIRED") { - recipe_1.default - .getInstanceOrThrowError() - .addClaimValidatorFromOtherRecipe( - emailVerificationClaim_1.EmailVerificationClaim.validators.isVerified() - ); - } - }); - return Recipe.instance; - } else { - throw new Error( - "Emailverification recipe has already been initialised. Please check your code for bugs." - ); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "emailverification"; diff --git a/lib/build/recipe/emailverification/recipeImplementation.d.ts b/lib/build/recipe/emailverification/recipeImplementation.d.ts deleted file mode 100644 index 6a2182ed3..000000000 --- a/lib/build/recipe/emailverification/recipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "./"; -import { Querier } from "../../querier"; -export default function getRecipeInterface(querier: Querier): RecipeInterface; diff --git a/lib/build/recipe/emailverification/recipeImplementation.js b/lib/build/recipe/emailverification/recipeImplementation.js deleted file mode 100644 index 99489ca51..000000000 --- a/lib/build/recipe/emailverification/recipeImplementation.js +++ /dev/null @@ -1,122 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeInterface(querier) { - return { - createEmailVerificationToken: function ({ userId, email }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/user/email/verify/token"), - { - userId, - email, - } - ); - if (response.status === "OK") { - return { - status: "OK", - token: response.token, - }; - } else { - return { - status: "EMAIL_ALREADY_VERIFIED_ERROR", - }; - } - }); - }, - verifyEmailUsingToken: function ({ token }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/user/email/verify"), - { - method: "token", - token, - } - ); - if (response.status === "OK") { - return { - status: "OK", - user: { - id: response.userId, - email: response.email, - }, - }; - } else { - return { - status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR", - }; - } - }); - }, - isEmailVerified: function ({ userId, email }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/user/email/verify"), - { - userId, - email, - } - ); - return response.isVerified; - }); - }, - revokeEmailVerificationTokens: function (input) { - return __awaiter(this, void 0, void 0, function* () { - yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/user/email/verify/token/remove"), - { - userId: input.userId, - email: input.email, - } - ); - return { status: "OK" }; - }); - }, - unverifyEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/user/email/verify/remove"), { - userId: input.userId, - email: input.email, - }); - return { status: "OK" }; - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/emailverification/types.d.ts b/lib/build/recipe/emailverification/types.d.ts deleted file mode 100644 index 27bb17bd3..000000000 --- a/lib/build/recipe/emailverification/types.d.ts +++ /dev/null @@ -1,182 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import OverrideableBuilder from "supertokens-js-override"; -import { - TypeInput as EmailDeliveryTypeInput, - TypeInputWithService as EmailDeliveryTypeInputWithService, -} from "../../ingredients/emaildelivery/types"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { GeneralErrorResponse, NormalisedAppinfo } from "../../types"; -import { SessionContainerInterface } from "../session/types"; -export declare type TypeInput = { - mode: "REQUIRED" | "OPTIONAL"; - emailDelivery?: EmailDeliveryTypeInput; - getEmailForUserId?: ( - userId: string, - userContext: any - ) => Promise< - | { - status: "OK"; - email: string; - } - | { - status: "EMAIL_DOES_NOT_EXIST_ERROR" | "UNKNOWN_USER_ID_ERROR"; - } - >; - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: (user: User, emailVerificationURLWithToken: string, userContext: any) => Promise; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - mode: "REQUIRED" | "OPTIONAL"; - getEmailDeliveryConfig: ( - isInServerlessEnv: boolean - ) => EmailDeliveryTypeInputWithService; - getEmailForUserId?: ( - userId: string, - userContext: any - ) => Promise< - | { - status: "OK"; - email: string; - } - | { - status: "EMAIL_DOES_NOT_EXIST_ERROR" | "UNKNOWN_USER_ID_ERROR"; - } - >; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type User = { - id: string; - email: string; -}; -export declare type RecipeInterface = { - createEmailVerificationToken(input: { - userId: string; - email: string; - userContext: any; - }): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "EMAIL_ALREADY_VERIFIED_ERROR"; - } - >; - verifyEmailUsingToken(input: { - token: string; - userContext: any; - }): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"; - } - >; - isEmailVerified(input: { userId: string; email: string; userContext: any }): Promise; - revokeEmailVerificationTokens(input: { - userId: string; - email: string; - userContext: any; - }): Promise<{ - status: "OK"; - }>; - unverifyEmail(input: { - userId: string; - email: string; - userContext: any; - }): Promise<{ - status: "OK"; - }>; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - appInfo: NormalisedAppinfo; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - req: BaseRequest; - res: BaseResponse; - emailDelivery: EmailDeliveryIngredient; -}; -export declare type APIInterface = { - verifyEmailPOST: - | undefined - | ((input: { - token: string; - options: APIOptions; - userContext: any; - session?: SessionContainerInterface; - }) => Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_VERIFICATION_INVALID_TOKEN_ERROR"; - } - | GeneralErrorResponse - >); - isEmailVerifiedGET: - | undefined - | ((input: { - options: APIOptions; - userContext: any; - session: SessionContainerInterface; - }) => Promise< - | { - status: "OK"; - isVerified: boolean; - } - | GeneralErrorResponse - >); - generateEmailVerifyTokenPOST: - | undefined - | ((input: { - options: APIOptions; - userContext: any; - session: SessionContainerInterface; - }) => Promise< - | { - status: "EMAIL_ALREADY_VERIFIED_ERROR" | "OK"; - } - | GeneralErrorResponse - >); -}; -export declare type TypeEmailVerificationEmailDeliveryInput = { - type: "EMAIL_VERIFICATION"; - user: { - id: string; - email: string; - }; - emailVerifyLink: string; -}; -export declare type GetEmailForUserIdFunc = ( - userId: string, - userContext: any -) => Promise< - | { - status: "OK"; - email: string; - } - | { - status: "EMAIL_DOES_NOT_EXIST_ERROR" | "UNKNOWN_USER_ID_ERROR"; - } ->; diff --git a/lib/build/recipe/emailverification/types.js b/lib/build/recipe/emailverification/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/recipe/emailverification/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/emailverification/utils.d.ts b/lib/build/recipe/emailverification/utils.d.ts deleted file mode 100644 index 627176f4a..000000000 --- a/lib/build/recipe/emailverification/utils.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function validateAndNormaliseUserInput( - _: Recipe, - appInfo: NormalisedAppinfo, - config: TypeInput -): TypeNormalisedInput; -export declare function getEmailVerifyLink(input: { - appInfo: NormalisedAppinfo; - token: string; - recipeId: string; -}): string; diff --git a/lib/build/recipe/emailverification/utils.js b/lib/build/recipe/emailverification/utils.js deleted file mode 100644 index 26dc9f073..000000000 --- a/lib/build/recipe/emailverification/utils.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getEmailVerifyLink = exports.validateAndNormaliseUserInput = void 0; -const backwardCompatibility_1 = __importDefault(require("./emaildelivery/services/backwardCompatibility")); -function validateAndNormaliseUserInput(_, appInfo, config) { - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config.override - ); - function getEmailDeliveryConfig(isInServerlessEnv) { - var _a; - let emailService = (_a = config.emailDelivery) === null || _a === void 0 ? void 0 : _a.service; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomEmail config. If the user - * has not passed even that config, we use the default - * createAndSendCustomEmail implementation which calls our supertokens API - */ - if (emailService === undefined) { - emailService = new backwardCompatibility_1.default( - appInfo, - isInServerlessEnv, - config.createAndSendCustomEmail - ); - } - return Object.assign(Object.assign({}, config.emailDelivery), { - /** - * if we do - * let emailDelivery = { - * service: emailService, - * ...config.emailDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: emailService, - }); - } - return { - mode: config.mode, - getEmailForUserId: config.getEmailForUserId, - override, - getEmailDeliveryConfig, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function getEmailVerifyLink(input) { - return ( - input.appInfo.websiteDomain.getAsStringDangerous() + - input.appInfo.websiteBasePath.getAsStringDangerous() + - "/verify-email" + - "?token=" + - input.token + - "&rid=" + - input.recipeId - ); -} -exports.getEmailVerifyLink = getEmailVerifyLink; diff --git a/lib/build/recipe/jwt/api/getJWKS.d.ts b/lib/build/recipe/jwt/api/getJWKS.d.ts deleted file mode 100644 index 7b983911b..000000000 --- a/lib/build/recipe/jwt/api/getJWKS.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function getJWKS(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/jwt/api/getJWKS.js b/lib/build/recipe/jwt/api/getJWKS.js deleted file mode 100644 index 20c56ccb9..000000000 --- a/lib/build/recipe/jwt/api/getJWKS.js +++ /dev/null @@ -1,68 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("../../../utils"); -function getJWKS(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.getJWKSGET === undefined) { - return false; - } - let result = yield apiImplementation.getJWKSGET({ - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - if ("status" in result && result.status === "GENERAL_ERROR") { - utils_1.send200Response(options.res, result); - } else { - options.res.setHeader("Access-Control-Allow-Origin", "*", false); - utils_1.send200Response(options.res, result); - } - return true; - }); -} -exports.default = getJWKS; diff --git a/lib/build/recipe/jwt/api/implementation.d.ts b/lib/build/recipe/jwt/api/implementation.d.ts deleted file mode 100644 index 0218549fa..000000000 --- a/lib/build/recipe/jwt/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../types"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/jwt/api/implementation.js b/lib/build/recipe/jwt/api/implementation.js deleted file mode 100644 index 88600ac6e..000000000 --- a/lib/build/recipe/jwt/api/implementation.js +++ /dev/null @@ -1,57 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getAPIImplementation() { - return { - getJWKSGET: function ({ options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - return yield options.recipeImplementation.getJWKS({ userContext }); - }); - }, - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/jwt/constants.d.ts b/lib/build/recipe/jwt/constants.d.ts deleted file mode 100644 index 719f84e81..000000000 --- a/lib/build/recipe/jwt/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @ts-nocheck -export declare const GET_JWKS_API = "/jwt/jwks.json"; diff --git a/lib/build/recipe/jwt/constants.js b/lib/build/recipe/jwt/constants.js deleted file mode 100644 index b21a20fa1..000000000 --- a/lib/build/recipe/jwt/constants.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GET_JWKS_API = void 0; -exports.GET_JWKS_API = "/jwt/jwks.json"; diff --git a/lib/build/recipe/jwt/index.d.ts b/lib/build/recipe/jwt/index.d.ts deleted file mode 100644 index c907fff5c..000000000 --- a/lib/build/recipe/jwt/index.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { APIInterface, RecipeInterface, APIOptions, JsonWebKey } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static createJWT( - payload: any, - validitySeconds?: number, - useStaticSigningKey?: boolean, - userContext?: any - ): Promise< - | { - status: "OK"; - jwt: string; - } - | { - status: "UNSUPPORTED_ALGORITHM_ERROR"; - } - >; - static getJWKS( - userContext?: any - ): Promise<{ - keys: JsonWebKey[]; - }>; -} -export declare let init: typeof Recipe.init; -export declare let createJWT: typeof Wrapper.createJWT; -export declare let getJWKS: typeof Wrapper.getJWKS; -export type { APIInterface, APIOptions, RecipeInterface, JsonWebKey }; diff --git a/lib/build/recipe/jwt/index.js b/lib/build/recipe/jwt/index.js deleted file mode 100644 index 01f4ee357..000000000 --- a/lib/build/recipe/jwt/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getJWKS = exports.createJWT = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -class Wrapper { - static createJWT(payload, validitySeconds, useStaticSigningKey, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.createJWT({ - payload, - validitySeconds, - useStaticSigningKey, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getJWKS(userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getJWKS({ - userContext: userContext === undefined ? {} : userContext, - }); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -exports.init = Wrapper.init; -exports.createJWT = Wrapper.createJWT; -exports.getJWKS = Wrapper.getJWKS; diff --git a/lib/build/recipe/jwt/recipe.d.ts b/lib/build/recipe/jwt/recipe.d.ts deleted file mode 100644 index 59cd100e9..000000000 --- a/lib/build/recipe/jwt/recipe.d.ts +++ /dev/null @@ -1,30 +0,0 @@ -// @ts-nocheck -import error from "../../error"; -import { BaseRequest, BaseResponse } from "../../framework"; -import normalisedURLPath from "../../normalisedURLPath"; -import RecipeModule from "../../recipeModule"; -import { APIHandled, HTTPMethod, NormalisedAppinfo, RecipeListFunction } from "../../types"; -import { APIInterface, RecipeInterface, TypeInput, TypeNormalisedInput } from "./types"; -export default class Recipe extends RecipeModule { - static RECIPE_ID: string; - private static instance; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): Recipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled(): APIHandled[]; - handleAPIRequest: ( - _: string, - req: BaseRequest, - res: BaseResponse, - __: normalisedURLPath, - ___: HTTPMethod - ) => Promise; - handleError(error: error, _: BaseRequest, __: BaseResponse): Promise; - getAllCORSHeaders(): string[]; - isErrorFromThisRecipe(err: any): err is error; -} diff --git a/lib/build/recipe/jwt/recipe.js b/lib/build/recipe/jwt/recipe.js deleted file mode 100644 index acf557c24..000000000 --- a/lib/build/recipe/jwt/recipe.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const querier_1 = require("../../querier"); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const getJWKS_1 = __importDefault(require("./api/getJWKS")); -const implementation_1 = __importDefault(require("./api/implementation")); -const constants_1 = require("./constants"); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const utils_1 = require("./utils"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - this.handleAPIRequest = (_, req, res, __, ___) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - }; - return yield getJWKS_1.default(this.apiImpl, options); - }); - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default( - querier_1.Querier.getNewInstanceOrThrowError(recipeId), - this.config, - appInfo - ) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - } - /* Init functions */ - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return Recipe.instance; - } else { - throw new Error("JWT recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } - /* RecipeModule functions */ - getAPIsHandled() { - return [ - { - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.GET_JWKS_API), - id: constants_1.GET_JWKS_API, - disabled: this.apiImpl.getJWKSGET === undefined, - }, - ]; - } - handleError(error, _, __) { - throw error; - } - getAllCORSHeaders() { - return []; - } - isErrorFromThisRecipe(err) { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - } -} -exports.default = Recipe; -Recipe.RECIPE_ID = "jwt"; -Recipe.instance = undefined; diff --git a/lib/build/recipe/jwt/recipeImplementation.d.ts b/lib/build/recipe/jwt/recipeImplementation.d.ts deleted file mode 100644 index 5109fbcb1..000000000 --- a/lib/build/recipe/jwt/recipeImplementation.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { Querier } from "../../querier"; -import { NormalisedAppinfo } from "../../types"; -import { RecipeInterface, TypeNormalisedInput } from "./types"; -export default function getRecipeInterface( - querier: Querier, - config: TypeNormalisedInput, - appInfo: NormalisedAppinfo -): RecipeInterface; diff --git a/lib/build/recipe/jwt/recipeImplementation.js b/lib/build/recipe/jwt/recipeImplementation.js deleted file mode 100644 index aab389ff6..000000000 --- a/lib/build/recipe/jwt/recipeImplementation.js +++ /dev/null @@ -1,88 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeInterface(querier, config, appInfo) { - return { - createJWT: function ({ payload, validitySeconds, useStaticSigningKey }) { - return __awaiter(this, void 0, void 0, function* () { - if (validitySeconds === undefined) { - // If the user does not provide a validity to this function and the config validity is also undefined, use 100 years (in seconds) - validitySeconds = config.jwtValiditySeconds; - } - let response = yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/jwt"), { - payload: payload !== null && payload !== void 0 ? payload : {}, - validity: validitySeconds, - useStaticSigningKey: useStaticSigningKey !== false, - algorithm: "RS256", - jwksDomain: appInfo.apiDomain.getAsStringDangerous(), - }); - if (response.status === "OK") { - return { - status: "OK", - jwt: response.jwt, - }; - } else { - return { - status: "UNSUPPORTED_ALGORITHM_ERROR", - }; - } - }); - }, - getJWKS: function () { - return __awaiter(this, void 0, void 0, function* () { - return yield querier.sendGetRequest(new normalisedURLPath_1.default("/.well-known/jwks.json"), {}); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/jwt/types.d.ts b/lib/build/recipe/jwt/types.d.ts deleted file mode 100644 index 3e6fa1965..000000000 --- a/lib/build/recipe/jwt/types.d.ts +++ /dev/null @@ -1,74 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import OverrideableBuilder from "supertokens-js-override"; -import { GeneralErrorResponse } from "../../types"; -export declare type JsonWebKey = { - kty: string; - kid: string; - n: string; - e: string; - alg: string; - use: string; -}; -export declare type TypeInput = { - jwtValiditySeconds?: number; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - jwtValiditySeconds: number; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - req: BaseRequest; - res: BaseResponse; -}; -export declare type RecipeInterface = { - createJWT(input: { - payload?: any; - validitySeconds?: number; - useStaticSigningKey?: boolean; - userContext: any; - }): Promise< - | { - status: "OK"; - jwt: string; - } - | { - status: "UNSUPPORTED_ALGORITHM_ERROR"; - } - >; - getJWKS(input: { - userContext: any; - }): Promise<{ - keys: JsonWebKey[]; - }>; -}; -export declare type APIInterface = { - getJWKSGET: - | undefined - | ((input: { - options: APIOptions; - userContext: any; - }) => Promise< - | { - keys: JsonWebKey[]; - } - | GeneralErrorResponse - >); -}; diff --git a/lib/build/recipe/jwt/types.js b/lib/build/recipe/jwt/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/recipe/jwt/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/jwt/utils.d.ts b/lib/build/recipe/jwt/utils.d.ts deleted file mode 100644 index 4025b1b44..000000000 --- a/lib/build/recipe/jwt/utils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - _: Recipe, - __: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/jwt/utils.js b/lib/build/recipe/jwt/utils.js deleted file mode 100644 index 9c38d23ce..000000000 --- a/lib/build/recipe/jwt/utils.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -function validateAndNormaliseUserInput(_, __, config) { - var _a; - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - return { - jwtValiditySeconds: - (_a = config === null || config === void 0 ? void 0 : config.jwtValiditySeconds) !== null && _a !== void 0 - ? _a - : 3153600000, - override, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; diff --git a/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.d.ts b/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.d.ts deleted file mode 100644 index e1cd1cd3b..000000000 --- a/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../types"; -export default function getOpenIdDiscoveryConfiguration( - apiImplementation: APIInterface, - options: APIOptions -): Promise; diff --git a/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.js b/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.js deleted file mode 100644 index 9fd8c6e31..000000000 --- a/lib/build/recipe/openid/api/getOpenIdDiscoveryConfiguration.js +++ /dev/null @@ -1,71 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const utils_1 = require("../../../utils"); -const utils_2 = require("../../../utils"); -function getOpenIdDiscoveryConfiguration(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.getOpenIdDiscoveryConfigurationGET === undefined) { - return false; - } - let result = yield apiImplementation.getOpenIdDiscoveryConfigurationGET({ - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - if (result.status === "OK") { - options.res.setHeader("Access-Control-Allow-Origin", "*", false); - utils_1.send200Response(options.res, { - issuer: result.issuer, - jwks_uri: result.jwks_uri, - }); - } else { - utils_1.send200Response(options.res, result); - } - return true; - }); -} -exports.default = getOpenIdDiscoveryConfiguration; diff --git a/lib/build/recipe/openid/api/implementation.d.ts b/lib/build/recipe/openid/api/implementation.d.ts deleted file mode 100644 index 0218549fa..000000000 --- a/lib/build/recipe/openid/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../types"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/openid/api/implementation.js b/lib/build/recipe/openid/api/implementation.js deleted file mode 100644 index 81609c3b2..000000000 --- a/lib/build/recipe/openid/api/implementation.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getAPIImplementation() { - return { - getOpenIdDiscoveryConfigurationGET: function ({ options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - return yield options.recipeImplementation.getOpenIdDiscoveryConfiguration({ userContext }); - }); - }, - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/openid/constants.d.ts b/lib/build/recipe/openid/constants.d.ts deleted file mode 100644 index 241a857f7..000000000 --- a/lib/build/recipe/openid/constants.d.ts +++ /dev/null @@ -1,2 +0,0 @@ -// @ts-nocheck -export declare const GET_DISCOVERY_CONFIG_URL = "/.well-known/openid-configuration"; diff --git a/lib/build/recipe/openid/constants.js b/lib/build/recipe/openid/constants.js deleted file mode 100644 index 067eee64a..000000000 --- a/lib/build/recipe/openid/constants.js +++ /dev/null @@ -1,18 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GET_DISCOVERY_CONFIG_URL = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -exports.GET_DISCOVERY_CONFIG_URL = "/.well-known/openid-configuration"; diff --git a/lib/build/recipe/openid/index.d.ts b/lib/build/recipe/openid/index.d.ts deleted file mode 100644 index fccc1d4c6..000000000 --- a/lib/build/recipe/openid/index.d.ts +++ /dev/null @@ -1,35 +0,0 @@ -// @ts-nocheck -import OpenIdRecipe from "./recipe"; -export default class OpenIdRecipeWrapper { - static init: typeof OpenIdRecipe.init; - static getOpenIdDiscoveryConfiguration( - userContext?: any - ): Promise<{ - status: "OK"; - issuer: string; - jwks_uri: string; - }>; - static createJWT( - payload?: any, - validitySeconds?: number, - useStaticSigningKey?: boolean, - userContext?: any - ): Promise< - | { - status: "OK"; - jwt: string; - } - | { - status: "UNSUPPORTED_ALGORITHM_ERROR"; - } - >; - static getJWKS( - userContext?: any - ): Promise<{ - keys: import("../jwt").JsonWebKey[]; - }>; -} -export declare let init: typeof OpenIdRecipe.init; -export declare let getOpenIdDiscoveryConfiguration: typeof OpenIdRecipeWrapper.getOpenIdDiscoveryConfiguration; -export declare let createJWT: typeof OpenIdRecipeWrapper.createJWT; -export declare let getJWKS: typeof OpenIdRecipeWrapper.getJWKS; diff --git a/lib/build/recipe/openid/index.js b/lib/build/recipe/openid/index.js deleted file mode 100644 index 8eb1cf8a8..000000000 --- a/lib/build/recipe/openid/index.js +++ /dev/null @@ -1,35 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getJWKS = exports.createJWT = exports.getOpenIdDiscoveryConfiguration = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -class OpenIdRecipeWrapper { - static getOpenIdDiscoveryConfiguration(userContext) { - return recipe_1.default.getInstanceOrThrowError().recipeImplementation.getOpenIdDiscoveryConfiguration({ - userContext: userContext === undefined ? {} : userContext, - }); - } - static createJWT(payload, validitySeconds, useStaticSigningKey, userContext) { - return recipe_1.default.getInstanceOrThrowError().jwtRecipe.recipeInterfaceImpl.createJWT({ - payload, - validitySeconds, - useStaticSigningKey, - userContext: userContext === undefined ? {} : userContext, - }); - } - static getJWKS(userContext) { - return recipe_1.default.getInstanceOrThrowError().jwtRecipe.recipeInterfaceImpl.getJWKS({ - userContext: userContext === undefined ? {} : userContext, - }); - } -} -exports.default = OpenIdRecipeWrapper; -OpenIdRecipeWrapper.init = recipe_1.default.init; -exports.init = OpenIdRecipeWrapper.init; -exports.getOpenIdDiscoveryConfiguration = OpenIdRecipeWrapper.getOpenIdDiscoveryConfiguration; -exports.createJWT = OpenIdRecipeWrapper.createJWT; -exports.getJWKS = OpenIdRecipeWrapper.getJWKS; diff --git a/lib/build/recipe/openid/recipe.d.ts b/lib/build/recipe/openid/recipe.d.ts deleted file mode 100644 index 0de7ecdc7..000000000 --- a/lib/build/recipe/openid/recipe.d.ts +++ /dev/null @@ -1,31 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -import { BaseRequest, BaseResponse } from "../../framework"; -import normalisedURLPath from "../../normalisedURLPath"; -import RecipeModule from "../../recipeModule"; -import { APIHandled, HTTPMethod, NormalisedAppinfo, RecipeListFunction } from "../../types"; -import { APIInterface, RecipeInterface, TypeInput, TypeNormalisedInput } from "./types"; -import JWTRecipe from "../jwt/recipe"; -export default class OpenIdRecipe extends RecipeModule { - static RECIPE_ID: string; - private static instance; - config: TypeNormalisedInput; - jwtRecipe: JWTRecipe; - recipeImplementation: RecipeInterface; - apiImpl: APIInterface; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): OpenIdRecipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - response: BaseResponse, - path: normalisedURLPath, - method: HTTPMethod - ) => Promise; - handleError: (error: STError, request: BaseRequest, response: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; -} diff --git a/lib/build/recipe/openid/recipe.js b/lib/build/recipe/openid/recipe.js deleted file mode 100644 index baf6bc665..000000000 --- a/lib/build/recipe/openid/recipe.js +++ /dev/null @@ -1,146 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const error_1 = __importDefault(require("../../error")); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const utils_1 = require("./utils"); -const recipe_1 = __importDefault(require("../jwt/recipe")); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const constants_1 = require("./constants"); -const getOpenIdDiscoveryConfiguration_1 = __importDefault(require("./api/getOpenIdDiscoveryConfiguration")); -class OpenIdRecipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - this.getAPIsHandled = () => { - return [ - { - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.GET_DISCOVERY_CONFIG_URL), - id: constants_1.GET_DISCOVERY_CONFIG_URL, - disabled: this.apiImpl.getOpenIdDiscoveryConfigurationGET === undefined, - }, - ...this.jwtRecipe.getAPIsHandled(), - ]; - }; - this.handleAPIRequest = (id, req, response, path, method) => - __awaiter(this, void 0, void 0, function* () { - let apiOptions = { - recipeImplementation: this.recipeImplementation, - config: this.config, - recipeId: this.getRecipeId(), - req, - res: response, - }; - if (id === constants_1.GET_DISCOVERY_CONFIG_URL) { - return yield getOpenIdDiscoveryConfiguration_1.default(this.apiImpl, apiOptions); - } else { - return this.jwtRecipe.handleAPIRequest(id, req, response, path, method); - } - }); - this.handleError = (error, request, response) => - __awaiter(this, void 0, void 0, function* () { - if (error.fromRecipe === OpenIdRecipe.RECIPE_ID) { - throw error; - } else { - return yield this.jwtRecipe.handleError(error, request, response); - } - }); - this.getAllCORSHeaders = () => { - return [...this.jwtRecipe.getAllCORSHeaders()]; - }; - this.isErrorFromThisRecipe = (err) => { - return ( - (error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === OpenIdRecipe.RECIPE_ID) || - this.jwtRecipe.isErrorFromThisRecipe(err) - ); - }; - this.config = utils_1.validateAndNormaliseUserInput(appInfo, config); - this.jwtRecipe = new recipe_1.default(recipeId, appInfo, isInServerlessEnv, { - jwtValiditySeconds: this.config.jwtValiditySeconds, - override: this.config.override.jwtFeature, - }); - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(this.config, this.jwtRecipe.recipeInterfaceImpl) - ); - this.recipeImplementation = builder.override(this.config.override.functions).build(); - let apiBuilder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = apiBuilder.override(this.config.override.apis).build(); - } - static getInstanceOrThrowError() { - if (OpenIdRecipe.instance !== undefined) { - return OpenIdRecipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (OpenIdRecipe.instance === undefined) { - OpenIdRecipe.instance = new OpenIdRecipe(OpenIdRecipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return OpenIdRecipe.instance; - } else { - throw new Error("OpenId recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - OpenIdRecipe.instance = undefined; - } -} -exports.default = OpenIdRecipe; -OpenIdRecipe.RECIPE_ID = "openid"; -OpenIdRecipe.instance = undefined; diff --git a/lib/build/recipe/openid/recipeImplementation.d.ts b/lib/build/recipe/openid/recipeImplementation.d.ts deleted file mode 100644 index d4698099c..000000000 --- a/lib/build/recipe/openid/recipeImplementation.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { RecipeInterface, TypeNormalisedInput } from "./types"; -import { RecipeInterface as JWTRecipeInterface } from "../jwt/types"; -export default function getRecipeInterface( - config: TypeNormalisedInput, - jwtRecipeImplementation: JWTRecipeInterface -): RecipeInterface; diff --git a/lib/build/recipe/openid/recipeImplementation.js b/lib/build/recipe/openid/recipeImplementation.js deleted file mode 100644 index 53c193eda..000000000 --- a/lib/build/recipe/openid/recipeImplementation.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const constants_1 = require("../jwt/constants"); -function getRecipeInterface(config, jwtRecipeImplementation) { - return { - getOpenIdDiscoveryConfiguration: function () { - return __awaiter(this, void 0, void 0, function* () { - let issuer = config.issuerDomain.getAsStringDangerous() + config.issuerPath.getAsStringDangerous(); - let jwks_uri = - config.issuerDomain.getAsStringDangerous() + - config.issuerPath - .appendPath(new normalisedURLPath_1.default(constants_1.GET_JWKS_API)) - .getAsStringDangerous(); - return { - status: "OK", - issuer, - jwks_uri, - }; - }); - }, - createJWT: function ({ payload, validitySeconds, useStaticSigningKey, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - payload = payload === undefined || payload === null ? {} : payload; - let issuer = config.issuerDomain.getAsStringDangerous() + config.issuerPath.getAsStringDangerous(); - return yield jwtRecipeImplementation.createJWT({ - payload: Object.assign({ iss: issuer }, payload), - useStaticSigningKey, - validitySeconds, - userContext, - }); - }); - }, - getJWKS: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield jwtRecipeImplementation.getJWKS(input); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/openid/types.d.ts b/lib/build/recipe/openid/types.d.ts deleted file mode 100644 index 30af4d0b1..000000000 --- a/lib/build/recipe/openid/types.d.ts +++ /dev/null @@ -1,100 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -import { BaseRequest, BaseResponse } from "../../framework"; -import NormalisedURLDomain from "../../normalisedURLDomain"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { RecipeInterface as JWTRecipeInterface, APIInterface as JWTAPIInterface, JsonWebKey } from "../jwt/types"; -import { GeneralErrorResponse } from "../../types"; -export declare type TypeInput = { - issuer?: string; - jwtValiditySeconds?: number; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - jwtFeature?: { - functions?: ( - originalImplementation: JWTRecipeInterface, - builder?: OverrideableBuilder - ) => JWTRecipeInterface; - apis?: ( - originalImplementation: JWTAPIInterface, - builder?: OverrideableBuilder - ) => JWTAPIInterface; - }; - }; -}; -export declare type TypeNormalisedInput = { - issuerDomain: NormalisedURLDomain; - issuerPath: NormalisedURLPath; - jwtValiditySeconds?: number; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - jwtFeature?: { - functions?: ( - originalImplementation: JWTRecipeInterface, - builder?: OverrideableBuilder - ) => JWTRecipeInterface; - apis?: ( - originalImplementation: JWTAPIInterface, - builder?: OverrideableBuilder - ) => JWTAPIInterface; - }; - }; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - config: TypeNormalisedInput; - recipeId: string; - req: BaseRequest; - res: BaseResponse; -}; -export declare type APIInterface = { - getOpenIdDiscoveryConfigurationGET: - | undefined - | ((input: { - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - issuer: string; - jwks_uri: string; - } - | GeneralErrorResponse - >); -}; -export declare type RecipeInterface = { - getOpenIdDiscoveryConfiguration(input: { - userContext: any; - }): Promise<{ - status: "OK"; - issuer: string; - jwks_uri: string; - }>; - createJWT(input: { - payload?: any; - validitySeconds?: number; - useStaticSigningKey?: boolean; - userContext: any; - }): Promise< - | { - status: "OK"; - jwt: string; - } - | { - status: "UNSUPPORTED_ALGORITHM_ERROR"; - } - >; - getJWKS(input: { - userContext: any; - }): Promise<{ - keys: JsonWebKey[]; - }>; -}; diff --git a/lib/build/recipe/openid/types.js b/lib/build/recipe/openid/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/recipe/openid/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/openid/utils.d.ts b/lib/build/recipe/openid/utils.d.ts deleted file mode 100644 index 6b5abd280..000000000 --- a/lib/build/recipe/openid/utils.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - appInfo: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/openid/utils.js b/lib/build/recipe/openid/utils.js deleted file mode 100644 index fac3a3f43..000000000 --- a/lib/build/recipe/openid/utils.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const normalisedURLDomain_1 = __importDefault(require("../../normalisedURLDomain")); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function validateAndNormaliseUserInput(appInfo, config) { - let issuerDomain = appInfo.apiDomain; - let issuerPath = appInfo.apiBasePath; - if (config !== undefined) { - if (config.issuer !== undefined) { - issuerDomain = new normalisedURLDomain_1.default(config.issuer); - issuerPath = new normalisedURLPath_1.default(config.issuer); - } - if (!issuerPath.equals(appInfo.apiBasePath)) { - throw new Error("The path of the issuer URL must be equal to the apiBasePath. The default value is /auth"); - } - } - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - return { - issuerDomain, - issuerPath, - jwtValiditySeconds: config === null || config === void 0 ? void 0 : config.jwtValiditySeconds, - override, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; diff --git a/lib/build/recipe/passwordless/api/consumeCode.d.ts b/lib/build/recipe/passwordless/api/consumeCode.d.ts deleted file mode 100644 index 0f21b8d73..000000000 --- a/lib/build/recipe/passwordless/api/consumeCode.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from ".."; -export default function consumeCode(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/passwordless/api/consumeCode.js b/lib/build/recipe/passwordless/api/consumeCode.js deleted file mode 100644 index 27cd79132..000000000 --- a/lib/build/recipe/passwordless/api/consumeCode.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -function consumeCode(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.consumeCodePOST === undefined) { - return false; - } - const body = yield options.req.getJSONBody(); - const preAuthSessionId = body.preAuthSessionId; - const linkCode = body.linkCode; - const deviceId = body.deviceId; - const userInputCode = body.userInputCode; - if (preAuthSessionId === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide preAuthSessionId", - }); - } - if (deviceId !== undefined || userInputCode !== undefined) { - if (linkCode !== undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide one of (linkCode) or (deviceId+userInputCode) and not both", - }); - } - if (deviceId === undefined || userInputCode === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide both deviceId and userInputCode", - }); - } - } else if (linkCode === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide one of (linkCode) or (deviceId+userInputCode) and not both", - }); - } - const userContext = utils_2.makeDefaultUserContextFromAPI(options.req); - let result = yield apiImplementation.consumeCodePOST( - deviceId !== undefined - ? { - deviceId, - userInputCode, - preAuthSessionId, - options, - userContext, - } - : { - linkCode, - options, - preAuthSessionId, - userContext, - } - ); - if (result.status === "OK") { - delete result.session; - } - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = consumeCode; diff --git a/lib/build/recipe/passwordless/api/createCode.d.ts b/lib/build/recipe/passwordless/api/createCode.d.ts deleted file mode 100644 index d72ea96e0..000000000 --- a/lib/build/recipe/passwordless/api/createCode.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from ".."; -export default function createCode(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/passwordless/api/createCode.js b/lib/build/recipe/passwordless/api/createCode.js deleted file mode 100644 index 83e8388a8..000000000 --- a/lib/build/recipe/passwordless/api/createCode.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const max_1 = __importDefault(require("libphonenumber-js/max")); -const utils_2 = require("../../../utils"); -function createCode(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.createCodePOST === undefined) { - return false; - } - const body = yield options.req.getJSONBody(); - let email = body.email; - let phoneNumber = body.phoneNumber; - if ((email !== undefined && phoneNumber !== undefined) || (email === undefined && phoneNumber === undefined)) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide exactly one of email or phoneNumber", - }); - } - if (email === undefined && options.config.contactMethod === "EMAIL") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: 'Please provide an email since you have set the contactMethod to "EMAIL"', - }); - } - if (phoneNumber === undefined && options.config.contactMethod === "PHONE") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: 'Please provide a phoneNumber since you have set the contactMethod to "PHONE"', - }); - } - // normalise and validate format of input - if ( - email !== undefined && - (options.config.contactMethod === "EMAIL" || options.config.contactMethod === "EMAIL_OR_PHONE") - ) { - email = email.trim(); - const validateError = yield options.config.validateEmailAddress(email); - if (validateError !== undefined) { - utils_1.send200Response(options.res, { - status: "GENERAL_ERROR", - message: validateError, - }); - return true; - } - } - if ( - phoneNumber !== undefined && - (options.config.contactMethod === "PHONE" || options.config.contactMethod === "EMAIL_OR_PHONE") - ) { - const validateError = yield options.config.validatePhoneNumber(phoneNumber); - if (validateError !== undefined) { - utils_1.send200Response(options.res, { - status: "GENERAL_ERROR", - message: validateError, - }); - return true; - } - const parsedPhoneNumber = max_1.default(phoneNumber); - if (parsedPhoneNumber === undefined) { - // this can come here if the user has provided their own impl of validatePhoneNumber and - // the phone number is valid according to their impl, but not according to the libphonenumber-js lib. - phoneNumber = phoneNumber.trim(); - } else { - phoneNumber = parsedPhoneNumber.format("E.164"); - } - } - let result = yield apiImplementation.createCodePOST( - email !== undefined - ? { email, options, userContext: utils_2.makeDefaultUserContextFromAPI(options.req) } - : { phoneNumber: phoneNumber, options, userContext: utils_2.makeDefaultUserContextFromAPI(options.req) } - ); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = createCode; diff --git a/lib/build/recipe/passwordless/api/emailExists.d.ts b/lib/build/recipe/passwordless/api/emailExists.d.ts deleted file mode 100644 index 74f301a87..000000000 --- a/lib/build/recipe/passwordless/api/emailExists.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function emailExists(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/passwordless/api/emailExists.js b/lib/build/recipe/passwordless/api/emailExists.js deleted file mode 100644 index e1fe058a4..000000000 --- a/lib/build/recipe/passwordless/api/emailExists.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -function emailExists(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.emailExistsGET === undefined) { - return false; - } - let email = options.req.getKeyValueFromQuery("email"); - if (email === undefined || typeof email !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the email as a GET param", - }); - } - let result = yield apiImplementation.emailExistsGET({ - email, - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = emailExists; diff --git a/lib/build/recipe/passwordless/api/implementation.d.ts b/lib/build/recipe/passwordless/api/implementation.d.ts deleted file mode 100644 index 402db9918..000000000 --- a/lib/build/recipe/passwordless/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/passwordless/api/implementation.js b/lib/build/recipe/passwordless/api/implementation.js deleted file mode 100644 index f7dcdb498..000000000 --- a/lib/build/recipe/passwordless/api/implementation.js +++ /dev/null @@ -1,297 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const logger_1 = require("../../../logger"); -const recipe_1 = __importDefault(require("../../emailverification/recipe")); -const session_1 = __importDefault(require("../../session")); -function getAPIImplementation() { - return { - consumeCodePOST: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield input.options.recipeImplementation.consumeCode( - "deviceId" in input - ? { - preAuthSessionId: input.preAuthSessionId, - deviceId: input.deviceId, - userInputCode: input.userInputCode, - userContext: input.userContext, - } - : { - preAuthSessionId: input.preAuthSessionId, - linkCode: input.linkCode, - userContext: input.userContext, - } - ); - if (response.status !== "OK") { - return response; - } - let user = response.user; - if (user.email !== undefined) { - const emailVerificationInstance = recipe_1.default.getInstance(); - if (emailVerificationInstance) { - const tokenResponse = yield emailVerificationInstance.recipeInterfaceImpl.createEmailVerificationToken( - { - userId: user.id, - email: user.email, - userContext: input.userContext, - } - ); - if (tokenResponse.status === "OK") { - yield emailVerificationInstance.recipeInterfaceImpl.verifyEmailUsingToken({ - token: tokenResponse.token, - userContext: input.userContext, - }); - } - } - } - const session = yield session_1.default.createNewSession( - input.options.req, - input.options.res, - user.id, - {}, - {}, - input.userContext - ); - return { - status: "OK", - createdNewUser: response.createdNewUser, - user: response.user, - session, - }; - }); - }, - createCodePOST: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield input.options.recipeImplementation.createCode( - "email" in input - ? { - userContext: input.userContext, - email: input.email, - userInputCode: - input.options.config.getCustomUserInputCode === undefined - ? undefined - : yield input.options.config.getCustomUserInputCode(input.userContext), - } - : { - userContext: input.userContext, - phoneNumber: input.phoneNumber, - userInputCode: - input.options.config.getCustomUserInputCode === undefined - ? undefined - : yield input.options.config.getCustomUserInputCode(input.userContext), - } - ); - // now we send the email / text message. - let magicLink = undefined; - let userInputCode = undefined; - const flowType = input.options.config.flowType; - if (flowType === "MAGIC_LINK" || flowType === "USER_INPUT_CODE_AND_MAGIC_LINK") { - magicLink = - input.options.appInfo.websiteDomain.getAsStringDangerous() + - input.options.appInfo.websiteBasePath.getAsStringDangerous() + - "/verify" + - "?rid=" + - input.options.recipeId + - "&preAuthSessionId=" + - response.preAuthSessionId + - "#" + - response.linkCode; - } - if (flowType === "USER_INPUT_CODE" || flowType === "USER_INPUT_CODE_AND_MAGIC_LINK") { - userInputCode = response.userInputCode; - } - // we don't do something special for serverless env here - // cause we want to wait for service's reply since it can show - // a UI error message for if sending an SMS / email failed or not. - if ( - input.options.config.contactMethod === "PHONE" || - (input.options.config.contactMethod === "EMAIL_OR_PHONE" && "phoneNumber" in input) - ) { - logger_1.logDebugMessage(`Sending passwordless login SMS to ${input.phoneNumber}`); - yield input.options.smsDelivery.ingredientInterfaceImpl.sendSms({ - type: "PASSWORDLESS_LOGIN", - codeLifetime: response.codeLifetime, - phoneNumber: input.phoneNumber, - preAuthSessionId: response.preAuthSessionId, - urlWithLinkCode: magicLink, - userInputCode, - userContext: input.userContext, - }); - } else { - logger_1.logDebugMessage(`Sending passwordless login email to ${input.email}`); - yield input.options.emailDelivery.ingredientInterfaceImpl.sendEmail({ - type: "PASSWORDLESS_LOGIN", - email: input.email, - codeLifetime: response.codeLifetime, - preAuthSessionId: response.preAuthSessionId, - urlWithLinkCode: magicLink, - userInputCode, - userContext: input.userContext, - }); - } - return { - status: "OK", - deviceId: response.deviceId, - flowType: input.options.config.flowType, - preAuthSessionId: response.preAuthSessionId, - }; - }); - }, - emailExistsGET: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield input.options.recipeImplementation.getUserByEmail({ - userContext: input.userContext, - email: input.email, - }); - return { - exists: response !== undefined, - status: "OK", - }; - }); - }, - phoneNumberExistsGET: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield input.options.recipeImplementation.getUserByPhoneNumber({ - userContext: input.userContext, - phoneNumber: input.phoneNumber, - }); - return { - exists: response !== undefined, - status: "OK", - }; - }); - }, - resendCodePOST: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let deviceInfo = yield input.options.recipeImplementation.listCodesByDeviceId({ - userContext: input.userContext, - deviceId: input.deviceId, - }); - if (deviceInfo === undefined) { - return { - status: "RESTART_FLOW_ERROR", - }; - } - if ( - (input.options.config.contactMethod === "PHONE" && deviceInfo.phoneNumber === undefined) || - (input.options.config.contactMethod === "EMAIL" && deviceInfo.email === undefined) - ) { - return { - status: "RESTART_FLOW_ERROR", - }; - } - let numberOfTriesToCreateNewCode = 0; - while (true) { - numberOfTriesToCreateNewCode++; - let response = yield input.options.recipeImplementation.createNewCodeForDevice({ - userContext: input.userContext, - deviceId: input.deviceId, - userInputCode: - input.options.config.getCustomUserInputCode === undefined - ? undefined - : yield input.options.config.getCustomUserInputCode(input.userContext), - }); - if (response.status === "USER_INPUT_CODE_ALREADY_USED_ERROR") { - if (numberOfTriesToCreateNewCode >= 3) { - // we retry 3 times. - return { - status: "GENERAL_ERROR", - message: "Failed to generate a one time code. Please try again", - }; - } - continue; - } - if (response.status === "OK") { - let magicLink = undefined; - let userInputCode = undefined; - const flowType = input.options.config.flowType; - if (flowType === "MAGIC_LINK" || flowType === "USER_INPUT_CODE_AND_MAGIC_LINK") { - magicLink = - input.options.appInfo.websiteDomain.getAsStringDangerous() + - input.options.appInfo.websiteBasePath.getAsStringDangerous() + - "/verify" + - "?rid=" + - input.options.recipeId + - "&preAuthSessionId=" + - response.preAuthSessionId + - "#" + - response.linkCode; - } - if (flowType === "USER_INPUT_CODE" || flowType === "USER_INPUT_CODE_AND_MAGIC_LINK") { - userInputCode = response.userInputCode; - } - // we don't do something special for serverless env here - // cause we want to wait for service's reply since it can show - // a UI error message for if sending an SMS / email failed or not. - if ( - input.options.config.contactMethod === "PHONE" || - (input.options.config.contactMethod === "EMAIL_OR_PHONE" && - deviceInfo.phoneNumber !== undefined) - ) { - logger_1.logDebugMessage(`Sending passwordless login SMS to ${input.phoneNumber}`); - yield input.options.smsDelivery.ingredientInterfaceImpl.sendSms({ - type: "PASSWORDLESS_LOGIN", - codeLifetime: response.codeLifetime, - phoneNumber: deviceInfo.phoneNumber, - preAuthSessionId: response.preAuthSessionId, - urlWithLinkCode: magicLink, - userInputCode, - userContext: input.userContext, - }); - } else { - logger_1.logDebugMessage(`Sending passwordless login email to ${input.email}`); - yield input.options.emailDelivery.ingredientInterfaceImpl.sendEmail({ - type: "PASSWORDLESS_LOGIN", - email: deviceInfo.email, - codeLifetime: response.codeLifetime, - preAuthSessionId: response.preAuthSessionId, - urlWithLinkCode: magicLink, - userInputCode, - userContext: input.userContext, - }); - } - } - return { - status: response.status, - }; - } - }); - }, - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/passwordless/api/phoneNumberExists.d.ts b/lib/build/recipe/passwordless/api/phoneNumberExists.d.ts deleted file mode 100644 index 9416f0cda..000000000 --- a/lib/build/recipe/passwordless/api/phoneNumberExists.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from ".."; -export default function phoneNumberExists(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/passwordless/api/phoneNumberExists.js b/lib/build/recipe/passwordless/api/phoneNumberExists.js deleted file mode 100644 index 64db5374f..000000000 --- a/lib/build/recipe/passwordless/api/phoneNumberExists.js +++ /dev/null @@ -1,77 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -function phoneNumberExists(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.phoneNumberExistsGET === undefined) { - return false; - } - let phoneNumber = options.req.getKeyValueFromQuery("phoneNumber"); - if (phoneNumber === undefined || typeof phoneNumber !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the phoneNumber as a GET param", - }); - } - let result = yield apiImplementation.phoneNumberExistsGET({ - phoneNumber, - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = phoneNumberExists; diff --git a/lib/build/recipe/passwordless/api/resendCode.d.ts b/lib/build/recipe/passwordless/api/resendCode.d.ts deleted file mode 100644 index ad4629bb6..000000000 --- a/lib/build/recipe/passwordless/api/resendCode.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from ".."; -export default function resendCode(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/passwordless/api/resendCode.js b/lib/build/recipe/passwordless/api/resendCode.js deleted file mode 100644 index 9fad206c2..000000000 --- a/lib/build/recipe/passwordless/api/resendCode.js +++ /dev/null @@ -1,86 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../../../utils"); -function resendCode(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.resendCodePOST === undefined) { - return false; - } - const body = yield options.req.getJSONBody(); - const preAuthSessionId = body.preAuthSessionId; - const deviceId = body.deviceId; - if (preAuthSessionId === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide preAuthSessionId", - }); - } - if (deviceId === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide a deviceId", - }); - } - let result = yield apiImplementation.resendCodePOST({ - deviceId, - preAuthSessionId, - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = resendCode; diff --git a/lib/build/recipe/passwordless/constants.d.ts b/lib/build/recipe/passwordless/constants.d.ts deleted file mode 100644 index f7438a00e..000000000 --- a/lib/build/recipe/passwordless/constants.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -export declare const CREATE_CODE_API = "/signinup/code"; -export declare const RESEND_CODE_API = "/signinup/code/resend"; -export declare const CONSUME_CODE_API = "/signinup/code/consume"; -export declare const DOES_EMAIL_EXIST_API = "/signup/email/exists"; -export declare const DOES_PHONE_NUMBER_EXIST_API = "/signup/phonenumber/exists"; diff --git a/lib/build/recipe/passwordless/constants.js b/lib/build/recipe/passwordless/constants.js deleted file mode 100644 index cd5590dc1..000000000 --- a/lib/build/recipe/passwordless/constants.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.DOES_PHONE_NUMBER_EXIST_API = exports.DOES_EMAIL_EXIST_API = exports.CONSUME_CODE_API = exports.RESEND_CODE_API = exports.CREATE_CODE_API = void 0; -exports.CREATE_CODE_API = "/signinup/code"; -exports.RESEND_CODE_API = "/signinup/code/resend"; -exports.CONSUME_CODE_API = "/signinup/code/consume"; -exports.DOES_EMAIL_EXIST_API = "/signup/email/exists"; -exports.DOES_PHONE_NUMBER_EXIST_API = "/signup/phonenumber/exists"; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index 2f0015dda..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessEmailDeliveryInput } from "../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -import { NormalisedAppinfo } from "../../../../../types"; -export default class BackwardCompatibilityService - implements EmailDeliveryInterface { - private createAndSendCustomEmail; - constructor( - appInfo: NormalisedAppinfo, - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise - ); - sendEmail: ( - input: TypePasswordlessEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.js b/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.js deleted file mode 100644 index 241629b1a..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,124 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -const logger_1 = require("../../../../../logger"); -function defaultCreateAndSendCustomEmail(appInfo) { - return (input, _) => - __awaiter(this, void 0, void 0, function* () { - if (process.env.TEST_MODE === "testing") { - return; - } - try { - yield axios_1.default({ - method: "POST", - url: "https://api.supertokens.io/0/st/auth/passwordless/login", - data: { - email: input.email, - appName: appInfo.appName, - codeLifetime: input.codeLifetime, - urlWithLinkCode: input.urlWithLinkCode, - userInputCode: input.userInputCode, - }, - headers: { - "api-version": 0, - }, - }); - logger_1.logDebugMessage(`Email sent to ${input.email}`); - } catch (error) { - logger_1.logDebugMessage("Error sending passwordless login email"); - if (axios_1.default.isAxiosError(error)) { - const err = error; - if (err.response) { - logger_1.logDebugMessage(`Error status: ${err.response.status}`); - logger_1.logDebugMessage(`Error response: ${JSON.stringify(err.response.data)}`); - } else { - logger_1.logDebugMessage(`Error: ${err.message}`); - } - } else { - logger_1.logDebugMessage(`Error: ${JSON.stringify(error)}`); - } - logger_1.logDebugMessage("Logging the input below:"); - logger_1.logDebugMessage( - JSON.stringify( - { - email: input.email, - appName: appInfo.appName, - codeLifetime: input.codeLifetime, - urlWithLinkCode: input.urlWithLinkCode, - userInputCode: input.userInputCode, - }, - null, - 2 - ) - ); - /** - * if the error is thrown from API, the response object - * will be of type `{err: string}` - */ - if (axios_1.default.isAxiosError(error) && error.response !== undefined) { - if (error.response.data.err !== undefined) { - throw Error(error.response.data.err); - } - } - throw error; - } - }); -} -class BackwardCompatibilityService { - constructor(appInfo, createAndSendCustomEmail) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.createAndSendCustomEmail( - { - email: input.email, - userInputCode: input.userInputCode, - urlWithLinkCode: input.urlWithLinkCode, - preAuthSessionId: input.preAuthSessionId, - codeLifetime: input.codeLifetime, - }, - input.userContext - ); - }); - this.createAndSendCustomEmail = - createAndSendCustomEmail === undefined - ? defaultCreateAndSendCustomEmail(appInfo) - : createAndSendCustomEmail; - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/index.d.ts b/lib/build/recipe/passwordless/emaildelivery/services/index.d.ts deleted file mode 100644 index 4de04d983..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import SMTP from "./smtp"; -export declare let SMTPService: typeof SMTP; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/index.js b/lib/build/recipe/passwordless/emaildelivery/services/index.js deleted file mode 100644 index 7e07f6706..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMTPService = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const smtp_1 = __importDefault(require("./smtp")); -exports.SMTPService = smtp_1.default; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.d.ts b/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.d.ts deleted file mode 100644 index 3cda03b71..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { ServiceInterface, TypeInput } from "../../../../../ingredients/emaildelivery/services/smtp"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -import { TypePasswordlessEmailDeliveryInput } from "../../../types"; -export default class SMTPService implements EmailDeliveryInterface { - serviceImpl: ServiceInterface; - constructor(config: TypeInput); - sendEmail: ( - input: TypePasswordlessEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.js b/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.js deleted file mode 100644 index e917fb0fe..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/index.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const nodemailer_1 = require("nodemailer"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const serviceImplementation_1 = require("./serviceImplementation"); -class SMTPService { - constructor(config) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - let content = yield this.serviceImpl.getContent(input); - yield this.serviceImpl.sendRawEmail( - Object.assign(Object.assign({}, content), { userContext: input.userContext }) - ); - }); - const transporter = nodemailer_1.createTransport({ - host: config.smtpSettings.host, - port: config.smtpSettings.port, - auth: { - user: config.smtpSettings.authUsername || config.smtpSettings.from.email, - pass: config.smtpSettings.password, - }, - secure: config.smtpSettings.secure, - }); - let builder = new supertokens_js_override_1.default( - serviceImplementation_1.getServiceImplementation(transporter, config.smtpSettings.from) - ); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.serviceImpl = builder.build(); - } -} -exports.default = SMTPService; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.d.ts b/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.d.ts deleted file mode 100644 index e3ae65d56..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessEmailDeliveryInput } from "../../../types"; -import { GetContentResult } from "../../../../../ingredients/emaildelivery/services/smtp"; -export default function getPasswordlessLoginEmailContent(input: TypePasswordlessEmailDeliveryInput): GetContentResult; -export declare function getPasswordlessLoginEmailHTML( - appName: string, - email: string, - codeLifetime: number, - urlWithLinkCode?: string, - userInputCode?: string -): string; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.js b/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.js deleted file mode 100644 index 1bc7a41ba..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/passwordlessLogin.js +++ /dev/null @@ -1,2864 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getPasswordlessLoginEmailHTML = void 0; -const supertokens_1 = __importDefault(require("../../../../../supertokens")); -const utils_1 = require("../../../../../utils"); -function getPasswordlessLoginEmailContent(input) { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - let body = getPasswordlessLoginEmailHTML( - appName, - input.email, - input.codeLifetime, - input.urlWithLinkCode, - input.userInputCode - ); - return { - body, - toEmail: input.email, - subject: "Login to your account", - isHtml: true, - }; -} -exports.default = getPasswordlessLoginEmailContent; -function getPasswordlessLoginOTPBody(appName, email, codeLifetime, userInputCode) { - return ` - - - - - - - - *|MC:SUBJECT|* - - - - - - - - - -
- - - - -
- - - - - - - - - - - -
- - - - - -
- -
- - - - - -
- - - - - - -
-

- Login to ${appName}

-
- - - - - - -
- - -
-
- -

- Enter the below OTP in your login screen. Note - that the OTP expires in ${codeLifetime}.

- -
-
- ${userInputCode}
- -
-
-
-
- - - - - - -
- - -

- This email is meant for ${email} -

-
-
- -
- - - - - -
- -
- -
-
- - - - `; -} -function getPasswordlessLoginURLLinkBody(appName, email, codeLifetime, urlWithLinkCode) { - return ` - - - - - - - - *|MC:SUBJECT|* - - - - - - - - - -
- - - - -
- - - - - - - - - - - -
- - - - - -
- -
- - - - - -
- - - - - - -
-

- Login to ${appName}

-
- - - - - - -
- - -
-
- -

- Please click the button below to sign in / up. - Note that the link expires in ${codeLifetime}. -

- -
- Login -
-
-
-

- Alternatively, you can directly paste this link - in your browser
- ${urlWithLinkCode} -

-
-
- - - - -
- - - - - - -
- - -

- This email is meant for ${email} -

-
-
- -
- - - - - -
- -
- -
-
- - - - `; -} -function getPasswordlessLoginOTPAndURLLinkBody(appName, email, codeLifetime, urlWithLinkCode, userInputCode) { - return ` - - - - - - - - *|MC:SUBJECT|* - - - - - - - - - -
- - - - -
- - - - - - - - - - - -
- - - - - -
- -
- - - - - -
- - - - - - -
-

- Login to ${appName}

-
- - - - - - -
-
-
-

- Enter the below OTP in your login screen. Note - that the OTP expires in ${codeLifetime}.

-
- -
-
- ${userInputCode}
-
-
-
- - - - - - -
- - - - - - - - - - -
- - or -
- - - -
- - - - - - -
- - -
-
- -

- Please click the button below to sign in / up. - Note that the link expires in ${codeLifetime}.

- -
- Login -
-
- -
-

- Alternatively, you can directly paste this link - in your browser
- ${urlWithLinkCode} -

-
-
- - -
- - - - - - -
-

- This email is meant for ${email} -

-
-
- -
- - - - - -
- -
- -
-
- - - - `; -} -function getPasswordlessLoginEmailHTML(appName, email, codeLifetime, urlWithLinkCode, userInputCode) { - if (urlWithLinkCode !== undefined && userInputCode !== undefined) { - return getPasswordlessLoginOTPAndURLLinkBody( - appName, - email, - utils_1.humaniseMilliseconds(codeLifetime), - urlWithLinkCode, - userInputCode - ); - } - if (userInputCode !== undefined) { - return getPasswordlessLoginOTPBody(appName, email, utils_1.humaniseMilliseconds(codeLifetime), userInputCode); - } - if (urlWithLinkCode !== undefined) { - return getPasswordlessLoginURLLinkBody( - appName, - email, - utils_1.humaniseMilliseconds(codeLifetime), - urlWithLinkCode - ); - } - throw Error("this should never be thrown"); -} -exports.getPasswordlessLoginEmailHTML = getPasswordlessLoginEmailHTML; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.d.ts b/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.d.ts deleted file mode 100644 index 7a58ac4e4..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessEmailDeliveryInput } from "../../../types"; -import { Transporter } from "nodemailer"; -import { ServiceInterface } from "../../../../../ingredients/emaildelivery/services/smtp"; -export declare function getServiceImplementation( - transporter: Transporter, - from: { - name: string; - email: string; - } -): ServiceInterface; diff --git a/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.js b/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.js deleted file mode 100644 index dfffb9e5d..000000000 --- a/lib/build/recipe/passwordless/emaildelivery/services/smtp/serviceImplementation.js +++ /dev/null @@ -1,83 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getServiceImplementation = void 0; -const passwordlessLogin_1 = __importDefault(require("./passwordlessLogin")); -function getServiceImplementation(transporter, from) { - return { - sendRawEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (input.isHtml) { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - html: input.body, - }); - } else { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - text: input.body, - }); - } - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return passwordlessLogin_1.default(input); - }); - }, - }; -} -exports.getServiceImplementation = getServiceImplementation; diff --git a/lib/build/recipe/passwordless/error.d.ts b/lib/build/recipe/passwordless/error.d.ts deleted file mode 100644 index 486758b61..000000000 --- a/lib/build/recipe/passwordless/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class SessionError extends STError { - constructor(options: { type: "BAD_INPUT_ERROR"; message: string }); -} diff --git a/lib/build/recipe/passwordless/error.js b/lib/build/recipe/passwordless/error.js deleted file mode 100644 index 852278b6d..000000000 --- a/lib/build/recipe/passwordless/error.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class SessionError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "passwordless"; - } -} -exports.default = SessionError; diff --git a/lib/build/recipe/passwordless/index.d.ts b/lib/build/recipe/passwordless/index.d.ts deleted file mode 100644 index f8966f784..000000000 --- a/lib/build/recipe/passwordless/index.d.ts +++ /dev/null @@ -1,183 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { - RecipeInterface, - User, - APIOptions, - APIInterface, - TypePasswordlessEmailDeliveryInput, - TypePasswordlessSmsDeliveryInput, -} from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static createCode( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - userInputCode?: string; - userContext?: any; - } - ): Promise<{ - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - }>; - static createNewCodeForDevice(input: { - deviceId: string; - userInputCode?: string; - userContext?: any; - }): Promise< - | { - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - } - | { - status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; - } - >; - static consumeCode( - input: - | { - preAuthSessionId: string; - userInputCode: string; - deviceId: string; - userContext?: any; - } - | { - preAuthSessionId: string; - linkCode: string; - userContext?: any; - } - ): Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | { - status: "RESTART_FLOW_ERROR"; - } - >; - static getUserById(input: { userId: string; userContext?: any }): Promise; - static getUserByEmail(input: { email: string; userContext?: any }): Promise; - static getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise; - static updateUser(input: { - userId: string; - email?: string | null; - phoneNumber?: string | null; - userContext?: any; - }): Promise<{ - status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; - }>; - static revokeAllCodes( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise<{ - status: "OK"; - }>; - static revokeCode(input: { - codeId: string; - userContext?: any; - }): Promise<{ - status: "OK"; - }>; - static listCodesByEmail(input: { email: string; userContext?: any }): Promise; - static listCodesByPhoneNumber(input: { - phoneNumber: string; - userContext?: any; - }): Promise; - static listCodesByDeviceId(input: { - deviceId: string; - userContext?: any; - }): Promise; - static listCodesByPreAuthSessionId(input: { - preAuthSessionId: string; - userContext?: any; - }): Promise; - static createMagicLink( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise; - static signInUp( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise<{ - status: string; - createdNewUser: boolean; - user: User; - }>; - static sendEmail( - input: TypePasswordlessEmailDeliveryInput & { - userContext?: any; - } - ): Promise; - static sendSms( - input: TypePasswordlessSmsDeliveryInput & { - userContext?: any; - } - ): Promise; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let createCode: typeof Wrapper.createCode; -export declare let consumeCode: typeof Wrapper.consumeCode; -export declare let getUserByEmail: typeof Wrapper.getUserByEmail; -export declare let getUserById: typeof Wrapper.getUserById; -export declare let getUserByPhoneNumber: typeof Wrapper.getUserByPhoneNumber; -export declare let listCodesByDeviceId: typeof Wrapper.listCodesByDeviceId; -export declare let listCodesByEmail: typeof Wrapper.listCodesByEmail; -export declare let listCodesByPhoneNumber: typeof Wrapper.listCodesByPhoneNumber; -export declare let listCodesByPreAuthSessionId: typeof Wrapper.listCodesByPreAuthSessionId; -export declare let createNewCodeForDevice: typeof Wrapper.createNewCodeForDevice; -export declare let updateUser: typeof Wrapper.updateUser; -export declare let revokeAllCodes: typeof Wrapper.revokeAllCodes; -export declare let revokeCode: typeof Wrapper.revokeCode; -export declare let createMagicLink: typeof Wrapper.createMagicLink; -export declare let signInUp: typeof Wrapper.signInUp; -export type { RecipeInterface, User, APIOptions, APIInterface }; -export declare let sendEmail: typeof Wrapper.sendEmail; -export declare let sendSms: typeof Wrapper.sendSms; diff --git a/lib/build/recipe/passwordless/index.js b/lib/build/recipe/passwordless/index.js deleted file mode 100644 index 4b86a87b7..000000000 --- a/lib/build/recipe/passwordless/index.js +++ /dev/null @@ -1,164 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sendSms = exports.sendEmail = exports.signInUp = exports.createMagicLink = exports.revokeCode = exports.revokeAllCodes = exports.updateUser = exports.createNewCodeForDevice = exports.listCodesByPreAuthSessionId = exports.listCodesByPhoneNumber = exports.listCodesByEmail = exports.listCodesByDeviceId = exports.getUserByPhoneNumber = exports.getUserById = exports.getUserByEmail = exports.consumeCode = exports.createCode = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -class Wrapper { - static createCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.createCode(Object.assign({ userContext: {} }, input)); - } - static createNewCodeForDevice(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.createNewCodeForDevice(Object.assign({ userContext: {} }, input)); - } - static consumeCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.consumeCode(Object.assign({ userContext: {} }, input)); - } - static getUserById(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.getUserById(Object.assign({ userContext: {} }, input)); - } - static getUserByEmail(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.getUserByEmail(Object.assign({ userContext: {} }, input)); - } - static getUserByPhoneNumber(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.getUserByPhoneNumber(Object.assign({ userContext: {} }, input)); - } - static updateUser(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.updateUser(Object.assign({ userContext: {} }, input)); - } - static revokeAllCodes(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeAllCodes(Object.assign({ userContext: {} }, input)); - } - static revokeCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeCode(Object.assign({ userContext: {} }, input)); - } - static listCodesByEmail(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByEmail(Object.assign({ userContext: {} }, input)); - } - static listCodesByPhoneNumber(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByPhoneNumber(Object.assign({ userContext: {} }, input)); - } - static listCodesByDeviceId(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByDeviceId(Object.assign({ userContext: {} }, input)); - } - static listCodesByPreAuthSessionId(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByPreAuthSessionId(Object.assign({ userContext: {} }, input)); - } - static createMagicLink(input) { - return recipe_1.default.getInstanceOrThrowError().createMagicLink(Object.assign({ userContext: {} }, input)); - } - static signInUp(input) { - return recipe_1.default.getInstanceOrThrowError().signInUp(Object.assign({ userContext: {} }, input)); - } - static sendEmail(input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default - .getInstanceOrThrowError() - .emailDelivery.ingredientInterfaceImpl.sendEmail(Object.assign({ userContext: {} }, input)); - }); - } - static sendSms(input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default - .getInstanceOrThrowError() - .smsDelivery.ingredientInterfaceImpl.sendSms(Object.assign({ userContext: {} }, input)); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.createCode = Wrapper.createCode; -exports.consumeCode = Wrapper.consumeCode; -exports.getUserByEmail = Wrapper.getUserByEmail; -exports.getUserById = Wrapper.getUserById; -exports.getUserByPhoneNumber = Wrapper.getUserByPhoneNumber; -exports.listCodesByDeviceId = Wrapper.listCodesByDeviceId; -exports.listCodesByEmail = Wrapper.listCodesByEmail; -exports.listCodesByPhoneNumber = Wrapper.listCodesByPhoneNumber; -exports.listCodesByPreAuthSessionId = Wrapper.listCodesByPreAuthSessionId; -exports.createNewCodeForDevice = Wrapper.createNewCodeForDevice; -exports.updateUser = Wrapper.updateUser; -exports.revokeAllCodes = Wrapper.revokeAllCodes; -exports.revokeCode = Wrapper.revokeCode; -exports.createMagicLink = Wrapper.createMagicLink; -exports.signInUp = Wrapper.signInUp; -exports.sendEmail = Wrapper.sendEmail; -exports.sendSms = Wrapper.sendSms; diff --git a/lib/build/recipe/passwordless/recipe.d.ts b/lib/build/recipe/passwordless/recipe.d.ts deleted file mode 100644 index 42b76df0a..000000000 --- a/lib/build/recipe/passwordless/recipe.d.ts +++ /dev/null @@ -1,72 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { TypeInput, TypeNormalisedInput, RecipeInterface, APIInterface } from "./types"; -import { NormalisedAppinfo, APIHandled, RecipeListFunction, HTTPMethod } from "../../types"; -import STError from "./error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { TypePasswordlessEmailDeliveryInput, TypePasswordlessSmsDeliveryInput } from "./types"; -import SmsDeliveryIngredient from "../../ingredients/smsdelivery"; -import { GetEmailForUserIdFunc } from "../emailverification/types"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - emailDelivery: EmailDeliveryIngredient; - smsDelivery: SmsDeliveryIngredient; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput, - ingredients: { - emailDelivery: EmailDeliveryIngredient | undefined; - smsDelivery: SmsDeliveryIngredient | undefined; - } - ); - static getInstanceOrThrowError(): Recipe; - static init(config: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - _: NormalisedURLPath, - __: HTTPMethod - ) => Promise; - handleError: (err: STError, _: BaseRequest, __: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; - createMagicLink: ( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ) => Promise; - signInUp: ( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ) => Promise<{ - status: string; - createdNewUser: boolean; - user: import("./types").User; - }>; - getEmailForUserId: GetEmailForUserIdFunc; -} diff --git a/lib/build/recipe/passwordless/recipe.js b/lib/build/recipe/passwordless/recipe.js deleted file mode 100644 index 5f3720526..000000000 --- a/lib/build/recipe/passwordless/recipe.js +++ /dev/null @@ -1,292 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const recipe_1 = __importDefault(require("../emailverification/recipe")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const consumeCode_1 = __importDefault(require("./api/consumeCode")); -const createCode_1 = __importDefault(require("./api/createCode")); -const emailExists_1 = __importDefault(require("./api/emailExists")); -const phoneNumberExists_1 = __importDefault(require("./api/phoneNumberExists")); -const resendCode_1 = __importDefault(require("./api/resendCode")); -const constants_1 = require("./constants"); -const emaildelivery_1 = __importDefault(require("../../ingredients/emaildelivery")); -const smsdelivery_1 = __importDefault(require("../../ingredients/smsdelivery")); -const postSuperTokensInitCallbacks_1 = require("../../postSuperTokensInitCallbacks"); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, ingredients) { - super(recipeId, appInfo); - // abstract instance functions below............... - this.getAPIsHandled = () => { - return [ - { - id: constants_1.CONSUME_CODE_API, - disabled: this.apiImpl.consumeCodePOST === undefined, - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.CONSUME_CODE_API), - }, - { - id: constants_1.CREATE_CODE_API, - disabled: this.apiImpl.createCodePOST === undefined, - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.CREATE_CODE_API), - }, - { - id: constants_1.DOES_EMAIL_EXIST_API, - disabled: this.apiImpl.emailExistsGET === undefined, - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.DOES_EMAIL_EXIST_API), - }, - { - id: constants_1.DOES_PHONE_NUMBER_EXIST_API, - disabled: this.apiImpl.phoneNumberExistsGET === undefined, - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.DOES_PHONE_NUMBER_EXIST_API), - }, - { - id: constants_1.RESEND_CODE_API, - disabled: this.apiImpl.resendCodePOST === undefined, - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.RESEND_CODE_API), - }, - ]; - }; - this.handleAPIRequest = (id, req, res, _, __) => - __awaiter(this, void 0, void 0, function* () { - const options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - emailDelivery: this.emailDelivery, - smsDelivery: this.smsDelivery, - appInfo: this.getAppInfo(), - }; - if (id === constants_1.CONSUME_CODE_API) { - return yield consumeCode_1.default(this.apiImpl, options); - } else if (id === constants_1.CREATE_CODE_API) { - return yield createCode_1.default(this.apiImpl, options); - } else if (id === constants_1.DOES_EMAIL_EXIST_API) { - return yield emailExists_1.default(this.apiImpl, options); - } else if (id === constants_1.DOES_PHONE_NUMBER_EXIST_API) { - return yield phoneNumberExists_1.default(this.apiImpl, options); - } else { - return yield resendCode_1.default(this.apiImpl, options); - } - }); - this.handleError = (err, _, __) => - __awaiter(this, void 0, void 0, function* () { - throw err; - }); - this.getAllCORSHeaders = () => { - return []; - }; - this.isErrorFromThisRecipe = (err) => { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - }; - // helper functions below... - this.createMagicLink = (input) => - __awaiter(this, void 0, void 0, function* () { - let userInputCode = - this.config.getCustomUserInputCode !== undefined - ? yield this.config.getCustomUserInputCode(input.userContext) - : undefined; - const codeInfo = yield this.recipeInterfaceImpl.createCode( - "email" in input - ? { - email: input.email, - userInputCode, - userContext: input.userContext, - } - : { - phoneNumber: input.phoneNumber, - userInputCode, - userContext: input.userContext, - } - ); - const appInfo = this.getAppInfo(); - let magicLink = - appInfo.websiteDomain.getAsStringDangerous() + - appInfo.websiteBasePath.getAsStringDangerous() + - "/verify" + - "?rid=" + - this.getRecipeId() + - "&preAuthSessionId=" + - codeInfo.preAuthSessionId + - "#" + - codeInfo.linkCode; - return magicLink; - }); - this.signInUp = (input) => - __awaiter(this, void 0, void 0, function* () { - let codeInfo = yield this.recipeInterfaceImpl.createCode( - "email" in input - ? { - email: input.email, - userContext: input.userContext, - } - : { - phoneNumber: input.phoneNumber, - userContext: input.userContext, - } - ); - let consumeCodeResponse = yield this.recipeInterfaceImpl.consumeCode( - this.config.flowType === "MAGIC_LINK" - ? { - preAuthSessionId: codeInfo.preAuthSessionId, - linkCode: codeInfo.linkCode, - userContext: input.userContext, - } - : { - preAuthSessionId: codeInfo.preAuthSessionId, - deviceId: codeInfo.deviceId, - userInputCode: codeInfo.userInputCode, - userContext: input.userContext, - } - ); - if (consumeCodeResponse.status === "OK") { - return { - status: "OK", - createdNewUser: consumeCodeResponse.createdNewUser, - user: consumeCodeResponse.user, - }; - } else { - throw new Error("Failed to create user. Please retry"); - } - }); - // helper functions... - this.getEmailForUserId = (userId, userContext) => - __awaiter(this, void 0, void 0, function* () { - let userInfo = yield this.recipeInterfaceImpl.getUserById({ userId, userContext }); - if (userInfo !== undefined) { - if (userInfo.email !== undefined) { - return { - status: "OK", - email: userInfo.email, - }; - } - return { - status: "EMAIL_DOES_NOT_EXIST_ERROR", - }; - } - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - }); - this.isInServerlessEnv = isInServerlessEnv; - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(querier_1.Querier.getNewInstanceOrThrowError(recipeId)) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - /** - * emailDelivery will always needs to be declared after isInServerlessEnv - * and recipeInterfaceImpl values are set - */ - this.emailDelivery = - ingredients.emailDelivery === undefined - ? new emaildelivery_1.default(this.config.getEmailDeliveryConfig()) - : ingredients.emailDelivery; - this.smsDelivery = - ingredients.smsDelivery === undefined - ? new smsdelivery_1.default(this.config.getSmsDeliveryConfig()) - : ingredients.smsDelivery; - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.addPostInitCallback(() => { - const emailVerificationRecipe = recipe_1.default.getInstance(); - if (emailVerificationRecipe !== undefined) { - emailVerificationRecipe.addGetEmailForUserIdFunc(this.getEmailForUserId.bind(this)); - } - }); - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config, { - emailDelivery: undefined, - smsDelivery: undefined, - }); - return Recipe.instance; - } else { - throw new Error("Passwordless recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "passwordless"; diff --git a/lib/build/recipe/passwordless/recipeImplementation.d.ts b/lib/build/recipe/passwordless/recipeImplementation.d.ts deleted file mode 100644 index 86bf78a27..000000000 --- a/lib/build/recipe/passwordless/recipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "./types"; -import { Querier } from "../../querier"; -export default function getRecipeInterface(querier: Querier): RecipeInterface; diff --git a/lib/build/recipe/passwordless/recipeImplementation.js b/lib/build/recipe/passwordless/recipeImplementation.js deleted file mode 100644 index 50296548b..000000000 --- a/lib/build/recipe/passwordless/recipeImplementation.js +++ /dev/null @@ -1,177 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeInterface(querier) { - function copyAndRemoveUserContext(input) { - let result = Object.assign({}, input); - delete result.userContext; - return result; - } - return { - consumeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/signinup/code/consume"), - copyAndRemoveUserContext(input) - ); - return response; - }); - }, - createCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/signinup/code"), - copyAndRemoveUserContext(input) - ); - return response; - }); - }, - createNewCodeForDevice: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/signinup/code"), - copyAndRemoveUserContext(input) - ); - return response; - }); - }, - getUserByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/user"), - copyAndRemoveUserContext(input) - ); - if (response.status === "OK") { - return response.user; - } - return undefined; - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/user"), - copyAndRemoveUserContext(input) - ); - if (response.status === "OK") { - return response.user; - } - return undefined; - }); - }, - getUserByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/user"), - copyAndRemoveUserContext(input) - ); - if (response.status === "OK") { - return response.user; - } - return undefined; - }); - }, - listCodesByDeviceId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/signinup/codes"), - copyAndRemoveUserContext(input) - ); - return response.devices.length === 1 ? response.devices[0] : undefined; - }); - }, - listCodesByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/signinup/codes"), - copyAndRemoveUserContext(input) - ); - return response.devices; - }); - }, - listCodesByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/signinup/codes"), - copyAndRemoveUserContext(input) - ); - return response.devices; - }); - }, - listCodesByPreAuthSessionId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/signinup/codes"), - copyAndRemoveUserContext(input) - ); - return response.devices.length === 1 ? response.devices[0] : undefined; - }); - }, - revokeAllCodes: function (input) { - return __awaiter(this, void 0, void 0, function* () { - yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/signinup/codes/remove"), - copyAndRemoveUserContext(input) - ); - return { - status: "OK", - }; - }); - }, - revokeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/signinup/code/remove"), - copyAndRemoveUserContext(input) - ); - return { status: "OK" }; - }); - }, - updateUser: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPutRequest( - new normalisedURLPath_1.default("/recipe/user"), - copyAndRemoveUserContext(input) - ); - return response; - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index d1477c878..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,25 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessSmsDeliveryInput } from "../../../types"; -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { NormalisedAppinfo } from "../../../../../types"; -export default class BackwardCompatibilityService implements SmsDeliveryInterface { - private createAndSendCustomSms; - constructor( - appInfo: NormalisedAppinfo, - createAndSendCustomSms?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise - ); - sendSms: ( - input: TypePasswordlessSmsDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.js b/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.js deleted file mode 100644 index 887b67227..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,148 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -const supertokens_1 = require("../../../../../ingredients/smsdelivery/services/supertokens"); -const supertokens_2 = __importDefault(require("../../../../../supertokens")); -const logger_1 = require("../../../../../logger"); -function defaultCreateAndSendCustomSms(_) { - return (input, _) => - __awaiter(this, void 0, void 0, function* () { - let supertokens = supertokens_2.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - try { - yield axios_1.default({ - method: "post", - url: supertokens_1.SUPERTOKENS_SMS_SERVICE_URL, - data: { - smsInput: { - appName, - type: "PASSWORDLESS_LOGIN", - phoneNumber: input.phoneNumber, - userInputCode: input.userInputCode, - urlWithLinkCode: input.urlWithLinkCode, - codeLifetime: input.codeLifetime, - }, - }, - headers: { - "api-version": "0", - }, - }); - logger_1.logDebugMessage(`Passwordless login SMS sent to ${input.phoneNumber}`); - return; - } catch (error) { - logger_1.logDebugMessage("Error sending passwordless login SMS"); - if (axios_1.default.isAxiosError(error)) { - const err = error; - if (err.response) { - logger_1.logDebugMessage(`Error status: ${err.response.status}`); - logger_1.logDebugMessage(`Error response: ${JSON.stringify(err.response.data)}`); - } else { - logger_1.logDebugMessage(`Error: ${err.message}`); - } - if (err.response) { - if (err.response.status !== 429) { - /** - * if the error is thrown from API, the response object - * will be of type `{err: string}` - */ - if (err.response.data.err !== undefined) { - throw Error(err.response.data.err); - } else { - throw err; - } - } - } else { - throw err; - } - } else { - logger_1.logDebugMessage(`Error: ${JSON.stringify(error)}`); - throw error; - } - } - console.log( - "Free daily SMS quota reached. If you want to use SuperTokens to send SMS, please sign up on supertokens.com to get your SMS API key, else you can also define your own method by overriding the service. For now, we are logging it below:" - ); - /** - * if we do console.log(`SMS content: ${input}`); - * Output would be: - * SMS content: [object Object] - */ - /** - * JSON.stringify takes 3 inputs - * - value: usually an object or array, to be converted - * - replacer: An array of strings and numbers that acts - * as an approved list for selecting the object - * properties that will be stringified - * - space: Adds indentation, white space, and line break characters - * to the return-value JSON text to make it easier to read - * - * console.log(JSON.stringify({"a": 1, "b": 2})) - * Output: - * {"a":1,"b":2} - * - * console.log(JSON.stringify({"a": 1, "b": 2}, null, 2)) - * Output: - * { - * "a": 1, - * "b": 2 - * } - */ - console.log(`\nSMS content: ${JSON.stringify(input, null, 2)}`); - }); -} -class BackwardCompatibilityService { - constructor(appInfo, createAndSendCustomSms) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.createAndSendCustomSms( - { - phoneNumber: input.phoneNumber, - userInputCode: input.userInputCode, - urlWithLinkCode: input.urlWithLinkCode, - preAuthSessionId: input.preAuthSessionId, - codeLifetime: input.codeLifetime, - }, - input.userContext - ); - }); - this.createAndSendCustomSms = - createAndSendCustomSms === undefined ? defaultCreateAndSendCustomSms(appInfo) : createAndSendCustomSms; - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/index.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/index.d.ts deleted file mode 100644 index f14aacf83..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import Twilio from "./twilio"; -import Supertokens from "./supertokens"; -export declare let TwilioService: typeof Twilio; -export declare let SupertokensService: typeof Supertokens; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/index.js b/lib/build/recipe/passwordless/smsdelivery/services/index.js deleted file mode 100644 index f85fb8900..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SupertokensService = exports.TwilioService = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const twilio_1 = __importDefault(require("./twilio")); -const supertokens_1 = __importDefault(require("./supertokens")); -exports.TwilioService = twilio_1.default; -exports.SupertokensService = supertokens_1.default; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.d.ts deleted file mode 100644 index 501ecbce0..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.d.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @ts-nocheck -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { TypePasswordlessSmsDeliveryInput } from "../../../types"; -export default class SupertokensService implements SmsDeliveryInterface { - private apiKey; - constructor(apiKey: string); - sendSms: (input: TypePasswordlessSmsDeliveryInput) => Promise; -} diff --git a/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.js b/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.js deleted file mode 100644 index 712ce00bd..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/supertokens/index.js +++ /dev/null @@ -1,116 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const supertokens_1 = require("../../../../../ingredients/smsdelivery/services/supertokens"); -const axios_1 = __importDefault(require("axios")); -const supertokens_2 = __importDefault(require("../../../../../supertokens")); -const logger_1 = require("../../../../../logger"); -class SupertokensService { - constructor(apiKey) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - let supertokens = supertokens_2.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - try { - yield axios_1.default({ - method: "post", - url: supertokens_1.SUPERTOKENS_SMS_SERVICE_URL, - data: { - apiKey: this.apiKey, - smsInput: { - type: input.type, - phoneNumber: input.phoneNumber, - userInputCode: input.userInputCode, - urlWithLinkCode: input.urlWithLinkCode, - codeLifetime: input.codeLifetime, - appName, - }, - }, - headers: { - "api-version": "0", - }, - }); - } catch (error) { - logger_1.logDebugMessage("Error sending SMS"); - if (axios_1.default.isAxiosError(error)) { - const err = error; - if (err.response) { - logger_1.logDebugMessage(`Error status: ${err.response.status}`); - logger_1.logDebugMessage(`Error response: ${JSON.stringify(err.response.data)}`); - } else { - logger_1.logDebugMessage(`Error: ${err.message}`); - } - } else { - logger_1.logDebugMessage(`Error: ${JSON.stringify(error)}`); - } - logger_1.logDebugMessage("Logging the input below:"); - logger_1.logDebugMessage( - JSON.stringify( - { - type: input.type, - phoneNumber: input.phoneNumber, - userInputCode: input.userInputCode, - urlWithLinkCode: input.urlWithLinkCode, - codeLifetime: input.codeLifetime, - appName, - }, - null, - 2 - ) - ); - throw error; - } - }); - this.apiKey = apiKey; - } -} -exports.default = SupertokensService; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.d.ts deleted file mode 100644 index ef7c09e1d..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -import { ServiceInterface, TypeInput } from "../../../../../ingredients/smsdelivery/services/twilio"; -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { TypePasswordlessSmsDeliveryInput } from "../../../types"; -export default class TwilioService implements SmsDeliveryInterface { - serviceImpl: ServiceInterface; - private config; - constructor(config: TypeInput); - sendSms: ( - input: TypePasswordlessSmsDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.js b/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.js deleted file mode 100644 index 96a763dc0..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/index.js +++ /dev/null @@ -1,93 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const twilio_1 = require("../../../../../ingredients/smsdelivery/services/twilio"); -const twilio_2 = __importDefault(require("twilio")); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const serviceImplementation_1 = require("./serviceImplementation"); -class TwilioService { - constructor(config) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - let content = yield this.serviceImpl.getContent(input); - if ("from" in this.config.twilioSettings) { - yield this.serviceImpl.sendRawSms( - Object.assign(Object.assign({}, content), { - userContext: input.userContext, - from: this.config.twilioSettings.from, - }) - ); - } else { - yield this.serviceImpl.sendRawSms( - Object.assign(Object.assign({}, content), { - userContext: input.userContext, - messagingServiceSid: this.config.twilioSettings.messagingServiceSid, - }) - ); - } - }); - this.config = twilio_1.normaliseUserInputConfig(config); - const twilioClient = twilio_2.default( - config.twilioSettings.accountSid, - config.twilioSettings.authToken, - config.twilioSettings.opts - ); - let builder = new supertokens_js_override_1.default( - serviceImplementation_1.getServiceImplementation(twilioClient) - ); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.serviceImpl = builder.build(); - } -} -exports.default = TwilioService; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.d.ts deleted file mode 100644 index 16af07d5e..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessSmsDeliveryInput } from "../../../types"; -import { GetContentResult } from "../../../../../ingredients/smsdelivery/services/twilio"; -export default function getPasswordlessLoginSmsContent(input: TypePasswordlessSmsDeliveryInput): GetContentResult; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.js b/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.js deleted file mode 100644 index 070ca9c75..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/passwordlessLogin.js +++ /dev/null @@ -1,32 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../../../utils"); -const supertokens_1 = __importDefault(require("../../../../../supertokens")); -function getPasswordlessLoginSmsContent(input) { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let appName = supertokens.appInfo.appName; - let body = getPasswordlessLoginSmsBody(appName, input.codeLifetime, input.urlWithLinkCode, input.userInputCode); - return { - body, - toPhoneNumber: input.phoneNumber, - }; -} -exports.default = getPasswordlessLoginSmsContent; -function getPasswordlessLoginSmsBody(appName, codeLifetime, urlWithLinkCode, userInputCode) { - let message = ""; - if (urlWithLinkCode !== undefined && userInputCode !== undefined) { - message += `OTP to login is ${userInputCode} for ${appName}\n\nOR click ${urlWithLinkCode} to login.\n\n`; - } else if (urlWithLinkCode !== undefined) { - message += `Click ${urlWithLinkCode} to login to ${appName}\n\n`; - } else { - message += `OTP to login is ${userInputCode} for ${appName}\n\n`; - } - const humanisedCodeLifetime = utils_1.humaniseMilliseconds(codeLifetime); - message += `This is valid for ${humanisedCodeLifetime}.`; - return message; -} diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.d.ts b/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.d.ts deleted file mode 100644 index 6aa22d4d2..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { TypePasswordlessSmsDeliveryInput } from "../../../types"; -import Twilio from "twilio/lib/rest/Twilio"; -import { ServiceInterface } from "../../../../../ingredients/smsdelivery/services/twilio"; -export declare function getServiceImplementation( - twilioClient: Twilio -): ServiceInterface; diff --git a/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.js b/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.js deleted file mode 100644 index f41680526..000000000 --- a/lib/build/recipe/passwordless/smsdelivery/services/twilio/serviceImplementation.js +++ /dev/null @@ -1,81 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getServiceImplementation = void 0; -const passwordlessLogin_1 = __importDefault(require("./passwordlessLogin")); -function getServiceImplementation(twilioClient) { - return { - sendRawSms: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if ("from" in input) { - yield twilioClient.messages.create({ - to: input.toPhoneNumber, - body: input.body, - from: input.from, - }); - } else { - yield twilioClient.messages.create({ - to: input.toPhoneNumber, - body: input.body, - messagingServiceSid: input.messagingServiceSid, - }); - } - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return passwordlessLogin_1.default(input); - }); - }, - }; -} -exports.getServiceImplementation = getServiceImplementation; diff --git a/lib/build/recipe/passwordless/types.d.ts b/lib/build/recipe/passwordless/types.d.ts deleted file mode 100644 index d8fbe092d..000000000 --- a/lib/build/recipe/passwordless/types.d.ts +++ /dev/null @@ -1,364 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import OverrideableBuilder from "supertokens-js-override"; -import { SessionContainerInterface } from "../session/types"; -import { - TypeInput as EmailDeliveryTypeInput, - TypeInputWithService as EmailDeliveryTypeInputWithService, -} from "../../ingredients/emaildelivery/types"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import { - TypeInput as SmsDeliveryTypeInput, - TypeInputWithService as SmsDeliveryTypeInputWithService, -} from "../../ingredients/smsdelivery/types"; -import SmsDeliveryIngredient from "../../ingredients/smsdelivery"; -import { GeneralErrorResponse, NormalisedAppinfo } from "../../types"; -export declare type User = { - id: string; - email?: string; - phoneNumber?: string; - timeJoined: number; -}; -export declare type TypeInput = ( - | { - contactMethod: "PHONE"; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - /** - * @deprecated Please use smsDelivery config instead - */ - createAndSendCustomTextMessage?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - | { - contactMethod: "EMAIL"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - | { - contactMethod: "EMAIL_OR_PHONE"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - /** - * @deprecated Please use smsDelivery config instead - */ - createAndSendCustomTextMessage?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } -) & { - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - emailDelivery?: EmailDeliveryTypeInput; - smsDelivery?: SmsDeliveryTypeInput; - getCustomUserInputCode?: (userContext: any) => Promise | string; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = ( - | { - contactMethod: "PHONE"; - validatePhoneNumber: (phoneNumber: string) => Promise | string | undefined; - } - | { - contactMethod: "EMAIL"; - validateEmailAddress: (email: string) => Promise | string | undefined; - } - | { - contactMethod: "EMAIL_OR_PHONE"; - validateEmailAddress: (email: string) => Promise | string | undefined; - validatePhoneNumber: (phoneNumber: string) => Promise | string | undefined; - } -) & { - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - getCustomUserInputCode?: (userContext: any) => Promise | string; - getSmsDeliveryConfig: () => SmsDeliveryTypeInputWithService; - getEmailDeliveryConfig: () => EmailDeliveryTypeInputWithService; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - createCode: ( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - userInputCode?: string; - userContext: any; - } - ) => Promise<{ - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - }>; - createNewCodeForDevice: (input: { - deviceId: string; - userInputCode?: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - } - | { - status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; - } - >; - consumeCode: ( - input: - | { - userInputCode: string; - deviceId: string; - preAuthSessionId: string; - userContext: any; - } - | { - linkCode: string; - preAuthSessionId: string; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | { - status: "RESTART_FLOW_ERROR"; - } - >; - getUserById: (input: { userId: string; userContext: any }) => Promise; - getUserByEmail: (input: { email: string; userContext: any }) => Promise; - getUserByPhoneNumber: (input: { phoneNumber: string; userContext: any }) => Promise; - updateUser: (input: { - userId: string; - email?: string | null; - phoneNumber?: string | null; - userContext: any; - }) => Promise<{ - status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; - }>; - revokeAllCodes: ( - input: - | { - email: string; - userContext: any; - } - | { - phoneNumber: string; - userContext: any; - } - ) => Promise<{ - status: "OK"; - }>; - revokeCode: (input: { - codeId: string; - userContext: any; - }) => Promise<{ - status: "OK"; - }>; - listCodesByEmail: (input: { email: string; userContext: any }) => Promise; - listCodesByPhoneNumber: (input: { phoneNumber: string; userContext: any }) => Promise; - listCodesByDeviceId: (input: { deviceId: string; userContext: any }) => Promise; - listCodesByPreAuthSessionId: (input: { - preAuthSessionId: string; - userContext: any; - }) => Promise; -}; -export declare type DeviceType = { - preAuthSessionId: string; - failedCodeInputAttemptCount: number; - email?: string; - phoneNumber?: string; - codes: { - codeId: string; - timeCreated: string; - codeLifetime: number; - }[]; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - appInfo: NormalisedAppinfo; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - req: BaseRequest; - res: BaseResponse; - emailDelivery: EmailDeliveryIngredient; - smsDelivery: SmsDeliveryIngredient; -}; -export declare type APIInterface = { - createCodePOST?: ( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - options: APIOptions; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - deviceId: string; - preAuthSessionId: string; - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - } - | GeneralErrorResponse - >; - resendCodePOST?: ( - input: { - deviceId: string; - preAuthSessionId: string; - } & { - options: APIOptions; - userContext: any; - } - ) => Promise< - | GeneralErrorResponse - | { - status: "RESTART_FLOW_ERROR" | "OK"; - } - >; - consumeCodePOST?: ( - input: ( - | { - userInputCode: string; - deviceId: string; - preAuthSessionId: string; - } - | { - linkCode: string; - preAuthSessionId: string; - } - ) & { - options: APIOptions; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - session: SessionContainerInterface; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | GeneralErrorResponse - | { - status: "RESTART_FLOW_ERROR"; - } - >; - emailExistsGET?: (input: { - email: string; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >; - phoneNumberExistsGET?: (input: { - phoneNumber: string; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >; -}; -export declare type TypePasswordlessEmailDeliveryInput = { - type: "PASSWORDLESS_LOGIN"; - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; -}; -export declare type TypePasswordlessSmsDeliveryInput = { - type: "PASSWORDLESS_LOGIN"; - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; -}; diff --git a/lib/build/recipe/passwordless/types.js b/lib/build/recipe/passwordless/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/recipe/passwordless/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/passwordless/utils.d.ts b/lib/build/recipe/passwordless/utils.d.ts deleted file mode 100644 index f00fc5184..000000000 --- a/lib/build/recipe/passwordless/utils.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function validateAndNormaliseUserInput( - _: Recipe, - appInfo: NormalisedAppinfo, - config: TypeInput -): TypeNormalisedInput; -export declare function defaultValidatePhoneNumber(value: string): Promise | string | undefined; -export declare function defaultValidateEmail(value: string): Promise | string | undefined; diff --git a/lib/build/recipe/passwordless/utils.js b/lib/build/recipe/passwordless/utils.js deleted file mode 100644 index 2bbe5e2e2..000000000 --- a/lib/build/recipe/passwordless/utils.js +++ /dev/null @@ -1,171 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.defaultValidateEmail = exports.defaultValidatePhoneNumber = exports.validateAndNormaliseUserInput = void 0; -const max_1 = __importDefault(require("libphonenumber-js/max")); -const backwardCompatibility_1 = __importDefault(require("./emaildelivery/services/backwardCompatibility")); -const backwardCompatibility_2 = __importDefault(require("./smsdelivery/services/backwardCompatibility")); -function validateAndNormaliseUserInput(_, appInfo, config) { - if ( - config.contactMethod !== "PHONE" && - config.contactMethod !== "EMAIL" && - config.contactMethod !== "EMAIL_OR_PHONE" - ) { - throw new Error('Please pass one of "PHONE", "EMAIL" or "EMAIL_OR_PHONE" as the contactMethod'); - } - if (config.flowType === undefined) { - throw new Error("Please pass flowType argument in the config"); - } - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config.override - ); - function getEmailDeliveryConfig() { - var _a; - let emailService = (_a = config.emailDelivery) === null || _a === void 0 ? void 0 : _a.service; - let createAndSendCustomEmail = config.contactMethod === "PHONE" ? undefined : config.createAndSendCustomEmail; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomEmail config. If the user - * has not passed even that config, we use the default - * createAndSendCustomEmail implementation - */ - if (emailService === undefined) { - emailService = new backwardCompatibility_1.default(appInfo, createAndSendCustomEmail); - } - let emailDelivery = Object.assign(Object.assign({}, config.emailDelivery), { - /** - * if we do - * let emailDelivery = { - * service: emailService, - * ...config.emailDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: emailService, - }); - return emailDelivery; - } - function getSmsDeliveryConfig() { - var _a; - let smsService = (_a = config.smsDelivery) === null || _a === void 0 ? void 0 : _a.service; - let createAndSendCustomTextMessage = - config.contactMethod === "EMAIL" ? undefined : config.createAndSendCustomTextMessage; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomTextMessage config. If the user - * has not passed even that config, we use the default - * createAndSendCustomTextMessage implementation - */ - if (smsService === undefined) { - smsService = new backwardCompatibility_2.default(appInfo, createAndSendCustomTextMessage); - } - let smsDelivery = Object.assign(Object.assign({}, config.smsDelivery), { - /** - * if we do - * let smsDelivery = { - * service: smsService, - * ...config.smsDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: smsService, - }); - return smsDelivery; - } - if (config.contactMethod === "EMAIL") { - return { - override, - getEmailDeliveryConfig, - getSmsDeliveryConfig, - flowType: config.flowType, - contactMethod: "EMAIL", - validateEmailAddress: - config.validateEmailAddress === undefined ? defaultValidateEmail : config.validateEmailAddress, - getCustomUserInputCode: config.getCustomUserInputCode, - }; - } else if (config.contactMethod === "PHONE") { - return { - override, - getEmailDeliveryConfig, - getSmsDeliveryConfig, - flowType: config.flowType, - contactMethod: "PHONE", - validatePhoneNumber: - config.validatePhoneNumber === undefined ? defaultValidatePhoneNumber : config.validatePhoneNumber, - getCustomUserInputCode: config.getCustomUserInputCode, - }; - } else { - return { - override, - getEmailDeliveryConfig, - getSmsDeliveryConfig, - flowType: config.flowType, - contactMethod: "EMAIL_OR_PHONE", - validateEmailAddress: - config.validateEmailAddress === undefined ? defaultValidateEmail : config.validateEmailAddress, - validatePhoneNumber: - config.validatePhoneNumber === undefined ? defaultValidatePhoneNumber : config.validatePhoneNumber, - getCustomUserInputCode: config.getCustomUserInputCode, - }; - } -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function defaultValidatePhoneNumber(value) { - if (typeof value !== "string") { - return "Development bug: Please make sure the phoneNumber field is a string"; - } - let parsedPhoneNumber = max_1.default(value); - if (parsedPhoneNumber === undefined || !parsedPhoneNumber.isValid()) { - return "Phone number is invalid"; - } - // we can even use Twilio's phone number validity lookup service: https://www.twilio.com/docs/glossary/what-e164. - return undefined; -} -exports.defaultValidatePhoneNumber = defaultValidatePhoneNumber; -function defaultValidateEmail(value) { - // We check if the email syntax is correct - // As per https://github.com/supertokens/supertokens-auth-react/issues/5#issuecomment-709512438 - // Regex from https://stackoverflow.com/a/46181/3867175 - if (typeof value !== "string") { - return "Development bug: Please make sure the email field is a string"; - } - if ( - value.match( - /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/ - ) === null - ) { - return "Email is invalid"; - } - return undefined; -} -exports.defaultValidateEmail = defaultValidateEmail; diff --git a/lib/build/recipe/session/accessToken.d.ts b/lib/build/recipe/session/accessToken.d.ts deleted file mode 100644 index 4cd06e3f0..000000000 --- a/lib/build/recipe/session/accessToken.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @ts-nocheck -import { ParsedJWTInfo } from "./jwt"; -import * as jose from "jose"; -export declare function getInfoFromAccessToken( - jwtInfo: ParsedJWTInfo, - jwks: jose.JWTVerifyGetKey, - doAntiCsrfCheck: boolean -): Promise<{ - sessionHandle: string; - userId: string; - refreshTokenHash1: string; - parentRefreshTokenHash1: string | undefined; - userData: any; - antiCsrfToken: string | undefined; - expiryTime: number; - timeCreated: number; -}>; -export declare function validateAccessTokenStructure(payload: any, version: number): void; -export declare function sanitizeNumberInput(field: any): number | undefined; diff --git a/lib/build/recipe/session/accessToken.js b/lib/build/recipe/session/accessToken.js deleted file mode 100644 index 6fa115d69..000000000 --- a/lib/build/recipe/session/accessToken.js +++ /dev/null @@ -1,266 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __asyncValues = - (this && this.__asyncValues) || - function (o) { - if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined."); - var m = o[Symbol.asyncIterator], - i; - return m - ? m.call(o) - : ((o = typeof __values === "function" ? __values(o) : o[Symbol.iterator]()), - (i = {}), - verb("next"), - verb("throw"), - verb("return"), - (i[Symbol.asyncIterator] = function () { - return this; - }), - i); - function verb(n) { - i[n] = - o[n] && - function (v) { - return new Promise(function (resolve, reject) { - (v = o[n](v)), settle(resolve, reject, v.done, v.value); - }); - }; - } - function settle(resolve, reject, d, v) { - Promise.resolve(v).then(function (v) { - resolve({ value: v, done: d }); - }, reject); - } - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sanitizeNumberInput = exports.validateAccessTokenStructure = exports.getInfoFromAccessToken = void 0; -const error_1 = __importDefault(require("./error")); -const jose = __importStar(require("jose")); -const processState_1 = require("../../processState"); -function getInfoFromAccessToken(jwtInfo, jwks, doAntiCsrfCheck) { - var e_1, _a; - return __awaiter(this, void 0, void 0, function* () { - try { - // From the library examples - let payload = undefined; - try { - payload = (yield jose.jwtVerify(jwtInfo.rawTokenString, jwks)).payload; - } catch (error) { - // We only want to opt-into this for V2 access tokens - if ( - jwtInfo.version === 2 && - (error === null || error === void 0 ? void 0 : error.code) === "ERR_JWKS_MULTIPLE_MATCHING_KEYS" - ) { - processState_1.ProcessState.getInstance().addState( - processState_1.PROCESS_STATE.MULTI_JWKS_VALIDATION - ); - try { - // We are trying to validate the token with each key. - // Since the kid is missing from v2 tokens, this basically means we try all keys present in the cache. - for ( - var error_2 = __asyncValues(error), error_2_1; - (error_2_1 = yield error_2.next()), !error_2_1.done; - - ) { - const publicKey = error_2_1.value; - try { - payload = (yield jose.jwtVerify(jwtInfo.rawTokenString, publicKey)).payload; - break; - } catch (innerError) { - if ( - (innerError === null || innerError === void 0 ? void 0 : innerError.code) === - "ERR_JWS_SIGNATURE_VERIFICATION_FAILED" - ) { - continue; - } - throw innerError; - } - } - } catch (e_1_1) { - e_1 = { error: e_1_1 }; - } finally { - try { - if (error_2_1 && !error_2_1.done && (_a = error_2.return)) yield _a.call(error_2); - } finally { - if (e_1) throw e_1.error; - } - } - if (payload === undefined) { - throw new jose.errors.JWSSignatureVerificationFailed(); - } - } else { - throw error; - } - } - // This should be called before this function, but the check is very quick, so we can also do them here - validateAccessTokenStructure(payload, jwtInfo.version); - // We can mark these as defined (the ! after the calls), since validateAccessTokenPayload checks this - let userId = jwtInfo.version === 2 ? sanitizeStringInput(payload.userId) : sanitizeStringInput(payload.sub); - let expiryTime = - jwtInfo.version === 2 - ? sanitizeNumberInput(payload.expiryTime) - : sanitizeNumberInput(payload.exp) * 1000; - let timeCreated = - jwtInfo.version === 2 - ? sanitizeNumberInput(payload.timeCreated) - : sanitizeNumberInput(payload.iat) * 1000; - let userData = jwtInfo.version === 2 ? payload.userData : payload; - let sessionHandle = sanitizeStringInput(payload.sessionHandle); - let refreshTokenHash1 = sanitizeStringInput(payload.refreshTokenHash1); - let parentRefreshTokenHash1 = sanitizeStringInput(payload.parentRefreshTokenHash1); - let antiCsrfToken = sanitizeStringInput(payload.antiCsrfToken); - if (antiCsrfToken === undefined && doAntiCsrfCheck) { - throw Error("Access token does not contain the anti-csrf token."); - } - if (expiryTime < Date.now()) { - throw Error("Access token expired"); - } - return { - sessionHandle, - userId, - refreshTokenHash1, - parentRefreshTokenHash1, - userData, - antiCsrfToken, - expiryTime, - timeCreated, - }; - } catch (err) { - throw new error_1.default({ - message: "Failed to verify access token", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - }); -} -exports.getInfoFromAccessToken = getInfoFromAccessToken; -function validateAccessTokenStructure(payload, version) { - if (version >= 3) { - if ( - typeof payload.sub !== "string" || - typeof payload.exp !== "number" || - typeof payload.iat !== "number" || - typeof payload.sessionHandle !== "string" || - typeof payload.refreshTokenHash1 !== "string" - ) { - // it would come here if we change the structure of the JWT. - throw Error("Access token does not contain all the information. Maybe the structure has changed?"); - } - } else if ( - typeof payload.sessionHandle !== "string" || - typeof payload.userId !== "string" || - typeof payload.refreshTokenHash1 !== "string" || - payload.userData === undefined || - typeof payload.expiryTime !== "number" || - typeof payload.timeCreated !== "number" - ) { - // it would come here if we change the structure of the JWT. - throw Error("Access token does not contain all the information. Maybe the structure has changed?"); - } -} -exports.validateAccessTokenStructure = validateAccessTokenStructure; -function sanitizeStringInput(field) { - if (field === "") { - return ""; - } - if (typeof field !== "string") { - return undefined; - } - try { - let result = field.trim(); - return result; - } catch (err) {} - return undefined; -} -function sanitizeNumberInput(field) { - if (typeof field === "number") { - return field; - } - return undefined; -} -exports.sanitizeNumberInput = sanitizeNumberInput; diff --git a/lib/build/recipe/session/api/implementation.d.ts b/lib/build/recipe/session/api/implementation.d.ts deleted file mode 100644 index dd40e7025..000000000 --- a/lib/build/recipe/session/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIInterface(): APIInterface; diff --git a/lib/build/recipe/session/api/implementation.js b/lib/build/recipe/session/api/implementation.js deleted file mode 100644 index 7c8a8b26c..000000000 --- a/lib/build/recipe/session/api/implementation.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const normalisedURLPath_1 = __importDefault(require("../../../normalisedURLPath")); -const sessionRequestFunctions_1 = require("../sessionRequestFunctions"); -function getAPIInterface() { - return { - refreshPOST: function ({ options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - return sessionRequestFunctions_1.refreshSessionInRequest({ - req: options.req, - res: options.res, - userContext, - config: options.config, - recipeInterfaceImpl: options.recipeImplementation, - }); - }); - }, - verifySession: function ({ verifySessionOptions, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let method = utils_1.normaliseHttpMethod(options.req.getMethod()); - if (method === "options" || method === "trace") { - return undefined; - } - let incomingPath = new normalisedURLPath_1.default(options.req.getOriginalURL()); - let refreshTokenPath = options.config.refreshTokenPath; - if (incomingPath.equals(refreshTokenPath) && method === "post") { - return sessionRequestFunctions_1.refreshSessionInRequest({ - req: options.req, - res: options.res, - userContext, - config: options.config, - recipeInterfaceImpl: options.recipeImplementation, - }); - } else { - return sessionRequestFunctions_1.getSessionFromRequest({ - req: options.req, - res: options.res, - options: verifySessionOptions, - config: options.config, - recipeInterfaceImpl: options.recipeImplementation, - userContext, - }); - } - }); - }, - signOutPOST: function ({ session, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - if (session !== undefined) { - yield session.revokeSession(userContext); - } - return { - status: "OK", - }; - }); - }, - }; -} -exports.default = getAPIInterface; diff --git a/lib/build/recipe/session/api/refresh.d.ts b/lib/build/recipe/session/api/refresh.d.ts deleted file mode 100644 index 6b4746e67..000000000 --- a/lib/build/recipe/session/api/refresh.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function handleRefreshAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/session/api/refresh.js b/lib/build/recipe/session/api/refresh.js deleted file mode 100644 index 6ae4b4a31..000000000 --- a/lib/build/recipe/session/api/refresh.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("../../../utils"); -function handleRefreshAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.refreshPOST === undefined) { - return false; - } - yield apiImplementation.refreshPOST({ - options, - userContext: utils_2.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, {}); - return true; - }); -} -exports.default = handleRefreshAPI; diff --git a/lib/build/recipe/session/api/signout.d.ts b/lib/build/recipe/session/api/signout.d.ts deleted file mode 100644 index 0e1d985d3..000000000 --- a/lib/build/recipe/session/api/signout.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function signOutAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/session/api/signout.js b/lib/build/recipe/session/api/signout.js deleted file mode 100644 index 4fe19526d..000000000 --- a/lib/build/recipe/session/api/signout.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const utils_2 = require("../../../utils"); -const sessionRequestFunctions_1 = require("../sessionRequestFunctions"); -function signOutAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - // Logic as per https://github.com/supertokens/supertokens-node/issues/34#issuecomment-717958537 - if (apiImplementation.signOutPOST === undefined) { - return false; - } - let defaultUserContext = utils_2.makeDefaultUserContextFromAPI(options.req); - const session = yield sessionRequestFunctions_1.getSessionFromRequest({ - req: options.req, - res: options.res, - config: options.config, - recipeInterfaceImpl: options.recipeImplementation, - options: { - sessionRequired: false, - overrideGlobalClaimValidators: () => [], - }, - userContext: defaultUserContext, - }); - let result = yield apiImplementation.signOutPOST({ - options, - session, - userContext: defaultUserContext, - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = signOutAPI; diff --git a/lib/build/recipe/session/claimBaseClasses/booleanClaim.d.ts b/lib/build/recipe/session/claimBaseClasses/booleanClaim.d.ts deleted file mode 100644 index ba5736f3f..000000000 --- a/lib/build/recipe/session/claimBaseClasses/booleanClaim.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -import { SessionClaim, SessionClaimValidator } from "../types"; -import { PrimitiveClaim } from "./primitiveClaim"; -export declare class BooleanClaim extends PrimitiveClaim { - constructor(conf: { - key: string; - fetchValue: SessionClaim["fetchValue"]; - defaultMaxAgeInSeconds?: number; - }); - validators: PrimitiveClaim["validators"] & { - isTrue: (maxAge?: number, id?: string) => SessionClaimValidator; - isFalse: (maxAge?: number, id?: string) => SessionClaimValidator; - }; -} diff --git a/lib/build/recipe/session/claimBaseClasses/booleanClaim.js b/lib/build/recipe/session/claimBaseClasses/booleanClaim.js deleted file mode 100644 index 37e233d3f..000000000 --- a/lib/build/recipe/session/claimBaseClasses/booleanClaim.js +++ /dev/null @@ -1,14 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BooleanClaim = void 0; -const primitiveClaim_1 = require("./primitiveClaim"); -class BooleanClaim extends primitiveClaim_1.PrimitiveClaim { - constructor(conf) { - super(conf); - this.validators = Object.assign(Object.assign({}, this.validators), { - isTrue: (maxAge, id) => this.validators.hasValue(true, maxAge, id), - isFalse: (maxAge, id) => this.validators.hasValue(false, maxAge, id), - }); - } -} -exports.BooleanClaim = BooleanClaim; diff --git a/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.d.ts b/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.d.ts deleted file mode 100644 index 8f765d22a..000000000 --- a/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @ts-nocheck -import { JSONPrimitive } from "../../../types"; -import { SessionClaim, SessionClaimValidator } from "../types"; -export declare class PrimitiveArrayClaim extends SessionClaim { - readonly fetchValue: (userId: string, userContext: any) => Promise | T[] | undefined; - readonly defaultMaxAgeInSeconds: number | undefined; - constructor(config: { key: string; fetchValue: SessionClaim["fetchValue"]; defaultMaxAgeInSeconds?: number }); - addToPayload_internal(payload: any, value: T[], _userContext: any): any; - removeFromPayloadByMerge_internal(payload: any, _userContext?: any): any; - removeFromPayload(payload: any, _userContext?: any): any; - getValueFromPayload(payload: any, _userContext?: any): T[] | undefined; - getLastRefetchTime(payload: any, _userContext?: any): number | undefined; - validators: { - includes: (val: T, maxAgeInSeconds?: number | undefined, id?: string | undefined) => SessionClaimValidator; - excludes: (val: T, maxAgeInSeconds?: number | undefined, id?: string | undefined) => SessionClaimValidator; - includesAll: (val: T[], maxAgeInSeconds?: number | undefined, id?: string | undefined) => SessionClaimValidator; - excludesAll: (val: T[], maxAgeInSeconds?: number | undefined, id?: string | undefined) => SessionClaimValidator; - }; -} diff --git a/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.js b/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.js deleted file mode 100644 index 1b95308b2..000000000 --- a/lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim.js +++ /dev/null @@ -1,248 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrimitiveArrayClaim = void 0; -const types_1 = require("../types"); -class PrimitiveArrayClaim extends types_1.SessionClaim { - constructor(config) { - super(config.key); - this.validators = { - includes: (val, maxAgeInSeconds = this.defaultMaxAgeInSeconds, id) => { - return { - claim: this, - id: id !== null && id !== void 0 ? id : this.key, - shouldRefetch: (payload, ctx) => - this.getValueFromPayload(payload, ctx) === undefined || - // We know payload[this.id] is defined since the value is not undefined in this branch - (maxAgeInSeconds !== undefined && payload[this.key].t < Date.now() - maxAgeInSeconds * 1000), - validate: (payload, ctx) => - __awaiter(this, void 0, void 0, function* () { - const claimVal = this.getValueFromPayload(payload, ctx); - if (claimVal === undefined) { - return { - isValid: false, - reason: { - message: "value does not exist", - expectedToInclude: val, - actualValue: claimVal, - }, - }; - } - const ageInSeconds = (Date.now() - this.getLastRefetchTime(payload, ctx)) / 1000; - if (maxAgeInSeconds !== undefined && ageInSeconds > maxAgeInSeconds) { - return { - isValid: false, - reason: { - message: "expired", - ageInSeconds, - maxAgeInSeconds, - }, - }; - } - if (!claimVal.includes(val)) { - return { - isValid: false, - reason: { message: "wrong value", expectedToInclude: val, actualValue: claimVal }, - }; - } - return { isValid: true }; - }), - }; - }, - excludes: (val, maxAgeInSeconds = this.defaultMaxAgeInSeconds, id) => { - return { - claim: this, - id: id !== null && id !== void 0 ? id : this.key, - shouldRefetch: (payload, ctx) => - this.getValueFromPayload(payload, ctx) === undefined || - // We know payload[this.id] is defined since the value is not undefined in this branch - (maxAgeInSeconds !== undefined && payload[this.key].t < Date.now() - maxAgeInSeconds * 1000), - validate: (payload, ctx) => - __awaiter(this, void 0, void 0, function* () { - const claimVal = this.getValueFromPayload(payload, ctx); - if (claimVal === undefined) { - return { - isValid: false, - reason: { - message: "value does not exist", - expectedToNotInclude: val, - actualValue: claimVal, - }, - }; - } - const ageInSeconds = (Date.now() - this.getLastRefetchTime(payload, ctx)) / 1000; - if (maxAgeInSeconds !== undefined && ageInSeconds > maxAgeInSeconds) { - return { - isValid: false, - reason: { - message: "expired", - ageInSeconds, - maxAgeInSeconds, - }, - }; - } - if (claimVal.includes(val)) { - return { - isValid: false, - reason: { - message: "wrong value", - expectedToNotInclude: val, - actualValue: claimVal, - }, - }; - } - return { isValid: true }; - }), - }; - }, - includesAll: (val, maxAgeInSeconds = this.defaultMaxAgeInSeconds, id) => { - return { - claim: this, - id: id !== null && id !== void 0 ? id : this.key, - shouldRefetch: (payload, ctx) => - this.getValueFromPayload(payload, ctx) === undefined || - // We know payload[this.id] is defined since the value is not undefined in this branch - (maxAgeInSeconds !== undefined && payload[this.key].t < Date.now() - maxAgeInSeconds * 1000), - validate: (payload, ctx) => - __awaiter(this, void 0, void 0, function* () { - const claimVal = this.getValueFromPayload(payload, ctx); - if (claimVal === undefined) { - return { - isValid: false, - reason: { - message: "value does not exist", - expectedToInclude: val, - actualValue: claimVal, - }, - }; - } - const ageInSeconds = (Date.now() - this.getLastRefetchTime(payload, ctx)) / 1000; - if (maxAgeInSeconds !== undefined && ageInSeconds > maxAgeInSeconds) { - return { - isValid: false, - reason: { - message: "expired", - ageInSeconds, - maxAgeInSeconds, - }, - }; - } - const claimSet = new Set(claimVal); - const isValid = val.every((v) => claimSet.has(v)); - return isValid - ? { isValid } - : { - isValid, - reason: { message: "wrong value", expectedToInclude: val, actualValue: claimVal }, - }; - }), - }; - }, - excludesAll: (val, maxAgeInSeconds = this.defaultMaxAgeInSeconds, id) => { - return { - claim: this, - id: id !== null && id !== void 0 ? id : this.key, - shouldRefetch: (payload, ctx) => - this.getValueFromPayload(payload, ctx) === undefined || - // We know payload[this.id] is defined since the value is not undefined in this branch - (maxAgeInSeconds !== undefined && payload[this.key].t < Date.now() - maxAgeInSeconds * 1000), - validate: (payload, ctx) => - __awaiter(this, void 0, void 0, function* () { - const claimVal = this.getValueFromPayload(payload, ctx); - if (claimVal === undefined) { - return { - isValid: false, - reason: { - message: "value does not exist", - expectedToNotInclude: val, - actualValue: claimVal, - }, - }; - } - const ageInSeconds = (Date.now() - this.getLastRefetchTime(payload, ctx)) / 1000; - if (maxAgeInSeconds !== undefined && ageInSeconds > maxAgeInSeconds) { - return { - isValid: false, - reason: { - message: "expired", - ageInSeconds, - maxAgeInSeconds, - }, - }; - } - const claimSet = new Set(claimVal); - const isValid = val.every((v) => !claimSet.has(v)); - return isValid - ? { isValid: isValid } - : { - isValid, - reason: { - message: "wrong value", - expectedToNotInclude: val, - actualValue: claimVal, - }, - }; - }), - }; - }, - }; - this.fetchValue = config.fetchValue; - this.defaultMaxAgeInSeconds = config.defaultMaxAgeInSeconds; - } - addToPayload_internal(payload, value, _userContext) { - return Object.assign(Object.assign({}, payload), { - [this.key]: { - v: value, - t: Date.now(), - }, - }); - } - removeFromPayloadByMerge_internal(payload, _userContext) { - const res = Object.assign(Object.assign({}, payload), { [this.key]: null }); - return res; - } - removeFromPayload(payload, _userContext) { - const res = Object.assign({}, payload); - delete res[this.key]; - return res; - } - getValueFromPayload(payload, _userContext) { - var _a; - return (_a = payload[this.key]) === null || _a === void 0 ? void 0 : _a.v; - } - getLastRefetchTime(payload, _userContext) { - var _a; - return (_a = payload[this.key]) === null || _a === void 0 ? void 0 : _a.t; - } -} -exports.PrimitiveArrayClaim = PrimitiveArrayClaim; diff --git a/lib/build/recipe/session/claimBaseClasses/primitiveClaim.d.ts b/lib/build/recipe/session/claimBaseClasses/primitiveClaim.d.ts deleted file mode 100644 index 48e8cbff1..000000000 --- a/lib/build/recipe/session/claimBaseClasses/primitiveClaim.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @ts-nocheck -import { JSONPrimitive } from "../../../types"; -import { SessionClaim, SessionClaimValidator } from "../types"; -export declare class PrimitiveClaim extends SessionClaim { - readonly fetchValue: (userId: string, userContext: any) => Promise | T | undefined; - readonly defaultMaxAgeInSeconds: number | undefined; - constructor(config: { key: string; fetchValue: SessionClaim["fetchValue"]; defaultMaxAgeInSeconds?: number }); - addToPayload_internal(payload: any, value: T, _userContext: any): any; - removeFromPayloadByMerge_internal(payload: any, _userContext?: any): any; - removeFromPayload(payload: any, _userContext?: any): any; - getValueFromPayload(payload: any, _userContext?: any): T | undefined; - getLastRefetchTime(payload: any, _userContext?: any): number | undefined; - validators: { - hasValue: (val: T, maxAgeInSeconds?: number | undefined, id?: string | undefined) => SessionClaimValidator; - }; -} diff --git a/lib/build/recipe/session/claimBaseClasses/primitiveClaim.js b/lib/build/recipe/session/claimBaseClasses/primitiveClaim.js deleted file mode 100644 index ff72f2b4e..000000000 --- a/lib/build/recipe/session/claimBaseClasses/primitiveClaim.js +++ /dev/null @@ -1,112 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PrimitiveClaim = void 0; -const types_1 = require("../types"); -class PrimitiveClaim extends types_1.SessionClaim { - constructor(config) { - super(config.key); - this.validators = { - hasValue: (val, maxAgeInSeconds = this.defaultMaxAgeInSeconds, id) => { - return { - claim: this, - id: id !== null && id !== void 0 ? id : this.key, - shouldRefetch: (payload, ctx) => - this.getValueFromPayload(payload, ctx) === undefined || - (maxAgeInSeconds !== undefined && // We know payload[this.id] is defined since the value is not undefined in this branch - payload[this.key].t < Date.now() - maxAgeInSeconds * 1000), - validate: (payload, ctx) => - __awaiter(this, void 0, void 0, function* () { - const claimVal = this.getValueFromPayload(payload, ctx); - if (claimVal === undefined) { - return { - isValid: false, - reason: { - message: "value does not exist", - expectedValue: val, - actualValue: claimVal, - }, - }; - } - const ageInSeconds = (Date.now() - this.getLastRefetchTime(payload, ctx)) / 1000; - if (maxAgeInSeconds !== undefined && ageInSeconds > maxAgeInSeconds) { - return { - isValid: false, - reason: { - message: "expired", - ageInSeconds, - maxAgeInSeconds, - }, - }; - } - if (claimVal !== val) { - return { - isValid: false, - reason: { message: "wrong value", expectedValue: val, actualValue: claimVal }, - }; - } - return { isValid: true }; - }), - }; - }, - }; - this.fetchValue = config.fetchValue; - this.defaultMaxAgeInSeconds = config.defaultMaxAgeInSeconds; - } - addToPayload_internal(payload, value, _userContext) { - return Object.assign(Object.assign({}, payload), { - [this.key]: { - v: value, - t: Date.now(), - }, - }); - } - removeFromPayloadByMerge_internal(payload, _userContext) { - const res = Object.assign(Object.assign({}, payload), { [this.key]: null }); - return res; - } - removeFromPayload(payload, _userContext) { - const res = Object.assign({}, payload); - delete res[this.key]; - return res; - } - getValueFromPayload(payload, _userContext) { - var _a; - return (_a = payload[this.key]) === null || _a === void 0 ? void 0 : _a.v; - } - getLastRefetchTime(payload, _userContext) { - var _a; - return (_a = payload[this.key]) === null || _a === void 0 ? void 0 : _a.t; - } -} -exports.PrimitiveClaim = PrimitiveClaim; diff --git a/lib/build/recipe/session/claims.d.ts b/lib/build/recipe/session/claims.d.ts deleted file mode 100644 index ae6b132bd..000000000 --- a/lib/build/recipe/session/claims.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -export { SessionClaim } from "./types"; -export { PrimitiveClaim } from "./claimBaseClasses/primitiveClaim"; -export { PrimitiveArrayClaim } from "./claimBaseClasses/primitiveArrayClaim"; -export { BooleanClaim } from "./claimBaseClasses/booleanClaim"; diff --git a/lib/build/recipe/session/claims.js b/lib/build/recipe/session/claims.js deleted file mode 100644 index 30fae1663..000000000 --- a/lib/build/recipe/session/claims.js +++ /dev/null @@ -1,31 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.BooleanClaim = exports.PrimitiveArrayClaim = exports.PrimitiveClaim = exports.SessionClaim = void 0; -var types_1 = require("./types"); -Object.defineProperty(exports, "SessionClaim", { - enumerable: true, - get: function () { - return types_1.SessionClaim; - }, -}); -var primitiveClaim_1 = require("./claimBaseClasses/primitiveClaim"); -Object.defineProperty(exports, "PrimitiveClaim", { - enumerable: true, - get: function () { - return primitiveClaim_1.PrimitiveClaim; - }, -}); -var primitiveArrayClaim_1 = require("./claimBaseClasses/primitiveArrayClaim"); -Object.defineProperty(exports, "PrimitiveArrayClaim", { - enumerable: true, - get: function () { - return primitiveArrayClaim_1.PrimitiveArrayClaim; - }, -}); -var booleanClaim_1 = require("./claimBaseClasses/booleanClaim"); -Object.defineProperty(exports, "BooleanClaim", { - enumerable: true, - get: function () { - return booleanClaim_1.BooleanClaim; - }, -}); diff --git a/lib/build/recipe/session/constants.d.ts b/lib/build/recipe/session/constants.d.ts deleted file mode 100644 index 77315f542..000000000 --- a/lib/build/recipe/session/constants.d.ts +++ /dev/null @@ -1,6 +0,0 @@ -// @ts-nocheck -import { TokenTransferMethod } from "./types"; -export declare const REFRESH_API_PATH = "/session/refresh"; -export declare const SIGNOUT_API_PATH = "/signout"; -export declare const availableTokenTransferMethods: TokenTransferMethod[]; -export declare const hundredYearsInMs = 3153600000000; diff --git a/lib/build/recipe/session/constants.js b/lib/build/recipe/session/constants.js deleted file mode 100644 index 06ebc6c0a..000000000 --- a/lib/build/recipe/session/constants.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.hundredYearsInMs = exports.availableTokenTransferMethods = exports.SIGNOUT_API_PATH = exports.REFRESH_API_PATH = void 0; -exports.REFRESH_API_PATH = "/session/refresh"; -exports.SIGNOUT_API_PATH = "/signout"; -exports.availableTokenTransferMethods = ["cookie", "header"]; -exports.hundredYearsInMs = 3153600000000; diff --git a/lib/build/recipe/session/cookieAndHeaders.d.ts b/lib/build/recipe/session/cookieAndHeaders.d.ts deleted file mode 100644 index 4d8feb729..000000000 --- a/lib/build/recipe/session/cookieAndHeaders.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import { TokenTransferMethod, TokenType, TypeNormalisedInput } from "./types"; -export declare function clearSessionFromAllTokenTransferMethods(config: TypeNormalisedInput, res: BaseResponse): void; -export declare function clearSession( - config: TypeNormalisedInput, - res: BaseResponse, - transferMethod: TokenTransferMethod -): void; -export declare function getAntiCsrfTokenFromHeaders(req: BaseRequest): string | undefined; -export declare function setAntiCsrfTokenInHeaders(res: BaseResponse, antiCsrfToken: string): void; -export declare function buildFrontToken(userId: string, atExpiry: number, accessTokenPayload: any): string; -export declare function setFrontTokenInHeaders(res: BaseResponse, frontToken: string): void; -export declare function getCORSAllowedHeaders(): string[]; -export declare function getToken( - req: BaseRequest, - tokenType: TokenType, - transferMethod: TokenTransferMethod -): string | undefined; -export declare function setToken( - config: TypeNormalisedInput, - res: BaseResponse, - tokenType: TokenType, - value: string, - expires: number, - transferMethod: TokenTransferMethod -): void; -export declare function setHeader(res: BaseResponse, name: string, value: string): void; -/** - * - * @param res - * @param name - * @param value - * @param domain - * @param secure - * @param httpOnly - * @param expires - * @param path - */ -export declare function setCookie( - config: TypeNormalisedInput, - res: BaseResponse, - name: string, - value: string, - expires: number, - pathType: "refreshTokenPath" | "accessTokenPath" -): void; -export declare function getAuthModeFromHeader(req: BaseRequest): string | undefined; diff --git a/lib/build/recipe/session/cookieAndHeaders.js b/lib/build/recipe/session/cookieAndHeaders.js deleted file mode 100644 index 89f7957ce..000000000 --- a/lib/build/recipe/session/cookieAndHeaders.js +++ /dev/null @@ -1,165 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getAuthModeFromHeader = exports.setCookie = exports.setHeader = exports.setToken = exports.getToken = exports.getCORSAllowedHeaders = exports.setFrontTokenInHeaders = exports.buildFrontToken = exports.setAntiCsrfTokenInHeaders = exports.getAntiCsrfTokenFromHeaders = exports.clearSession = exports.clearSessionFromAllTokenTransferMethods = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const constants_1 = require("../../constants"); -const logger_1 = require("../../logger"); -const constants_2 = require("./constants"); -const authorizationHeaderKey = "authorization"; -const accessTokenCookieKey = "sAccessToken"; -const accessTokenHeaderKey = "st-access-token"; -const refreshTokenCookieKey = "sRefreshToken"; -const refreshTokenHeaderKey = "st-refresh-token"; -const antiCsrfHeaderKey = "anti-csrf"; -const frontTokenHeaderKey = "front-token"; -const authModeHeaderKey = "st-auth-mode"; -function clearSessionFromAllTokenTransferMethods(config, res) { - // We are clearing the session in all transfermethods to be sure to override cookies in case they have been already added to the response. - // This is done to handle the following use-case: - // If the app overrides signInPOST to check the ban status of the user after the original implementation and throwing an UNAUTHORISED error - // In this case: the SDK has attached cookies to the response, but none was sent with the request - // We can't know which to clear since we can't reliably query or remove the set-cookie header added to the response (causes issues in some frameworks, i.e.: hapi) - // The safe solution in this case is to overwrite all the response cookies/headers with an empty value, which is what we are doing here - for (const transferMethod of constants_2.availableTokenTransferMethods) { - clearSession(config, res, transferMethod); - } -} -exports.clearSessionFromAllTokenTransferMethods = clearSessionFromAllTokenTransferMethods; -function clearSession(config, res, transferMethod) { - // If we can be specific about which transferMethod we want to clear, there is no reason to clear the other ones - const tokenTypes = ["access", "refresh"]; - for (const token of tokenTypes) { - setToken(config, res, token, "", 0, transferMethod); - } - res.removeHeader(antiCsrfHeaderKey); - // This can be added multiple times in some cases, but that should be OK - res.setHeader(frontTokenHeaderKey, "remove", false); - res.setHeader("Access-Control-Expose-Headers", frontTokenHeaderKey, true); -} -exports.clearSession = clearSession; -function getAntiCsrfTokenFromHeaders(req) { - return req.getHeaderValue(antiCsrfHeaderKey); -} -exports.getAntiCsrfTokenFromHeaders = getAntiCsrfTokenFromHeaders; -function setAntiCsrfTokenInHeaders(res, antiCsrfToken) { - res.setHeader(antiCsrfHeaderKey, antiCsrfToken, false); - res.setHeader("Access-Control-Expose-Headers", antiCsrfHeaderKey, true); -} -exports.setAntiCsrfTokenInHeaders = setAntiCsrfTokenInHeaders; -function buildFrontToken(userId, atExpiry, accessTokenPayload) { - const tokenInfo = { - uid: userId, - ate: atExpiry, - up: accessTokenPayload, - }; - return Buffer.from(JSON.stringify(tokenInfo)).toString("base64"); -} -exports.buildFrontToken = buildFrontToken; -function setFrontTokenInHeaders(res, frontToken) { - res.setHeader(frontTokenHeaderKey, frontToken, false); - res.setHeader("Access-Control-Expose-Headers", frontTokenHeaderKey, true); -} -exports.setFrontTokenInHeaders = setFrontTokenInHeaders; -function getCORSAllowedHeaders() { - return [antiCsrfHeaderKey, constants_1.HEADER_RID, authorizationHeaderKey, authModeHeaderKey]; -} -exports.getCORSAllowedHeaders = getCORSAllowedHeaders; -function getCookieNameFromTokenType(tokenType) { - switch (tokenType) { - case "access": - return accessTokenCookieKey; - case "refresh": - return refreshTokenCookieKey; - default: - throw new Error("Unknown token type, should never happen."); - } -} -function getResponseHeaderNameForTokenType(tokenType) { - switch (tokenType) { - case "access": - return accessTokenHeaderKey; - case "refresh": - return refreshTokenHeaderKey; - default: - throw new Error("Unknown token type, should never happen."); - } -} -function getToken(req, tokenType, transferMethod) { - if (transferMethod === "cookie") { - return req.getCookieValue(getCookieNameFromTokenType(tokenType)); - } else if (transferMethod === "header") { - const value = req.getHeaderValue(authorizationHeaderKey); - if (value === undefined || !value.startsWith("Bearer ")) { - return undefined; - } - return value.replace(/^Bearer /, "").trim(); - } else { - throw new Error("Should never happen: Unknown transferMethod: " + transferMethod); - } -} -exports.getToken = getToken; -function setToken(config, res, tokenType, value, expires, transferMethod) { - logger_1.logDebugMessage(`setToken: Setting ${tokenType} token as ${transferMethod}`); - if (transferMethod === "cookie") { - setCookie( - config, - res, - getCookieNameFromTokenType(tokenType), - value, - expires, - tokenType === "refresh" ? "refreshTokenPath" : "accessTokenPath" - ); - } else if (transferMethod === "header") { - setHeader(res, getResponseHeaderNameForTokenType(tokenType), value); - } -} -exports.setToken = setToken; -function setHeader(res, name, value) { - res.setHeader(name, value, false); - res.setHeader("Access-Control-Expose-Headers", name, true); -} -exports.setHeader = setHeader; -/** - * - * @param res - * @param name - * @param value - * @param domain - * @param secure - * @param httpOnly - * @param expires - * @param path - */ -function setCookie(config, res, name, value, expires, pathType) { - let domain = config.cookieDomain; - let secure = config.cookieSecure; - let sameSite = config.cookieSameSite; - let path = ""; - if (pathType === "refreshTokenPath") { - path = config.refreshTokenPath.getAsStringDangerous(); - } else if (pathType === "accessTokenPath") { - path = - config.accessTokenPath.getAsStringDangerous() === "" ? "/" : config.accessTokenPath.getAsStringDangerous(); - } - let httpOnly = true; - return res.setCookie(name, value, domain, secure, httpOnly, expires, path, sameSite); -} -exports.setCookie = setCookie; -function getAuthModeFromHeader(req) { - var _a; - return (_a = req.getHeaderValue(authModeHeaderKey)) === null || _a === void 0 ? void 0 : _a.toLowerCase(); -} -exports.getAuthModeFromHeader = getAuthModeFromHeader; diff --git a/lib/build/recipe/session/error.d.ts b/lib/build/recipe/session/error.d.ts deleted file mode 100644 index 9ff25e067..000000000 --- a/lib/build/recipe/session/error.d.ts +++ /dev/null @@ -1,36 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -import { ClaimValidationError } from "./types"; -export default class SessionError extends STError { - static UNAUTHORISED: "UNAUTHORISED"; - static TRY_REFRESH_TOKEN: "TRY_REFRESH_TOKEN"; - static TOKEN_THEFT_DETECTED: "TOKEN_THEFT_DETECTED"; - static INVALID_CLAIMS: "INVALID_CLAIMS"; - constructor( - options: - | { - message: string; - type: "UNAUTHORISED"; - payload?: { - clearTokens: boolean; - }; - } - | { - message: string; - type: "TRY_REFRESH_TOKEN"; - } - | { - message: string; - type: "TOKEN_THEFT_DETECTED"; - payload: { - userId: string; - sessionHandle: string; - }; - } - | { - message: string; - type: "INVALID_CLAIMS"; - payload: ClaimValidationError[]; - } - ); -} diff --git a/lib/build/recipe/session/error.js b/lib/build/recipe/session/error.js deleted file mode 100644 index 24c92ef59..000000000 --- a/lib/build/recipe/session/error.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class SessionError extends error_1.default { - constructor(options) { - super( - options.type === "UNAUTHORISED" && options.payload === undefined - ? Object.assign(Object.assign({}, options), { - payload: { - clearTokens: true, - }, - }) - : Object.assign({}, options) - ); - this.fromRecipe = "session"; - } -} -exports.default = SessionError; -SessionError.UNAUTHORISED = "UNAUTHORISED"; -SessionError.TRY_REFRESH_TOKEN = "TRY_REFRESH_TOKEN"; -SessionError.TOKEN_THEFT_DETECTED = "TOKEN_THEFT_DETECTED"; -SessionError.INVALID_CLAIMS = "INVALID_CLAIMS"; diff --git a/lib/build/recipe/session/framework/awsLambda.d.ts b/lib/build/recipe/session/framework/awsLambda.d.ts deleted file mode 100644 index 2b5f88975..000000000 --- a/lib/build/recipe/session/framework/awsLambda.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import type { Handler } from "aws-lambda"; -import { VerifySessionOptions } from ".."; -export declare function verifySession(handler: Handler, verifySessionOptions?: VerifySessionOptions): Handler; diff --git a/lib/build/recipe/session/framework/awsLambda.js b/lib/build/recipe/session/framework/awsLambda.js deleted file mode 100644 index ea8086157..000000000 --- a/lib/build/recipe/session/framework/awsLambda.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -const framework_1 = require("../../../framework/awsLambda/framework"); -const supertokens_1 = __importDefault(require("../../../supertokens")); -const recipe_1 = __importDefault(require("../recipe")); -function verifySession(handler, verifySessionOptions) { - return (event, context, callback) => - __awaiter(this, void 0, void 0, function* () { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - let request = new framework_1.AWSRequest(event); - let response = new framework_1.AWSResponse(event); - try { - let sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - event.session = yield sessionRecipe.verifySession(verifySessionOptions, request, response); - let handlerResult = yield handler(event, context, callback); - return response.sendResponse(handlerResult); - } catch (err) { - yield supertokens.errorHandler(err, request, response); - if (response.responseSet) { - return response.sendResponse({}); - } - throw err; - } - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/framework/express.d.ts b/lib/build/recipe/session/framework/express.d.ts deleted file mode 100644 index bcb0bf234..000000000 --- a/lib/build/recipe/session/framework/express.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import type { VerifySessionOptions } from ".."; -import type { SessionRequest } from "../../../framework/express/framework"; -import type { NextFunction, Response } from "express"; -export declare function verifySession( - options?: VerifySessionOptions -): (req: SessionRequest, res: Response, next: NextFunction) => Promise; diff --git a/lib/build/recipe/session/framework/express.js b/lib/build/recipe/session/framework/express.js deleted file mode 100644 index 94346e430..000000000 --- a/lib/build/recipe/session/framework/express.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("../recipe")); -const framework_1 = require("../../../framework/express/framework"); -const supertokens_1 = __importDefault(require("../../../supertokens")); -function verifySession(options) { - return (req, res, next) => - __awaiter(this, void 0, void 0, function* () { - const request = new framework_1.ExpressRequest(req); - const response = new framework_1.ExpressResponse(res); - try { - const sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - req.session = yield sessionRecipe.verifySession(options, request, response); - next(); - } catch (err) { - try { - const supertokens = supertokens_1.default.getInstanceOrThrowError(); - yield supertokens.errorHandler(err, request, response); - } catch (_a) { - next(err); - } - } - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/framework/fastify.d.ts b/lib/build/recipe/session/framework/fastify.d.ts deleted file mode 100644 index a097f307a..000000000 --- a/lib/build/recipe/session/framework/fastify.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { VerifySessionOptions } from ".."; -import { SessionRequest } from "../../../framework/fastify/framework"; -import { FastifyReply } from "fastify"; -export declare function verifySession( - options?: VerifySessionOptions -): (req: SessionRequest, res: FastifyReply) => Promise; diff --git a/lib/build/recipe/session/framework/fastify.js b/lib/build/recipe/session/framework/fastify.js deleted file mode 100644 index 2a361bb97..000000000 --- a/lib/build/recipe/session/framework/fastify.js +++ /dev/null @@ -1,72 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("../recipe")); -const framework_1 = require("../../../framework/fastify/framework"); -const supertokens_1 = __importDefault(require("../../../supertokens")); -function verifySession(options) { - return (req, res) => - __awaiter(this, void 0, void 0, function* () { - let sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - let request = new framework_1.FastifyRequest(req); - let response = new framework_1.FastifyResponse(res); - try { - req.session = yield sessionRecipe.verifySession(options, request, response); - } catch (err) { - const supertokens = supertokens_1.default.getInstanceOrThrowError(); - yield supertokens.errorHandler(err, request, response); - throw err; - } - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/framework/hapi.d.ts b/lib/build/recipe/session/framework/hapi.d.ts deleted file mode 100644 index 0181a9012..000000000 --- a/lib/build/recipe/session/framework/hapi.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { VerifySessionOptions } from ".."; -import { ResponseToolkit } from "@hapi/hapi"; -import { SessionRequest } from "../../../framework/hapi/framework"; -export declare function verifySession( - options?: VerifySessionOptions -): (req: SessionRequest, h: ResponseToolkit) => Promise; diff --git a/lib/build/recipe/session/framework/hapi.js b/lib/build/recipe/session/framework/hapi.js deleted file mode 100644 index 369f6069a..000000000 --- a/lib/build/recipe/session/framework/hapi.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("../recipe")); -const framework_1 = require("../../../framework/hapi/framework"); -function verifySession(options) { - return (req, h) => - __awaiter(this, void 0, void 0, function* () { - let sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - let request = new framework_1.HapiRequest(req); - let response = new framework_1.HapiResponse(h); - req.session = yield sessionRecipe.verifySession(options, request, response); - return h.continue; - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/framework/index.d.ts b/lib/build/recipe/session/framework/index.d.ts deleted file mode 100644 index dfba9d1f7..000000000 --- a/lib/build/recipe/session/framework/index.d.ts +++ /dev/null @@ -1,22 +0,0 @@ -// @ts-nocheck -import * as expressFramework from "./express"; -import * as fastifyFramework from "./fastify"; -import * as hapiFramework from "./hapi"; -import * as loopbackFramework from "./loopback"; -import * as koaFramework from "./koa"; -import * as awsLambdaFramework from "./awsLambda"; -declare const _default: { - express: typeof expressFramework; - fastify: typeof fastifyFramework; - hapi: typeof hapiFramework; - loopback: typeof loopbackFramework; - koa: typeof koaFramework; - awsLambda: typeof awsLambdaFramework; -}; -export default _default; -export declare let express: typeof expressFramework; -export declare let fastify: typeof fastifyFramework; -export declare let hapi: typeof hapiFramework; -export declare let loopback: typeof loopbackFramework; -export declare let koa: typeof koaFramework; -export declare let awsLambda: typeof awsLambdaFramework; diff --git a/lib/build/recipe/session/framework/index.js b/lib/build/recipe/session/framework/index.js deleted file mode 100644 index 8aa3b653e..000000000 --- a/lib/build/recipe/session/framework/index.js +++ /dev/null @@ -1,73 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.awsLambda = exports.koa = exports.loopback = exports.hapi = exports.fastify = exports.express = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const expressFramework = __importStar(require("./express")); -const fastifyFramework = __importStar(require("./fastify")); -const hapiFramework = __importStar(require("./hapi")); -const loopbackFramework = __importStar(require("./loopback")); -const koaFramework = __importStar(require("./koa")); -const awsLambdaFramework = __importStar(require("./awsLambda")); -exports.default = { - express: expressFramework, - fastify: fastifyFramework, - hapi: hapiFramework, - loopback: loopbackFramework, - koa: koaFramework, - awsLambda: awsLambdaFramework, -}; -exports.express = expressFramework; -exports.fastify = fastifyFramework; -exports.hapi = hapiFramework; -exports.loopback = loopbackFramework; -exports.koa = koaFramework; -exports.awsLambda = awsLambdaFramework; diff --git a/lib/build/recipe/session/framework/koa.d.ts b/lib/build/recipe/session/framework/koa.d.ts deleted file mode 100644 index 9e23ae80b..000000000 --- a/lib/build/recipe/session/framework/koa.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import type { VerifySessionOptions } from ".."; -import type { Next } from "koa"; -import type { SessionContext } from "../../../framework/koa/framework"; -export declare function verifySession( - options?: VerifySessionOptions -): (ctx: SessionContext, next: Next) => Promise; diff --git a/lib/build/recipe/session/framework/koa.js b/lib/build/recipe/session/framework/koa.js deleted file mode 100644 index 74b51cf3c..000000000 --- a/lib/build/recipe/session/framework/koa.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("../recipe")); -const framework_1 = require("../../../framework/koa/framework"); -function verifySession(options) { - return (ctx, next) => - __awaiter(this, void 0, void 0, function* () { - let sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - let request = new framework_1.KoaRequest(ctx); - let response = new framework_1.KoaResponse(ctx); - ctx.session = yield sessionRecipe.verifySession(options, request, response); - yield next(); - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/framework/loopback.d.ts b/lib/build/recipe/session/framework/loopback.d.ts deleted file mode 100644 index ee251753d..000000000 --- a/lib/build/recipe/session/framework/loopback.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { VerifySessionOptions } from ".."; -import { InterceptorOrKey } from "@loopback/core"; -export declare function verifySession(options?: VerifySessionOptions): InterceptorOrKey; diff --git a/lib/build/recipe/session/framework/loopback.js b/lib/build/recipe/session/framework/loopback.js deleted file mode 100644 index d43ae15d4..000000000 --- a/lib/build/recipe/session/framework/loopback.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifySession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipe_1 = __importDefault(require("../recipe")); -const framework_1 = require("../../../framework/loopback/framework"); -function verifySession(options) { - return (ctx, next) => - __awaiter(this, void 0, void 0, function* () { - let sessionRecipe = recipe_1.default.getInstanceOrThrowError(); - let middlewareCtx = yield ctx.get("middleware.http.context"); - let request = new framework_1.LoopbackRequest(middlewareCtx); - let response = new framework_1.LoopbackResponse(middlewareCtx); - middlewareCtx.session = yield sessionRecipe.verifySession(options, request, response); - return yield next(); - }); -} -exports.verifySession = verifySession; diff --git a/lib/build/recipe/session/index.d.ts b/lib/build/recipe/session/index.d.ts deleted file mode 100644 index 3b46aa1d7..000000000 --- a/lib/build/recipe/session/index.d.ts +++ /dev/null @@ -1,228 +0,0 @@ -// @ts-nocheck -import SuperTokensError from "./error"; -import { - VerifySessionOptions, - SessionContainerInterface as SessionContainer, - SessionInformation, - APIInterface, - APIOptions, - SessionClaimValidator, - SessionClaim, - ClaimValidationError, - RecipeInterface, -} from "./types"; -import Recipe from "./recipe"; -import { JSONObject } from "../../types"; -export default class SessionWrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static createNewSession( - req: any, - res: any, - userId: string, - accessTokenPayload?: any, - sessionDataInDatabase?: any, - userContext?: any - ): Promise; - static createNewSessionWithoutRequestResponse( - userId: string, - accessTokenPayload?: any, - sessionDataInDatabase?: any, - disableAntiCsrf?: boolean, - userContext?: any - ): Promise; - static validateClaimsForSessionHandle( - sessionHandle: string, - overrideGlobalClaimValidators?: ( - globalClaimValidators: SessionClaimValidator[], - sessionInfo: SessionInformation, - userContext: any - ) => Promise | SessionClaimValidator[], - userContext?: any - ): Promise< - | { - status: "SESSION_DOES_NOT_EXIST_ERROR"; - } - | { - status: "OK"; - invalidClaims: ClaimValidationError[]; - } - >; - static validateClaimsInJWTPayload( - userId: string, - jwtPayload: JSONObject, - overrideGlobalClaimValidators?: ( - globalClaimValidators: SessionClaimValidator[], - userId: string, - userContext: any - ) => Promise | SessionClaimValidator[], - userContext?: any - ): Promise<{ - status: "OK"; - invalidClaims: ClaimValidationError[]; - }>; - static getSession(req: any, res: any): Promise; - static getSession( - req: any, - res: any, - options?: VerifySessionOptions & { - sessionRequired?: true; - }, - userContext?: any - ): Promise; - static getSession( - req: any, - res: any, - options?: VerifySessionOptions & { - sessionRequired: false; - }, - userContext?: any - ): Promise; - static getSession( - req: any, - res: any, - options?: VerifySessionOptions, - userContext?: any - ): Promise; - /** - * Tries to validate an access token and build a Session object from it. - * - * Notes about anti-csrf checking: - * - if the `antiCsrf` is set to VIA_HEADER in the Session recipe config you have to handle anti-csrf checking before calling this function and set antiCsrfCheck to false in the options. - * - you can disable anti-csrf checks by setting antiCsrf to NONE in the Session recipe config. We only recommend this if you are always getting the access-token from the Authorization header. - * - if the antiCsrf check fails the returned satatus will be TRY_REFRESH_TOKEN_ERROR - * - * Results: - * OK: The session was successfully validated, including claim validation - * CLAIM_VALIDATION_ERROR: While the access token is valid, one or more claim validators have failed. Our frontend SDKs expect a 403 response the contents matching the value returned from this function. - * TRY_REFRESH_TOKEN_ERROR: This means, that the access token structure was valid, but it didn't pass validation for some reason and the user should call the refresh API. - * You can send a 401 response to trigger this behaviour if you are using our frontend SDKs - * UNAUTHORISED: This means that the access token likely doesn't belong to a SuperTokens session. If this is unexpected, it's best handled by sending a 401 response. - * - * @param accessToken The access token extracted from the authorization header or cookies - * @param antiCsrfToken The anti-csrf token extracted from the authorization header or cookies. Can be undefined if antiCsrfCheck is false - * @param options Same options objects as getSession or verifySession takes, except the `sessionRequired` prop, which is always set to true in this function - * @param userContext User context - */ - static getSessionWithoutRequestResponse(accessToken: string, antiCsrfToken?: string): Promise; - static getSessionWithoutRequestResponse( - accessToken: string, - antiCsrfToken?: string, - options?: VerifySessionOptions & { - sessionRequired?: true; - }, - userContext?: any - ): Promise; - static getSessionWithoutRequestResponse( - accessToken: string, - antiCsrfToken?: string, - options?: VerifySessionOptions & { - sessionRequired: false; - }, - userContext?: any - ): Promise; - static getSessionWithoutRequestResponse( - accessToken: string, - antiCsrfToken?: string, - options?: VerifySessionOptions, - userContext?: any - ): Promise; - static getSessionInformation(sessionHandle: string, userContext?: any): Promise; - static refreshSession(req: any, res: any, userContext?: any): Promise; - static refreshSessionWithoutRequestResponse( - refreshToken: string, - disableAntiCsrf?: boolean, - antiCsrfToken?: string, - userContext?: any - ): Promise; - static revokeAllSessionsForUser(userId: string, userContext?: any): Promise; - static getAllSessionHandlesForUser(userId: string, userContext?: any): Promise; - static revokeSession(sessionHandle: string, userContext?: any): Promise; - static revokeMultipleSessions(sessionHandles: string[], userContext?: any): Promise; - static updateSessionDataInDatabase(sessionHandle: string, newSessionData: any, userContext?: any): Promise; - static mergeIntoAccessTokenPayload( - sessionHandle: string, - accessTokenPayloadUpdate: JSONObject, - userContext?: any - ): Promise; - static createJWT( - payload?: any, - validitySeconds?: number, - useStaticSigningKey?: boolean, - userContext?: any - ): Promise< - | { - status: "OK"; - jwt: string; - } - | { - status: "UNSUPPORTED_ALGORITHM_ERROR"; - } - >; - static getJWKS( - userContext?: any - ): Promise<{ - keys: import("../jwt").JsonWebKey[]; - }>; - static getOpenIdDiscoveryConfiguration( - userContext?: any - ): Promise<{ - status: "OK"; - issuer: string; - jwks_uri: string; - }>; - static fetchAndSetClaim(sessionHandle: string, claim: SessionClaim, userContext?: any): Promise; - static setClaimValue( - sessionHandle: string, - claim: SessionClaim, - value: T, - userContext?: any - ): Promise; - static getClaimValue( - sessionHandle: string, - claim: SessionClaim, - userContext?: any - ): Promise< - | { - status: "SESSION_DOES_NOT_EXIST_ERROR"; - } - | { - status: "OK"; - value: T | undefined; - } - >; - static removeClaim(sessionHandle: string, claim: SessionClaim, userContext?: any): Promise; -} -export declare let init: typeof Recipe.init; -export declare let createNewSession: typeof SessionWrapper.createNewSession; -export declare let createNewSessionWithoutRequestResponse: typeof SessionWrapper.createNewSessionWithoutRequestResponse; -export declare let getSession: typeof SessionWrapper.getSession; -export declare let getSessionWithoutRequestResponse: typeof SessionWrapper.getSessionWithoutRequestResponse; -export declare let getSessionInformation: typeof SessionWrapper.getSessionInformation; -export declare let refreshSession: typeof SessionWrapper.refreshSession; -export declare let refreshSessionWithoutRequestResponse: typeof SessionWrapper.refreshSessionWithoutRequestResponse; -export declare let revokeAllSessionsForUser: typeof SessionWrapper.revokeAllSessionsForUser; -export declare let getAllSessionHandlesForUser: typeof SessionWrapper.getAllSessionHandlesForUser; -export declare let revokeSession: typeof SessionWrapper.revokeSession; -export declare let revokeMultipleSessions: typeof SessionWrapper.revokeMultipleSessions; -export declare let updateSessionDataInDatabase: typeof SessionWrapper.updateSessionDataInDatabase; -export declare let mergeIntoAccessTokenPayload: typeof SessionWrapper.mergeIntoAccessTokenPayload; -export declare let fetchAndSetClaim: typeof SessionWrapper.fetchAndSetClaim; -export declare let setClaimValue: typeof SessionWrapper.setClaimValue; -export declare let getClaimValue: typeof SessionWrapper.getClaimValue; -export declare let removeClaim: typeof SessionWrapper.removeClaim; -export declare let validateClaimsInJWTPayload: typeof SessionWrapper.validateClaimsInJWTPayload; -export declare let validateClaimsForSessionHandle: typeof SessionWrapper.validateClaimsForSessionHandle; -export declare let Error: typeof SuperTokensError; -export declare let createJWT: typeof SessionWrapper.createJWT; -export declare let getJWKS: typeof SessionWrapper.getJWKS; -export declare let getOpenIdDiscoveryConfiguration: typeof SessionWrapper.getOpenIdDiscoveryConfiguration; -export type { - VerifySessionOptions, - RecipeInterface, - SessionContainer, - APIInterface, - APIOptions, - SessionInformation, - SessionClaimValidator, -}; diff --git a/lib/build/recipe/session/index.js b/lib/build/recipe/session/index.js deleted file mode 100644 index cc9102494..000000000 --- a/lib/build/recipe/session/index.js +++ /dev/null @@ -1,354 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getOpenIdDiscoveryConfiguration = exports.getJWKS = exports.createJWT = exports.Error = exports.validateClaimsForSessionHandle = exports.validateClaimsInJWTPayload = exports.removeClaim = exports.getClaimValue = exports.setClaimValue = exports.fetchAndSetClaim = exports.mergeIntoAccessTokenPayload = exports.updateSessionDataInDatabase = exports.revokeMultipleSessions = exports.revokeSession = exports.getAllSessionHandlesForUser = exports.revokeAllSessionsForUser = exports.refreshSessionWithoutRequestResponse = exports.refreshSession = exports.getSessionInformation = exports.getSessionWithoutRequestResponse = exports.getSession = exports.createNewSessionWithoutRequestResponse = exports.createNewSession = exports.init = void 0; -const error_1 = __importDefault(require("./error")); -const recipe_1 = __importDefault(require("./recipe")); -const utils_1 = require("./utils"); -const sessionRequestFunctions_1 = require("./sessionRequestFunctions"); -// For Express -class SessionWrapper { - static createNewSession(req, res, userId, accessTokenPayload = {}, sessionDataInDatabase = {}, userContext = {}) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - const config = recipeInstance.config; - const appInfo = recipeInstance.getAppInfo(); - return yield sessionRequestFunctions_1.createNewSessionInRequest({ - req, - res, - userContext, - recipeInstance, - accessTokenPayload, - userId, - config, - appInfo, - sessionDataInDatabase, - }); - }); - } - static createNewSessionWithoutRequestResponse( - userId, - accessTokenPayload = {}, - sessionDataInDatabase = {}, - disableAntiCsrf = false, - userContext = {} - ) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - const claimsAddedByOtherRecipes = recipeInstance.getClaimsAddedByOtherRecipes(); - const appInfo = recipeInstance.getAppInfo(); - const issuer = appInfo.apiDomain.getAsStringDangerous() + appInfo.apiBasePath.getAsStringDangerous(); - let finalAccessTokenPayload = Object.assign(Object.assign({}, accessTokenPayload), { iss: issuer }); - for (const claim of claimsAddedByOtherRecipes) { - const update = yield claim.build(userId, userContext); - finalAccessTokenPayload = Object.assign(Object.assign({}, finalAccessTokenPayload), update); - } - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.createNewSession({ - userId, - accessTokenPayload: finalAccessTokenPayload, - sessionDataInDatabase, - disableAntiCsrf, - userContext, - }); - }); - } - static validateClaimsForSessionHandle(sessionHandle, overrideGlobalClaimValidators, userContext = {}) { - return __awaiter(this, void 0, void 0, function* () { - const recipeImpl = recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl; - const sessionInfo = yield recipeImpl.getSessionInformation({ - sessionHandle, - userContext, - }); - if (sessionInfo === undefined) { - return { - status: "SESSION_DOES_NOT_EXIST_ERROR", - }; - } - const claimValidatorsAddedByOtherRecipes = recipe_1.default - .getInstanceOrThrowError() - .getClaimValidatorsAddedByOtherRecipes(); - const globalClaimValidators = yield recipeImpl.getGlobalClaimValidators({ - userId: sessionInfo === null || sessionInfo === void 0 ? void 0 : sessionInfo.userId, - claimValidatorsAddedByOtherRecipes, - userContext, - }); - const claimValidators = - overrideGlobalClaimValidators !== undefined - ? yield overrideGlobalClaimValidators(globalClaimValidators, sessionInfo, userContext) - : globalClaimValidators; - let claimValidationResponse = yield recipeImpl.validateClaims({ - userId: sessionInfo.userId, - accessTokenPayload: sessionInfo.customClaimsInAccessTokenPayload, - claimValidators, - userContext, - }); - if (claimValidationResponse.accessTokenPayloadUpdate !== undefined) { - if ( - !(yield recipeImpl.mergeIntoAccessTokenPayload({ - sessionHandle, - accessTokenPayloadUpdate: claimValidationResponse.accessTokenPayloadUpdate, - userContext, - })) - ) { - return { - status: "SESSION_DOES_NOT_EXIST_ERROR", - }; - } - } - return { - status: "OK", - invalidClaims: claimValidationResponse.invalidClaims, - }; - }); - } - static validateClaimsInJWTPayload(userId, jwtPayload, overrideGlobalClaimValidators, userContext = {}) { - return __awaiter(this, void 0, void 0, function* () { - const recipeImpl = recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl; - const claimValidatorsAddedByOtherRecipes = recipe_1.default - .getInstanceOrThrowError() - .getClaimValidatorsAddedByOtherRecipes(); - const globalClaimValidators = yield recipeImpl.getGlobalClaimValidators({ - userId, - claimValidatorsAddedByOtherRecipes, - userContext, - }); - const claimValidators = - overrideGlobalClaimValidators !== undefined - ? yield overrideGlobalClaimValidators(globalClaimValidators, userId, userContext) - : globalClaimValidators; - return recipeImpl.validateClaimsInJWTPayload({ - userId, - jwtPayload, - claimValidators, - userContext, - }); - }); - } - static getSession(req, res, options, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - const config = recipeInstance.config; - const recipeInterfaceImpl = recipeInstance.recipeInterfaceImpl; - return sessionRequestFunctions_1.getSessionFromRequest({ - req, - res, - recipeInterfaceImpl, - config, - options, - userContext, - }); - }); - } - static getSessionWithoutRequestResponse(accessToken, antiCsrfToken, options, userContext = {}) { - return __awaiter(this, void 0, void 0, function* () { - const recipeInterfaceImpl = recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl; - const session = yield recipeInterfaceImpl.getSession({ - accessToken, - antiCsrfToken, - options, - userContext, - }); - if (session !== undefined) { - const claimValidators = yield utils_1.getRequiredClaimValidators( - session, - options === null || options === void 0 ? void 0 : options.overrideGlobalClaimValidators, - userContext - ); - yield session.assertClaims(claimValidators, userContext); - } - return session; - }); - } - static getSessionInformation(sessionHandle, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getSessionInformation({ - sessionHandle, - userContext, - }); - } - static refreshSession(req, res, userContext = {}) { - const recipeInstance = recipe_1.default.getInstanceOrThrowError(); - const config = recipeInstance.config; - const recipeInterfaceImpl = recipeInstance.recipeInterfaceImpl; - return sessionRequestFunctions_1.refreshSessionInRequest({ - res, - req, - userContext, - config, - recipeInterfaceImpl, - }); - } - static refreshSessionWithoutRequestResponse( - refreshToken, - disableAntiCsrf = false, - antiCsrfToken, - userContext = {} - ) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.refreshSession({ - refreshToken, - disableAntiCsrf, - antiCsrfToken, - userContext, - }); - } - static revokeAllSessionsForUser(userId, userContext = {}) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeAllSessionsForUser({ userId, userContext }); - } - static getAllSessionHandlesForUser(userId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getAllSessionHandlesForUser({ - userId, - userContext, - }); - } - static revokeSession(sessionHandle, userContext = {}) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeSession({ sessionHandle, userContext }); - } - static revokeMultipleSessions(sessionHandles, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.revokeMultipleSessions({ - sessionHandles, - userContext, - }); - } - static updateSessionDataInDatabase(sessionHandle, newSessionData, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.updateSessionDataInDatabase({ - sessionHandle, - newSessionData, - userContext, - }); - } - static mergeIntoAccessTokenPayload(sessionHandle, accessTokenPayloadUpdate, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.mergeIntoAccessTokenPayload({ - sessionHandle, - accessTokenPayloadUpdate, - userContext, - }); - } - static createJWT(payload, validitySeconds, useStaticSigningKey, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().openIdRecipe.recipeImplementation.createJWT({ - payload, - validitySeconds, - useStaticSigningKey, - userContext, - }); - } - static getJWKS(userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().openIdRecipe.recipeImplementation.getJWKS({ userContext }); - } - static getOpenIdDiscoveryConfiguration(userContext = {}) { - return recipe_1.default - .getInstanceOrThrowError() - .openIdRecipe.recipeImplementation.getOpenIdDiscoveryConfiguration({ - userContext, - }); - } - static fetchAndSetClaim(sessionHandle, claim, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.fetchAndSetClaim({ - sessionHandle, - claim, - userContext, - }); - } - static setClaimValue(sessionHandle, claim, value, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.setClaimValue({ - sessionHandle, - claim, - value, - userContext, - }); - } - static getClaimValue(sessionHandle, claim, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getClaimValue({ - sessionHandle, - claim, - userContext, - }); - } - static removeClaim(sessionHandle, claim, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.removeClaim({ - sessionHandle, - claim, - userContext, - }); - } -} -exports.default = SessionWrapper; -SessionWrapper.init = recipe_1.default.init; -SessionWrapper.Error = error_1.default; -exports.init = SessionWrapper.init; -exports.createNewSession = SessionWrapper.createNewSession; -exports.createNewSessionWithoutRequestResponse = SessionWrapper.createNewSessionWithoutRequestResponse; -exports.getSession = SessionWrapper.getSession; -exports.getSessionWithoutRequestResponse = SessionWrapper.getSessionWithoutRequestResponse; -exports.getSessionInformation = SessionWrapper.getSessionInformation; -exports.refreshSession = SessionWrapper.refreshSession; -exports.refreshSessionWithoutRequestResponse = SessionWrapper.refreshSessionWithoutRequestResponse; -exports.revokeAllSessionsForUser = SessionWrapper.revokeAllSessionsForUser; -exports.getAllSessionHandlesForUser = SessionWrapper.getAllSessionHandlesForUser; -exports.revokeSession = SessionWrapper.revokeSession; -exports.revokeMultipleSessions = SessionWrapper.revokeMultipleSessions; -exports.updateSessionDataInDatabase = SessionWrapper.updateSessionDataInDatabase; -exports.mergeIntoAccessTokenPayload = SessionWrapper.mergeIntoAccessTokenPayload; -exports.fetchAndSetClaim = SessionWrapper.fetchAndSetClaim; -exports.setClaimValue = SessionWrapper.setClaimValue; -exports.getClaimValue = SessionWrapper.getClaimValue; -exports.removeClaim = SessionWrapper.removeClaim; -exports.validateClaimsInJWTPayload = SessionWrapper.validateClaimsInJWTPayload; -exports.validateClaimsForSessionHandle = SessionWrapper.validateClaimsForSessionHandle; -exports.Error = SessionWrapper.Error; -// JWT Functions -exports.createJWT = SessionWrapper.createJWT; -exports.getJWKS = SessionWrapper.getJWKS; -// Open id functions -exports.getOpenIdDiscoveryConfiguration = SessionWrapper.getOpenIdDiscoveryConfiguration; diff --git a/lib/build/recipe/session/jwt.d.ts b/lib/build/recipe/session/jwt.d.ts deleted file mode 100644 index a0e848660..000000000 --- a/lib/build/recipe/session/jwt.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -export declare type ParsedJWTInfo = { - version: number; - rawTokenString: string; - rawPayload: string; - header: string; - payload: any; - signature: string; - kid: string | undefined; -}; -export declare function parseJWTWithoutSignatureVerification(jwt: string): ParsedJWTInfo; diff --git a/lib/build/recipe/session/jwt.js b/lib/build/recipe/session/jwt.js deleted file mode 100644 index e6aa04e1b..000000000 --- a/lib/build/recipe/session/jwt.js +++ /dev/null @@ -1,69 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.parseJWTWithoutSignatureVerification = void 0; -const HEADERS = new Set([ - Buffer.from( - JSON.stringify({ - alg: "RS256", - typ: "JWT", - version: "1", - }) - ).toString("base64"), - Buffer.from( - JSON.stringify({ - alg: "RS256", - typ: "JWT", - version: "2", - }) - ).toString("base64"), -]); -function parseJWTWithoutSignatureVerification(jwt) { - const splittedInput = jwt.split("."); - if (splittedInput.length !== 3) { - throw new Error("Invalid JWT"); - } - // V1&V2 is functionally identical, plus all legacy tokens should be V2 now. - let version = 2; - let kid = undefined; - // V2 or older tokens did not save the key id; - // checking header - if (!HEADERS.has(splittedInput[0])) { - const parsedHeader = JSON.parse(Buffer.from(splittedInput[0], "base64").toString()); - // We have to ensure version is a string, otherwise Number.parseInt can have unexpected results - if (typeof parsedHeader.version !== "string") { - throw new Error("JWT header mismatch"); - } - version = Number.parseInt(parsedHeader.version); - kid = parsedHeader.kid; - // Number.isInteger returns false for Number.NaN (if it fails to parse the version) - if (parsedHeader.typ !== "JWT" || !Number.isInteger(version) || version < 3 || kid === undefined) { - throw new Error("JWT header mismatch"); - } - } - return { - version, - kid, - rawTokenString: jwt, - rawPayload: splittedInput[1], - header: splittedInput[0], - // Ideally we would only parse this after the signature verification is done. - // We do this at the start, since we want to check if a token can be a supertokens access token or not - payload: JSON.parse(Buffer.from(splittedInput[1], "base64").toString()), - signature: splittedInput[2], - }; -} -exports.parseJWTWithoutSignatureVerification = parseJWTWithoutSignatureVerification; diff --git a/lib/build/recipe/session/recipe.d.ts b/lib/build/recipe/session/recipe.d.ts deleted file mode 100644 index ad5649db0..000000000 --- a/lib/build/recipe/session/recipe.d.ts +++ /dev/null @@ -1,51 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { - TypeInput, - TypeNormalisedInput, - RecipeInterface, - APIInterface, - VerifySessionOptions, - SessionClaimValidator, - SessionClaim, -} from "./types"; -import STError from "./error"; -import { NormalisedAppinfo, RecipeListFunction, APIHandled, HTTPMethod } from "../../types"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import OpenIdRecipe from "../openid/recipe"; -export default class SessionRecipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - private claimsAddedByOtherRecipes; - private claimValidatorsAddedByOtherRecipes; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - openIdRecipe: OpenIdRecipe; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): SessionRecipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - addClaimFromOtherRecipe: (claim: SessionClaim) => void; - getClaimsAddedByOtherRecipes: () => SessionClaim[]; - addClaimValidatorFromOtherRecipe: (builder: SessionClaimValidator) => void; - getClaimValidatorsAddedByOtherRecipes: () => SessionClaimValidator[]; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - path: NormalisedURLPath, - method: HTTPMethod - ) => Promise; - handleError: (err: STError, request: BaseRequest, response: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; - verifySession: ( - options: VerifySessionOptions | undefined, - request: BaseRequest, - response: BaseResponse - ) => Promise; -} diff --git a/lib/build/recipe/session/recipe.js b/lib/build/recipe/session/recipe.js deleted file mode 100644 index d098d3799..000000000 --- a/lib/build/recipe/session/recipe.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const refresh_1 = __importDefault(require("./api/refresh")); -const signout_1 = __importDefault(require("./api/signout")); -const constants_1 = require("./constants"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const cookieAndHeaders_1 = require("./cookieAndHeaders"); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const querier_1 = require("../../querier"); -const implementation_1 = __importDefault(require("./api/implementation")); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const recipe_1 = __importDefault(require("../openid/recipe")); -const logger_1 = require("../../logger"); -const utils_2 = require("../../utils"); -// For Express -class SessionRecipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - this.claimsAddedByOtherRecipes = []; - this.claimValidatorsAddedByOtherRecipes = []; - this.addClaimFromOtherRecipe = (claim) => { - // We are throwing here (and not in addClaimValidatorFromOtherRecipe) because if multiple - // claims are added with the same key they will overwrite each other. Validators will all run - // and work as expected even if they are added multiple times. - if (this.claimsAddedByOtherRecipes.some((c) => c.key === claim.key)) { - throw new Error("Claim added by multiple recipes"); - } - this.claimsAddedByOtherRecipes.push(claim); - }; - this.getClaimsAddedByOtherRecipes = () => { - return this.claimsAddedByOtherRecipes; - }; - this.addClaimValidatorFromOtherRecipe = (builder) => { - this.claimValidatorsAddedByOtherRecipes.push(builder); - }; - this.getClaimValidatorsAddedByOtherRecipes = () => { - return this.claimValidatorsAddedByOtherRecipes; - }; - // abstract instance functions below............... - this.getAPIsHandled = () => { - let apisHandled = [ - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.REFRESH_API_PATH), - id: constants_1.REFRESH_API_PATH, - disabled: this.apiImpl.refreshPOST === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.SIGNOUT_API_PATH), - id: constants_1.SIGNOUT_API_PATH, - disabled: this.apiImpl.signOutPOST === undefined, - }, - ]; - apisHandled.push(...this.openIdRecipe.getAPIsHandled()); - return apisHandled; - }; - this.handleAPIRequest = (id, req, res, path, method) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - req, - res, - }; - if (id === constants_1.REFRESH_API_PATH) { - return yield refresh_1.default(this.apiImpl, options); - } else if (id === constants_1.SIGNOUT_API_PATH) { - return yield signout_1.default(this.apiImpl, options); - } else { - return yield this.openIdRecipe.handleAPIRequest(id, req, res, path, method); - } - }); - this.handleError = (err, request, response) => - __awaiter(this, void 0, void 0, function* () { - if (err.fromRecipe === SessionRecipe.RECIPE_ID) { - if (err.type === error_1.default.UNAUTHORISED) { - logger_1.logDebugMessage("errorHandler: returning UNAUTHORISED"); - if ( - err.payload === undefined || - err.payload.clearTokens === undefined || - err.payload.clearTokens === true - ) { - logger_1.logDebugMessage("errorHandler: Clearing tokens because of UNAUTHORISED response"); - cookieAndHeaders_1.clearSessionFromAllTokenTransferMethods(this.config, response); - } - return yield this.config.errorHandlers.onUnauthorised(err.message, request, response); - } else if (err.type === error_1.default.TRY_REFRESH_TOKEN) { - logger_1.logDebugMessage("errorHandler: returning TRY_REFRESH_TOKEN"); - return yield this.config.errorHandlers.onTryRefreshToken(err.message, request, response); - } else if (err.type === error_1.default.TOKEN_THEFT_DETECTED) { - logger_1.logDebugMessage("errorHandler: returning TOKEN_THEFT_DETECTED"); - logger_1.logDebugMessage( - "errorHandler: Clearing tokens because of TOKEN_THEFT_DETECTED response" - ); - cookieAndHeaders_1.clearSessionFromAllTokenTransferMethods(this.config, response); - return yield this.config.errorHandlers.onTokenTheftDetected( - err.payload.sessionHandle, - err.payload.userId, - request, - response - ); - } else if (err.type === error_1.default.INVALID_CLAIMS) { - return yield this.config.errorHandlers.onInvalidClaim(err.payload, request, response); - } else { - throw err; - } - } else { - return yield this.openIdRecipe.handleError(err, request, response); - } - }); - this.getAllCORSHeaders = () => { - let corsHeaders = [...cookieAndHeaders_1.getCORSAllowedHeaders()]; - corsHeaders.push(...this.openIdRecipe.getAllCORSHeaders()); - return corsHeaders; - }; - this.isErrorFromThisRecipe = (err) => { - return ( - error_1.default.isErrorFromSuperTokens(err) && - (err.fromRecipe === SessionRecipe.RECIPE_ID || this.openIdRecipe.isErrorFromThisRecipe(err)) - ); - }; - this.verifySession = (options, request, response) => - __awaiter(this, void 0, void 0, function* () { - return yield this.apiImpl.verifySession({ - verifySessionOptions: options, - options: { - config: this.config, - req: request, - res: response, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - }, - userContext: utils_2.makeDefaultUserContextFromAPI(request), - }); - }); - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - logger_1.logDebugMessage("session init: antiCsrf: " + this.config.antiCsrf); - logger_1.logDebugMessage("session init: cookieDomain: " + this.config.cookieDomain); - logger_1.logDebugMessage("session init: cookieSameSite: " + this.config.cookieSameSite); - logger_1.logDebugMessage("session init: cookieSecure: " + this.config.cookieSecure); - logger_1.logDebugMessage( - "session init: refreshTokenPath: " + this.config.refreshTokenPath.getAsStringDangerous() - ); - logger_1.logDebugMessage("session init: sessionExpiredStatusCode: " + this.config.sessionExpiredStatusCode); - this.isInServerlessEnv = isInServerlessEnv; - this.openIdRecipe = new recipe_1.default(recipeId, appInfo, isInServerlessEnv, { - override: this.config.override.openIdFeature, - }); - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default( - querier_1.Querier.getNewInstanceOrThrowError(recipeId), - this.config, - this.getAppInfo(), - () => this.recipeInterfaceImpl - ) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - } - static getInstanceOrThrowError() { - if (SessionRecipe.instance !== undefined) { - return SessionRecipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (SessionRecipe.instance === undefined) { - SessionRecipe.instance = new SessionRecipe(SessionRecipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return SessionRecipe.instance; - } else { - throw new Error("Session recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - SessionRecipe.instance = undefined; - } -} -exports.default = SessionRecipe; -SessionRecipe.instance = undefined; -SessionRecipe.RECIPE_ID = "session"; diff --git a/lib/build/recipe/session/recipeImplementation.d.ts b/lib/build/recipe/session/recipeImplementation.d.ts deleted file mode 100644 index 5af8072a1..000000000 --- a/lib/build/recipe/session/recipeImplementation.d.ts +++ /dev/null @@ -1,20 +0,0 @@ -// @ts-nocheck -import { JWTVerifyGetKey } from "jose"; -import { RecipeInterface, TypeNormalisedInput } from "./types"; -import { Querier } from "../../querier"; -import { NormalisedAppinfo } from "../../types"; -export declare type Helpers = { - querier: Querier; - JWKS: JWTVerifyGetKey; - config: TypeNormalisedInput; - appInfo: NormalisedAppinfo; - getRecipeImpl: () => RecipeInterface; -}; -export declare const JWKCacheMaxAgeInMs = 60000; -export declare const protectedProps: string[]; -export default function getRecipeInterface( - querier: Querier, - config: TypeNormalisedInput, - appInfo: NormalisedAppinfo, - getRecipeImplAfterOverrides: () => RecipeInterface -): RecipeInterface; diff --git a/lib/build/recipe/session/recipeImplementation.js b/lib/build/recipe/session/recipeImplementation.js deleted file mode 100644 index 9f443eb49..000000000 --- a/lib/build/recipe/session/recipeImplementation.js +++ /dev/null @@ -1,456 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.protectedProps = exports.JWKCacheMaxAgeInMs = void 0; -const jose_1 = require("jose"); -const SessionFunctions = __importStar(require("./sessionFunctions")); -const cookieAndHeaders_1 = require("./cookieAndHeaders"); -const utils_1 = require("./utils"); -const sessionClass_1 = __importDefault(require("./sessionClass")); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const logger_1 = require("../../logger"); -const jwt_1 = require("./jwt"); -const accessToken_1 = require("./accessToken"); -const error_1 = __importDefault(require("./error")); -exports.JWKCacheMaxAgeInMs = 60000; -exports.protectedProps = [ - "sub", - "iat", - "exp", - "sessionHandle", - "parentRefreshTokenHash1", - "refreshTokenHash1", - "antiCsrfToken", -]; -function getRecipeInterface(querier, config, appInfo, getRecipeImplAfterOverrides) { - const JWKS = querier.getAllCoreUrlsForPath("/.well-known/jwks.json").map((url) => - jose_1.createRemoteJWKSet(new URL(url), { - cooldownDuration: 500, - cacheMaxAge: exports.JWKCacheMaxAgeInMs, - }) - ); - /** - This function fetches all JWKs from the first available core instance. This combines the other JWKS functions to become - error resistant. - - Every core instance a backend is connected to is expected to connect to the same database and use the same key set for - token verification. Otherwise, the result of session verification would depend on which core is currently available. - */ - const combinedJWKS = (...args) => - __awaiter(this, void 0, void 0, function* () { - let lastError = undefined; - if (JWKS.length === 0) { - throw Error( - "No SuperTokens core available to query. Please pass supertokens > connectionURI to the init function, or override all the functions of the recipe you are using." - ); - } - for (const jwks of JWKS) { - try { - // We await before returning to make sure we catch the error - return yield jwks(...args); - } catch (ex) { - lastError = ex; - } - } - throw lastError; - }); - let obj = { - createNewSession: function ({ userId, accessTokenPayload = {}, sessionDataInDatabase = {}, disableAntiCsrf }) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("createNewSession: Started"); - let response = yield SessionFunctions.createNewSession( - helpers, - userId, - disableAntiCsrf === true, - accessTokenPayload, - sessionDataInDatabase - ); - logger_1.logDebugMessage("createNewSession: Finished"); - const payload = jwt_1.parseJWTWithoutSignatureVerification(response.accessToken.token).payload; - return new sessionClass_1.default( - helpers, - response.accessToken.token, - cookieAndHeaders_1.buildFrontToken(response.session.userId, response.accessToken.expiry, payload), - response.refreshToken, - response.antiCsrfToken, - response.session.handle, - response.session.userId, - payload, - undefined, - true - ); - }); - }, - getGlobalClaimValidators: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return input.claimValidatorsAddedByOtherRecipes; - }); - }, - getSession: function ({ accessToken: accessTokenString, antiCsrfToken, options }) { - return __awaiter(this, void 0, void 0, function* () { - if ( - (options === null || options === void 0 ? void 0 : options.antiCsrfCheck) !== false && - config.antiCsrf === "VIA_CUSTOM_HEADER" - ) { - throw new Error( - "Since the anti-csrf mode is VIA_CUSTOM_HEADER getSession can't check the CSRF token. Please either use VIA_TOKEN or set antiCsrfCheck to false" - ); - } - logger_1.logDebugMessage("getSession: Started"); - if (accessTokenString === undefined) { - if ((options === null || options === void 0 ? void 0 : options.sessionRequired) === false) { - logger_1.logDebugMessage( - "getSession: returning undefined because accessToken is undefined and sessionRequired is false" - ); - // there is no session that exists here, and the user wants session verification - // to be optional. So we return undefined. - return undefined; - } - logger_1.logDebugMessage("getSession: UNAUTHORISED because accessToken in request is undefined"); - throw new error_1.default({ - message: - "Session does not exist. Are you sending the session tokens in the request with the appropriate token transfer method?", - type: error_1.default.UNAUTHORISED, - payload: { - // we do not clear the session here because of a - // race condition mentioned here: https://github.com/supertokens/supertokens-node/issues/17 - clearTokens: false, - }, - }); - } - let accessToken; - try { - accessToken = jwt_1.parseJWTWithoutSignatureVerification(accessTokenString); - accessToken_1.validateAccessTokenStructure(accessToken.payload, accessToken.version); - } catch (error) { - if ((options === null || options === void 0 ? void 0 : options.sessionRequired) === false) { - logger_1.logDebugMessage( - "getSession: Returning undefined because parsing failed and sessionRequired is false" - ); - return undefined; - } - throw new error_1.default({ - message: "Token parsing failed", - type: "UNAUTHORISED", - payload: { clearTokens: false }, - }); - } - const response = yield SessionFunctions.getSession( - helpers, - accessToken, - antiCsrfToken, - (options === null || options === void 0 ? void 0 : options.antiCsrfCheck) !== false, - (options === null || options === void 0 ? void 0 : options.checkDatabase) === true - ); - logger_1.logDebugMessage("getSession: Success!"); - const payload = - accessToken.version >= 3 - ? response.accessToken !== undefined - ? jwt_1.parseJWTWithoutSignatureVerification(response.accessToken.token).payload - : accessToken.payload - : response.session.userDataInJWT; - const session = new sessionClass_1.default( - helpers, - response.accessToken !== undefined ? response.accessToken.token : accessTokenString, - cookieAndHeaders_1.buildFrontToken( - response.session.userId, - response.accessToken !== undefined ? response.accessToken.expiry : response.session.expiryTime, - payload - ), - undefined, // refresh - antiCsrfToken, - response.session.handle, - response.session.userId, - payload, - undefined, - response.accessToken !== undefined - ); - return session; - }); - }, - validateClaims: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let accessTokenPayload = input.accessTokenPayload; - let accessTokenPayloadUpdate = undefined; - const origSessionClaimPayloadJSON = JSON.stringify(accessTokenPayload); - for (const validator of input.claimValidators) { - logger_1.logDebugMessage( - "updateClaimsInPayloadIfNeeded checking shouldRefetch for " + validator.id - ); - if ( - "claim" in validator && - (yield validator.shouldRefetch(accessTokenPayload, input.userContext)) - ) { - logger_1.logDebugMessage("updateClaimsInPayloadIfNeeded refetching " + validator.id); - const value = yield validator.claim.fetchValue(input.userId, input.userContext); - logger_1.logDebugMessage( - "updateClaimsInPayloadIfNeeded " + validator.id + " refetch result " + JSON.stringify(value) - ); - if (value !== undefined) { - accessTokenPayload = validator.claim.addToPayload_internal( - accessTokenPayload, - value, - input.userContext - ); - } - } - } - if (JSON.stringify(accessTokenPayload) !== origSessionClaimPayloadJSON) { - accessTokenPayloadUpdate = accessTokenPayload; - } - const invalidClaims = yield utils_1.validateClaimsInPayload( - input.claimValidators, - accessTokenPayload, - input.userContext - ); - return { - invalidClaims, - accessTokenPayloadUpdate, - }; - }); - }, - validateClaimsInJWTPayload: function (input) { - return __awaiter(this, void 0, void 0, function* () { - // We skip refetching here, because we have no way of updating the JWT payload here - // if we have access to the entire session other methods can be used to do validation while updating - const invalidClaims = yield utils_1.validateClaimsInPayload( - input.claimValidators, - input.jwtPayload, - input.userContext - ); - return { - status: "OK", - invalidClaims, - }; - }); - }, - getSessionInformation: function ({ sessionHandle }) { - return __awaiter(this, void 0, void 0, function* () { - return SessionFunctions.getSessionInformation(helpers, sessionHandle); - }); - }, - refreshSession: function ({ refreshToken, antiCsrfToken, disableAntiCsrf }) { - return __awaiter(this, void 0, void 0, function* () { - if (disableAntiCsrf !== true && config.antiCsrf === "VIA_CUSTOM_HEADER") { - throw new Error( - "Since the anti-csrf mode is VIA_CUSTOM_HEADER getSession can't check the CSRF token. Please either use VIA_TOKEN or set antiCsrfCheck to false" - ); - } - logger_1.logDebugMessage("refreshSession: Started"); - const response = yield SessionFunctions.refreshSession( - helpers, - refreshToken, - antiCsrfToken, - disableAntiCsrf - ); - logger_1.logDebugMessage("refreshSession: Success!"); - const payload = jwt_1.parseJWTWithoutSignatureVerification(response.accessToken.token).payload; - return new sessionClass_1.default( - helpers, - response.accessToken.token, - cookieAndHeaders_1.buildFrontToken(response.session.userId, response.accessToken.expiry, payload), - response.refreshToken, - response.antiCsrfToken, - response.session.handle, - response.session.userId, - payload, - undefined, - true - ); - }); - }, - regenerateAccessToken: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let newAccessTokenPayload = - input.newAccessTokenPayload === null || input.newAccessTokenPayload === undefined - ? {} - : input.newAccessTokenPayload; - let response = yield querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/regenerate"), - { - accessToken: input.accessToken, - userDataInJWT: newAccessTokenPayload, - } - ); - if (response.status === "UNAUTHORISED") { - return undefined; - } - return response; - }); - }, - revokeAllSessionsForUser: function ({ userId }) { - return SessionFunctions.revokeAllSessionsForUser(helpers, userId); - }, - getAllSessionHandlesForUser: function ({ userId }) { - return SessionFunctions.getAllSessionHandlesForUser(helpers, userId); - }, - revokeSession: function ({ sessionHandle }) { - return SessionFunctions.revokeSession(helpers, sessionHandle); - }, - revokeMultipleSessions: function ({ sessionHandles }) { - return SessionFunctions.revokeMultipleSessions(helpers, sessionHandles); - }, - updateSessionDataInDatabase: function ({ sessionHandle, newSessionData }) { - return SessionFunctions.updateSessionDataInDatabase(helpers, sessionHandle, newSessionData); - }, - mergeIntoAccessTokenPayload: function ({ sessionHandle, accessTokenPayloadUpdate, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - const sessionInfo = yield this.getSessionInformation({ sessionHandle, userContext }); - if (sessionInfo === undefined) { - return false; - } - let newAccessTokenPayload = Object.assign({}, sessionInfo.customClaimsInAccessTokenPayload); - for (const key of exports.protectedProps) { - delete newAccessTokenPayload[key]; - } - newAccessTokenPayload = Object.assign( - Object.assign({}, newAccessTokenPayload), - accessTokenPayloadUpdate - ); - for (const key of Object.keys(accessTokenPayloadUpdate)) { - if (accessTokenPayloadUpdate[key] === null) { - delete newAccessTokenPayload[key]; - } - } - return SessionFunctions.updateAccessTokenPayload(helpers, sessionHandle, newAccessTokenPayload); - }); - }, - fetchAndSetClaim: function (input) { - return __awaiter(this, void 0, void 0, function* () { - const sessionInfo = yield this.getSessionInformation({ - sessionHandle: input.sessionHandle, - userContext: input.userContext, - }); - if (sessionInfo === undefined) { - return false; - } - const accessTokenPayloadUpdate = yield input.claim.build(sessionInfo.userId, input.userContext); - return this.mergeIntoAccessTokenPayload({ - sessionHandle: input.sessionHandle, - accessTokenPayloadUpdate, - userContext: input.userContext, - }); - }); - }, - setClaimValue: function (input) { - const accessTokenPayloadUpdate = input.claim.addToPayload_internal({}, input.value, input.userContext); - return this.mergeIntoAccessTokenPayload({ - sessionHandle: input.sessionHandle, - accessTokenPayloadUpdate, - userContext: input.userContext, - }); - }, - getClaimValue: function (input) { - return __awaiter(this, void 0, void 0, function* () { - const sessionInfo = yield this.getSessionInformation({ - sessionHandle: input.sessionHandle, - userContext: input.userContext, - }); - if (sessionInfo === undefined) { - return { - status: "SESSION_DOES_NOT_EXIST_ERROR", - }; - } - return { - status: "OK", - value: input.claim.getValueFromPayload( - sessionInfo.customClaimsInAccessTokenPayload, - input.userContext - ), - }; - }); - }, - removeClaim: function (input) { - const accessTokenPayloadUpdate = input.claim.removeFromPayloadByMerge_internal({}, input.userContext); - return this.mergeIntoAccessTokenPayload({ - sessionHandle: input.sessionHandle, - accessTokenPayloadUpdate, - userContext: input.userContext, - }); - }, - }; - let helpers = { - querier, - JWKS: combinedJWKS, - config, - appInfo, - getRecipeImpl: getRecipeImplAfterOverrides, - }; - if (process.env.TEST_MODE === "testing") { - // testing mode, we add some of the help functions to the obj - obj.helpers = helpers; - } - return obj; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/session/sessionClass.d.ts b/lib/build/recipe/session/sessionClass.d.ts deleted file mode 100644 index 5cad6a1cb..000000000 --- a/lib/build/recipe/session/sessionClass.d.ts +++ /dev/null @@ -1,50 +0,0 @@ -// @ts-nocheck -import { SessionClaim, SessionClaimValidator, SessionContainerInterface, ReqResInfo, TokenInfo } from "./types"; -import { Helpers } from "./recipeImplementation"; -export default class Session implements SessionContainerInterface { - protected helpers: Helpers; - protected accessToken: string; - protected frontToken: string; - protected refreshToken: TokenInfo | undefined; - protected antiCsrfToken: string | undefined; - protected sessionHandle: string; - protected userId: string; - protected userDataInAccessToken: any; - protected reqResInfo: ReqResInfo | undefined; - protected accessTokenUpdated: boolean; - constructor( - helpers: Helpers, - accessToken: string, - frontToken: string, - refreshToken: TokenInfo | undefined, - antiCsrfToken: string | undefined, - sessionHandle: string, - userId: string, - userDataInAccessToken: any, - reqResInfo: ReqResInfo | undefined, - accessTokenUpdated: boolean - ); - revokeSession(userContext?: any): Promise; - getSessionDataFromDatabase(userContext?: any): Promise; - updateSessionDataInDatabase(newSessionData: any, userContext?: any): Promise; - getUserId(_userContext?: any): string; - getAccessTokenPayload(_userContext?: any): any; - getHandle(): string; - getAccessToken(): string; - getAllSessionTokensDangerously(): { - accessToken: string; - accessAndFrontTokenUpdated: boolean; - refreshToken: string | undefined; - frontToken: string; - antiCsrfToken: string | undefined; - }; - mergeIntoAccessTokenPayload(accessTokenPayloadUpdate: any, userContext?: any): Promise; - getTimeCreated(userContext?: any): Promise; - getExpiry(userContext?: any): Promise; - assertClaims(claimValidators: SessionClaimValidator[], userContext?: any): Promise; - fetchAndSetClaim(claim: SessionClaim, userContext?: any): Promise; - setClaimValue(claim: SessionClaim, value: T, userContext?: any): Promise; - getClaimValue(claim: SessionClaim, userContext?: any): Promise; - removeClaim(claim: SessionClaim, userContext?: any): Promise; - attachToRequestResponse(info: ReqResInfo): void; -} diff --git a/lib/build/recipe/session/sessionClass.js b/lib/build/recipe/session/sessionClass.js deleted file mode 100644 index e7267bf9c..000000000 --- a/lib/build/recipe/session/sessionClass.js +++ /dev/null @@ -1,312 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const cookieAndHeaders_1 = require("./cookieAndHeaders"); -const error_1 = __importDefault(require("./error")); -const recipeImplementation_1 = require("./recipeImplementation"); -const utils_1 = require("./utils"); -const jwt_1 = require("./jwt"); -class Session { - constructor( - helpers, - accessToken, - frontToken, - refreshToken, - antiCsrfToken, - sessionHandle, - userId, - userDataInAccessToken, - reqResInfo, - accessTokenUpdated - ) { - this.helpers = helpers; - this.accessToken = accessToken; - this.frontToken = frontToken; - this.refreshToken = refreshToken; - this.antiCsrfToken = antiCsrfToken; - this.sessionHandle = sessionHandle; - this.userId = userId; - this.userDataInAccessToken = userDataInAccessToken; - this.reqResInfo = reqResInfo; - this.accessTokenUpdated = accessTokenUpdated; - } - revokeSession(userContext) { - return __awaiter(this, void 0, void 0, function* () { - yield this.helpers.getRecipeImpl().revokeSession({ - sessionHandle: this.sessionHandle, - userContext: userContext === undefined ? {} : userContext, - }); - if (this.reqResInfo !== undefined) { - // we do not check the output of calling revokeSession - // before clearing the cookies because we are revoking the - // current API request's session. - // If we instead clear the cookies only when revokeSession - // returns true, it can cause this kind of a bug: - // https://github.com/supertokens/supertokens-node/issues/343 - cookieAndHeaders_1.clearSession( - this.helpers.config, - this.reqResInfo.res, - this.reqResInfo.transferMethod - ); - } - }); - } - getSessionDataFromDatabase(userContext) { - return __awaiter(this, void 0, void 0, function* () { - let sessionInfo = yield this.helpers.getRecipeImpl().getSessionInformation({ - sessionHandle: this.sessionHandle, - userContext: userContext === undefined ? {} : userContext, - }); - if (sessionInfo === undefined) { - throw new error_1.default({ - message: "Session does not exist anymore", - type: error_1.default.UNAUTHORISED, - }); - } - return sessionInfo.sessionDataInDatabase; - }); - } - updateSessionDataInDatabase(newSessionData, userContext) { - return __awaiter(this, void 0, void 0, function* () { - if ( - !(yield this.helpers.getRecipeImpl().updateSessionDataInDatabase({ - sessionHandle: this.sessionHandle, - newSessionData, - userContext: userContext === undefined ? {} : userContext, - })) - ) { - throw new error_1.default({ - message: "Session does not exist anymore", - type: error_1.default.UNAUTHORISED, - }); - } - }); - } - getUserId(_userContext) { - return this.userId; - } - getAccessTokenPayload(_userContext) { - return this.userDataInAccessToken; - } - getHandle() { - return this.sessionHandle; - } - getAccessToken() { - return this.accessToken; - } - getAllSessionTokensDangerously() { - var _a; - return { - accessToken: this.accessToken, - accessAndFrontTokenUpdated: this.accessTokenUpdated, - refreshToken: (_a = this.refreshToken) === null || _a === void 0 ? void 0 : _a.token, - frontToken: this.frontToken, - antiCsrfToken: this.antiCsrfToken, - }; - } - // Any update to this function should also be reflected in the respective JWT version - mergeIntoAccessTokenPayload(accessTokenPayloadUpdate, userContext) { - return __awaiter(this, void 0, void 0, function* () { - let newAccessTokenPayload = Object.assign({}, this.getAccessTokenPayload(userContext)); - for (const key of recipeImplementation_1.protectedProps) { - delete newAccessTokenPayload[key]; - } - newAccessTokenPayload = Object.assign(Object.assign({}, newAccessTokenPayload), accessTokenPayloadUpdate); - for (const key of Object.keys(accessTokenPayloadUpdate)) { - if (accessTokenPayloadUpdate[key] === null) { - delete newAccessTokenPayload[key]; - } - } - let response = yield this.helpers.getRecipeImpl().regenerateAccessToken({ - accessToken: this.getAccessToken(), - newAccessTokenPayload, - userContext: userContext === undefined ? {} : userContext, - }); - if (response === undefined) { - throw new error_1.default({ - message: "Session does not exist anymore", - type: error_1.default.UNAUTHORISED, - }); - } - if (response.accessToken !== undefined) { - const respToken = jwt_1.parseJWTWithoutSignatureVerification(response.accessToken.token); - const payload = respToken.version < 3 ? response.session.userDataInJWT : respToken.payload; - this.userDataInAccessToken = payload; - this.accessToken = response.accessToken.token; - this.frontToken = cookieAndHeaders_1.buildFrontToken(this.userId, response.accessToken.expiry, payload); - this.accessTokenUpdated = true; - if (this.reqResInfo !== undefined) { - // We need to cast to let TS know that the accessToken in the response is defined (and we don't overwrite it with undefined) - utils_1.setAccessTokenInResponse( - this.reqResInfo.res, - this.accessToken, - this.frontToken, - this.helpers.config, - this.reqResInfo.transferMethod - ); - } - } else { - // This case means that the access token has expired between the validation and this update - // We can't update the access token on the FE, as it will need to call refresh anyway but we handle this as a successful update during this request. - // the changes will be reflected on the FE after refresh is called - this.userDataInAccessToken = Object.assign( - Object.assign({}, this.getAccessTokenPayload()), - response.session.userDataInJWT - ); - } - }); - } - getTimeCreated(userContext) { - return __awaiter(this, void 0, void 0, function* () { - let sessionInfo = yield this.helpers.getRecipeImpl().getSessionInformation({ - sessionHandle: this.sessionHandle, - userContext: userContext === undefined ? {} : userContext, - }); - if (sessionInfo === undefined) { - throw new error_1.default({ - message: "Session does not exist anymore", - type: error_1.default.UNAUTHORISED, - }); - } - return sessionInfo.timeCreated; - }); - } - getExpiry(userContext) { - return __awaiter(this, void 0, void 0, function* () { - let sessionInfo = yield this.helpers.getRecipeImpl().getSessionInformation({ - sessionHandle: this.sessionHandle, - userContext: userContext === undefined ? {} : userContext, - }); - if (sessionInfo === undefined) { - throw new error_1.default({ - message: "Session does not exist anymore", - type: error_1.default.UNAUTHORISED, - }); - } - return sessionInfo.expiry; - }); - } - // Any update to this function should also be reflected in the respective JWT version - assertClaims(claimValidators, userContext) { - return __awaiter(this, void 0, void 0, function* () { - let validateClaimResponse = yield this.helpers.getRecipeImpl().validateClaims({ - accessTokenPayload: this.getAccessTokenPayload(userContext), - userId: this.getUserId(userContext), - claimValidators, - userContext, - }); - if (validateClaimResponse.accessTokenPayloadUpdate !== undefined) { - for (const key of recipeImplementation_1.protectedProps) { - delete validateClaimResponse.accessTokenPayloadUpdate[key]; - } - yield this.mergeIntoAccessTokenPayload(validateClaimResponse.accessTokenPayloadUpdate, userContext); - } - if (validateClaimResponse.invalidClaims.length !== 0) { - throw new error_1.default({ - type: "INVALID_CLAIMS", - message: "INVALID_CLAIMS", - payload: validateClaimResponse.invalidClaims, - }); - } - }); - } - // Any update to this function should also be reflected in the respective JWT version - fetchAndSetClaim(claim, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const update = yield claim.build(this.getUserId(userContext), userContext); - return this.mergeIntoAccessTokenPayload(update, userContext); - }); - } - // Any update to this function should also be reflected in the respective JWT version - setClaimValue(claim, value, userContext) { - const update = claim.addToPayload_internal({}, value, userContext); - return this.mergeIntoAccessTokenPayload(update, userContext); - } - // Any update to this function should also be reflected in the respective JWT version - getClaimValue(claim, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return claim.getValueFromPayload(yield this.getAccessTokenPayload(userContext), userContext); - }); - } - // Any update to this function should also be reflected in the respective JWT version - removeClaim(claim, userContext) { - const update = claim.removeFromPayloadByMerge_internal({}, userContext); - return this.mergeIntoAccessTokenPayload(update, userContext); - } - attachToRequestResponse(info) { - this.reqResInfo = info; - if (this.accessTokenUpdated) { - const { res, transferMethod } = info; - utils_1.setAccessTokenInResponse( - res, - this.accessToken, - this.frontToken, - this.helpers.config, - transferMethod - ); - if (this.refreshToken !== undefined) { - cookieAndHeaders_1.setToken( - this.helpers.config, - res, - "refresh", - this.refreshToken.token, - this.refreshToken.expiry, - transferMethod - ); - } - if (this.antiCsrfToken !== undefined) { - cookieAndHeaders_1.setAntiCsrfTokenInHeaders(res, this.antiCsrfToken); - } - } - } -} -exports.default = Session; diff --git a/lib/build/recipe/session/sessionFunctions.d.ts b/lib/build/recipe/session/sessionFunctions.d.ts deleted file mode 100644 index b8210f10e..000000000 --- a/lib/build/recipe/session/sessionFunctions.d.ts +++ /dev/null @@ -1,86 +0,0 @@ -// @ts-nocheck -import { ParsedJWTInfo } from "./jwt"; -import { CreateOrRefreshAPIResponse, SessionInformation } from "./types"; -import { Helpers } from "./recipeImplementation"; -/** - * @description call this to "login" a user. - */ -export declare function createNewSession( - helpers: Helpers, - userId: string, - disableAntiCsrf: boolean, - accessTokenPayload?: any, - sessionDataInDatabase?: any -): Promise; -/** - * @description authenticates a session. To be used in APIs that require authentication - */ -export declare function getSession( - helpers: Helpers, - parsedAccessToken: ParsedJWTInfo, - antiCsrfToken: string | undefined, - doAntiCsrfCheck: boolean, - alwaysCheckCore: boolean -): Promise<{ - session: { - handle: string; - userId: string; - userDataInJWT: any; - expiryTime: number; - }; - accessToken?: { - token: string; - expiry: number; - createdTime: number; - }; -}>; -/** - * @description Retrieves session information from storage for a given session handle - * @returns session data stored in the database, including userData and access token payload, or undefined if sessionHandle is invalid - */ -export declare function getSessionInformation( - helpers: Helpers, - sessionHandle: string -): Promise; -/** - * @description generates new access and refresh tokens for a given refresh token. Called when client's access token has expired. - * @sideEffects calls onTokenTheftDetection if token theft is detected. - */ -export declare function refreshSession( - helpers: Helpers, - refreshToken: string, - antiCsrfToken: string | undefined, - disableAntiCsrf: boolean -): Promise; -/** - * @description deletes session info of a user from db. This only invalidates the refresh token. Not the access token. - * Access tokens cannot be immediately invalidated. Unless we add a blacklisting method. Or changed the private key to sign them. - */ -export declare function revokeAllSessionsForUser(helpers: Helpers, userId: string): Promise; -/** - * @description gets all session handles for current user. Please do not call this unless this user is authenticated. - */ -export declare function getAllSessionHandlesForUser(helpers: Helpers, userId: string): Promise; -/** - * @description call to destroy one session - * @returns true if session was deleted from db. Else false in case there was nothing to delete - */ -export declare function revokeSession(helpers: Helpers, sessionHandle: string): Promise; -/** - * @description call to destroy multiple sessions - * @returns list of sessions revoked - */ -export declare function revokeMultipleSessions(helpers: Helpers, sessionHandles: string[]): Promise; -/** - * @description: It provides no locking mechanism in case other processes are updating session data for this session as well. - */ -export declare function updateSessionDataInDatabase( - helpers: Helpers, - sessionHandle: string, - newSessionData: any -): Promise; -export declare function updateAccessTokenPayload( - helpers: Helpers, - sessionHandle: string, - newAccessTokenPayload: any -): Promise; diff --git a/lib/build/recipe/session/sessionFunctions.js b/lib/build/recipe/session/sessionFunctions.js deleted file mode 100644 index b0827c364..000000000 --- a/lib/build/recipe/session/sessionFunctions.js +++ /dev/null @@ -1,404 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.updateAccessTokenPayload = exports.updateSessionDataInDatabase = exports.revokeMultipleSessions = exports.revokeSession = exports.getAllSessionHandlesForUser = exports.revokeAllSessionsForUser = exports.refreshSession = exports.getSessionInformation = exports.getSession = exports.createNewSession = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const accessToken_1 = require("./accessToken"); -const error_1 = __importDefault(require("./error")); -const processState_1 = require("../../processState"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const recipeImplementation_1 = require("./recipeImplementation"); -const utils_1 = require("../../utils"); -const logger_1 = require("../../logger"); -/** - * @description call this to "login" a user. - */ -function createNewSession(helpers, userId, disableAntiCsrf, accessTokenPayload = {}, sessionDataInDatabase = {}) { - return __awaiter(this, void 0, void 0, function* () { - accessTokenPayload = accessTokenPayload === null || accessTokenPayload === undefined ? {} : accessTokenPayload; - sessionDataInDatabase = - sessionDataInDatabase === null || sessionDataInDatabase === undefined ? {} : sessionDataInDatabase; - const requestBody = { - userId, - userDataInJWT: accessTokenPayload, - userDataInDatabase: sessionDataInDatabase, - useDynamicSigningKey: helpers.config.useDynamicAccessTokenSigningKey, - enableAntiCsrf: !disableAntiCsrf && helpers.config.antiCsrf === "VIA_TOKEN", - }; - const response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session"), - requestBody - ); - delete response.status; - return response; - }); -} -exports.createNewSession = createNewSession; -/** - * @description authenticates a session. To be used in APIs that require authentication - */ -function getSession(helpers, parsedAccessToken, antiCsrfToken, doAntiCsrfCheck, alwaysCheckCore) { - var _a; - return __awaiter(this, void 0, void 0, function* () { - let accessTokenInfo; - try { - /** - * get access token info using jwks - */ - accessTokenInfo = yield accessToken_1.getInfoFromAccessToken( - parsedAccessToken, - helpers.JWKS, - helpers.config.antiCsrf === "VIA_TOKEN" && doAntiCsrfCheck - ); - } catch (err) { - /** - * if error type is not TRY_REFRESH_TOKEN, we return the - * error to the user - */ - if (err.type !== error_1.default.TRY_REFRESH_TOKEN) { - throw err; - } - /** - * if it comes here, it means token verification has failed. - * It may be due to: - * - signing key was updated and this token was signed with new key - * - access token is actually expired - * - access token was signed with the older signing key - * - * if access token is actually expired, we don't need to call core and - * just return TRY_REFRESH_TOKEN to the client - * - * if access token creation time is after this signing key was created - * we need to call core as there are chances that the token - * was signed with the updated signing key - * - * if access token creation time is before oldest signing key was created, - * so if foundASigningKeyThatIsOlderThanTheAccessToken is still false after - * the loop we just return TRY_REFRESH_TOKEN - */ - if (parsedAccessToken.version < 3) { - let payload = parsedAccessToken.payload; - const timeCreated = accessToken_1.sanitizeNumberInput(payload.timeCreated); - const expiryTime = accessToken_1.sanitizeNumberInput(payload.expiryTime); - if (expiryTime === undefined || timeCreated == undefined) { - throw err; - } - if (expiryTime < Date.now()) { - throw err; - } - // We check if the token was created since the last time we refreshed the keys from the core - // Since we do not know the exact timing of the last refresh, we check against the max age - if (timeCreated <= Date.now() - recipeImplementation_1.JWKCacheMaxAgeInMs) { - throw err; - } - } else { - // Since v3 (and above) tokens contain a kid we can trust the cache-refresh mechanism of the jose library. - // This means we do not need to call the core since the signature wouldn't pass verification anyway. - throw err; - } - } - if (parsedAccessToken.version >= 3) { - const tokenUsesDynamicKey = parsedAccessToken.kid.startsWith("d-"); - if (tokenUsesDynamicKey !== helpers.config.useDynamicAccessTokenSigningKey) { - logger_1.logDebugMessage( - "getSession: Returning TRY_REFRESH_TOKEN because the access token doesn't match the useDynamicAccessTokenSigningKey in the config" - ); - throw new error_1.default({ - message: "The access token doesn't match the useDynamicAccessTokenSigningKey setting", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - } - // If we get here we either have a V2 token that doesn't pass verification or a valid V3> token - /** - * anti-csrf check if accesstokenInfo is not undefined, - * which means token verification was successful - */ - if (doAntiCsrfCheck) { - if (helpers.config.antiCsrf === "VIA_TOKEN") { - if (accessTokenInfo !== undefined) { - if (antiCsrfToken === undefined || antiCsrfToken !== accessTokenInfo.antiCsrfToken) { - if (antiCsrfToken === undefined) { - logger_1.logDebugMessage( - "getSession: Returning TRY_REFRESH_TOKEN because antiCsrfToken is missing from request" - ); - throw new error_1.default({ - message: - "Provided antiCsrfToken is undefined. If you do not want anti-csrf check for this API, please set doAntiCsrfCheck to false for this API", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } else { - logger_1.logDebugMessage( - "getSession: Returning TRY_REFRESH_TOKEN because the passed antiCsrfToken is not the same as in the access token" - ); - throw new error_1.default({ - message: "anti-csrf check failed", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - } - } - } else if (helpers.config.antiCsrf === "VIA_CUSTOM_HEADER") { - // The function should never be called by this (we check this outside the function as well) - // There we can add a bit more information to the error, so that's the primary check, this is just making sure. - throw new Error("Please either use VIA_TOKEN, NONE or call with doAntiCsrfCheck false"); - } - } - if ( - accessTokenInfo !== undefined && - !alwaysCheckCore && - accessTokenInfo.parentRefreshTokenHash1 === undefined - ) { - return { - session: { - handle: accessTokenInfo.sessionHandle, - userId: accessTokenInfo.userId, - userDataInJWT: accessTokenInfo.userData, - expiryTime: accessTokenInfo.expiryTime, - }, - }; - } - processState_1.ProcessState.getInstance().addState(processState_1.PROCESS_STATE.CALLING_SERVICE_IN_VERIFY); - let requestBody = { - accessToken: parsedAccessToken.rawTokenString, - antiCsrfToken, - doAntiCsrfCheck, - enableAntiCsrf: helpers.config.antiCsrf === "VIA_TOKEN", - checkDatabase: alwaysCheckCore, - }; - let response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/verify"), - requestBody - ); - if (response.status === "OK") { - delete response.status; - response.session.expiryTime = - ((_a = response.accessToken) === null || _a === void 0 ? void 0 : _a.expiry) || // if we got a new accesstoken we take the expiry time from there - (accessTokenInfo === null || accessTokenInfo === void 0 ? void 0 : accessTokenInfo.expiryTime) || // if we didn't get a new access token but could validate the token take that info (alwaysCheckCore === true, or parentRefreshTokenHash1 !== null) - parsedAccessToken.payload["expiryTime"]; // if the token didn't pass validation, but we got here, it means it was a v2 token that we didn't have the key cached for. - return response; - } else if (response.status === "UNAUTHORISED") { - logger_1.logDebugMessage("getSession: Returning UNAUTHORISED because of core response"); - throw new error_1.default({ - message: response.message, - type: error_1.default.UNAUTHORISED, - }); - } else { - logger_1.logDebugMessage("getSession: Returning TRY_REFRESH_TOKEN because of core response."); - throw new error_1.default({ - message: response.message, - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - }); -} -exports.getSession = getSession; -/** - * @description Retrieves session information from storage for a given session handle - * @returns session data stored in the database, including userData and access token payload, or undefined if sessionHandle is invalid - */ -function getSessionInformation(helpers, sessionHandle) { - return __awaiter(this, void 0, void 0, function* () { - let apiVersion = yield helpers.querier.getAPIVersion(); - if (utils_1.maxVersion(apiVersion, "2.7") === "2.7") { - throw new Error("Please use core version >= 3.5 to call this function."); - } - let response = yield helpers.querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/session"), { - sessionHandle, - }); - if (response.status === "OK") { - // Change keys to make them more readable - response["sessionDataInDatabase"] = response.userDataInDatabase; - response["customClaimsInAccessTokenPayload"] = response.userDataInJWT; - delete response.userDataInDatabase; - delete response.userDataInJWT; - return response; - } else { - return undefined; - } - }); -} -exports.getSessionInformation = getSessionInformation; -/** - * @description generates new access and refresh tokens for a given refresh token. Called when client's access token has expired. - * @sideEffects calls onTokenTheftDetection if token theft is detected. - */ -function refreshSession(helpers, refreshToken, antiCsrfToken, disableAntiCsrf) { - return __awaiter(this, void 0, void 0, function* () { - let requestBody = { - refreshToken, - antiCsrfToken, - enableAntiCsrf: !disableAntiCsrf && helpers.config.antiCsrf === "VIA_TOKEN", - }; - if (helpers.config.antiCsrf === "VIA_CUSTOM_HEADER" && !disableAntiCsrf) { - // The function should never be called by this (we check this outside the function as well) - // There we can add a bit more information to the error, so that's the primary check, this is just making sure. - throw new Error("Please either use VIA_TOKEN, NONE or call with doAntiCsrfCheck false"); - } - let response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/refresh"), - requestBody - ); - if (response.status === "OK") { - delete response.status; - return response; - } else if (response.status === "UNAUTHORISED") { - logger_1.logDebugMessage("refreshSession: Returning UNAUTHORISED because of core response"); - throw new error_1.default({ - message: response.message, - type: error_1.default.UNAUTHORISED, - }); - } else { - logger_1.logDebugMessage("refreshSession: Returning TOKEN_THEFT_DETECTED because of core response"); - throw new error_1.default({ - message: "Token theft detected", - payload: { - userId: response.session.userId, - sessionHandle: response.session.handle, - }, - type: error_1.default.TOKEN_THEFT_DETECTED, - }); - } - }); -} -exports.refreshSession = refreshSession; -/** - * @description deletes session info of a user from db. This only invalidates the refresh token. Not the access token. - * Access tokens cannot be immediately invalidated. Unless we add a blacklisting method. Or changed the private key to sign them. - */ -function revokeAllSessionsForUser(helpers, userId) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/remove"), - { - userId, - } - ); - return response.sessionHandlesRevoked; - }); -} -exports.revokeAllSessionsForUser = revokeAllSessionsForUser; -/** - * @description gets all session handles for current user. Please do not call this unless this user is authenticated. - */ -function getAllSessionHandlesForUser(helpers, userId) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield helpers.querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/session/user"), { - userId, - }); - return response.sessionHandles; - }); -} -exports.getAllSessionHandlesForUser = getAllSessionHandlesForUser; -/** - * @description call to destroy one session - * @returns true if session was deleted from db. Else false in case there was nothing to delete - */ -function revokeSession(helpers, sessionHandle) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/remove"), - { - sessionHandles: [sessionHandle], - } - ); - return response.sessionHandlesRevoked.length === 1; - }); -} -exports.revokeSession = revokeSession; -/** - * @description call to destroy multiple sessions - * @returns list of sessions revoked - */ -function revokeMultipleSessions(helpers, sessionHandles) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield helpers.querier.sendPostRequest( - new normalisedURLPath_1.default("/recipe/session/remove"), - { - sessionHandles, - } - ); - return response.sessionHandlesRevoked; - }); -} -exports.revokeMultipleSessions = revokeMultipleSessions; -/** - * @description: It provides no locking mechanism in case other processes are updating session data for this session as well. - */ -function updateSessionDataInDatabase(helpers, sessionHandle, newSessionData) { - return __awaiter(this, void 0, void 0, function* () { - newSessionData = newSessionData === null || newSessionData === undefined ? {} : newSessionData; - let response = yield helpers.querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/session/data"), { - sessionHandle, - userDataInDatabase: newSessionData, - }); - if (response.status === "UNAUTHORISED") { - return false; - } - return true; - }); -} -exports.updateSessionDataInDatabase = updateSessionDataInDatabase; -function updateAccessTokenPayload(helpers, sessionHandle, newAccessTokenPayload) { - return __awaiter(this, void 0, void 0, function* () { - newAccessTokenPayload = - newAccessTokenPayload === null || newAccessTokenPayload === undefined ? {} : newAccessTokenPayload; - let response = yield helpers.querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/jwt/data"), { - sessionHandle, - userDataInJWT: newAccessTokenPayload, - }); - if (response.status === "UNAUTHORISED") { - return false; - } - return true; - }); -} -exports.updateAccessTokenPayload = updateAccessTokenPayload; diff --git a/lib/build/recipe/session/sessionRequestFunctions.d.ts b/lib/build/recipe/session/sessionRequestFunctions.d.ts deleted file mode 100644 index 6ab9e8a63..000000000 --- a/lib/build/recipe/session/sessionRequestFunctions.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { VerifySessionOptions, RecipeInterface, TypeNormalisedInput, SessionContainerInterface } from "./types"; -import { NormalisedAppinfo } from "../../types"; -export declare function getSessionFromRequest({ - req, - res, - config, - recipeInterfaceImpl, - options, - userContext, -}: { - req: any; - res: any; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - options?: VerifySessionOptions; - userContext?: any; -}): Promise; -export declare function refreshSessionInRequest({ - res, - req, - userContext, - config, - recipeInterfaceImpl, -}: { - res: any; - req: any; - userContext: any; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; -}): Promise; -export declare function createNewSessionInRequest({ - req, - res, - userContext, - recipeInstance, - accessTokenPayload, - userId, - config, - appInfo, - sessionDataInDatabase, -}: { - req: any; - res: any; - userContext: any; - recipeInstance: Recipe; - accessTokenPayload: any; - userId: string; - config: TypeNormalisedInput; - appInfo: NormalisedAppinfo; - sessionDataInDatabase: any; -}): Promise; diff --git a/lib/build/recipe/session/sessionRequestFunctions.js b/lib/build/recipe/session/sessionRequestFunctions.js deleted file mode 100644 index 9e044fb56..000000000 --- a/lib/build/recipe/session/sessionRequestFunctions.js +++ /dev/null @@ -1,383 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.createNewSessionInRequest = exports.refreshSessionInRequest = exports.getSessionFromRequest = void 0; -const framework_1 = __importDefault(require("../../framework")); -const supertokens_1 = __importDefault(require("../../supertokens")); -const utils_1 = require("./utils"); -const utils_2 = require("../../utils"); -const logger_1 = require("../../logger"); -const constants_1 = require("./constants"); -const cookieAndHeaders_1 = require("./cookieAndHeaders"); -const jwt_1 = require("./jwt"); -const accessToken_1 = require("./accessToken"); -const error_1 = __importDefault(require("./error")); -// We are defining this here (and not exporting it) to reduce the scope of legacy code -const LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME = "sIdRefreshToken"; -function getSessionFromRequest({ req, res, config, recipeInterfaceImpl, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("getSession: Started"); - if (!res.wrapperUsed) { - res = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapResponse(res); - } - if (!req.wrapperUsed) { - req = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapRequest(req); - } - userContext = utils_2.setRequestInUserContextIfNotDefined(userContext, req); - logger_1.logDebugMessage("getSession: Wrapping done"); - // This token isn't handled by getToken to limit the scope of this legacy/migration code - if (req.getCookieValue(LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME) !== undefined) { - // This could create a spike on refresh calls during the update of the backend SDK - throw new error_1.default({ - message: "using legacy session, please call the refresh API", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - const sessionOptional = (options === null || options === void 0 ? void 0 : options.sessionRequired) === false; - logger_1.logDebugMessage("getSession: optional validation: " + sessionOptional); - const accessTokens = {}; - // We check all token transfer methods for available access tokens - for (const transferMethod of constants_1.availableTokenTransferMethods) { - const tokenString = cookieAndHeaders_1.getToken(req, "access", transferMethod); - if (tokenString !== undefined) { - try { - const info = jwt_1.parseJWTWithoutSignatureVerification(tokenString); - accessToken_1.validateAccessTokenStructure(info.payload, info.version); - logger_1.logDebugMessage("getSession: got access token from " + transferMethod); - accessTokens[transferMethod] = info; - } catch (_a) { - logger_1.logDebugMessage( - `getSession: ignoring token in ${transferMethod}, because it doesn't match our access token structure` - ); - } - } - } - const allowedTransferMethod = config.getTokenTransferMethod({ - req, - forCreateNewSession: false, - userContext, - }); - let requestTransferMethod; - let accessToken; - if ( - (allowedTransferMethod === "any" || allowedTransferMethod === "header") && - accessTokens["header"] !== undefined - ) { - logger_1.logDebugMessage("getSession: using header transfer method"); - requestTransferMethod = "header"; - accessToken = accessTokens["header"]; - } else if ( - (allowedTransferMethod === "any" || allowedTransferMethod === "cookie") && - accessTokens["cookie"] !== undefined - ) { - logger_1.logDebugMessage("getSession: using cookie transfer method"); - requestTransferMethod = "cookie"; - accessToken = accessTokens["cookie"]; - } - let antiCsrfToken = cookieAndHeaders_1.getAntiCsrfTokenFromHeaders(req); - let doAntiCsrfCheck = options !== undefined ? options.antiCsrfCheck : undefined; - if (doAntiCsrfCheck === undefined) { - doAntiCsrfCheck = utils_2.normaliseHttpMethod(req.getMethod()) !== "get"; - } - if (requestTransferMethod === "header") { - doAntiCsrfCheck = false; - } - if (doAntiCsrfCheck && config.antiCsrf === "VIA_CUSTOM_HEADER") { - if (config.antiCsrf === "VIA_CUSTOM_HEADER") { - if (utils_2.getRidFromHeader(req) === undefined) { - logger_1.logDebugMessage( - "getSession: Returning TRY_REFRESH_TOKEN because custom header (rid) was not passed" - ); - throw new error_1.default({ - message: - "anti-csrf check failed. Please pass 'rid: \"session\"' header in the request, or set doAntiCsrfCheck to false for this API", - type: error_1.default.TRY_REFRESH_TOKEN, - }); - } - logger_1.logDebugMessage("getSession: VIA_CUSTOM_HEADER anti-csrf check passed"); - doAntiCsrfCheck = false; - } - } - logger_1.logDebugMessage("getSession: Value of doAntiCsrfCheck is: " + doAntiCsrfCheck); - const session = yield recipeInterfaceImpl.getSession({ - accessToken: accessToken === null || accessToken === void 0 ? void 0 : accessToken.rawTokenString, - antiCsrfToken, - options: Object.assign(Object.assign({}, options), { antiCsrfCheck: doAntiCsrfCheck }), - userContext, - }); - if (session !== undefined) { - const claimValidators = yield utils_1.getRequiredClaimValidators( - session, - options === null || options === void 0 ? void 0 : options.overrideGlobalClaimValidators, - userContext - ); - yield session.assertClaims(claimValidators, userContext); - // requestTransferMethod can only be undefined here if the user overridden getSession - // to load the session by a custom method in that (very niche) case they also need to - // override how the session is attached to the response. - // In that scenario the transferMethod passed to attachToRequestResponse likely doesn't - // matter, still, we follow the general fallback logic - yield session.attachToRequestResponse({ - req, - res, - transferMethod: - requestTransferMethod !== undefined - ? requestTransferMethod - : allowedTransferMethod !== "any" - ? allowedTransferMethod - : "header", - }); - } - return session; - }); -} -exports.getSessionFromRequest = getSessionFromRequest; -/* - In all cases: if sIdRefreshToken token exists (so it's a legacy session) we clear it. - Check http://localhost:3002/docs/contribute/decisions/session/0008 for further details and a table of expected behaviours -*/ -function refreshSessionInRequest({ res, req, userContext, config, recipeInterfaceImpl }) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("refreshSession: Started"); - if (!res.wrapperUsed) { - res = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapResponse(res); - } - if (!req.wrapperUsed) { - req = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapRequest(req); - } - userContext = utils_2.setRequestInUserContextIfNotDefined(userContext, req); - logger_1.logDebugMessage("refreshSession: Wrapping done"); - const refreshTokens = {}; - // We check all token transfer methods for available refresh tokens - // We do this so that we can later clear all we are not overwriting - for (const transferMethod of constants_1.availableTokenTransferMethods) { - refreshTokens[transferMethod] = cookieAndHeaders_1.getToken(req, "refresh", transferMethod); - if (refreshTokens[transferMethod] !== undefined) { - logger_1.logDebugMessage("refreshSession: got refresh token from " + transferMethod); - } - } - const allowedTransferMethod = config.getTokenTransferMethod({ - req, - forCreateNewSession: false, - userContext, - }); - logger_1.logDebugMessage("refreshSession: getTokenTransferMethod returned " + allowedTransferMethod); - let requestTransferMethod; - let refreshToken; - if ( - (allowedTransferMethod === "any" || allowedTransferMethod === "header") && - refreshTokens["header"] !== undefined - ) { - logger_1.logDebugMessage("refreshSession: using header transfer method"); - requestTransferMethod = "header"; - refreshToken = refreshTokens["header"]; - } else if ((allowedTransferMethod === "any" || allowedTransferMethod === "cookie") && refreshTokens["cookie"]) { - logger_1.logDebugMessage("refreshSession: using cookie transfer method"); - requestTransferMethod = "cookie"; - refreshToken = refreshTokens["cookie"]; - } else { - // This token isn't handled by getToken/setToken to limit the scope of this legacy/migration code - if (req.getCookieValue(LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME) !== undefined) { - logger_1.logDebugMessage( - "refreshSession: cleared legacy id refresh token because refresh token was not found" - ); - cookieAndHeaders_1.setCookie( - config, - res, - LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME, - "", - 0, - "accessTokenPath" - ); - } - logger_1.logDebugMessage("refreshSession: UNAUTHORISED because refresh token in request is undefined"); - throw new error_1.default({ - message: "Refresh token not found. Are you sending the refresh token in the request?", - payload: { - clearTokens: false, - }, - type: error_1.default.UNAUTHORISED, - }); - } - let disableAntiCsrf = requestTransferMethod === "header"; - const antiCsrfToken = cookieAndHeaders_1.getAntiCsrfTokenFromHeaders(req); - if (config.antiCsrf === "VIA_CUSTOM_HEADER" && !disableAntiCsrf) { - if (utils_2.getRidFromHeader(req) === undefined) { - logger_1.logDebugMessage( - "refreshSession: Returning UNAUTHORISED because custom header (rid) was not passed" - ); - throw new error_1.default({ - message: "anti-csrf check failed. Please pass 'rid: \"session\"' header in the request.", - type: error_1.default.UNAUTHORISED, - payload: { - clearTokens: false, // see https://github.com/supertokens/supertokens-node/issues/141 - }, - }); - } - disableAntiCsrf = true; - } - let session; - try { - session = yield recipeInterfaceImpl.refreshSession({ - refreshToken: refreshToken, - antiCsrfToken, - disableAntiCsrf, - userContext, - }); - } catch (ex) { - if ( - error_1.default.isErrorFromSuperTokens(ex) && - (ex.type === error_1.default.TOKEN_THEFT_DETECTED || ex.payload.clearTokens === true) - ) { - // We clear the LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME here because we want to limit the scope of this legacy/migration code - // so the token clearing functions in the error handlers do not - if (req.getCookieValue(LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME) !== undefined) { - logger_1.logDebugMessage( - "refreshSession: cleared legacy id refresh token because refresh is clearing other tokens" - ); - cookieAndHeaders_1.setCookie( - config, - res, - LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME, - "", - 0, - "accessTokenPath" - ); - } - } - throw ex; - } - logger_1.logDebugMessage("refreshSession: Attaching refreshed session info as " + requestTransferMethod); - // We clear the tokens in all token transfer methods we are not going to overwrite - for (const transferMethod of constants_1.availableTokenTransferMethods) { - if (transferMethod !== requestTransferMethod && refreshTokens[transferMethod] !== undefined) { - cookieAndHeaders_1.clearSession(config, res, transferMethod); - } - } - yield session.attachToRequestResponse({ - req, - res, - transferMethod: requestTransferMethod, - }); - logger_1.logDebugMessage("refreshSession: Success!"); - // This token isn't handled by getToken/setToken to limit the scope of this legacy/migration code - if (req.getCookieValue(LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME) !== undefined) { - logger_1.logDebugMessage("refreshSession: cleared legacy id refresh token after successful refresh"); - cookieAndHeaders_1.setCookie(config, res, LEGACY_ID_REFRESH_TOKEN_COOKIE_NAME, "", 0, "accessTokenPath"); - } - return session; - }); -} -exports.refreshSessionInRequest = refreshSessionInRequest; -function createNewSessionInRequest({ - req, - res, - userContext, - recipeInstance, - accessTokenPayload, - userId, - config, - appInfo, - sessionDataInDatabase, -}) { - return __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("createNewSession: Started"); - if (!req.wrapperUsed) { - req = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapRequest(req); - } - if (!res.wrapperUsed) { - res = framework_1.default[supertokens_1.default.getInstanceOrThrowError().framework].wrapResponse(res); - } - logger_1.logDebugMessage("createNewSession: Wrapping done"); - userContext = utils_2.setRequestInUserContextIfNotDefined(userContext, req); - const claimsAddedByOtherRecipes = recipeInstance.getClaimsAddedByOtherRecipes(); - const issuer = appInfo.apiDomain.getAsStringDangerous() + appInfo.apiBasePath.getAsStringDangerous(); - let finalAccessTokenPayload = Object.assign(Object.assign({}, accessTokenPayload), { iss: issuer }); - for (const claim of claimsAddedByOtherRecipes) { - const update = yield claim.build(userId, userContext); - finalAccessTokenPayload = Object.assign(Object.assign({}, finalAccessTokenPayload), update); - } - logger_1.logDebugMessage("createNewSession: Access token payload built"); - let outputTransferMethod = config.getTokenTransferMethod({ req, forCreateNewSession: true, userContext }); - if (outputTransferMethod === "any") { - outputTransferMethod = "header"; - } - logger_1.logDebugMessage("createNewSession: using transfer method " + outputTransferMethod); - if ( - outputTransferMethod === "cookie" && - config.cookieSameSite === "none" && - !config.cookieSecure && - !( - (appInfo.topLevelAPIDomain === "localhost" || utils_2.isAnIpAddress(appInfo.topLevelAPIDomain)) && - (appInfo.topLevelWebsiteDomain === "localhost" || utils_2.isAnIpAddress(appInfo.topLevelWebsiteDomain)) - ) - ) { - // We can allow insecure cookie when both website & API domain are localhost or an IP - // When either of them is a different domain, API domain needs to have https and a secure cookie to work - throw new Error( - "Since your API and website domain are different, for sessions to work, please use https on your apiDomain and dont set cookieSecure to false." - ); - } - const disableAntiCsrf = outputTransferMethod === "header"; - const session = yield recipeInstance.recipeInterfaceImpl.createNewSession({ - userId, - accessTokenPayload: finalAccessTokenPayload, - sessionDataInDatabase, - disableAntiCsrf, - userContext, - }); - logger_1.logDebugMessage("createNewSession: Session created in core built"); - for (const transferMethod of constants_1.availableTokenTransferMethods) { - if ( - transferMethod !== outputTransferMethod && - cookieAndHeaders_1.getToken(req, "access", transferMethod) !== undefined - ) { - cookieAndHeaders_1.clearSession(config, res, transferMethod); - } - } - logger_1.logDebugMessage("createNewSession: Cleared old tokens"); - yield session.attachToRequestResponse({ - req, - res, - transferMethod: outputTransferMethod, - }); - logger_1.logDebugMessage("createNewSession: Attached new tokens to res"); - return session; - }); -} -exports.createNewSessionInRequest = createNewSessionInRequest; diff --git a/lib/build/recipe/session/types.d.ts b/lib/build/recipe/session/types.d.ts deleted file mode 100644 index 498888978..000000000 --- a/lib/build/recipe/session/types.d.ts +++ /dev/null @@ -1,399 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { RecipeInterface as JWTRecipeInterface, APIInterface as JWTAPIInterface } from "../jwt/types"; -import OverrideableBuilder from "supertokens-js-override"; -import { RecipeInterface as OpenIdRecipeInterface, APIInterface as OpenIdAPIInterface } from "../openid/types"; -import { JSONObject, JSONValue } from "../../types"; -import { GeneralErrorResponse } from "../../types"; -export declare type KeyInfo = { - publicKey: string; - expiryTime: number; - createdAt: number; -}; -export declare type AntiCsrfType = "VIA_TOKEN" | "VIA_CUSTOM_HEADER" | "NONE"; -export declare type TokenInfo = { - token: string; - expiry: number; - createdTime: number; -}; -export declare type CreateOrRefreshAPIResponse = { - session: { - handle: string; - userId: string; - userDataInJWT: any; - }; - accessToken: TokenInfo; - refreshToken: TokenInfo; - antiCsrfToken: string | undefined; -}; -export interface ErrorHandlers { - onUnauthorised?: ErrorHandlerMiddleware; - onTokenTheftDetected?: TokenTheftErrorHandlerMiddleware; - onInvalidClaim?: InvalidClaimErrorHandlerMiddleware; -} -export declare type TokenType = "access" | "refresh"; -export declare type TokenTransferMethod = "header" | "cookie"; -export declare type TypeInput = { - useDynamicAccessTokenSigningKey?: boolean; - sessionExpiredStatusCode?: number; - invalidClaimStatusCode?: number; - accessTokenPath?: string; - cookieSecure?: boolean; - cookieSameSite?: "strict" | "lax" | "none"; - cookieDomain?: string; - getTokenTransferMethod?: (input: { - req: BaseRequest; - forCreateNewSession: boolean; - userContext: any; - }) => TokenTransferMethod | "any"; - errorHandlers?: ErrorHandlers; - antiCsrf?: "VIA_TOKEN" | "VIA_CUSTOM_HEADER" | "NONE"; - exposeAccessTokenToFrontendInCookieBasedAuth?: boolean; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - openIdFeature?: { - functions?: ( - originalImplementation: OpenIdRecipeInterface, - builder?: OverrideableBuilder - ) => OpenIdRecipeInterface; - apis?: ( - originalImplementation: OpenIdAPIInterface, - builder?: OverrideableBuilder - ) => OpenIdAPIInterface; - jwtFeature?: { - functions?: ( - originalImplementation: JWTRecipeInterface, - builder?: OverrideableBuilder - ) => JWTRecipeInterface; - apis?: ( - originalImplementation: JWTAPIInterface, - builder?: OverrideableBuilder - ) => JWTAPIInterface; - }; - }; - }; -}; -export declare type TypeNormalisedInput = { - useDynamicAccessTokenSigningKey: boolean; - refreshTokenPath: NormalisedURLPath; - accessTokenPath: NormalisedURLPath; - cookieDomain: string | undefined; - cookieSameSite: "strict" | "lax" | "none"; - cookieSecure: boolean; - sessionExpiredStatusCode: number; - errorHandlers: NormalisedErrorHandlers; - antiCsrf: "VIA_TOKEN" | "VIA_CUSTOM_HEADER" | "NONE"; - getTokenTransferMethod: (input: { - req: BaseRequest; - forCreateNewSession: boolean; - userContext: any; - }) => TokenTransferMethod | "any"; - invalidClaimStatusCode: number; - exposeAccessTokenToFrontendInCookieBasedAuth: boolean; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - openIdFeature?: { - functions?: ( - originalImplementation: OpenIdRecipeInterface, - builder?: OverrideableBuilder - ) => OpenIdRecipeInterface; - apis?: ( - originalImplementation: OpenIdAPIInterface, - builder?: OverrideableBuilder - ) => OpenIdAPIInterface; - jwtFeature?: { - functions?: ( - originalImplementation: JWTRecipeInterface, - builder?: OverrideableBuilder - ) => JWTRecipeInterface; - apis?: ( - originalImplementation: JWTAPIInterface, - builder?: OverrideableBuilder - ) => JWTAPIInterface; - }; - }; - }; -}; -export interface SessionRequest extends BaseRequest { - session?: SessionContainerInterface; -} -export interface ErrorHandlerMiddleware { - (message: string, request: BaseRequest, response: BaseResponse): Promise; -} -export interface TokenTheftErrorHandlerMiddleware { - (sessionHandle: string, userId: string, request: BaseRequest, response: BaseResponse): Promise; -} -export interface InvalidClaimErrorHandlerMiddleware { - (validatorErrors: ClaimValidationError[], request: BaseRequest, response: BaseResponse): Promise; -} -export interface NormalisedErrorHandlers { - onUnauthorised: ErrorHandlerMiddleware; - onTryRefreshToken: ErrorHandlerMiddleware; - onTokenTheftDetected: TokenTheftErrorHandlerMiddleware; - onInvalidClaim: InvalidClaimErrorHandlerMiddleware; -} -export interface VerifySessionOptions { - antiCsrfCheck?: boolean; - sessionRequired?: boolean; - checkDatabase?: boolean; - overrideGlobalClaimValidators?: ( - globalClaimValidators: SessionClaimValidator[], - session: SessionContainerInterface, - userContext: any - ) => Promise | SessionClaimValidator[]; -} -export declare type RecipeInterface = { - createNewSession(input: { - userId: string; - accessTokenPayload?: any; - sessionDataInDatabase?: any; - disableAntiCsrf?: boolean; - userContext: any; - }): Promise; - getGlobalClaimValidators(input: { - userId: string; - claimValidatorsAddedByOtherRecipes: SessionClaimValidator[]; - userContext: any; - }): Promise | SessionClaimValidator[]; - getSession(input: { - accessToken: string | undefined; - antiCsrfToken?: string; - options?: VerifySessionOptions; - userContext: any; - }): Promise; - refreshSession(input: { - refreshToken: string; - antiCsrfToken?: string; - disableAntiCsrf: boolean; - userContext: any; - }): Promise; - /** - * Used to retrieve all session information for a given session handle. Can be used in place of: - * - getSessionDataFromDatabase - * - getAccessTokenPayload - * - * Returns undefined if the sessionHandle does not exist - */ - getSessionInformation(input: { sessionHandle: string; userContext: any }): Promise; - revokeAllSessionsForUser(input: { userId: string; userContext: any }): Promise; - getAllSessionHandlesForUser(input: { userId: string; userContext: any }): Promise; - revokeSession(input: { sessionHandle: string; userContext: any }): Promise; - revokeMultipleSessions(input: { sessionHandles: string[]; userContext: any }): Promise; - updateSessionDataInDatabase(input: { - sessionHandle: string; - newSessionData: any; - userContext: any; - }): Promise; - mergeIntoAccessTokenPayload(input: { - sessionHandle: string; - accessTokenPayloadUpdate: JSONObject; - userContext: any; - }): Promise; - /** - * @returns {Promise} Returns false if the sessionHandle does not exist - */ - regenerateAccessToken(input: { - accessToken: string; - newAccessTokenPayload?: any; - userContext: any; - }): Promise< - | { - status: "OK"; - session: { - handle: string; - userId: string; - userDataInJWT: any; - }; - accessToken?: { - token: string; - expiry: number; - createdTime: number; - }; - } - | undefined - >; - validateClaims(input: { - userId: string; - accessTokenPayload: any; - claimValidators: SessionClaimValidator[]; - userContext: any; - }): Promise<{ - invalidClaims: ClaimValidationError[]; - accessTokenPayloadUpdate?: any; - }>; - validateClaimsInJWTPayload(input: { - userId: string; - jwtPayload: JSONObject; - claimValidators: SessionClaimValidator[]; - userContext: any; - }): Promise<{ - status: "OK"; - invalidClaims: ClaimValidationError[]; - }>; - fetchAndSetClaim(input: { sessionHandle: string; claim: SessionClaim; userContext: any }): Promise; - setClaimValue(input: { - sessionHandle: string; - claim: SessionClaim; - value: T; - userContext: any; - }): Promise; - getClaimValue(input: { - sessionHandle: string; - claim: SessionClaim; - userContext: any; - }): Promise< - | { - status: "SESSION_DOES_NOT_EXIST_ERROR"; - } - | { - status: "OK"; - value: T | undefined; - } - >; - removeClaim(input: { sessionHandle: string; claim: SessionClaim; userContext: any }): Promise; -}; -export interface SessionContainerInterface { - revokeSession(userContext?: any): Promise; - getSessionDataFromDatabase(userContext?: any): Promise; - updateSessionDataInDatabase(newSessionData: any, userContext?: any): Promise; - getUserId(userContext?: any): string; - getAccessTokenPayload(userContext?: any): any; - getHandle(userContext?: any): string; - getAllSessionTokensDangerously(): { - accessToken: string; - refreshToken: string | undefined; - antiCsrfToken: string | undefined; - frontToken: string; - accessAndFrontTokenUpdated: boolean; - }; - getAccessToken(userContext?: any): string; - mergeIntoAccessTokenPayload(accessTokenPayloadUpdate: JSONObject, userContext?: any): Promise; - getTimeCreated(userContext?: any): Promise; - getExpiry(userContext?: any): Promise; - assertClaims(claimValidators: SessionClaimValidator[], userContext?: any): Promise; - fetchAndSetClaim(claim: SessionClaim, userContext?: any): Promise; - setClaimValue(claim: SessionClaim, value: T, userContext?: any): Promise; - getClaimValue(claim: SessionClaim, userContext?: any): Promise; - removeClaim(claim: SessionClaim, userContext?: any): Promise; - attachToRequestResponse(reqResInfo: ReqResInfo): Promise | void; -} -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - req: BaseRequest; - res: BaseResponse; -}; -export declare type APIInterface = { - /** - * We do not add a GeneralErrorResponse response to this API - * since it's not something that is directly called by the user on the - * frontend anyway - */ - refreshPOST: undefined | ((input: { options: APIOptions; userContext: any }) => Promise); - signOutPOST: - | undefined - | ((input: { - options: APIOptions; - session: SessionContainerInterface | undefined; - userContext: any; - }) => Promise< - | { - status: "OK"; - } - | GeneralErrorResponse - >); - verifySession(input: { - verifySessionOptions: VerifySessionOptions | undefined; - options: APIOptions; - userContext: any; - }): Promise; -}; -export declare type SessionInformation = { - sessionHandle: string; - userId: string; - sessionDataInDatabase: any; - expiry: number; - customClaimsInAccessTokenPayload: any; - timeCreated: number; -}; -export declare type ClaimValidationResult = - | { - isValid: true; - } - | { - isValid: false; - reason?: JSONValue; - }; -export declare type ClaimValidationError = { - id: string; - reason?: JSONValue; -}; -export declare type SessionClaimValidator = ( - | // We split the type like this to express that either both claim and shouldRefetch is defined or neither. - { - claim: SessionClaim; - /** - * Decides if we need to refetch the claim value before checking the payload with `isValid`. - * E.g.: if the information in the payload is expired, or is not sufficient for this check. - */ - shouldRefetch: (payload: any, userContext: any) => Promise | boolean; - } - | {} -) & { - id: string; - /** - * Decides if the claim is valid based on the payload (and not checking DB or anything else) - */ - validate: (payload: any, userContext: any) => Promise; -}; -export declare abstract class SessionClaim { - readonly key: string; - constructor(key: string); - /** - * This methods fetches the current value of this claim for the user. - * The undefined return value signifies that we don't want to update the claim payload and or the claim value is not present in the database - * This can happen for example with a second factor auth claim, where we don't want to add the claim to the session automatically. - */ - abstract fetchValue(userId: string, userContext: any): Promise | T | undefined; - /** - * Saves the provided value into the payload, by cloning and updating the entire object. - * - * @returns The modified payload object - */ - abstract addToPayload_internal(payload: JSONObject, value: T, userContext: any): JSONObject; - /** - * Removes the claim from the payload by setting it to null, so mergeIntoAccessTokenPayload clears it - * - * @returns The modified payload object - */ - abstract removeFromPayloadByMerge_internal(payload: JSONObject, userContext?: any): JSONObject; - /** - * Removes the claim from the payload, by cloning and updating the entire object. - * - * @returns The modified payload object - */ - abstract removeFromPayload(payload: JSONObject, userContext?: any): JSONObject; - /** - * Gets the value of the claim stored in the payload - * - * @returns Claim value - */ - abstract getValueFromPayload(payload: JSONObject, userContext: any): T | undefined; - build(userId: string, userContext?: any): Promise; -} -export declare type ReqResInfo = { - res: BaseResponse; - req: BaseRequest; - transferMethod: TokenTransferMethod; -}; diff --git a/lib/build/recipe/session/types.js b/lib/build/recipe/session/types.js deleted file mode 100644 index af3c78734..000000000 --- a/lib/build/recipe/session/types.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SessionClaim = void 0; -class SessionClaim { - constructor(key) { - this.key = key; - } - build(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const value = yield this.fetchValue(userId, userContext); - if (value === undefined) { - return {}; - } - return this.addToPayload_internal({}, value, userContext); - }); - } -} -exports.SessionClaim = SessionClaim; diff --git a/lib/build/recipe/session/utils.d.ts b/lib/build/recipe/session/utils.d.ts deleted file mode 100644 index 753592dd4..000000000 --- a/lib/build/recipe/session/utils.d.ts +++ /dev/null @@ -1,68 +0,0 @@ -// @ts-nocheck -import { - TypeInput, - TypeNormalisedInput, - ClaimValidationError, - SessionClaimValidator, - SessionContainerInterface, - VerifySessionOptions, - TokenTransferMethod, -} from "./types"; -import SessionRecipe from "./recipe"; -import { NormalisedAppinfo } from "../../types"; -import { BaseRequest, BaseResponse } from "../../framework"; -export declare function sendTryRefreshTokenResponse( - recipeInstance: SessionRecipe, - _: string, - __: BaseRequest, - response: BaseResponse -): Promise; -export declare function sendUnauthorisedResponse( - recipeInstance: SessionRecipe, - _: string, - __: BaseRequest, - response: BaseResponse -): Promise; -export declare function sendInvalidClaimResponse( - recipeInstance: SessionRecipe, - claimValidationErrors: ClaimValidationError[], - __: BaseRequest, - response: BaseResponse -): Promise; -export declare function sendTokenTheftDetectedResponse( - recipeInstance: SessionRecipe, - sessionHandle: string, - _: string, - __: BaseRequest, - response: BaseResponse -): Promise; -export declare function normaliseSessionScopeOrThrowError(sessionScope: string): string; -export declare function getURLProtocol(url: string): string; -export declare function validateAndNormaliseUserInput( - recipeInstance: SessionRecipe, - appInfo: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; -export declare function normaliseSameSiteOrThrowError(sameSite: string): "strict" | "lax" | "none"; -export declare function setAccessTokenInResponse( - res: BaseResponse, - accessToken: string, - frontToken: string, - config: TypeNormalisedInput, - transferMethod: TokenTransferMethod -): void; -export declare function getRequiredClaimValidators( - session: SessionContainerInterface, - overrideGlobalClaimValidators: VerifySessionOptions["overrideGlobalClaimValidators"], - userContext: any -): Promise; -export declare function validateClaimsInPayload( - claimValidators: SessionClaimValidator[], - newAccessTokenPayload: any, - userContext: any -): Promise< - { - id: string; - reason: import("../../types").JSONValue; - }[] ->; diff --git a/lib/build/recipe/session/utils.js b/lib/build/recipe/session/utils.js deleted file mode 100644 index cea6a0e77..000000000 --- a/lib/build/recipe/session/utils.js +++ /dev/null @@ -1,333 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateClaimsInPayload = exports.getRequiredClaimValidators = exports.setAccessTokenInResponse = exports.normaliseSameSiteOrThrowError = exports.validateAndNormaliseUserInput = exports.getURLProtocol = exports.normaliseSessionScopeOrThrowError = exports.sendTokenTheftDetectedResponse = exports.sendInvalidClaimResponse = exports.sendUnauthorisedResponse = exports.sendTryRefreshTokenResponse = void 0; -const cookieAndHeaders_1 = require("./cookieAndHeaders"); -const url_1 = require("url"); -const recipe_1 = __importDefault(require("./recipe")); -const constants_1 = require("./constants"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const utils_1 = require("../../utils"); -const utils_2 = require("../../utils"); -const logger_1 = require("../../logger"); -function sendTryRefreshTokenResponse(recipeInstance, _, __, response) { - return __awaiter(this, void 0, void 0, function* () { - utils_2.sendNon200ResponseWithMessage( - response, - "try refresh token", - recipeInstance.config.sessionExpiredStatusCode - ); - }); -} -exports.sendTryRefreshTokenResponse = sendTryRefreshTokenResponse; -function sendUnauthorisedResponse(recipeInstance, _, __, response) { - return __awaiter(this, void 0, void 0, function* () { - utils_2.sendNon200ResponseWithMessage(response, "unauthorised", recipeInstance.config.sessionExpiredStatusCode); - }); -} -exports.sendUnauthorisedResponse = sendUnauthorisedResponse; -function sendInvalidClaimResponse(recipeInstance, claimValidationErrors, __, response) { - return __awaiter(this, void 0, void 0, function* () { - utils_2.sendNon200Response(response, recipeInstance.config.invalidClaimStatusCode, { - message: "invalid claim", - claimValidationErrors, - }); - }); -} -exports.sendInvalidClaimResponse = sendInvalidClaimResponse; -function sendTokenTheftDetectedResponse(recipeInstance, sessionHandle, _, __, response) { - return __awaiter(this, void 0, void 0, function* () { - yield recipeInstance.recipeInterfaceImpl.revokeSession({ sessionHandle, userContext: {} }); - utils_2.sendNon200ResponseWithMessage( - response, - "token theft detected", - recipeInstance.config.sessionExpiredStatusCode - ); - }); -} -exports.sendTokenTheftDetectedResponse = sendTokenTheftDetectedResponse; -function normaliseSessionScopeOrThrowError(sessionScope) { - function helper(sessionScope) { - sessionScope = sessionScope.trim().toLowerCase(); - // first we convert it to a URL so that we can use the URL class - if (sessionScope.startsWith(".")) { - sessionScope = sessionScope.substr(1); - } - if (!sessionScope.startsWith("http://") && !sessionScope.startsWith("https://")) { - sessionScope = "http://" + sessionScope; - } - try { - let urlObj = new url_1.URL(sessionScope); - sessionScope = urlObj.hostname; - // remove leading dot - if (sessionScope.startsWith(".")) { - sessionScope = sessionScope.substr(1); - } - return sessionScope; - } catch (err) { - throw new Error("Please provide a valid sessionScope"); - } - } - let noDotNormalised = helper(sessionScope); - if (noDotNormalised === "localhost" || utils_1.isAnIpAddress(noDotNormalised)) { - return noDotNormalised; - } - if (sessionScope.startsWith(".")) { - return "." + noDotNormalised; - } - return noDotNormalised; -} -exports.normaliseSessionScopeOrThrowError = normaliseSessionScopeOrThrowError; -function getURLProtocol(url) { - let urlObj = new url_1.URL(url); - return urlObj.protocol; -} -exports.getURLProtocol = getURLProtocol; -function validateAndNormaliseUserInput(recipeInstance, appInfo, config) { - var _a, _b, _c; - let cookieDomain = - config === undefined || config.cookieDomain === undefined - ? undefined - : normaliseSessionScopeOrThrowError(config.cookieDomain); - let accessTokenPath = - config === undefined || config.accessTokenPath === undefined - ? new normalisedURLPath_1.default("/") - : new normalisedURLPath_1.default(config.accessTokenPath); - let protocolOfAPIDomain = getURLProtocol(appInfo.apiDomain.getAsStringDangerous()); - let protocolOfWebsiteDomain = getURLProtocol(appInfo.websiteDomain.getAsStringDangerous()); - let cookieSameSite = - appInfo.topLevelAPIDomain !== appInfo.topLevelWebsiteDomain || protocolOfAPIDomain !== protocolOfWebsiteDomain - ? "none" - : "lax"; - cookieSameSite = - config === undefined || config.cookieSameSite === undefined - ? cookieSameSite - : normaliseSameSiteOrThrowError(config.cookieSameSite); - let cookieSecure = - config === undefined || config.cookieSecure === undefined - ? appInfo.apiDomain.getAsStringDangerous().startsWith("https") - : config.cookieSecure; - let sessionExpiredStatusCode = - config === undefined || config.sessionExpiredStatusCode === undefined ? 401 : config.sessionExpiredStatusCode; - const invalidClaimStatusCode = - (_a = config === null || config === void 0 ? void 0 : config.invalidClaimStatusCode) !== null && _a !== void 0 - ? _a - : 403; - if (sessionExpiredStatusCode === invalidClaimStatusCode) { - throw new Error("sessionExpiredStatusCode and sessionExpiredStatusCode must be different"); - } - if (config !== undefined && config.antiCsrf !== undefined) { - if (config.antiCsrf !== "NONE" && config.antiCsrf !== "VIA_CUSTOM_HEADER" && config.antiCsrf !== "VIA_TOKEN") { - throw new Error("antiCsrf config must be one of 'NONE' or 'VIA_CUSTOM_HEADER' or 'VIA_TOKEN'"); - } - } - let antiCsrf = - config === undefined || config.antiCsrf === undefined - ? cookieSameSite === "none" - ? "VIA_CUSTOM_HEADER" - : "NONE" - : config.antiCsrf; - let errorHandlers = { - onTokenTheftDetected: (sessionHandle, userId, request, response) => - __awaiter(this, void 0, void 0, function* () { - return yield sendTokenTheftDetectedResponse(recipeInstance, sessionHandle, userId, request, response); - }), - onTryRefreshToken: (message, request, response) => - __awaiter(this, void 0, void 0, function* () { - return yield sendTryRefreshTokenResponse(recipeInstance, message, request, response); - }), - onUnauthorised: (message, request, response) => - __awaiter(this, void 0, void 0, function* () { - return yield sendUnauthorisedResponse(recipeInstance, message, request, response); - }), - onInvalidClaim: (validationErrors, request, response) => { - return sendInvalidClaimResponse(recipeInstance, validationErrors, request, response); - }, - }; - if (config !== undefined && config.errorHandlers !== undefined) { - if (config.errorHandlers.onTokenTheftDetected !== undefined) { - errorHandlers.onTokenTheftDetected = config.errorHandlers.onTokenTheftDetected; - } - if (config.errorHandlers.onUnauthorised !== undefined) { - errorHandlers.onUnauthorised = config.errorHandlers.onUnauthorised; - } - if (config.errorHandlers.onInvalidClaim !== undefined) { - errorHandlers.onInvalidClaim = config.errorHandlers.onInvalidClaim; - } - } - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - return { - useDynamicAccessTokenSigningKey: - (_b = config === null || config === void 0 ? void 0 : config.useDynamicAccessTokenSigningKey) !== null && - _b !== void 0 - ? _b - : true, - exposeAccessTokenToFrontendInCookieBasedAuth: - (_c = - config === null || config === void 0 ? void 0 : config.exposeAccessTokenToFrontendInCookieBasedAuth) !== - null && _c !== void 0 - ? _c - : false, - refreshTokenPath: appInfo.apiBasePath.appendPath(new normalisedURLPath_1.default(constants_1.REFRESH_API_PATH)), - accessTokenPath, - getTokenTransferMethod: - (config === null || config === void 0 ? void 0 : config.getTokenTransferMethod) === undefined - ? defaultGetTokenTransferMethod - : config.getTokenTransferMethod, - cookieDomain, - cookieSameSite, - cookieSecure, - sessionExpiredStatusCode, - errorHandlers, - antiCsrf, - override, - invalidClaimStatusCode, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function normaliseSameSiteOrThrowError(sameSite) { - sameSite = sameSite.trim(); - sameSite = sameSite.toLocaleLowerCase(); - if (sameSite !== "strict" && sameSite !== "lax" && sameSite !== "none") { - throw new Error(`cookie same site must be one of "strict", "lax", or "none"`); - } - return sameSite; -} -exports.normaliseSameSiteOrThrowError = normaliseSameSiteOrThrowError; -function setAccessTokenInResponse(res, accessToken, frontToken, config, transferMethod) { - cookieAndHeaders_1.setFrontTokenInHeaders(res, frontToken); - cookieAndHeaders_1.setToken( - config, - res, - "access", - accessToken, - // We set the expiration to 100 years, because we can't really access the expiration of the refresh token everywhere we are setting it. - // This should be safe to do, since this is only the validity of the cookie (set here or on the frontend) but we check the expiration of the JWT anyway. - // Even if the token is expired the presence of the token indicates that the user could have a valid refresh token - // Setting them to infinity would require special case handling on the frontend and just adding 100 years seems enough. - Date.now() + constants_1.hundredYearsInMs, - transferMethod - ); - if (config.exposeAccessTokenToFrontendInCookieBasedAuth && transferMethod === "cookie") { - cookieAndHeaders_1.setToken( - config, - res, - "access", - accessToken, - // We set the expiration to 100 years, because we can't really access the expiration of the refresh token everywhere we are setting it. - // This should be safe to do, since this is only the validity of the cookie (set here or on the frontend) but we check the expiration of the JWT anyway. - // Even if the token is expired the presence of the token indicates that the user could have a valid refresh token - // Setting them to infinity would require special case handling on the frontend and just adding 100 years seems enough. - Date.now() + constants_1.hundredYearsInMs, - "header" - ); - } -} -exports.setAccessTokenInResponse = setAccessTokenInResponse; -function getRequiredClaimValidators(session, overrideGlobalClaimValidators, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const claimValidatorsAddedByOtherRecipes = recipe_1.default - .getInstanceOrThrowError() - .getClaimValidatorsAddedByOtherRecipes(); - const globalClaimValidators = yield recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.getGlobalClaimValidators({ - userId: session.getUserId(), - claimValidatorsAddedByOtherRecipes, - userContext, - }); - return overrideGlobalClaimValidators !== undefined - ? yield overrideGlobalClaimValidators(globalClaimValidators, session, userContext) - : globalClaimValidators; - }); -} -exports.getRequiredClaimValidators = getRequiredClaimValidators; -function validateClaimsInPayload(claimValidators, newAccessTokenPayload, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const validationErrors = []; - for (const validator of claimValidators) { - const claimValidationResult = yield validator.validate(newAccessTokenPayload, userContext); - logger_1.logDebugMessage( - "validateClaimsInPayload " + validator.id + " validation res " + JSON.stringify(claimValidationResult) - ); - if (!claimValidationResult.isValid) { - validationErrors.push({ - id: validator.id, - reason: claimValidationResult.reason, - }); - } - } - return validationErrors; - }); -} -exports.validateClaimsInPayload = validateClaimsInPayload; -function defaultGetTokenTransferMethod({ req, forCreateNewSession }) { - // We allow fallback (checking headers then cookies) by default when validating - if (!forCreateNewSession) { - return "any"; - } - // In create new session we respect the frontend preference by default - switch (cookieAndHeaders_1.getAuthModeFromHeader(req)) { - case "header": - return "header"; - case "cookie": - return "cookie"; - default: - return "any"; - } -} diff --git a/lib/build/recipe/thirdparty/api/appleRedirect.d.ts b/lib/build/recipe/thirdparty/api/appleRedirect.d.ts deleted file mode 100644 index df930a9a1..000000000 --- a/lib/build/recipe/thirdparty/api/appleRedirect.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function appleRedirectHandler(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/thirdparty/api/appleRedirect.js b/lib/build/recipe/thirdparty/api/appleRedirect.js deleted file mode 100644 index caf7cad15..000000000 --- a/lib/build/recipe/thirdparty/api/appleRedirect.js +++ /dev/null @@ -1,67 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -function appleRedirectHandler(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.appleRedirectHandlerPOST === undefined) { - return false; - } - let body = yield options.req.getFormData(); - let state = body.state; - let code = body.code; - // this will redirect the user... - yield apiImplementation.appleRedirectHandlerPOST({ - code, - state, - options, - userContext: utils_1.makeDefaultUserContextFromAPI(options.req), - }); - return true; - }); -} -exports.default = appleRedirectHandler; diff --git a/lib/build/recipe/thirdparty/api/authorisationUrl.d.ts b/lib/build/recipe/thirdparty/api/authorisationUrl.d.ts deleted file mode 100644 index 5603eb9c1..000000000 --- a/lib/build/recipe/thirdparty/api/authorisationUrl.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function authorisationUrlAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/thirdparty/api/authorisationUrl.js b/lib/build/recipe/thirdparty/api/authorisationUrl.js deleted file mode 100644 index dc9c1d64d..000000000 --- a/lib/build/recipe/thirdparty/api/authorisationUrl.js +++ /dev/null @@ -1,85 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("../../../utils"); -const error_1 = __importDefault(require("../error")); -const utils_2 = require("../utils"); -const utils_3 = require("../../../utils"); -function authorisationUrlAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.authorisationUrlGET === undefined) { - return false; - } - let thirdPartyId = options.req.getKeyValueFromQuery("thirdPartyId"); - if (thirdPartyId === undefined || typeof thirdPartyId !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the thirdPartyId as a GET param", - }); - } - let provider = utils_2.findRightProvider(options.providers, thirdPartyId, undefined); - if (provider === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "The third party provider " + thirdPartyId + ` seems to be missing from the backend configs.`, - }); - } - let result = yield apiImplementation.authorisationUrlGET({ - provider, - options, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - utils_1.send200Response(options.res, result); - return true; - }); -} -exports.default = authorisationUrlAPI; diff --git a/lib/build/recipe/thirdparty/api/implementation.d.ts b/lib/build/recipe/thirdparty/api/implementation.d.ts deleted file mode 100644 index a594ecb37..000000000 --- a/lib/build/recipe/thirdparty/api/implementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIInterface(): APIInterface; -export declare function getActualClientIdFromDevelopmentClientId(client_id: string): string; diff --git a/lib/build/recipe/thirdparty/api/implementation.js b/lib/build/recipe/thirdparty/api/implementation.js deleted file mode 100644 index da30ed4af..000000000 --- a/lib/build/recipe/thirdparty/api/implementation.js +++ /dev/null @@ -1,250 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getActualClientIdFromDevelopmentClientId = void 0; -const session_1 = __importDefault(require("../../session")); -const url_1 = require("url"); -const axios = __importStar(require("axios")); -const qs = __importStar(require("querystring")); -const recipe_1 = __importDefault(require("../../emailverification/recipe")); -function getAPIInterface() { - return { - authorisationUrlGET: function ({ provider, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let providerInfo = provider.get(undefined, undefined, userContext); - let params = {}; - let keys = Object.keys(providerInfo.authorisationRedirect.params); - for (let i = 0; i < keys.length; i++) { - let key = keys[i]; - let value = providerInfo.authorisationRedirect.params[key]; - params[key] = typeof value === "function" ? yield value(options.req.original) : value; - } - if ( - providerInfo.getRedirectURI !== undefined && - !isUsingDevelopmentClientId(providerInfo.getClientId(userContext)) - ) { - // the backend wants to set the redirectURI - so we set that here. - // we add the not development keys because the oauth provider will - // redirect to supertokens.io's URL which will redirect the app - // to the the user's website, which will handle the callback as usual. - // If we add this, then instead, the supertokens' site will redirect - // the user to this API layer, which is not needed. - params["redirect_uri"] = providerInfo.getRedirectURI(userContext); - } - if (isUsingDevelopmentClientId(providerInfo.getClientId(userContext))) { - params["actual_redirect_uri"] = providerInfo.authorisationRedirect.url; - Object.keys(params).forEach((key) => { - if (params[key] === providerInfo.getClientId(userContext)) { - params[key] = getActualClientIdFromDevelopmentClientId( - providerInfo.getClientId(userContext) - ); - } - }); - } - let paramsString = new url_1.URLSearchParams(params).toString(); - let url = `${providerInfo.authorisationRedirect.url}?${paramsString}`; - if (isUsingDevelopmentClientId(providerInfo.getClientId(userContext))) { - url = `${DEV_OAUTH_AUTHORIZATION_URL}?${paramsString}`; - } - return { - status: "OK", - url, - }; - }); - }, - signInUpPOST: function ({ provider, code, redirectURI, authCodeResponse, options, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let userInfo; - let accessTokenAPIResponse; - { - let providerInfo = provider.get(undefined, undefined, userContext); - if (isUsingDevelopmentClientId(providerInfo.getClientId(userContext))) { - redirectURI = DEV_OAUTH_REDIRECT_URL; - } else if (providerInfo.getRedirectURI !== undefined) { - // we overwrite the redirectURI provided by the frontend - // since the backend wants to take charge of setting this. - redirectURI = providerInfo.getRedirectURI(userContext); - } - } - let providerInfo = provider.get(redirectURI, code, userContext); - if (authCodeResponse !== undefined) { - accessTokenAPIResponse = { - data: authCodeResponse, - }; - } else { - // we should use code to get the authCodeResponse body - if (isUsingDevelopmentClientId(providerInfo.getClientId(userContext))) { - Object.keys(providerInfo.accessTokenAPI.params).forEach((key) => { - if (providerInfo.accessTokenAPI.params[key] === providerInfo.getClientId(userContext)) { - providerInfo.accessTokenAPI.params[key] = getActualClientIdFromDevelopmentClientId( - providerInfo.getClientId(userContext) - ); - } - }); - } - accessTokenAPIResponse = yield axios.default({ - method: "post", - url: providerInfo.accessTokenAPI.url, - data: qs.stringify(providerInfo.accessTokenAPI.params), - headers: { - "content-type": "application/x-www-form-urlencoded", - accept: "application/json", // few providers like github don't send back json response by default - }, - }); - } - userInfo = yield providerInfo.getProfileInfo(accessTokenAPIResponse.data, userContext); - let emailInfo = userInfo.email; - if (emailInfo === undefined) { - return { - status: "NO_EMAIL_GIVEN_BY_PROVIDER", - }; - } - let response = yield options.recipeImplementation.signInUp({ - thirdPartyId: provider.id, - thirdPartyUserId: userInfo.id, - email: emailInfo.id, - userContext, - }); - // we set the email as verified if already verified by the OAuth provider. - // This block was added because of https://github.com/supertokens/supertokens-core/issues/295 - if (emailInfo.isVerified) { - const emailVerificationInstance = recipe_1.default.getInstance(); - if (emailVerificationInstance) { - const tokenResponse = yield emailVerificationInstance.recipeInterfaceImpl.createEmailVerificationToken( - { - userId: response.user.id, - email: response.user.email, - userContext, - } - ); - if (tokenResponse.status === "OK") { - yield emailVerificationInstance.recipeInterfaceImpl.verifyEmailUsingToken({ - token: tokenResponse.token, - userContext, - }); - } - } - } - let session = yield session_1.default.createNewSession( - options.req, - options.res, - response.user.id, - {}, - {}, - userContext - ); - return { - status: "OK", - createdNewUser: response.createdNewUser, - user: response.user, - session, - authCodeResponse: accessTokenAPIResponse.data, - }; - }); - }, - appleRedirectHandlerPOST: function ({ code, state, options }) { - return __awaiter(this, void 0, void 0, function* () { - const redirectURL = - options.appInfo.websiteDomain.getAsStringDangerous() + - options.appInfo.websiteBasePath.getAsStringDangerous() + - "/callback/apple?state=" + - state + - "&code=" + - code; - options.res.sendHTMLResponse( - `` - ); - }); - }, - }; -} -exports.default = getAPIInterface; -const DEV_OAUTH_AUTHORIZATION_URL = "https://supertokens.io/dev/oauth/redirect-to-provider"; -const DEV_OAUTH_REDIRECT_URL = "https://supertokens.io/dev/oauth/redirect-to-app"; -// If Third Party login is used with one of the following development keys, then the dev authorization url and the redirect url will be used. -const DEV_OAUTH_CLIENT_IDS = [ - "1060725074195-kmeum4crr01uirfl2op9kd5acmi9jutn.apps.googleusercontent.com", - "467101b197249757c71f", // github -]; -const DEV_KEY_IDENTIFIER = "4398792-"; -function isUsingDevelopmentClientId(client_id) { - return client_id.startsWith(DEV_KEY_IDENTIFIER) || DEV_OAUTH_CLIENT_IDS.includes(client_id); -} -function getActualClientIdFromDevelopmentClientId(client_id) { - if (client_id.startsWith(DEV_KEY_IDENTIFIER)) { - return client_id.split(DEV_KEY_IDENTIFIER)[1]; - } - return client_id; -} -exports.getActualClientIdFromDevelopmentClientId = getActualClientIdFromDevelopmentClientId; diff --git a/lib/build/recipe/thirdparty/api/signinup.d.ts b/lib/build/recipe/thirdparty/api/signinup.d.ts deleted file mode 100644 index b8fc4501c..000000000 --- a/lib/build/recipe/thirdparty/api/signinup.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface, APIOptions } from "../"; -export default function signInUpAPI(apiImplementation: APIInterface, options: APIOptions): Promise; diff --git a/lib/build/recipe/thirdparty/api/signinup.js b/lib/build/recipe/thirdparty/api/signinup.js deleted file mode 100644 index c9e1c7bf2..000000000 --- a/lib/build/recipe/thirdparty/api/signinup.js +++ /dev/null @@ -1,141 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../error")); -const utils_1 = require("../../../utils"); -const utils_2 = require("../utils"); -const utils_3 = require("../../../utils"); -function signInUpAPI(apiImplementation, options) { - return __awaiter(this, void 0, void 0, function* () { - if (apiImplementation.signInUpPOST === undefined) { - return false; - } - let bodyParams = yield options.req.getJSONBody(); - let thirdPartyId = bodyParams.thirdPartyId; - let code = bodyParams.code === undefined ? "" : bodyParams.code; - let redirectURI = bodyParams.redirectURI; - let authCodeResponse = bodyParams.authCodeResponse; - let clientId = bodyParams.clientId; - if (thirdPartyId === undefined || typeof thirdPartyId !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the thirdPartyId in request body", - }); - } - if (typeof code !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please make sure that the code in the request body is a string", - }); - } - if (code === "" && authCodeResponse === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide one of code or authCodeResponse in the request body", - }); - } - if (authCodeResponse !== undefined && authCodeResponse.access_token === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the access_token inside the authCodeResponse request param", - }); - } - if (redirectURI === undefined || typeof redirectURI !== "string") { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: "Please provide the redirectURI in request body", - }); - } - let provider = utils_2.findRightProvider(options.providers, thirdPartyId, clientId); - if (provider === undefined) { - if (clientId === undefined) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: - "The third party provider " + thirdPartyId + ` seems to be missing from the backend configs.`, - }); - } else { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: - "The third party provider " + - thirdPartyId + - ` seems to be missing from the backend configs. If it is configured, then please make sure that you are passing the correct clientId from the frontend.`, - }); - } - } - let result = yield apiImplementation.signInUpPOST({ - provider, - code, - clientId, - redirectURI, - options, - authCodeResponse, - userContext: utils_3.makeDefaultUserContextFromAPI(options.req), - }); - if (result.status === "OK") { - utils_1.send200Response(options.res, { - status: result.status, - user: result.user, - createdNewUser: result.createdNewUser, - }); - } else if (result.status === "NO_EMAIL_GIVEN_BY_PROVIDER") { - utils_1.send200Response(options.res, { - status: "NO_EMAIL_GIVEN_BY_PROVIDER", - }); - } else { - utils_1.send200Response(options.res, result); - } - return true; - }); -} -exports.default = signInUpAPI; diff --git a/lib/build/recipe/thirdparty/constants.d.ts b/lib/build/recipe/thirdparty/constants.d.ts deleted file mode 100644 index e2235e1bf..000000000 --- a/lib/build/recipe/thirdparty/constants.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -export declare const AUTHORISATION_API = "/authorisationurl"; -export declare const SIGN_IN_UP_API = "/signinup"; -export declare const APPLE_REDIRECT_HANDLER = "/callback/apple"; diff --git a/lib/build/recipe/thirdparty/constants.js b/lib/build/recipe/thirdparty/constants.js deleted file mode 100644 index 531579d94..000000000 --- a/lib/build/recipe/thirdparty/constants.js +++ /dev/null @@ -1,20 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.APPLE_REDIRECT_HANDLER = exports.SIGN_IN_UP_API = exports.AUTHORISATION_API = void 0; -exports.AUTHORISATION_API = "/authorisationurl"; -exports.SIGN_IN_UP_API = "/signinup"; -exports.APPLE_REDIRECT_HANDLER = "/callback/apple"; diff --git a/lib/build/recipe/thirdparty/error.d.ts b/lib/build/recipe/thirdparty/error.d.ts deleted file mode 100644 index cc9e34552..000000000 --- a/lib/build/recipe/thirdparty/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class ThirdPartyError extends STError { - constructor(options: { type: "BAD_INPUT_ERROR"; message: string }); -} diff --git a/lib/build/recipe/thirdparty/error.js b/lib/build/recipe/thirdparty/error.js deleted file mode 100644 index 49fa39f33..000000000 --- a/lib/build/recipe/thirdparty/error.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class ThirdPartyError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "thirdparty"; - } -} -exports.default = ThirdPartyError; diff --git a/lib/build/recipe/thirdparty/index.d.ts b/lib/build/recipe/thirdparty/index.d.ts deleted file mode 100644 index 4c076142b..000000000 --- a/lib/build/recipe/thirdparty/index.d.ts +++ /dev/null @@ -1,48 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { RecipeInterface, User, APIInterface, APIOptions, TypeProvider } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static signInUp( - thirdPartyId: string, - thirdPartyUserId: string, - email: string, - userContext?: any - ): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; - static getUserById(userId: string, userContext?: any): Promise; - static getUsersByEmail(email: string, userContext?: any): Promise; - static getUserByThirdPartyInfo( - thirdPartyId: string, - thirdPartyUserId: string, - userContext?: any - ): Promise; - static Google: typeof import("./providers/google").default; - static Github: typeof import("./providers/github").default; - static Facebook: typeof import("./providers/facebook").default; - static Apple: typeof import("./providers/apple").default; - static Discord: typeof import("./providers/discord").default; - static GoogleWorkspaces: typeof import("./providers/googleWorkspaces").default; - static Bitbucket: typeof import("./providers/bitbucket").default; - static GitLab: typeof import("./providers/gitlab").default; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let signInUp: typeof Wrapper.signInUp; -export declare let getUserById: typeof Wrapper.getUserById; -export declare let getUsersByEmail: typeof Wrapper.getUsersByEmail; -export declare let getUserByThirdPartyInfo: typeof Wrapper.getUserByThirdPartyInfo; -export declare let Google: typeof import("./providers/google").default; -export declare let Github: typeof import("./providers/github").default; -export declare let Facebook: typeof import("./providers/facebook").default; -export declare let Apple: typeof import("./providers/apple").default; -export declare let Discord: typeof import("./providers/discord").default; -export declare let GoogleWorkspaces: typeof import("./providers/googleWorkspaces").default; -export declare let Bitbucket: typeof import("./providers/bitbucket").default; -export declare let GitLab: typeof import("./providers/gitlab").default; -export type { RecipeInterface, User, APIInterface, APIOptions, TypeProvider }; diff --git a/lib/build/recipe/thirdparty/index.js b/lib/build/recipe/thirdparty/index.js deleted file mode 100644 index a643b1b06..000000000 --- a/lib/build/recipe/thirdparty/index.js +++ /dev/null @@ -1,142 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GitLab = exports.Bitbucket = exports.GoogleWorkspaces = exports.Discord = exports.Apple = exports.Facebook = exports.Github = exports.Google = exports.getUserByThirdPartyInfo = exports.getUsersByEmail = exports.getUserById = exports.signInUp = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -const thirdPartyProviders = __importStar(require("./providers")); -class Wrapper { - static signInUp(thirdPartyId, thirdPartyUserId, email, userContext = {}) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.signInUp({ - thirdPartyId, - thirdPartyUserId, - email, - userContext, - }); - }); - } - static getUserById(userId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserById({ userId, userContext }); - } - static getUsersByEmail(email, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUsersByEmail({ email, userContext }); - } - static getUserByThirdPartyInfo(thirdPartyId, thirdPartyUserId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserByThirdPartyInfo({ - thirdPartyId, - thirdPartyUserId, - userContext, - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -Wrapper.Google = thirdPartyProviders.Google; -Wrapper.Github = thirdPartyProviders.Github; -Wrapper.Facebook = thirdPartyProviders.Facebook; -Wrapper.Apple = thirdPartyProviders.Apple; -Wrapper.Discord = thirdPartyProviders.Discord; -Wrapper.GoogleWorkspaces = thirdPartyProviders.GoogleWorkspaces; -Wrapper.Bitbucket = thirdPartyProviders.Bitbucket; -Wrapper.GitLab = thirdPartyProviders.GitLab; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.signInUp = Wrapper.signInUp; -exports.getUserById = Wrapper.getUserById; -exports.getUsersByEmail = Wrapper.getUsersByEmail; -exports.getUserByThirdPartyInfo = Wrapper.getUserByThirdPartyInfo; -exports.Google = Wrapper.Google; -exports.Github = Wrapper.Github; -exports.Facebook = Wrapper.Facebook; -exports.Apple = Wrapper.Apple; -exports.Discord = Wrapper.Discord; -exports.GoogleWorkspaces = Wrapper.GoogleWorkspaces; -exports.Bitbucket = Wrapper.Bitbucket; -exports.GitLab = Wrapper.GitLab; diff --git a/lib/build/recipe/thirdparty/providers/activeDirectory.d.ts b/lib/build/recipe/thirdparty/providers/activeDirectory.d.ts deleted file mode 100644 index f6617924f..000000000 --- a/lib/build/recipe/thirdparty/providers/activeDirectory.d.ts +++ /dev/null @@ -1 +0,0 @@ -// @ts-nocheck diff --git a/lib/build/recipe/thirdparty/providers/activeDirectory.js b/lib/build/recipe/thirdparty/providers/activeDirectory.js deleted file mode 100644 index 35dd3bb54..000000000 --- a/lib/build/recipe/thirdparty/providers/activeDirectory.js +++ /dev/null @@ -1,103 +0,0 @@ -"use strict"; -// /* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. -// * -// * This software is licensed under the Apache License, Version 2.0 (the -// * "License") as published by the Apache Software Foundation. -// * -// * You may not use this file except in compliance with the License. You may -// * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// * -// * Unless required by applicable law or agreed to in writing, software -// * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// * License for the specific language governing permissions and limitations -// * under the License. -// */ -// import { TypeProvider, TypeProviderGetResponse } from "../types"; -// import { verifyIdTokenFromJWKSEndpoint } from "./utils"; -// import { getActualClientIdFromDevelopmentClientId } from "../api/implementation"; -// type TypeThirdPartyProviderActiveDirectoryWorkspacesConfig = { -// clientId: string; -// clientSecret: string; -// scope?: string[]; -// tenantId: string; -// authorisationRedirect?: { -// params?: { [key: string]: string | ((request: any) => string) }; -// }; -// isDefault?: boolean; -// }; -// export default function AD(config: TypeThirdPartyProviderActiveDirectoryWorkspacesConfig): TypeProvider { -// const id = "active-directory"; -// function get(redirectURI: string | undefined, authCodeFromRequest: string | undefined): TypeProviderGetResponse { -// let accessTokenAPIURL = `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/token`; -// let accessTokenAPIParams: { [key: string]: string } = { -// client_id: config.clientId, -// client_secret: config.clientSecret, -// grant_type: "authorization_code", -// }; -// if (authCodeFromRequest !== undefined) { -// accessTokenAPIParams.code = authCodeFromRequest; -// } -// if (redirectURI !== undefined) { -// accessTokenAPIParams.redirect_uri = redirectURI; -// } -// let authorisationRedirectURL = `https://login.microsoftonline.com/${config.tenantId}/oauth2/v2.0/authorize`; -// let scopes = ["email", "openid"]; -// if (config.scope !== undefined) { -// scopes = config.scope; -// scopes = Array.from(new Set(scopes)); -// } -// let additionalParams = -// config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined -// ? {} -// : config.authorisationRedirect.params; -// let authorizationRedirectParams: { [key: string]: string } = { -// scope: scopes.join(" "), -// response_type: "code", -// client_id: config.clientId, -// ...additionalParams, -// }; -// async function getProfileInfo(authCodeResponse: { id_token: string }) { -// let payload: any = await verifyIdTokenFromJWKSEndpoint( -// authCodeResponse.id_token, -// `https://login.microsoftonline.com/${config.tenantId}/discovery/v2.0/keys`, -// { -// audience: getActualClientIdFromDevelopmentClientId(config.clientId), -// issuer: [`https://login.microsoftonline.com/${config.tenantId}/v2.0`], -// } -// ); -// if (payload.email === undefined) { -// throw new Error("Could not get email. Please use a different login method"); -// } -// if (payload.tid !== config.tenantId) { -// throw new Error("Incorrect tenantId used for signing in."); -// } -// return { -// id: payload.sub, -// email: { -// id: "example@email.com", -// isVerified: true, -// }, -// }; -// } -// return { -// accessTokenAPI: { -// url: accessTokenAPIURL, -// params: accessTokenAPIParams, -// }, -// authorisationRedirect: { -// url: authorisationRedirectURL, -// params: authorizationRedirectParams, -// }, -// getProfileInfo, -// getClientId: () => { -// return config.clientId; -// }, -// }; -// } -// return { -// id, -// get, -// isDefault: config.isDefault, -// }; -// } diff --git a/lib/build/recipe/thirdparty/providers/apple.d.ts b/lib/build/recipe/thirdparty/providers/apple.d.ts deleted file mode 100644 index 5370e2111..000000000 --- a/lib/build/recipe/thirdparty/providers/apple.d.ts +++ /dev/null @@ -1,19 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderAppleConfig = { - clientId: string; - clientSecret: { - keyId: string; - privateKey: string; - teamId: string; - }; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function Apple(config: TypeThirdPartyProviderAppleConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/apple.js b/lib/build/recipe/thirdparty/providers/apple.js deleted file mode 100644 index 9ef569cc3..000000000 --- a/lib/build/recipe/thirdparty/providers/apple.js +++ /dev/null @@ -1,167 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const jsonwebtoken_1 = require("jsonwebtoken"); -const error_1 = __importDefault(require("../error")); -const implementation_1 = require("../api/implementation"); -const supertokens_1 = __importDefault(require("../../../supertokens")); -const constants_1 = require("../constants"); -const verify_apple_id_token_1 = __importDefault(require("verify-apple-id-token")); -function Apple(config) { - const id = "apple"; - function getClientSecret(clientId, keyId, teamId, privateKey) { - return jsonwebtoken_1.sign( - { - iss: teamId, - iat: Math.floor(Date.now() / 1000), - exp: Math.floor(Date.now() / 1000) + 86400 * 180, - aud: "https://appleid.apple.com", - sub: implementation_1.getActualClientIdFromDevelopmentClientId(clientId), - }, - privateKey.replace(/\\n/g, "\n"), - { algorithm: "ES256", keyid: keyId } - ); - } - try { - // trying to generate a client secret, in case client has not passed the values correctly - getClientSecret( - config.clientId, - config.clientSecret.keyId, - config.clientSecret.teamId, - config.clientSecret.privateKey - ); - } catch (error) { - throw new error_1.default({ - type: error_1.default.BAD_INPUT_ERROR, - message: error.message, - }); - } - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://appleid.apple.com/auth/token"; - let clientSecret = getClientSecret( - config.clientId, - config.clientSecret.keyId, - config.clientSecret.teamId, - config.clientSecret.privateKey - ); - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://appleid.apple.com/auth/authorize"; - let scopes = ["email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { scope: scopes.join(" "), response_mode: "form_post", response_type: "code", client_id: config.clientId }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - /* - - Verify the JWS E256 signature using the server’s public key - - Verify the nonce for the authentication - - Verify that the iss field contains https://appleid.apple.com - - Verify that the aud field is the developer’s client_id - - Verify that the time is earlier than the exp value of the token */ - const payload = yield verify_apple_id_token_1.default({ - idToken: accessTokenAPIResponse.id_token, - clientId: implementation_1.getActualClientIdFromDevelopmentClientId(config.clientId), - }); - if (payload === null) { - throw new Error("no user info found from user's id token received from apple"); - } - let id = payload.sub; - let email = payload.email; - let isVerified = payload.email_verified; - if (id === undefined || id === null) { - throw new Error("no user info found from user's id token received from apple"); - } - return { - id, - email: { - id: email, - isVerified, - }, - }; - }); - } - function getRedirectURI() { - let supertokens = supertokens_1.default.getInstanceOrThrowError(); - return ( - supertokens.appInfo.apiDomain.getAsStringDangerous() + - supertokens.appInfo.apiBasePath.getAsStringDangerous() + - constants_1.APPLE_REDIRECT_HANDLER - ); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - getRedirectURI, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Apple; diff --git a/lib/build/recipe/thirdparty/providers/bitbucket.d.ts b/lib/build/recipe/thirdparty/providers/bitbucket.d.ts deleted file mode 100644 index 1938f6c32..000000000 --- a/lib/build/recipe/thirdparty/providers/bitbucket.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderBitbucketConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function Bitbucket(config: TypeThirdPartyProviderBitbucketConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/bitbucket.js b/lib/build/recipe/thirdparty/providers/bitbucket.js deleted file mode 100644 index 215e1acdc..000000000 --- a/lib/build/recipe/thirdparty/providers/bitbucket.js +++ /dev/null @@ -1,147 +0,0 @@ -"use strict"; -/* Copyright (c) 2023, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -function Bitbucket(config) { - const id = "bitbucket"; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://bitbucket.org/site/oauth2/access_token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://bitbucket.org/site/oauth2/authorize"; - let scopes = ["account", "email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { scope: scopes.join(" "), access_type: "offline", response_type: "code", client_id: config.clientId }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let authHeader = `Bearer ${accessToken}`; - let response = yield axios_1.default({ - method: "get", - url: "https://api.bitbucket.org/2.0/user", - headers: { - Authorization: authHeader, - }, - }); - let userInfo = response.data; - let id = userInfo.uuid; - let emailRes = yield axios_1.default({ - method: "get", - url: "https://api.bitbucket.org/2.0/user/emails", - headers: { - Authorization: authHeader, - }, - }); - let emailData = emailRes.data; - let email = undefined; - let isVerified = false; - emailData.values.forEach((emailInfo) => { - if (emailInfo.is_primary) { - email = emailInfo.email; - isVerified = emailInfo.is_confirmed; - } - }); - if (email === undefined) { - return { - id, - }; - } - return { - id, - email: { - id: email, - isVerified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Bitbucket; diff --git a/lib/build/recipe/thirdparty/providers/discord.d.ts b/lib/build/recipe/thirdparty/providers/discord.d.ts deleted file mode 100644 index 926e9d737..000000000 --- a/lib/build/recipe/thirdparty/providers/discord.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderDiscordConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function Discord(config: TypeThirdPartyProviderDiscordConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/discord.js b/lib/build/recipe/thirdparty/providers/discord.js deleted file mode 100644 index ccb1f043e..000000000 --- a/lib/build/recipe/thirdparty/providers/discord.js +++ /dev/null @@ -1,114 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -function Discord(config) { - const id = "discord"; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://discord.com/api/oauth2/token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://discord.com/api/oauth2/authorize"; - let scopes = ["email", "identify"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { scope: scopes.join(" "), client_id: config.clientId, response_type: "code" }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let authHeader = `Bearer ${accessToken}`; - let response = yield axios_1.default({ - method: "get", - url: "https://discord.com/api/users/@me", - headers: { - Authorization: authHeader, - }, - }); - let userInfo = response.data; - return { - id: userInfo.id, - email: - userInfo.email === undefined - ? undefined - : { - id: userInfo.email, - isVerified: userInfo.verified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Discord; diff --git a/lib/build/recipe/thirdparty/providers/facebook.d.ts b/lib/build/recipe/thirdparty/providers/facebook.d.ts deleted file mode 100644 index 71b678eee..000000000 --- a/lib/build/recipe/thirdparty/providers/facebook.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderFacebookConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - isDefault?: boolean; -}; -export default function Facebook(config: TypeThirdPartyProviderFacebookConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/facebook.js b/lib/build/recipe/thirdparty/providers/facebook.js deleted file mode 100644 index 1b735a43f..000000000 --- a/lib/build/recipe/thirdparty/providers/facebook.js +++ /dev/null @@ -1,115 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -function Facebook(config) { - const id = "facebook"; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://graph.facebook.com/v9.0/oauth/access_token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://www.facebook.com/v9.0/dialog/oauth"; - let scopes = ["email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let authorizationRedirectParams = { - scope: scopes.join(" "), - response_type: "code", - client_id: config.clientId, - }; - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let response = yield axios_1.default({ - method: "get", - url: "https://graph.facebook.com/me", - params: { - access_token: accessToken, - fields: "id,email", - format: "json", - }, - }); - let userInfo = response.data; - let id = userInfo.id; - let email = userInfo.email; - if (email === undefined || email === null) { - return { - id, - }; - } - return { - id, - email: { - id: email, - isVerified: true, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Facebook; diff --git a/lib/build/recipe/thirdparty/providers/github.d.ts b/lib/build/recipe/thirdparty/providers/github.d.ts deleted file mode 100644 index 105f3adae..000000000 --- a/lib/build/recipe/thirdparty/providers/github.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderGithubConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function Github(config: TypeThirdPartyProviderGithubConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/github.js b/lib/build/recipe/thirdparty/providers/github.js deleted file mode 100644 index c387c0f4d..000000000 --- a/lib/build/recipe/thirdparty/providers/github.js +++ /dev/null @@ -1,145 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -function Github(config) { - const id = "github"; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://github.com/login/oauth/access_token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://github.com/login/oauth/authorize"; - let scopes = ["read:user", "user:email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { scope: scopes.join(" "), client_id: config.clientId }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let authHeader = `Bearer ${accessToken}`; - let response = yield axios_1.default({ - method: "get", - url: "https://api.github.com/user", - headers: { - Authorization: authHeader, - Accept: "application/vnd.github.v3+json", - }, - }); - let emailsInfoResponse = yield axios_1.default({ - url: "https://api.github.com/user/emails", - headers: { - Authorization: authHeader, - Accept: "application/vnd.github.v3+json", - }, - }); - let userInfo = response.data; - let emailsInfo = emailsInfoResponse.data; - let id = userInfo.id.toString(); // github userId will be a number - /* - if user has choosen not to show their email publicly, userInfo here will - have email as null. So we instead get the info from the emails api and - use the email which is marked as primary one. - - Sample github response for email info - [ - { - email: '', - primary: true, - verified: true, - visibility: 'public' - } - ] - */ - let emailInfo = emailsInfo.find((e) => e.primary); - if (emailInfo === undefined) { - return { - id, - }; - } - let isVerified = emailInfo !== undefined ? emailInfo.verified : false; - return { - id, - email: - emailInfo.email === undefined - ? undefined - : { - id: emailInfo.email, - isVerified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Github; diff --git a/lib/build/recipe/thirdparty/providers/gitlab.d.ts b/lib/build/recipe/thirdparty/providers/gitlab.d.ts deleted file mode 100644 index 304fde9ee..000000000 --- a/lib/build/recipe/thirdparty/providers/gitlab.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderGitLabConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - gitlabBaseUrl?: string; - isDefault?: boolean; -}; -export default function GitLab(config: TypeThirdPartyProviderGitLabConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/gitlab.js b/lib/build/recipe/thirdparty/providers/gitlab.js deleted file mode 100644 index 733b1c510..000000000 --- a/lib/build/recipe/thirdparty/providers/gitlab.js +++ /dev/null @@ -1,138 +0,0 @@ -"use strict"; -/* Copyright (c) 2023, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -const normalisedURLDomain_1 = __importDefault(require("../../../normalisedURLDomain")); -function GitLab(config) { - const id = "gitlab"; - function get(redirectURI, authCodeFromRequest) { - let baseUrl = - config.gitlabBaseUrl === undefined - ? "https://gitlab.com" // no traling slash cause we add that in the path - : new normalisedURLDomain_1.default(config.gitlabBaseUrl).getAsStringDangerous(); - let accessTokenAPIURL = baseUrl + "/oauth/token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = baseUrl + "/oauth/authorize"; - let scopes = ["read_user"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { scope: scopes.join(" "), response_type: "code", client_id: config.clientId }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let authHeader = `Bearer ${accessToken}`; - let response = yield axios_1.default({ - method: "get", - url: baseUrl + "/api/v4/user", - headers: { - Authorization: authHeader, - }, - }); - let userInfo = response.data; - let id = userInfo.id + ""; - let email = userInfo.email; - if (email === undefined || email === null) { - return { - id, - }; - } - let isVerified = userInfo.confirmed_at !== null && userInfo.confirmed_at !== undefined; - return { - id, - email: { - id: email, - isVerified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = GitLab; diff --git a/lib/build/recipe/thirdparty/providers/google.d.ts b/lib/build/recipe/thirdparty/providers/google.d.ts deleted file mode 100644 index 4baaaccce..000000000 --- a/lib/build/recipe/thirdparty/providers/google.d.ts +++ /dev/null @@ -1,15 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderGoogleConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function Google(config: TypeThirdPartyProviderGoogleConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/google.js b/lib/build/recipe/thirdparty/providers/google.js deleted file mode 100644 index a9a479c2f..000000000 --- a/lib/build/recipe/thirdparty/providers/google.js +++ /dev/null @@ -1,128 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const axios_1 = __importDefault(require("axios")); -function Google(config) { - const id = "google"; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://oauth2.googleapis.com/token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://accounts.google.com/o/oauth2/v2/auth"; - let scopes = ["https://www.googleapis.com/auth/userinfo.email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { - scope: scopes.join(" "), - access_type: "offline", - include_granted_scopes: "true", - response_type: "code", - client_id: config.clientId, - }, - additionalParams - ); - function getProfileInfo(accessTokenAPIResponse) { - return __awaiter(this, void 0, void 0, function* () { - let accessToken = accessTokenAPIResponse.access_token; - let authHeader = `Bearer ${accessToken}`; - let response = yield axios_1.default({ - method: "get", - url: "https://www.googleapis.com/oauth2/v1/userinfo", - params: { - alt: "json", - }, - headers: { - Authorization: authHeader, - }, - }); - let userInfo = response.data; - let id = userInfo.id; - let email = userInfo.email; - if (email === undefined || email === null) { - return { - id, - }; - } - let isVerified = userInfo.verified_email; - return { - id, - email: { - id: email, - isVerified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = Google; diff --git a/lib/build/recipe/thirdparty/providers/googleWorkspaces.d.ts b/lib/build/recipe/thirdparty/providers/googleWorkspaces.d.ts deleted file mode 100644 index cf313c6ac..000000000 --- a/lib/build/recipe/thirdparty/providers/googleWorkspaces.d.ts +++ /dev/null @@ -1,16 +0,0 @@ -// @ts-nocheck -import { TypeProvider } from "../types"; -declare type TypeThirdPartyProviderGoogleWorkspacesConfig = { - clientId: string; - clientSecret: string; - scope?: string[]; - domain?: string; - authorisationRedirect?: { - params?: { - [key: string]: string | ((request: any) => string); - }; - }; - isDefault?: boolean; -}; -export default function GW(config: TypeThirdPartyProviderGoogleWorkspacesConfig): TypeProvider; -export {}; diff --git a/lib/build/recipe/thirdparty/providers/googleWorkspaces.js b/lib/build/recipe/thirdparty/providers/googleWorkspaces.js deleted file mode 100644 index 8a1e526f6..000000000 --- a/lib/build/recipe/thirdparty/providers/googleWorkspaces.js +++ /dev/null @@ -1,123 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("./utils"); -const implementation_1 = require("../api/implementation"); -function GW(config) { - const id = "google-workspaces"; - let domain = config.domain === undefined ? "*" : config.domain; - function get(redirectURI, authCodeFromRequest) { - let accessTokenAPIURL = "https://oauth2.googleapis.com/token"; - let accessTokenAPIParams = { - client_id: config.clientId, - client_secret: config.clientSecret, - grant_type: "authorization_code", - }; - if (authCodeFromRequest !== undefined) { - accessTokenAPIParams.code = authCodeFromRequest; - } - if (redirectURI !== undefined) { - accessTokenAPIParams.redirect_uri = redirectURI; - } - let authorisationRedirectURL = "https://accounts.google.com/o/oauth2/v2/auth"; - let scopes = ["https://www.googleapis.com/auth/userinfo.email"]; - if (config.scope !== undefined) { - scopes = config.scope; - scopes = Array.from(new Set(scopes)); - } - let additionalParams = - config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined - ? {} - : config.authorisationRedirect.params; - let authorizationRedirectParams = Object.assign( - { - scope: scopes.join(" "), - access_type: "offline", - include_granted_scopes: "true", - response_type: "code", - client_id: config.clientId, - hd: domain, - }, - additionalParams - ); - function getProfileInfo(authCodeResponse) { - return __awaiter(this, void 0, void 0, function* () { - let payload = yield utils_1.verifyIdTokenFromJWKSEndpoint( - authCodeResponse.id_token, - "https://www.googleapis.com/oauth2/v3/certs", - { - audience: implementation_1.getActualClientIdFromDevelopmentClientId(config.clientId), - issuer: ["https://accounts.google.com", "accounts.google.com"], - } - ); - if (payload.email === undefined) { - throw new Error("Could not get email. Please use a different login method"); - } - if (payload.hd === undefined) { - throw new Error("Please use a Google Workspace ID to login"); - } - // if the domain is "*" in it, it means that any workspace email is allowed. - if (!domain.includes("*") && payload.hd !== domain) { - throw new Error("Please use emails from " + domain + " to login"); - } - return { - id: payload.sub, - email: { - id: payload.email, - isVerified: payload.email_verified, - }, - }; - }); - } - return { - accessTokenAPI: { - url: accessTokenAPIURL, - params: accessTokenAPIParams, - }, - authorisationRedirect: { - url: authorisationRedirectURL, - params: authorizationRedirectParams, - }, - getProfileInfo, - getClientId: () => { - return config.clientId; - }, - }; - } - return { - id, - get, - isDefault: config.isDefault, - }; -} -exports.default = GW; diff --git a/lib/build/recipe/thirdparty/providers/index.d.ts b/lib/build/recipe/thirdparty/providers/index.d.ts deleted file mode 100644 index 5b9d69353..000000000 --- a/lib/build/recipe/thirdparty/providers/index.d.ts +++ /dev/null @@ -1,17 +0,0 @@ -// @ts-nocheck -import ProviderGoogle from "./google"; -import ProviderFacebook from "./facebook"; -import ProviderGithub from "./github"; -import ProviderApple from "./apple"; -import ProviderDiscord from "./discord"; -import ProviderGoogleWorkspaces from "./googleWorkspaces"; -import ProviderBitbucket from "./bitbucket"; -import ProviderGitlab from "./gitlab"; -export declare let Google: typeof ProviderGoogle; -export declare let Facebook: typeof ProviderFacebook; -export declare let Github: typeof ProviderGithub; -export declare let Apple: typeof ProviderApple; -export declare let Discord: typeof ProviderDiscord; -export declare let GoogleWorkspaces: typeof ProviderGoogleWorkspaces; -export declare let Bitbucket: typeof ProviderBitbucket; -export declare let GitLab: typeof ProviderGitlab; diff --git a/lib/build/recipe/thirdparty/providers/index.js b/lib/build/recipe/thirdparty/providers/index.js deleted file mode 100644 index 467358a5e..000000000 --- a/lib/build/recipe/thirdparty/providers/index.js +++ /dev/null @@ -1,28 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.GitLab = exports.Bitbucket = exports.GoogleWorkspaces = exports.Discord = exports.Apple = exports.Github = exports.Facebook = exports.Google = void 0; -const google_1 = __importDefault(require("./google")); -const facebook_1 = __importDefault(require("./facebook")); -const github_1 = __importDefault(require("./github")); -const apple_1 = __importDefault(require("./apple")); -const discord_1 = __importDefault(require("./discord")); -// import ProviderOkta from "./okta"; -const googleWorkspaces_1 = __importDefault(require("./googleWorkspaces")); -// import ProviderAD from "./activeDirectory"; -const bitbucket_1 = __importDefault(require("./bitbucket")); -const gitlab_1 = __importDefault(require("./gitlab")); -exports.Google = google_1.default; -exports.Facebook = facebook_1.default; -exports.Github = github_1.default; -exports.Apple = apple_1.default; -exports.Discord = discord_1.default; -exports.GoogleWorkspaces = googleWorkspaces_1.default; -exports.Bitbucket = bitbucket_1.default; -exports.GitLab = gitlab_1.default; -// export let Okta = ProviderOkta; -// export let ActiveDirectory = ProviderAD; diff --git a/lib/build/recipe/thirdparty/providers/okta.d.ts b/lib/build/recipe/thirdparty/providers/okta.d.ts deleted file mode 100644 index f6617924f..000000000 --- a/lib/build/recipe/thirdparty/providers/okta.d.ts +++ /dev/null @@ -1 +0,0 @@ -// @ts-nocheck diff --git a/lib/build/recipe/thirdparty/providers/okta.js b/lib/build/recipe/thirdparty/providers/okta.js deleted file mode 100644 index 1ab55988c..000000000 --- a/lib/build/recipe/thirdparty/providers/okta.js +++ /dev/null @@ -1,105 +0,0 @@ -"use strict"; -// /* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. -// * -// * This software is licensed under the Apache License, Version 2.0 (the -// * "License") as published by the Apache Software Foundation. -// * -// * You may not use this file except in compliance with the License. You may -// * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 -// * -// * Unless required by applicable law or agreed to in writing, software -// * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT -// * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the -// * License for the specific language governing permissions and limitations -// * under the License. -// */ -// import { TypeProvider, TypeProviderGetResponse } from "../types"; -// import axios from "axios"; -// type TypeThirdPartyProviderOktaConfig = { -// clientId: string; -// clientSecret: string; -// scope?: string[]; -// authorisationRedirect?: { -// params?: { [key: string]: string | ((request: any) => string) }; -// }; -// oktaDomain: string; -// authorizationServerId?: string; -// isDefault?: boolean; -// }; -// export default function Okta(config: TypeThirdPartyProviderOktaConfig): TypeProvider { -// const id = "okta"; -// const authorizationServerId = config.authorizationServerId === undefined ? "default" : config.authorizationServerId; -// const baseUrl = `https://${config.oktaDomain}/oauth2/${authorizationServerId}`; -// function get(redirectURI: string | undefined, authCodeFromRequest: string | undefined): TypeProviderGetResponse { -// let accessTokenAPIURL = baseUrl + "/v1/token"; -// let accessTokenAPIParams: { [key: string]: string } = { -// client_id: config.clientId, -// client_secret: config.clientSecret, -// grant_type: "authorization_code", -// }; -// if (authCodeFromRequest !== undefined) { -// accessTokenAPIParams.code = authCodeFromRequest; -// } -// if (redirectURI !== undefined) { -// accessTokenAPIParams.redirect_uri = redirectURI; -// } -// let authorisationRedirectURL = baseUrl + "/v1/authorize"; -// let scopes = ["openid", "email"]; -// if (config.scope !== undefined) { -// scopes = config.scope; -// scopes = Array.from(new Set(scopes)); -// } -// let additionalParams = -// config.authorisationRedirect === undefined || config.authorisationRedirect.params === undefined -// ? {} -// : config.authorisationRedirect.params; -// let authorizationRedirectParams: { [key: string]: string } = { -// scope: scopes.join(" "), -// client_id: config.clientId, -// response_type: "code", -// ...additionalParams, -// }; -// async function getProfileInfo(accessTokenAPIResponse: { -// access_token: string; -// expires_in: number; -// token_type: string; -// }) { -// let accessToken = accessTokenAPIResponse.access_token; -// let authHeader = `Bearer ${accessToken}`; -// let response = await axios({ -// method: "get", -// url: baseUrl + "/v1/userinfo", -// headers: { -// Authorization: authHeader, -// }, -// }); -// let userInfo = response.data; -// return { -// id: userInfo.sub, -// email: { -// id: userInfo.email, -// isVerified: userInfo.email_verified, -// }, -// }; -// } -// return { -// accessTokenAPI: { -// url: accessTokenAPIURL, -// params: accessTokenAPIParams, -// }, -// authorisationRedirect: { -// url: authorisationRedirectURL, -// params: authorizationRedirectParams, -// }, -// getProfileInfo, -// getClientId: () => { -// return config.clientId; -// }, -// }; -// } -// return { -// id, -// get, -// isDefault: config.isDefault, -// }; -// } diff --git a/lib/build/recipe/thirdparty/providers/utils.d.ts b/lib/build/recipe/thirdparty/providers/utils.d.ts deleted file mode 100644 index c3d294df8..000000000 --- a/lib/build/recipe/thirdparty/providers/utils.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { VerifyOptions } from "jsonwebtoken"; -export declare function verifyIdTokenFromJWKSEndpoint( - idToken: string, - jwksUri: string, - otherOptions: VerifyOptions -): Promise; diff --git a/lib/build/recipe/thirdparty/providers/utils.js b/lib/build/recipe/thirdparty/providers/utils.js deleted file mode 100644 index fbbe76311..000000000 --- a/lib/build/recipe/thirdparty/providers/utils.js +++ /dev/null @@ -1,65 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.verifyIdTokenFromJWKSEndpoint = void 0; -const jsonwebtoken_1 = require("jsonwebtoken"); -const jwks_rsa_1 = __importDefault(require("jwks-rsa")); -function verifyIdTokenFromJWKSEndpoint(idToken, jwksUri, otherOptions) { - return __awaiter(this, void 0, void 0, function* () { - const client = jwks_rsa_1.default({ - jwksUri, - }); - function getKey(header, callback) { - client.getSigningKey(header.kid, function (_, key) { - var signingKey = key.publicKey || key.rsaPublicKey; - callback(null, signingKey); - }); - } - let payload = yield new Promise((resolve, reject) => { - jsonwebtoken_1.verify(idToken, getKey, otherOptions, function (err, decoded) { - if (err) { - reject(err); - } else { - resolve(decoded); - } - }); - }); - return payload; - }); -} -exports.verifyIdTokenFromJWKSEndpoint = verifyIdTokenFromJWKSEndpoint; diff --git a/lib/build/recipe/thirdparty/recipe.d.ts b/lib/build/recipe/thirdparty/recipe.d.ts deleted file mode 100644 index 4c4f5dae3..000000000 --- a/lib/build/recipe/thirdparty/recipe.d.ts +++ /dev/null @@ -1,40 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { NormalisedAppinfo, APIHandled, RecipeListFunction, HTTPMethod } from "../../types"; -import { TypeInput, TypeNormalisedInput, TypeProvider, RecipeInterface, APIInterface } from "./types"; -import STError from "./error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import { BaseRequest, BaseResponse } from "../../framework"; -import { GetEmailForUserIdFunc } from "../emailverification/types"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - providers: TypeProvider[]; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput, - _recipes: {}, - _ingredients: {} - ); - static init(config: TypeInput): RecipeListFunction; - static getInstanceOrThrowError(): Recipe; - static reset(): void; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - _path: NormalisedURLPath, - _method: HTTPMethod - ) => Promise; - handleError: (err: STError, _request: BaseRequest, _response: BaseResponse) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; - getEmailForUserId: GetEmailForUserIdFunc; -} diff --git a/lib/build/recipe/thirdparty/recipe.js b/lib/build/recipe/thirdparty/recipe.js deleted file mode 100644 index b60df47f8..000000000 --- a/lib/build/recipe/thirdparty/recipe.js +++ /dev/null @@ -1,191 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const utils_1 = require("./utils"); -const recipe_1 = __importDefault(require("../emailverification/recipe")); -const error_1 = __importDefault(require("./error")); -const constants_1 = require("./constants"); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -const signinup_1 = __importDefault(require("./api/signinup")); -const authorisationUrl_1 = __importDefault(require("./api/authorisationUrl")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const appleRedirect_1 = __importDefault(require("./api/appleRedirect")); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const postSuperTokensInitCallbacks_1 = require("../../postSuperTokensInitCallbacks"); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, _recipes, _ingredients) { - super(recipeId, appInfo); - this.getAPIsHandled = () => { - return [ - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.SIGN_IN_UP_API), - id: constants_1.SIGN_IN_UP_API, - disabled: this.apiImpl.signInUpPOST === undefined, - }, - { - method: "get", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.AUTHORISATION_API), - id: constants_1.AUTHORISATION_API, - disabled: this.apiImpl.authorisationUrlGET === undefined, - }, - { - method: "post", - pathWithoutApiBasePath: new normalisedURLPath_1.default(constants_1.APPLE_REDIRECT_HANDLER), - id: constants_1.APPLE_REDIRECT_HANDLER, - disabled: this.apiImpl.appleRedirectHandlerPOST === undefined, - }, - ]; - }; - this.handleAPIRequest = (id, req, res, _path, _method) => - __awaiter(this, void 0, void 0, function* () { - let options = { - config: this.config, - recipeId: this.getRecipeId(), - isInServerlessEnv: this.isInServerlessEnv, - recipeImplementation: this.recipeInterfaceImpl, - providers: this.providers, - req, - res, - appInfo: this.getAppInfo(), - }; - if (id === constants_1.SIGN_IN_UP_API) { - return yield signinup_1.default(this.apiImpl, options); - } else if (id === constants_1.AUTHORISATION_API) { - return yield authorisationUrl_1.default(this.apiImpl, options); - } else if (id === constants_1.APPLE_REDIRECT_HANDLER) { - return yield appleRedirect_1.default(this.apiImpl, options); - } - return false; - }); - this.handleError = (err, _request, _response) => - __awaiter(this, void 0, void 0, function* () { - throw err; - }); - this.getAllCORSHeaders = () => { - return []; - }; - this.isErrorFromThisRecipe = (err) => { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - }; - // helper functions... - this.getEmailForUserId = (userId, userContext) => - __awaiter(this, void 0, void 0, function* () { - let userInfo = yield this.recipeInterfaceImpl.getUserById({ userId, userContext }); - if (userInfo !== undefined) { - return { - status: "OK", - email: userInfo.email, - }; - } - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - }); - this.config = utils_1.validateAndNormaliseUserInput(appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - this.providers = this.config.signInAndUpFeature.providers; - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(querier_1.Querier.getNewInstanceOrThrowError(recipeId)) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.addPostInitCallback(() => { - const emailVerificationRecipe = recipe_1.default.getInstance(); - if (emailVerificationRecipe !== undefined) { - emailVerificationRecipe.addGetEmailForUserIdFunc(this.getEmailForUserId.bind(this)); - } - }); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe( - Recipe.RECIPE_ID, - appInfo, - isInServerlessEnv, - config, - {}, - { - emailDelivery: undefined, - } - ); - return Recipe.instance; - } else { - throw new Error("ThirdParty recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "thirdparty"; diff --git a/lib/build/recipe/thirdparty/recipeImplementation.d.ts b/lib/build/recipe/thirdparty/recipeImplementation.d.ts deleted file mode 100644 index 7d1180bfb..000000000 --- a/lib/build/recipe/thirdparty/recipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "./types"; -import { Querier } from "../../querier"; -export default function getRecipeImplementation(querier: Querier): RecipeInterface; diff --git a/lib/build/recipe/thirdparty/recipeImplementation.js b/lib/build/recipe/thirdparty/recipeImplementation.js deleted file mode 100644 index 5fe91ff97..000000000 --- a/lib/build/recipe/thirdparty/recipeImplementation.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeImplementation(querier) { - return { - signInUp: function ({ thirdPartyId, thirdPartyUserId, email }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/signinup"), { - thirdPartyId, - thirdPartyUserId, - email: { id: email }, - }); - return { - status: "OK", - createdNewUser: response.createdNewUser, - user: response.user, - }; - }); - }, - getUserById: function ({ userId }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user"), { - userId, - }); - if (response.status === "OK") { - return Object.assign({}, response.user); - } else { - return undefined; - } - }); - }, - getUsersByEmail: function ({ email }) { - return __awaiter(this, void 0, void 0, function* () { - const { users } = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/recipe/users/by-email"), - { - email, - } - ); - return users; - }); - }, - getUserByThirdPartyInfo: function ({ thirdPartyId, thirdPartyUserId }) { - return __awaiter(this, void 0, void 0, function* () { - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user"), { - thirdPartyId, - thirdPartyUserId, - }); - if (response.status === "OK") { - return Object.assign({}, response.user); - } else { - return undefined; - } - }); - }, - }; -} -exports.default = getRecipeImplementation; diff --git a/lib/build/recipe/thirdparty/types.d.ts b/lib/build/recipe/thirdparty/types.d.ts deleted file mode 100644 index 04fe306bb..000000000 --- a/lib/build/recipe/thirdparty/types.d.ts +++ /dev/null @@ -1,144 +0,0 @@ -// @ts-nocheck -import { BaseRequest, BaseResponse } from "../../framework"; -import { NormalisedAppinfo } from "../../types"; -import OverrideableBuilder from "supertokens-js-override"; -import { SessionContainerInterface } from "../session/types"; -import { GeneralErrorResponse } from "../../types"; -export declare type UserInfo = { - id: string; - email?: { - id: string; - isVerified: boolean; - }; -}; -export declare type TypeProviderGetResponse = { - accessTokenAPI: { - url: string; - params: { - [key: string]: string; - }; - }; - authorisationRedirect: { - url: string; - params: { - [key: string]: string | ((request: any) => string); - }; - }; - getProfileInfo: (authCodeResponse: any, userContext: any) => Promise; - getClientId: (userContext: any) => string; - getRedirectURI?: (userContext: any) => string; -}; -export declare type TypeProvider = { - id: string; - get: ( - redirectURI: string | undefined, - authCodeFromRequest: string | undefined, - userContext: any - ) => TypeProviderGetResponse; - isDefault?: boolean; -}; -export declare type User = { - id: string; - timeJoined: number; - email: string; - thirdParty: { - id: string; - userId: string; - }; -}; -export declare type TypeInputSignInAndUp = { - providers: TypeProvider[]; -}; -export declare type TypeNormalisedInputSignInAndUp = { - providers: TypeProvider[]; -}; -export declare type TypeInput = { - signInAndUpFeature: TypeInputSignInAndUp; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - signInAndUpFeature: TypeNormalisedInputSignInAndUp; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - getUserById(input: { userId: string; userContext: any }): Promise; - getUsersByEmail(input: { email: string; userContext: any }): Promise; - getUserByThirdPartyInfo(input: { - thirdPartyId: string; - thirdPartyUserId: string; - userContext: any; - }): Promise; - signInUp(input: { - thirdPartyId: string; - thirdPartyUserId: string; - email: string; - userContext: any; - }): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; -}; -export declare type APIOptions = { - recipeImplementation: RecipeInterface; - config: TypeNormalisedInput; - recipeId: string; - isInServerlessEnv: boolean; - providers: TypeProvider[]; - req: BaseRequest; - res: BaseResponse; - appInfo: NormalisedAppinfo; -}; -export declare type APIInterface = { - authorisationUrlGET: - | undefined - | ((input: { - provider: TypeProvider; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - url: string; - } - | GeneralErrorResponse - >); - signInUpPOST: - | undefined - | ((input: { - provider: TypeProvider; - code: string; - redirectURI: string; - authCodeResponse?: any; - clientId?: string; - options: APIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - session: SessionContainerInterface; - authCodeResponse: any; - } - | { - status: "NO_EMAIL_GIVEN_BY_PROVIDER"; - } - | GeneralErrorResponse - >); - appleRedirectHandlerPOST: - | undefined - | ((input: { code: string; state: string; options: APIOptions; userContext: any }) => Promise); -}; diff --git a/lib/build/recipe/thirdparty/types.js b/lib/build/recipe/thirdparty/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/recipe/thirdparty/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/thirdparty/utils.d.ts b/lib/build/recipe/thirdparty/utils.d.ts deleted file mode 100644 index 2c878466d..000000000 --- a/lib/build/recipe/thirdparty/utils.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import { TypeProvider } from "./types"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - appInfo: NormalisedAppinfo, - config: TypeInput -): TypeNormalisedInput; -export declare function findRightProvider( - providers: TypeProvider[], - thirdPartyId: string, - clientId?: string -): TypeProvider | undefined; diff --git a/lib/build/recipe/thirdparty/utils.js b/lib/build/recipe/thirdparty/utils.js deleted file mode 100644 index ab88136b4..000000000 --- a/lib/build/recipe/thirdparty/utils.js +++ /dev/null @@ -1,95 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.findRightProvider = exports.validateAndNormaliseUserInput = void 0; -function validateAndNormaliseUserInput(appInfo, config) { - let signInAndUpFeature = validateAndNormaliseSignInAndUpConfig(appInfo, config.signInAndUpFeature); - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config.override - ); - return { - signInAndUpFeature, - override, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function findRightProvider(providers, thirdPartyId, clientId) { - return providers.find((p) => { - let id = p.id; - if (id !== thirdPartyId) { - return false; - } - // first if there is only one provider with thirdPartyId in the providers array, - let otherProvidersWithSameId = providers.filter((p1) => p1.id === id && p !== p1); - if (otherProvidersWithSameId.length === 0) { - // they we always return that. - return true; - } - // otherwise, we look for the isDefault provider if clientId is missing - if (clientId === undefined) { - return p.isDefault === true; - } - // otherwise, we return a provider that matches based on client ID as well. - return p.get(undefined, undefined, {}).getClientId({}) === clientId; - }); -} -exports.findRightProvider = findRightProvider; -function validateAndNormaliseSignInAndUpConfig(_, config) { - let providers = config.providers; - if (providers === undefined || providers.length === 0) { - throw new Error( - "thirdparty recipe requires atleast 1 provider to be passed in signInAndUpFeature.providers config" - ); - } - // we check if there are multiple providers with the same id that have isDefault as true. - // In this case, we want to throw an error.. - let isDefaultProvidersSet = new Set(); - let allProvidersSet = new Set(); - providers.forEach((p) => { - let id = p.id; - allProvidersSet.add(p.id); - let isDefault = p.isDefault; - if (isDefault === undefined) { - // if this id is not being used by any other provider, we treat this as the isDefault - let otherProvidersWithSameId = providers.filter((p1) => p1.id === id && p !== p1); - if (otherProvidersWithSameId.length === 0) { - // we treat this as the isDefault now... - isDefault = true; - } - } - if (isDefault) { - if (isDefaultProvidersSet.has(id)) { - throw new Error( - `You have provided multiple third party providers that have the id: "${id}" and are marked as "isDefault: true". Please only mark one of them as isDefault.` - ); - } - isDefaultProvidersSet.add(id); - } - }); - if (isDefaultProvidersSet.size !== allProvidersSet.size) { - // this means that there is no provider marked as isDefault - throw new Error( - `The providers array has multiple entries for the same third party provider. Please mark one of them as the default one by using "isDefault: true".` - ); - } - return { - providers, - }; -} diff --git a/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.d.ts b/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.d.ts deleted file mode 100644 index 74122e450..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../../emailpassword"; -import { APIInterface as ThirdPartyEmailPasswordAPIInterface } from "../"; -export default function getIterfaceImpl(apiImplmentation: ThirdPartyEmailPasswordAPIInterface): APIInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.js b/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.js deleted file mode 100644 index c8d9d033a..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/emailPasswordAPIImplementation.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function getIterfaceImpl(apiImplmentation) { - var _a, _b, _c, _d, _e; - return { - emailExistsGET: - (_a = apiImplmentation.emailPasswordEmailExistsGET) === null || _a === void 0 - ? void 0 - : _a.bind(apiImplmentation), - generatePasswordResetTokenPOST: - (_b = apiImplmentation.generatePasswordResetTokenPOST) === null || _b === void 0 - ? void 0 - : _b.bind(apiImplmentation), - passwordResetPOST: - (_c = apiImplmentation.passwordResetPOST) === null || _c === void 0 ? void 0 : _c.bind(apiImplmentation), - signInPOST: - (_d = apiImplmentation.emailPasswordSignInPOST) === null || _d === void 0 - ? void 0 - : _d.bind(apiImplmentation), - signUpPOST: - (_e = apiImplmentation.emailPasswordSignUpPOST) === null || _e === void 0 - ? void 0 - : _e.bind(apiImplmentation), - }; -} -exports.default = getIterfaceImpl; diff --git a/lib/build/recipe/thirdpartyemailpassword/api/implementation.d.ts b/lib/build/recipe/thirdpartyemailpassword/api/implementation.d.ts deleted file mode 100644 index 402db9918..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/api/implementation.js b/lib/build/recipe/thirdpartyemailpassword/api/implementation.js deleted file mode 100644 index a34e03443..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/implementation.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const implementation_1 = __importDefault(require("../../emailpassword/api/implementation")); -const implementation_2 = __importDefault(require("../../thirdparty/api/implementation")); -const emailPasswordAPIImplementation_1 = __importDefault(require("./emailPasswordAPIImplementation")); -const thirdPartyAPIImplementation_1 = __importDefault(require("./thirdPartyAPIImplementation")); -function getAPIImplementation() { - var _a, _b, _c, _d, _e, _f, _g, _h; - let emailPasswordImplementation = implementation_1.default(); - let thirdPartyImplementation = implementation_2.default(); - return { - emailPasswordEmailExistsGET: - (_a = emailPasswordImplementation.emailExistsGET) === null || _a === void 0 - ? void 0 - : _a.bind(emailPasswordAPIImplementation_1.default(this)), - authorisationUrlGET: - (_b = thirdPartyImplementation.authorisationUrlGET) === null || _b === void 0 - ? void 0 - : _b.bind(thirdPartyAPIImplementation_1.default(this)), - emailPasswordSignInPOST: - (_c = emailPasswordImplementation.signInPOST) === null || _c === void 0 - ? void 0 - : _c.bind(emailPasswordAPIImplementation_1.default(this)), - emailPasswordSignUpPOST: - (_d = emailPasswordImplementation.signUpPOST) === null || _d === void 0 - ? void 0 - : _d.bind(emailPasswordAPIImplementation_1.default(this)), - generatePasswordResetTokenPOST: - (_e = emailPasswordImplementation.generatePasswordResetTokenPOST) === null || _e === void 0 - ? void 0 - : _e.bind(emailPasswordAPIImplementation_1.default(this)), - passwordResetPOST: - (_f = emailPasswordImplementation.passwordResetPOST) === null || _f === void 0 - ? void 0 - : _f.bind(emailPasswordAPIImplementation_1.default(this)), - thirdPartySignInUpPOST: - (_g = thirdPartyImplementation.signInUpPOST) === null || _g === void 0 - ? void 0 - : _g.bind(thirdPartyAPIImplementation_1.default(this)), - appleRedirectHandlerPOST: - (_h = thirdPartyImplementation.appleRedirectHandlerPOST) === null || _h === void 0 - ? void 0 - : _h.bind(thirdPartyAPIImplementation_1.default(this)), - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.d.ts b/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.d.ts deleted file mode 100644 index b0827c889..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../../thirdparty"; -import { APIInterface as ThirdPartyEmailPasswordAPIInterface } from "../"; -export default function getIterfaceImpl(apiImplmentation: ThirdPartyEmailPasswordAPIInterface): APIInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.js b/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.js deleted file mode 100644 index 0023e4411..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/api/thirdPartyAPIImplementation.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getIterfaceImpl(apiImplmentation) { - var _a, _b, _c; - const signInUpPOSTFromThirdPartyEmailPassword = - (_a = apiImplmentation.thirdPartySignInUpPOST) === null || _a === void 0 ? void 0 : _a.bind(apiImplmentation); - return { - authorisationUrlGET: - (_b = apiImplmentation.authorisationUrlGET) === null || _b === void 0 ? void 0 : _b.bind(apiImplmentation), - appleRedirectHandlerPOST: - (_c = apiImplmentation.appleRedirectHandlerPOST) === null || _c === void 0 - ? void 0 - : _c.bind(apiImplmentation), - signInUpPOST: - signInUpPOSTFromThirdPartyEmailPassword === undefined - ? undefined - : function (input) { - return __awaiter(this, void 0, void 0, function* () { - let result = yield signInUpPOSTFromThirdPartyEmailPassword(input); - if (result.status === "OK") { - if (result.user.thirdParty === undefined) { - throw new Error("Should never come here"); - } - return Object.assign(Object.assign({}, result), { - user: Object.assign(Object.assign({}, result.user), { - thirdParty: Object.assign({}, result.user.thirdParty), - }), - }); - } - return result; - }); - }, - }; -} -exports.default = getIterfaceImpl; diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index be35a1981..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,26 +0,0 @@ -// @ts-nocheck -import { TypeThirdPartyEmailPasswordEmailDeliveryInput, User } from "../../../types"; -import { RecipeInterface as EmailPasswordRecipeInterface } from "../../../../emailpassword"; -import { NormalisedAppinfo } from "../../../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class BackwardCompatibilityService - implements EmailDeliveryInterface { - private emailPasswordBackwardCompatibilityService; - constructor( - emailPasswordRecipeInterfaceImpl: EmailPasswordRecipeInterface, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - resetPasswordUsingTokenFeature?: { - createAndSendCustomEmail?: ( - user: User, - passwordResetURLWithToken: string, - userContext: any - ) => Promise; - } - ); - sendEmail: ( - input: TypeThirdPartyEmailPasswordEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.js b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.js deleted file mode 100644 index c4057c084..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const backwardCompatibility_1 = __importDefault( - require("../../../../emailpassword/emaildelivery/services/backwardCompatibility") -); -class BackwardCompatibilityService { - constructor(emailPasswordRecipeInterfaceImpl, appInfo, isInServerlessEnv, resetPasswordUsingTokenFeature) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.emailPasswordBackwardCompatibilityService.sendEmail(input); - }); - { - this.emailPasswordBackwardCompatibilityService = new backwardCompatibility_1.default( - emailPasswordRecipeInterfaceImpl, - appInfo, - isInServerlessEnv, - resetPasswordUsingTokenFeature - ); - } - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.d.ts b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.d.ts deleted file mode 100644 index 4de04d983..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import SMTP from "./smtp"; -export declare let SMTPService: typeof SMTP; diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.js b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.js deleted file mode 100644 index 7e07f6706..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMTPService = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const smtp_1 = __importDefault(require("./smtp")); -exports.SMTPService = smtp_1.default; diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.d.ts b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.d.ts deleted file mode 100644 index debae94a2..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { TypeInput } from "../../../../../ingredients/emaildelivery/services/smtp"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -import { TypeThirdPartyEmailPasswordEmailDeliveryInput } from "../../../types"; -export default class SMTPService implements EmailDeliveryInterface { - private emailPasswordSMTPService; - constructor(config: TypeInput); - sendEmail: ( - input: TypeThirdPartyEmailPasswordEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.js b/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.js deleted file mode 100644 index ab6aa1bf8..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/emaildelivery/services/smtp/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const smtp_1 = __importDefault(require("../../../../emailpassword/emaildelivery/services/smtp")); -class SMTPService { - constructor(config) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.emailPasswordSMTPService.sendEmail(input); - }); - this.emailPasswordSMTPService = new smtp_1.default(config); - } -} -exports.default = SMTPService; diff --git a/lib/build/recipe/thirdpartyemailpassword/error.d.ts b/lib/build/recipe/thirdpartyemailpassword/error.d.ts deleted file mode 100644 index 1d9c33665..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class ThirdPartyEmailPasswordError extends STError { - constructor(options: { type: "BAD_INPUT_ERROR"; message: string }); -} diff --git a/lib/build/recipe/thirdpartyemailpassword/error.js b/lib/build/recipe/thirdpartyemailpassword/error.js deleted file mode 100644 index a16bebfe0..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/error.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class ThirdPartyEmailPasswordError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "thirdpartyemailpassword"; - } -} -exports.default = ThirdPartyEmailPasswordError; diff --git a/lib/build/recipe/thirdpartyemailpassword/index.d.ts b/lib/build/recipe/thirdpartyemailpassword/index.d.ts deleted file mode 100644 index 6b0f43142..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/index.d.ts +++ /dev/null @@ -1,127 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { RecipeInterface, User, APIInterface, EmailPasswordAPIOptions, ThirdPartyAPIOptions } from "./types"; -import { TypeProvider } from "../thirdparty/types"; -import { TypeEmailPasswordEmailDeliveryInput } from "../emailpassword/types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static thirdPartySignInUp( - thirdPartyId: string, - thirdPartyUserId: string, - email: string, - userContext?: any - ): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; - static getUserByThirdPartyInfo( - thirdPartyId: string, - thirdPartyUserId: string, - userContext?: any - ): Promise; - static emailPasswordSignUp( - email: string, - password: string, - userContext?: any - ): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - >; - static emailPasswordSignIn( - email: string, - password: string, - userContext?: any - ): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - >; - static getUserById(userId: string, userContext?: any): Promise; - static getUsersByEmail(email: string, userContext?: any): Promise; - static createResetPasswordToken( - userId: string, - userContext?: any - ): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "UNKNOWN_USER_ID_ERROR"; - } - >; - static resetPasswordUsingToken( - token: string, - newPassword: string, - userContext?: any - ): Promise< - | { - status: "OK"; - userId?: string | undefined; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - >; - static Google: typeof import("../thirdparty/providers/google").default; - static updateEmailOrPassword(input: { - userId: string; - email?: string; - password?: string; - userContext?: any; - applyPasswordPolicy?: boolean; - }): Promise< - | { - status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR"; - } - | { - status: "PASSWORD_POLICY_VIOLATED_ERROR"; - failureReason: string; - } - >; - static Github: typeof import("../thirdparty/providers/github").default; - static Facebook: typeof import("../thirdparty/providers/facebook").default; - static Apple: typeof import("../thirdparty/providers/apple").default; - static Discord: typeof import("../thirdparty/providers/discord").default; - static GoogleWorkspaces: typeof import("../thirdparty/providers/googleWorkspaces").default; - static Bitbucket: typeof import("../thirdparty/providers/bitbucket").default; - static GitLab: typeof import("../thirdparty/providers/gitlab").default; - static sendEmail( - input: TypeEmailPasswordEmailDeliveryInput & { - userContext?: any; - } - ): Promise; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let emailPasswordSignUp: typeof Wrapper.emailPasswordSignUp; -export declare let emailPasswordSignIn: typeof Wrapper.emailPasswordSignIn; -export declare let thirdPartySignInUp: typeof Wrapper.thirdPartySignInUp; -export declare let getUserById: typeof Wrapper.getUserById; -export declare let getUserByThirdPartyInfo: typeof Wrapper.getUserByThirdPartyInfo; -export declare let getUsersByEmail: typeof Wrapper.getUsersByEmail; -export declare let createResetPasswordToken: typeof Wrapper.createResetPasswordToken; -export declare let resetPasswordUsingToken: typeof Wrapper.resetPasswordUsingToken; -export declare let updateEmailOrPassword: typeof Wrapper.updateEmailOrPassword; -export declare let Google: typeof import("../thirdparty/providers/google").default; -export declare let Github: typeof import("../thirdparty/providers/github").default; -export declare let Facebook: typeof import("../thirdparty/providers/facebook").default; -export declare let Apple: typeof import("../thirdparty/providers/apple").default; -export declare let Discord: typeof import("../thirdparty/providers/discord").default; -export declare let GoogleWorkspaces: typeof import("../thirdparty/providers/googleWorkspaces").default; -export declare let Bitbucket: typeof import("../thirdparty/providers/bitbucket").default; -export declare let GitLab: typeof import("../thirdparty/providers/gitlab").default; -export type { RecipeInterface, TypeProvider, User, APIInterface, EmailPasswordAPIOptions, ThirdPartyAPIOptions }; -export declare let sendEmail: typeof Wrapper.sendEmail; diff --git a/lib/build/recipe/thirdpartyemailpassword/index.js b/lib/build/recipe/thirdpartyemailpassword/index.js deleted file mode 100644 index fa2d0eed7..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/index.js +++ /dev/null @@ -1,186 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sendEmail = exports.GitLab = exports.Bitbucket = exports.GoogleWorkspaces = exports.Discord = exports.Apple = exports.Facebook = exports.Github = exports.Google = exports.updateEmailOrPassword = exports.resetPasswordUsingToken = exports.createResetPasswordToken = exports.getUsersByEmail = exports.getUserByThirdPartyInfo = exports.getUserById = exports.thirdPartySignInUp = exports.emailPasswordSignIn = exports.emailPasswordSignUp = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -const thirdPartyProviders = __importStar(require("../thirdparty/providers")); -class Wrapper { - static thirdPartySignInUp(thirdPartyId, thirdPartyUserId, email, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.thirdPartySignInUp({ - thirdPartyId, - thirdPartyUserId, - email, - userContext, - }); - } - static getUserByThirdPartyInfo(thirdPartyId, thirdPartyUserId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserByThirdPartyInfo({ - thirdPartyId, - thirdPartyUserId, - userContext, - }); - } - static emailPasswordSignUp(email, password, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.emailPasswordSignUp({ - email, - password, - userContext, - }); - } - static emailPasswordSignIn(email, password, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.emailPasswordSignIn({ - email, - password, - userContext, - }); - } - static getUserById(userId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserById({ userId, userContext }); - } - static getUsersByEmail(email, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUsersByEmail({ email, userContext }); - } - static createResetPasswordToken(userId, userContext = {}) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.createResetPasswordToken({ userId, userContext }); - } - static resetPasswordUsingToken(token, newPassword, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.resetPasswordUsingToken({ - token, - newPassword, - userContext, - }); - } - static updateEmailOrPassword(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.updateEmailOrPassword(Object.assign({ userContext: {} }, input)); - } - // static Okta = thirdPartyProviders.Okta; - // static ActiveDirectory = thirdPartyProviders.ActiveDirectory; - static sendEmail(input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default - .getInstanceOrThrowError() - .emailDelivery.ingredientInterfaceImpl.sendEmail(Object.assign({ userContext: {} }, input)); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -Wrapper.Google = thirdPartyProviders.Google; -Wrapper.Github = thirdPartyProviders.Github; -Wrapper.Facebook = thirdPartyProviders.Facebook; -Wrapper.Apple = thirdPartyProviders.Apple; -Wrapper.Discord = thirdPartyProviders.Discord; -Wrapper.GoogleWorkspaces = thirdPartyProviders.GoogleWorkspaces; -Wrapper.Bitbucket = thirdPartyProviders.Bitbucket; -Wrapper.GitLab = thirdPartyProviders.GitLab; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.emailPasswordSignUp = Wrapper.emailPasswordSignUp; -exports.emailPasswordSignIn = Wrapper.emailPasswordSignIn; -exports.thirdPartySignInUp = Wrapper.thirdPartySignInUp; -exports.getUserById = Wrapper.getUserById; -exports.getUserByThirdPartyInfo = Wrapper.getUserByThirdPartyInfo; -exports.getUsersByEmail = Wrapper.getUsersByEmail; -exports.createResetPasswordToken = Wrapper.createResetPasswordToken; -exports.resetPasswordUsingToken = Wrapper.resetPasswordUsingToken; -exports.updateEmailOrPassword = Wrapper.updateEmailOrPassword; -exports.Google = Wrapper.Google; -exports.Github = Wrapper.Github; -exports.Facebook = Wrapper.Facebook; -exports.Apple = Wrapper.Apple; -exports.Discord = Wrapper.Discord; -exports.GoogleWorkspaces = Wrapper.GoogleWorkspaces; -exports.Bitbucket = Wrapper.Bitbucket; -exports.GitLab = Wrapper.GitLab; -exports.sendEmail = Wrapper.sendEmail; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts b/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts deleted file mode 100644 index 36494b074..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipe.d.ts +++ /dev/null @@ -1,60 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { NormalisedAppinfo, APIHandled, RecipeListFunction, HTTPMethod } from "../../types"; -import EmailPasswordRecipe from "../emailpassword/recipe"; -import ThirdPartyRecipe from "../thirdparty/recipe"; -import { BaseRequest, BaseResponse } from "../../framework"; -import STError from "./error"; -import { - TypeInput, - TypeNormalisedInput, - RecipeInterface, - APIInterface, - TypeThirdPartyEmailPasswordEmailDeliveryInput, -} from "./types"; -import STErrorEmailPassword from "../emailpassword/error"; -import STErrorThirdParty from "../thirdparty/error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - private emailPasswordRecipe; - private thirdPartyRecipe; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - isInServerlessEnv: boolean; - emailDelivery: EmailDeliveryIngredient; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput, - recipes: { - thirdPartyInstance: ThirdPartyRecipe | undefined; - emailPasswordInstance: EmailPasswordRecipe | undefined; - }, - ingredients: { - emailDelivery: EmailDeliveryIngredient | undefined; - } - ); - static init(config: TypeInput): RecipeListFunction; - static reset(): void; - static getInstanceOrThrowError(): Recipe; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - path: NormalisedURLPath, - method: HTTPMethod - ) => Promise; - handleError: ( - err: STErrorEmailPassword | STErrorThirdParty, - request: BaseRequest, - response: BaseResponse - ) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; -} diff --git a/lib/build/recipe/thirdpartyemailpassword/recipe.js b/lib/build/recipe/thirdpartyemailpassword/recipe.js deleted file mode 100644 index 5d7b11450..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipe.js +++ /dev/null @@ -1,245 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const recipe_1 = __importDefault(require("../emailpassword/recipe")); -const recipe_2 = __importDefault(require("../thirdparty/recipe")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const emailPasswordRecipeImplementation_1 = __importDefault( - require("./recipeImplementation/emailPasswordRecipeImplementation") -); -const thirdPartyRecipeImplementation_1 = __importDefault( - require("./recipeImplementation/thirdPartyRecipeImplementation") -); -const thirdPartyAPIImplementation_1 = __importDefault(require("./api/thirdPartyAPIImplementation")); -const emailPasswordAPIImplementation_1 = __importDefault(require("./api/emailPasswordAPIImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const emaildelivery_1 = __importDefault(require("../../ingredients/emaildelivery")); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, recipes, ingredients) { - super(recipeId, appInfo); - this.getAPIsHandled = () => { - let apisHandled = [...this.emailPasswordRecipe.getAPIsHandled()]; - if (this.thirdPartyRecipe !== undefined) { - apisHandled.push(...this.thirdPartyRecipe.getAPIsHandled()); - } - return apisHandled; - }; - this.handleAPIRequest = (id, req, res, path, method) => - __awaiter(this, void 0, void 0, function* () { - if (this.emailPasswordRecipe.returnAPIIdIfCanHandleRequest(path, method) !== undefined) { - return yield this.emailPasswordRecipe.handleAPIRequest(id, req, res, path, method); - } - if ( - this.thirdPartyRecipe !== undefined && - this.thirdPartyRecipe.returnAPIIdIfCanHandleRequest(path, method) !== undefined - ) { - return yield this.thirdPartyRecipe.handleAPIRequest(id, req, res, path, method); - } - return false; - }); - this.handleError = (err, request, response) => - __awaiter(this, void 0, void 0, function* () { - if (err.fromRecipe === Recipe.RECIPE_ID) { - throw err; - } else { - if (this.emailPasswordRecipe.isErrorFromThisRecipe(err)) { - return yield this.emailPasswordRecipe.handleError(err, request, response); - } else if ( - this.thirdPartyRecipe !== undefined && - this.thirdPartyRecipe.isErrorFromThisRecipe(err) - ) { - return yield this.thirdPartyRecipe.handleError(err, request, response); - } - throw err; - } - }); - this.getAllCORSHeaders = () => { - let corsHeaders = [...this.emailPasswordRecipe.getAllCORSHeaders()]; - if (this.thirdPartyRecipe !== undefined) { - corsHeaders.push(...this.thirdPartyRecipe.getAllCORSHeaders()); - } - return corsHeaders; - }; - this.isErrorFromThisRecipe = (err) => { - return ( - error_1.default.isErrorFromSuperTokens(err) && - (err.fromRecipe === Recipe.RECIPE_ID || - this.emailPasswordRecipe.isErrorFromThisRecipe(err) || - (this.thirdPartyRecipe !== undefined && this.thirdPartyRecipe.isErrorFromThisRecipe(err))) - ); - }; - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - { - const getEmailPasswordConfig = () => this.emailPasswordRecipe.config; - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default( - querier_1.Querier.getNewInstanceOrThrowError(recipe_1.default.RECIPE_ID), - getEmailPasswordConfig, - querier_1.Querier.getNewInstanceOrThrowError(recipe_2.default.RECIPE_ID) - ) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - let emailPasswordRecipeImplementation = emailPasswordRecipeImplementation_1.default(this.recipeInterfaceImpl); - /** - * emailDelivery will always needs to be declared after isInServerlessEnv - * and recipeInterfaceImpl values are set - */ - this.emailDelivery = - ingredients.emailDelivery === undefined - ? new emaildelivery_1.default( - this.config.getEmailDeliveryConfig(emailPasswordRecipeImplementation, this.isInServerlessEnv) - ) - : ingredients.emailDelivery; - this.emailPasswordRecipe = - recipes.emailPasswordInstance !== undefined - ? recipes.emailPasswordInstance - : new recipe_1.default( - recipeId, - appInfo, - isInServerlessEnv, - { - override: { - functions: (_) => { - return emailPasswordRecipeImplementation; - }, - apis: (_) => { - return emailPasswordAPIImplementation_1.default(this.apiImpl); - }, - }, - signUpFeature: { - formFields: this.config.signUpFeature.formFields, - }, - resetPasswordUsingTokenFeature: this.config.resetPasswordUsingTokenFeature, - }, - { - emailDelivery: this.emailDelivery, - } - ); - if (this.config.providers.length !== 0) { - this.thirdPartyRecipe = - recipes.thirdPartyInstance !== undefined - ? recipes.thirdPartyInstance - : new recipe_2.default( - recipeId, - appInfo, - isInServerlessEnv, - { - override: { - functions: (_) => { - return thirdPartyRecipeImplementation_1.default(this.recipeInterfaceImpl); - }, - apis: (_) => { - return thirdPartyAPIImplementation_1.default(this.apiImpl); - }, - }, - signInAndUpFeature: { - providers: this.config.providers, - }, - }, - {}, - { - emailDelivery: this.emailDelivery, - } - ); - } - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe( - Recipe.RECIPE_ID, - appInfo, - isInServerlessEnv, - config, - { - emailPasswordInstance: undefined, - thirdPartyInstance: undefined, - }, - { - emailDelivery: undefined, - } - ); - return Recipe.instance; - } else { - throw new Error( - "ThirdPartyEmailPassword recipe has already been initialised. Please check your code for bugs." - ); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "thirdpartyemailpassword"; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.d.ts b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.d.ts deleted file mode 100644 index 26119b84e..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../../emailpassword/types"; -import { RecipeInterface as ThirdPartyEmailPasswordRecipeInterface } from "../types"; -export default function getRecipeInterface(recipeInterface: ThirdPartyEmailPasswordRecipeInterface): RecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.js b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.js deleted file mode 100644 index 8d8772bdd..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/emailPasswordRecipeImplementation.js +++ /dev/null @@ -1,84 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getRecipeInterface(recipeInterface) { - return { - signUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.emailPasswordSignUp(input); - }); - }, - signIn: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return recipeInterface.emailPasswordSignIn(input); - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserById(input); - if (user === undefined || user.thirdParty !== undefined) { - // either user is undefined or it's a thirdparty user. - return undefined; - } - return user; - }); - }, - getUserByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let result = yield recipeInterface.getUsersByEmail(input); - for (let i = 0; i < result.length; i++) { - if (result[i].thirdParty === undefined) { - return result[i]; - } - } - return undefined; - }); - }, - createResetPasswordToken: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return recipeInterface.createResetPasswordToken(input); - }); - }, - resetPasswordUsingToken: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return recipeInterface.resetPasswordUsingToken(input); - }); - }, - updateEmailOrPassword: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return recipeInterface.updateEmailOrPassword(input); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.d.ts b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.d.ts deleted file mode 100644 index 77b5d763c..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../types"; -import { Querier } from "../../../querier"; -import { TypeNormalisedInput } from "../../emailpassword/types"; -export default function getRecipeInterface( - emailPasswordQuerier: Querier, - getEmailPasswordConfig: () => TypeNormalisedInput, - thirdPartyQuerier?: Querier -): RecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.js b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.js deleted file mode 100644 index 0408fd6d4..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/index.js +++ /dev/null @@ -1,151 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeImplementation_1 = __importDefault(require("../../emailpassword/recipeImplementation")); -const recipeImplementation_2 = __importDefault(require("../../thirdparty/recipeImplementation")); -const emailPasswordRecipeImplementation_1 = __importDefault(require("./emailPasswordRecipeImplementation")); -const thirdPartyRecipeImplementation_1 = __importDefault(require("./thirdPartyRecipeImplementation")); -function getRecipeInterface(emailPasswordQuerier, getEmailPasswordConfig, thirdPartyQuerier) { - let originalEmailPasswordImplementation = recipeImplementation_1.default( - emailPasswordQuerier, - getEmailPasswordConfig - ); - let originalThirdPartyImplementation; - if (thirdPartyQuerier !== undefined) { - originalThirdPartyImplementation = recipeImplementation_2.default(thirdPartyQuerier); - } - return { - emailPasswordSignUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield originalEmailPasswordImplementation.signUp.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - }); - }, - emailPasswordSignIn: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalEmailPasswordImplementation.signIn.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - }); - }, - thirdPartySignInUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (originalThirdPartyImplementation === undefined) { - throw new Error("No thirdparty provider configured"); - } - return originalThirdPartyImplementation.signInUp.bind(thirdPartyRecipeImplementation_1.default(this))( - input - ); - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield originalEmailPasswordImplementation.getUserById.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - if (user !== undefined) { - return user; - } - if (originalThirdPartyImplementation === undefined) { - return undefined; - } - return yield originalThirdPartyImplementation.getUserById.bind( - thirdPartyRecipeImplementation_1.default(this) - )(input); - }); - }, - getUsersByEmail: function ({ email, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let userFromEmailPass = yield originalEmailPasswordImplementation.getUserByEmail.bind( - emailPasswordRecipeImplementation_1.default(this) - )({ email, userContext }); - if (originalThirdPartyImplementation === undefined) { - return userFromEmailPass === undefined ? [] : [userFromEmailPass]; - } - let usersFromThirdParty = yield originalThirdPartyImplementation.getUsersByEmail.bind( - thirdPartyRecipeImplementation_1.default(this) - )({ email, userContext }); - if (userFromEmailPass !== undefined) { - return [...usersFromThirdParty, userFromEmailPass]; - } - return usersFromThirdParty; - }); - }, - getUserByThirdPartyInfo: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (originalThirdPartyImplementation === undefined) { - return undefined; - } - return originalThirdPartyImplementation.getUserByThirdPartyInfo.bind( - thirdPartyRecipeImplementation_1.default(this) - )(input); - }); - }, - createResetPasswordToken: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalEmailPasswordImplementation.createResetPasswordToken.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - }); - }, - resetPasswordUsingToken: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalEmailPasswordImplementation.resetPasswordUsingToken.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - }); - }, - updateEmailOrPassword: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield this.getUserById({ userId: input.userId, userContext: input.userContext }); - if (user === undefined) { - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - } else if (user.thirdParty !== undefined) { - throw new Error("Cannot update email or password of a user who signed up using third party login."); - } - return originalEmailPasswordImplementation.updateEmailOrPassword.bind( - emailPasswordRecipeImplementation_1.default(this) - )(input); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.d.ts b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.d.ts deleted file mode 100644 index fc596f02a..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../../thirdparty/types"; -import { RecipeInterface as ThirdPartyEmailPasswordRecipeInterface } from "../types"; -export default function getRecipeInterface(recipeInterface: ThirdPartyEmailPasswordRecipeInterface): RecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.js b/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.js deleted file mode 100644 index 3dd764785..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/recipeImplementation/thirdPartyRecipeImplementation.js +++ /dev/null @@ -1,94 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getRecipeInterface(recipeInterface) { - return { - getUserByThirdPartyInfo: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserByThirdPartyInfo(input); - if (user === undefined || user.thirdParty === undefined) { - return undefined; - } - return { - email: user.email, - id: user.id, - timeJoined: user.timeJoined, - thirdParty: user.thirdParty, - }; - }); - }, - signInUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let result = yield recipeInterface.thirdPartySignInUp(input); - if (result.user.thirdParty === undefined) { - throw new Error("Should never come here"); - } - return { - status: "OK", - createdNewUser: result.createdNewUser, - user: { - email: result.user.email, - id: result.user.id, - timeJoined: result.user.timeJoined, - thirdParty: result.user.thirdParty, - }, - }; - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserById(input); - if (user === undefined || user.thirdParty === undefined) { - // either user is undefined or it's an email password user. - return undefined; - } - return { - email: user.email, - id: user.id, - timeJoined: user.timeJoined, - thirdParty: user.thirdParty, - }; - }); - }, - getUsersByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let users = yield recipeInterface.getUsersByEmail(input); - // we filter out all non thirdparty users. - return users.filter((u) => { - return u.thirdParty !== undefined; - }); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartyemailpassword/types.d.ts b/lib/build/recipe/thirdpartyemailpassword/types.d.ts deleted file mode 100644 index d6e1ed7c2..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/types.d.ts +++ /dev/null @@ -1,294 +0,0 @@ -// @ts-nocheck -import { TypeProvider, APIOptions as ThirdPartyAPIOptionsOriginal } from "../thirdparty/types"; -import { - NormalisedFormField, - TypeFormField, - TypeInputFormField, - TypeInputResetPasswordUsingTokenFeature, - APIOptions as EmailPasswordAPIOptionsOriginal, - TypeEmailPasswordEmailDeliveryInput, - RecipeInterface as EPRecipeInterface, -} from "../emailpassword/types"; -import OverrideableBuilder from "supertokens-js-override"; -import { SessionContainerInterface } from "../session/types"; -import { - TypeInput as EmailDeliveryTypeInput, - TypeInputWithService as EmailDeliveryTypeInputWithService, -} from "../../ingredients/emaildelivery/types"; -import { GeneralErrorResponse } from "../../types"; -export declare type User = { - id: string; - timeJoined: number; - email: string; - thirdParty?: { - id: string; - userId: string; - }; -}; -export declare type TypeContextEmailPasswordSignUp = { - loginType: "emailpassword"; - formFields: TypeFormField[]; -}; -export declare type TypeContextEmailPasswordSignIn = { - loginType: "emailpassword"; -}; -export declare type TypeContextThirdParty = { - loginType: "thirdparty"; - thirdPartyAuthCodeResponse: any; -}; -export declare type TypeInputSignUp = { - formFields?: TypeInputFormField[]; -}; -export declare type TypeNormalisedInputSignUp = { - formFields: NormalisedFormField[]; -}; -export declare type TypeInput = { - signUpFeature?: TypeInputSignUp; - providers?: TypeProvider[]; - emailDelivery?: EmailDeliveryTypeInput; - resetPasswordUsingTokenFeature?: TypeInputResetPasswordUsingTokenFeature; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - signUpFeature: TypeNormalisedInputSignUp; - providers: TypeProvider[]; - getEmailDeliveryConfig: ( - emailPasswordRecipeImpl: EPRecipeInterface, - isInServerlessEnv: boolean - ) => EmailDeliveryTypeInputWithService; - resetPasswordUsingTokenFeature?: TypeInputResetPasswordUsingTokenFeature; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - getUserById(input: { userId: string; userContext: any }): Promise; - getUsersByEmail(input: { email: string; userContext: any }): Promise; - getUserByThirdPartyInfo(input: { - thirdPartyId: string; - thirdPartyUserId: string; - userContext: any; - }): Promise; - thirdPartySignInUp(input: { - thirdPartyId: string; - thirdPartyUserId: string; - email: string; - userContext: any; - }): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; - emailPasswordSignUp(input: { - email: string; - password: string; - userContext: any; - }): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - >; - emailPasswordSignIn(input: { - email: string; - password: string; - userContext: any; - }): Promise< - | { - status: "OK"; - user: User; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - >; - createResetPasswordToken(input: { - userId: string; - userContext: any; - }): Promise< - | { - status: "OK"; - token: string; - } - | { - status: "UNKNOWN_USER_ID_ERROR"; - } - >; - resetPasswordUsingToken(input: { - token: string; - newPassword: string; - userContext: any; - }): Promise< - | { - status: "OK"; - /** - * The id of the user whose password was reset. - * Defined for Core versions 3.9 or later - */ - userId?: string; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - >; - updateEmailOrPassword(input: { - userId: string; - email?: string; - password?: string; - userContext: any; - applyPasswordPolicy?: boolean; - }): Promise< - | { - status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR"; - } - | { - status: "PASSWORD_POLICY_VIOLATED_ERROR"; - failureReason: string; - } - >; -}; -export declare type EmailPasswordAPIOptions = EmailPasswordAPIOptionsOriginal; -export declare type ThirdPartyAPIOptions = ThirdPartyAPIOptionsOriginal; -export declare type APIInterface = { - authorisationUrlGET: - | undefined - | ((input: { - provider: TypeProvider; - options: ThirdPartyAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - url: string; - } - | GeneralErrorResponse - >); - emailPasswordEmailExistsGET: - | undefined - | ((input: { - email: string; - options: EmailPasswordAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >); - generatePasswordResetTokenPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: EmailPasswordAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - } - | GeneralErrorResponse - >); - passwordResetPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - token: string; - options: EmailPasswordAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - userId?: string; - } - | { - status: "RESET_PASSWORD_INVALID_TOKEN_ERROR"; - } - | GeneralErrorResponse - >); - thirdPartySignInUpPOST: - | undefined - | ((input: { - provider: TypeProvider; - code: string; - redirectURI: string; - authCodeResponse?: any; - clientId?: string; - options: ThirdPartyAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - session: SessionContainerInterface; - authCodeResponse: any; - } - | GeneralErrorResponse - | { - status: "NO_EMAIL_GIVEN_BY_PROVIDER"; - } - >); - emailPasswordSignInPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: EmailPasswordAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - user: User; - session: SessionContainerInterface; - } - | { - status: "WRONG_CREDENTIALS_ERROR"; - } - | GeneralErrorResponse - >); - emailPasswordSignUpPOST: - | undefined - | ((input: { - formFields: { - id: string; - value: string; - }[]; - options: EmailPasswordAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - user: User; - session: SessionContainerInterface; - } - | { - status: "EMAIL_ALREADY_EXISTS_ERROR"; - } - | GeneralErrorResponse - >); - appleRedirectHandlerPOST: - | undefined - | ((input: { code: string; state: string; options: ThirdPartyAPIOptions; userContext: any }) => Promise); -}; -export declare type TypeThirdPartyEmailPasswordEmailDeliveryInput = TypeEmailPasswordEmailDeliveryInput; diff --git a/lib/build/recipe/thirdpartyemailpassword/types.js b/lib/build/recipe/thirdpartyemailpassword/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/thirdpartyemailpassword/utils.d.ts b/lib/build/recipe/thirdpartyemailpassword/utils.d.ts deleted file mode 100644 index 60b02c8b9..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/utils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import { TypeInput, TypeNormalisedInput } from "./types"; -import Recipe from "./recipe"; -export declare function validateAndNormaliseUserInput( - recipeInstance: Recipe, - appInfo: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/thirdpartyemailpassword/utils.js b/lib/build/recipe/thirdpartyemailpassword/utils.js deleted file mode 100644 index daa8a505c..000000000 --- a/lib/build/recipe/thirdpartyemailpassword/utils.js +++ /dev/null @@ -1,90 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -const utils_1 = require("../emailpassword/utils"); -const backwardCompatibility_1 = __importDefault(require("./emaildelivery/services/backwardCompatibility")); -function validateAndNormaliseUserInput(recipeInstance, appInfo, config) { - let signUpFeature = validateAndNormaliseSignUpConfig( - recipeInstance, - appInfo, - config === undefined ? undefined : config.signUpFeature - ); - let resetPasswordUsingTokenFeature = config === undefined ? undefined : config.resetPasswordUsingTokenFeature; - let providers = config === undefined || config.providers === undefined ? [] : config.providers; - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - function getEmailDeliveryConfig(emailPasswordRecipeImpl, isInServerlessEnv) { - var _a; - let emailService = - (_a = config === null || config === void 0 ? void 0 : config.emailDelivery) === null || _a === void 0 - ? void 0 - : _a.service; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomEmail config. If the user - * has not passed even that config, we use the default - * createAndSendCustomEmail implementation - */ - if (emailService === undefined) { - emailService = new backwardCompatibility_1.default( - emailPasswordRecipeImpl, - appInfo, - isInServerlessEnv, - config === null || config === void 0 ? void 0 : config.resetPasswordUsingTokenFeature - ); - } - return Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.emailDelivery), { - /** - * if we do - * let emailDelivery = { - * service: emailService, - * ...config.emailDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: emailService, - }); - } - return { - override, - getEmailDeliveryConfig, - signUpFeature, - providers, - resetPasswordUsingTokenFeature, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; -function validateAndNormaliseSignUpConfig(_, __, config) { - let formFields = utils_1.normaliseSignUpFormFields(config === undefined ? undefined : config.formFields); - return { - formFields, - }; -} diff --git a/lib/build/recipe/thirdpartypasswordless/api/implementation.d.ts b/lib/build/recipe/thirdpartypasswordless/api/implementation.d.ts deleted file mode 100644 index 0218549fa..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/implementation.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../types"; -export default function getAPIImplementation(): APIInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/api/implementation.js b/lib/build/recipe/thirdpartypasswordless/api/implementation.js deleted file mode 100644 index cb792ceb7..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/implementation.js +++ /dev/null @@ -1,51 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const implementation_1 = __importDefault(require("../../passwordless/api/implementation")); -const implementation_2 = __importDefault(require("../../thirdparty/api/implementation")); -const passwordlessAPIImplementation_1 = __importDefault(require("./passwordlessAPIImplementation")); -const thirdPartyAPIImplementation_1 = __importDefault(require("./thirdPartyAPIImplementation")); -function getAPIImplementation() { - var _a, _b, _c, _d, _e, _f, _g, _h; - let passwordlessImplementation = implementation_1.default(); - let thirdPartyImplementation = implementation_2.default(); - return { - consumeCodePOST: - (_a = passwordlessImplementation.consumeCodePOST) === null || _a === void 0 - ? void 0 - : _a.bind(passwordlessAPIImplementation_1.default(this)), - createCodePOST: - (_b = passwordlessImplementation.createCodePOST) === null || _b === void 0 - ? void 0 - : _b.bind(passwordlessAPIImplementation_1.default(this)), - passwordlessUserEmailExistsGET: - (_c = passwordlessImplementation.emailExistsGET) === null || _c === void 0 - ? void 0 - : _c.bind(passwordlessAPIImplementation_1.default(this)), - passwordlessUserPhoneNumberExistsGET: - (_d = passwordlessImplementation.phoneNumberExistsGET) === null || _d === void 0 - ? void 0 - : _d.bind(passwordlessAPIImplementation_1.default(this)), - resendCodePOST: - (_e = passwordlessImplementation.resendCodePOST) === null || _e === void 0 - ? void 0 - : _e.bind(passwordlessAPIImplementation_1.default(this)), - authorisationUrlGET: - (_f = thirdPartyImplementation.authorisationUrlGET) === null || _f === void 0 - ? void 0 - : _f.bind(thirdPartyAPIImplementation_1.default(this)), - thirdPartySignInUpPOST: - (_g = thirdPartyImplementation.signInUpPOST) === null || _g === void 0 - ? void 0 - : _g.bind(thirdPartyAPIImplementation_1.default(this)), - appleRedirectHandlerPOST: - (_h = thirdPartyImplementation.appleRedirectHandlerPOST) === null || _h === void 0 - ? void 0 - : _h.bind(thirdPartyAPIImplementation_1.default(this)), - }; -} -exports.default = getAPIImplementation; diff --git a/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.d.ts b/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.d.ts deleted file mode 100644 index e37fd1b22..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../../passwordless"; -import { APIInterface as ThirdPartyPasswordlessAPIInterface } from "../types"; -export default function getIterfaceImpl(apiImplmentation: ThirdPartyPasswordlessAPIInterface): APIInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.js b/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.js deleted file mode 100644 index 25e56c8b2..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/passwordlessAPIImplementation.js +++ /dev/null @@ -1,22 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -function getIterfaceImpl(apiImplmentation) { - var _a, _b, _c, _d, _e; - return { - emailExistsGET: - (_a = apiImplmentation.passwordlessUserEmailExistsGET) === null || _a === void 0 - ? void 0 - : _a.bind(apiImplmentation), - consumeCodePOST: - (_b = apiImplmentation.consumeCodePOST) === null || _b === void 0 ? void 0 : _b.bind(apiImplmentation), - createCodePOST: - (_c = apiImplmentation.createCodePOST) === null || _c === void 0 ? void 0 : _c.bind(apiImplmentation), - phoneNumberExistsGET: - (_d = apiImplmentation.passwordlessUserPhoneNumberExistsGET) === null || _d === void 0 - ? void 0 - : _d.bind(apiImplmentation), - resendCodePOST: - (_e = apiImplmentation.resendCodePOST) === null || _e === void 0 ? void 0 : _e.bind(apiImplmentation), - }; -} -exports.default = getIterfaceImpl; diff --git a/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.d.ts b/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.d.ts deleted file mode 100644 index 11fc459c9..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { APIInterface } from "../../thirdparty"; -import { APIInterface as ThirdPartyPasswordlessAPIInterface } from "../types"; -export default function getIterfaceImpl(apiImplmentation: ThirdPartyPasswordlessAPIInterface): APIInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.js b/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.js deleted file mode 100644 index e3d01c889..000000000 --- a/lib/build/recipe/thirdpartypasswordless/api/thirdPartyAPIImplementation.js +++ /dev/null @@ -1,66 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getIterfaceImpl(apiImplmentation) { - var _a, _b, _c; - const signInUpPOSTFromThirdPartyPasswordless = - (_a = apiImplmentation.thirdPartySignInUpPOST) === null || _a === void 0 ? void 0 : _a.bind(apiImplmentation); - return { - authorisationUrlGET: - (_b = apiImplmentation.authorisationUrlGET) === null || _b === void 0 ? void 0 : _b.bind(apiImplmentation), - appleRedirectHandlerPOST: - (_c = apiImplmentation.appleRedirectHandlerPOST) === null || _c === void 0 - ? void 0 - : _c.bind(apiImplmentation), - signInUpPOST: - signInUpPOSTFromThirdPartyPasswordless === undefined - ? undefined - : function (input) { - return __awaiter(this, void 0, void 0, function* () { - let result = yield signInUpPOSTFromThirdPartyPasswordless(input); - if (result.status === "OK") { - if (!("thirdParty" in result.user)) { - throw new Error("Should never come here"); - } - return Object.assign(Object.assign({}, result), { - user: Object.assign(Object.assign({}, result.user), { - thirdParty: Object.assign({}, result.user.thirdParty), - }), - }); - } - return result; - }); - }, - }; -} -exports.default = getIterfaceImpl; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index 3e90372c3..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -// @ts-nocheck -import { TypeThirdPartyPasswordlessEmailDeliveryInput } from "../../../types"; -import { NormalisedAppinfo } from "../../../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class BackwardCompatibilityService - implements EmailDeliveryInterface { - private passwordlessBackwardCompatibilityService; - constructor( - appInfo: NormalisedAppinfo, - passwordlessFeature?: { - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - ); - sendEmail: ( - input: TypeThirdPartyPasswordlessEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.js b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.js deleted file mode 100644 index d61010ab5..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,58 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const backwardCompatibility_1 = __importDefault( - require("../../../../passwordless/emaildelivery/services/backwardCompatibility") -); -class BackwardCompatibilityService { - constructor(appInfo, passwordlessFeature) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.passwordlessBackwardCompatibilityService.sendEmail(input); - }); - { - this.passwordlessBackwardCompatibilityService = new backwardCompatibility_1.default( - appInfo, - passwordlessFeature === null || passwordlessFeature === void 0 - ? void 0 - : passwordlessFeature.createAndSendCustomEmail - ); - } - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.d.ts b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.d.ts deleted file mode 100644 index 4de04d983..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -// @ts-nocheck -import SMTP from "./smtp"; -export declare let SMTPService: typeof SMTP; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.js b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.js deleted file mode 100644 index 7e07f6706..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/index.js +++ /dev/null @@ -1,24 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SMTPService = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const smtp_1 = __importDefault(require("./smtp")); -exports.SMTPService = smtp_1.default; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.d.ts b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.d.ts deleted file mode 100644 index ebb0eb32a..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.d.ts +++ /dev/null @@ -1,14 +0,0 @@ -// @ts-nocheck -import { ServiceInterface, TypeInput } from "../../../../../ingredients/emaildelivery/services/smtp"; -import { TypeThirdPartyPasswordlessEmailDeliveryInput } from "../../../types"; -import { EmailDeliveryInterface } from "../../../../../ingredients/emaildelivery/types"; -export default class SMTPService implements EmailDeliveryInterface { - serviceImpl: ServiceInterface; - private passwordlessSMTPService; - constructor(config: TypeInput); - sendEmail: ( - input: TypeThirdPartyPasswordlessEmailDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.js b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.js deleted file mode 100644 index 88e970f1c..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/index.js +++ /dev/null @@ -1,76 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const nodemailer_1 = require("nodemailer"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const serviceImplementation_1 = require("./serviceImplementation"); -const smtp_1 = __importDefault(require("../../../../passwordless/emaildelivery/services/smtp")); -const passwordlessServiceImplementation_1 = __importDefault( - require("./serviceImplementation/passwordlessServiceImplementation") -); -class SMTPService { - constructor(config) { - this.sendEmail = (input) => - __awaiter(this, void 0, void 0, function* () { - return yield this.passwordlessSMTPService.sendEmail(input); - }); - const transporter = nodemailer_1.createTransport({ - host: config.smtpSettings.host, - port: config.smtpSettings.port, - auth: { - user: config.smtpSettings.authUsername || config.smtpSettings.from.email, - pass: config.smtpSettings.password, - }, - secure: config.smtpSettings.secure, - }); - let builder = new supertokens_js_override_1.default( - serviceImplementation_1.getServiceImplementation(transporter, config.smtpSettings.from) - ); - if (config.override !== undefined) { - builder = builder.override(config.override); - } - this.serviceImpl = builder.build(); - this.passwordlessSMTPService = new smtp_1.default({ - smtpSettings: config.smtpSettings, - override: (_) => { - return passwordlessServiceImplementation_1.default(this.serviceImpl); - }, - }); - } -} -exports.default = SMTPService; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.d.ts b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.d.ts deleted file mode 100644 index 87aab5100..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @ts-nocheck -import { TypeThirdPartyPasswordlessEmailDeliveryInput } from "../../../../types"; -import { Transporter } from "nodemailer"; -import { ServiceInterface } from "../../../../../../ingredients/emaildelivery/services/smtp"; -export declare function getServiceImplementation( - transporter: Transporter, - from: { - name: string; - email: string; - } -): ServiceInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.js b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.js deleted file mode 100644 index 61a874879..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/index.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getServiceImplementation = void 0; -const serviceImplementation_1 = require("../../../../../passwordless/emaildelivery/services/smtp/serviceImplementation"); -const passwordlessServiceImplementation_1 = __importDefault(require("./passwordlessServiceImplementation")); -function getServiceImplementation(transporter, from) { - let passwordlessServiceImpl = serviceImplementation_1.getServiceImplementation(transporter, from); - return { - sendRawEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - yield transporter.sendMail({ - from: `${from.name} <${from.email}>`, - to: input.toEmail, - subject: input.subject, - html: input.body, - }); - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield passwordlessServiceImpl.getContent.bind(passwordlessServiceImplementation_1.default(this))( - input - ); - }); - }, - }; -} -exports.getServiceImplementation = getServiceImplementation; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.d.ts b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.d.ts deleted file mode 100644 index 0a0cece68..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { TypeThirdPartyPasswordlessEmailDeliveryInput } from "../../../../types"; -import { ServiceInterface } from "../../../../../../ingredients/emaildelivery/services/smtp"; -import { TypePasswordlessEmailDeliveryInput } from "../../../../../passwordless/types"; -export default function getServiceInterface( - thirdpartyPasswordlessServiceImplementation: ServiceInterface -): ServiceInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.js b/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.js deleted file mode 100644 index 9da544281..000000000 --- a/lib/build/recipe/thirdpartypasswordless/emaildelivery/services/smtp/serviceImplementation/passwordlessServiceImplementation.js +++ /dev/null @@ -1,62 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getServiceInterface(thirdpartyPasswordlessServiceImplementation) { - return { - sendRawEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return thirdpartyPasswordlessServiceImplementation.sendRawEmail(input); - }); - }, - getContent: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield thirdpartyPasswordlessServiceImplementation.getContent(input); - }); - }, - }; -} -exports.default = getServiceInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/error.d.ts b/lib/build/recipe/thirdpartypasswordless/error.d.ts deleted file mode 100644 index 1d9c33665..000000000 --- a/lib/build/recipe/thirdpartypasswordless/error.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import STError from "../../error"; -export default class ThirdPartyEmailPasswordError extends STError { - constructor(options: { type: "BAD_INPUT_ERROR"; message: string }); -} diff --git a/lib/build/recipe/thirdpartypasswordless/error.js b/lib/build/recipe/thirdpartypasswordless/error.js deleted file mode 100644 index 0114fec0e..000000000 --- a/lib/build/recipe/thirdpartypasswordless/error.js +++ /dev/null @@ -1,29 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -class ThirdPartyEmailPasswordError extends error_1.default { - constructor(options) { - super(Object.assign({}, options)); - this.fromRecipe = "thirdpartypasswordless"; - } -} -exports.default = ThirdPartyEmailPasswordError; diff --git a/lib/build/recipe/thirdpartypasswordless/index.d.ts b/lib/build/recipe/thirdpartypasswordless/index.d.ts deleted file mode 100644 index 0e8533e84..000000000 --- a/lib/build/recipe/thirdpartypasswordless/index.d.ts +++ /dev/null @@ -1,221 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import SuperTokensError from "./error"; -import { - RecipeInterface, - User, - APIInterface, - PasswordlessAPIOptions, - ThirdPartyAPIOptions, - TypeThirdPartyPasswordlessEmailDeliveryInput, -} from "./types"; -import { TypeProvider } from "../thirdparty/types"; -import { TypePasswordlessSmsDeliveryInput } from "../passwordless/types"; -export default class Wrapper { - static init: typeof Recipe.init; - static Error: typeof SuperTokensError; - static thirdPartySignInUp( - thirdPartyId: string, - thirdPartyUserId: string, - email: string, - userContext?: any - ): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; - static getUserByThirdPartyInfo( - thirdPartyId: string, - thirdPartyUserId: string, - userContext?: any - ): Promise; - static getUserById(userId: string, userContext?: any): Promise; - static getUsersByEmail(email: string, userContext?: any): Promise; - static createCode( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - userInputCode?: string; - userContext?: any; - } - ): Promise<{ - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - }>; - static createNewCodeForDevice(input: { - deviceId: string; - userInputCode?: string; - userContext?: any; - }): Promise< - | { - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - } - | { - status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; - } - >; - static consumeCode( - input: - | { - preAuthSessionId: string; - userInputCode: string; - deviceId: string; - userContext?: any; - } - | { - preAuthSessionId: string; - linkCode: string; - userContext?: any; - } - ): Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | { - status: "RESTART_FLOW_ERROR"; - } - >; - static getUserByPhoneNumber(input: { phoneNumber: string; userContext?: any }): Promise; - static updatePasswordlessUser(input: { - userId: string; - email?: string | null; - phoneNumber?: string | null; - userContext?: any; - }): Promise<{ - status: "OK" | "EMAIL_ALREADY_EXISTS_ERROR" | "UNKNOWN_USER_ID_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; - }>; - static revokeAllCodes( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise<{ - status: "OK"; - }>; - static revokeCode(input: { - codeId: string; - userContext?: any; - }): Promise<{ - status: "OK"; - }>; - static listCodesByEmail(input: { - email: string; - userContext?: any; - }): Promise; - static listCodesByPhoneNumber(input: { - phoneNumber: string; - userContext?: any; - }): Promise; - static listCodesByDeviceId(input: { - deviceId: string; - userContext?: any; - }): Promise; - static listCodesByPreAuthSessionId(input: { - preAuthSessionId: string; - userContext?: any; - }): Promise; - static createMagicLink( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise; - static passwordlessSignInUp( - input: - | { - email: string; - userContext?: any; - } - | { - phoneNumber: string; - userContext?: any; - } - ): Promise<{ - status: string; - createdNewUser: boolean; - user: import("../passwordless/types").User; - }>; - static Google: typeof import("../thirdparty/providers/google").default; - static Github: typeof import("../thirdparty/providers/github").default; - static Facebook: typeof import("../thirdparty/providers/facebook").default; - static Apple: typeof import("../thirdparty/providers/apple").default; - static Discord: typeof import("../thirdparty/providers/discord").default; - static GoogleWorkspaces: typeof import("../thirdparty/providers/googleWorkspaces").default; - static Bitbucket: typeof import("../thirdparty/providers/bitbucket").default; - static GitLab: typeof import("../thirdparty/providers/gitlab").default; - static sendEmail( - input: TypeThirdPartyPasswordlessEmailDeliveryInput & { - userContext?: any; - } - ): Promise; - static sendSms( - input: TypePasswordlessSmsDeliveryInput & { - userContext?: any; - } - ): Promise; -} -export declare let init: typeof Recipe.init; -export declare let Error: typeof SuperTokensError; -export declare let thirdPartySignInUp: typeof Wrapper.thirdPartySignInUp; -export declare let passwordlessSignInUp: typeof Wrapper.passwordlessSignInUp; -export declare let getUserById: typeof Wrapper.getUserById; -export declare let getUserByThirdPartyInfo: typeof Wrapper.getUserByThirdPartyInfo; -export declare let getUsersByEmail: typeof Wrapper.getUsersByEmail; -export declare let createCode: typeof Wrapper.createCode; -export declare let consumeCode: typeof Wrapper.consumeCode; -export declare let getUserByPhoneNumber: typeof Wrapper.getUserByPhoneNumber; -export declare let listCodesByDeviceId: typeof Wrapper.listCodesByDeviceId; -export declare let listCodesByEmail: typeof Wrapper.listCodesByEmail; -export declare let listCodesByPhoneNumber: typeof Wrapper.listCodesByPhoneNumber; -export declare let listCodesByPreAuthSessionId: typeof Wrapper.listCodesByPreAuthSessionId; -export declare let createNewCodeForDevice: typeof Wrapper.createNewCodeForDevice; -export declare let updatePasswordlessUser: typeof Wrapper.updatePasswordlessUser; -export declare let revokeAllCodes: typeof Wrapper.revokeAllCodes; -export declare let revokeCode: typeof Wrapper.revokeCode; -export declare let createMagicLink: typeof Wrapper.createMagicLink; -export declare let Google: typeof import("../thirdparty/providers/google").default; -export declare let Github: typeof import("../thirdparty/providers/github").default; -export declare let Facebook: typeof import("../thirdparty/providers/facebook").default; -export declare let Apple: typeof import("../thirdparty/providers/apple").default; -export declare let Discord: typeof import("../thirdparty/providers/discord").default; -export declare let GoogleWorkspaces: typeof import("../thirdparty/providers/googleWorkspaces").default; -export declare let Bitbucket: typeof import("../thirdparty/providers/bitbucket").default; -export declare let GitLab: typeof import("../thirdparty/providers/gitlab").default; -export type { RecipeInterface, TypeProvider, User, APIInterface, PasswordlessAPIOptions, ThirdPartyAPIOptions }; -export declare let sendEmail: typeof Wrapper.sendEmail; -export declare let sendSms: typeof Wrapper.sendSms; diff --git a/lib/build/recipe/thirdpartypasswordless/index.js b/lib/build/recipe/thirdpartypasswordless/index.js deleted file mode 100644 index fd5d6fd5a..000000000 --- a/lib/build/recipe/thirdpartypasswordless/index.js +++ /dev/null @@ -1,236 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.sendSms = exports.sendEmail = exports.GitLab = exports.Bitbucket = exports.GoogleWorkspaces = exports.Discord = exports.Apple = exports.Facebook = exports.Github = exports.Google = exports.createMagicLink = exports.revokeCode = exports.revokeAllCodes = exports.updatePasswordlessUser = exports.createNewCodeForDevice = exports.listCodesByPreAuthSessionId = exports.listCodesByPhoneNumber = exports.listCodesByEmail = exports.listCodesByDeviceId = exports.getUserByPhoneNumber = exports.consumeCode = exports.createCode = exports.getUsersByEmail = exports.getUserByThirdPartyInfo = exports.getUserById = exports.passwordlessSignInUp = exports.thirdPartySignInUp = exports.Error = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const error_1 = __importDefault(require("./error")); -const thirdPartyProviders = __importStar(require("../thirdparty/providers")); -class Wrapper { - static thirdPartySignInUp(thirdPartyId, thirdPartyUserId, email, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.thirdPartySignInUp({ - thirdPartyId, - thirdPartyUserId, - email, - userContext, - }); - } - static getUserByThirdPartyInfo(thirdPartyId, thirdPartyUserId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserByThirdPartyInfo({ - thirdPartyId, - thirdPartyUserId, - userContext, - }); - } - static getUserById(userId, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserById({ userId, userContext }); - } - static getUsersByEmail(email, userContext = {}) { - return recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUsersByEmail({ email, userContext }); - } - static createCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.createCode(Object.assign({ userContext: {} }, input)); - } - static createNewCodeForDevice(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.createNewCodeForDevice(Object.assign({ userContext: {} }, input)); - } - static consumeCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.consumeCode(Object.assign({ userContext: {} }, input)); - } - static getUserByPhoneNumber(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.getUserByPhoneNumber(Object.assign({ userContext: {} }, input)); - } - static updatePasswordlessUser(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.updatePasswordlessUser(Object.assign({ userContext: {} }, input)); - } - static revokeAllCodes(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeAllCodes(Object.assign({ userContext: {} }, input)); - } - static revokeCode(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.revokeCode(Object.assign({ userContext: {} }, input)); - } - static listCodesByEmail(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByEmail(Object.assign({ userContext: {} }, input)); - } - static listCodesByPhoneNumber(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByPhoneNumber(Object.assign({ userContext: {} }, input)); - } - static listCodesByDeviceId(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByDeviceId(Object.assign({ userContext: {} }, input)); - } - static listCodesByPreAuthSessionId(input) { - return recipe_1.default - .getInstanceOrThrowError() - .recipeInterfaceImpl.listCodesByPreAuthSessionId(Object.assign({ userContext: {} }, input)); - } - static createMagicLink(input) { - return recipe_1.default - .getInstanceOrThrowError() - .passwordlessRecipe.createMagicLink(Object.assign({ userContext: {} }, input)); - } - static passwordlessSignInUp(input) { - return recipe_1.default - .getInstanceOrThrowError() - .passwordlessRecipe.signInUp(Object.assign({ userContext: {} }, input)); - } - // static Okta = thirdPartyProviders.Okta; - // static ActiveDirectory = thirdPartyProviders.ActiveDirectory; - static sendEmail(input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default - .getInstanceOrThrowError() - .emailDelivery.ingredientInterfaceImpl.sendEmail(Object.assign({ userContext: {} }, input)); - }); - } - static sendSms(input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default - .getInstanceOrThrowError() - .smsDelivery.ingredientInterfaceImpl.sendSms(Object.assign({ userContext: {} }, input)); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.Error = error_1.default; -Wrapper.Google = thirdPartyProviders.Google; -Wrapper.Github = thirdPartyProviders.Github; -Wrapper.Facebook = thirdPartyProviders.Facebook; -Wrapper.Apple = thirdPartyProviders.Apple; -Wrapper.Discord = thirdPartyProviders.Discord; -Wrapper.GoogleWorkspaces = thirdPartyProviders.GoogleWorkspaces; -Wrapper.Bitbucket = thirdPartyProviders.Bitbucket; -Wrapper.GitLab = thirdPartyProviders.GitLab; -exports.init = Wrapper.init; -exports.Error = Wrapper.Error; -exports.thirdPartySignInUp = Wrapper.thirdPartySignInUp; -exports.passwordlessSignInUp = Wrapper.passwordlessSignInUp; -exports.getUserById = Wrapper.getUserById; -exports.getUserByThirdPartyInfo = Wrapper.getUserByThirdPartyInfo; -exports.getUsersByEmail = Wrapper.getUsersByEmail; -exports.createCode = Wrapper.createCode; -exports.consumeCode = Wrapper.consumeCode; -exports.getUserByPhoneNumber = Wrapper.getUserByPhoneNumber; -exports.listCodesByDeviceId = Wrapper.listCodesByDeviceId; -exports.listCodesByEmail = Wrapper.listCodesByEmail; -exports.listCodesByPhoneNumber = Wrapper.listCodesByPhoneNumber; -exports.listCodesByPreAuthSessionId = Wrapper.listCodesByPreAuthSessionId; -exports.createNewCodeForDevice = Wrapper.createNewCodeForDevice; -exports.updatePasswordlessUser = Wrapper.updatePasswordlessUser; -exports.revokeAllCodes = Wrapper.revokeAllCodes; -exports.revokeCode = Wrapper.revokeCode; -exports.createMagicLink = Wrapper.createMagicLink; -exports.Google = Wrapper.Google; -exports.Github = Wrapper.Github; -exports.Facebook = Wrapper.Facebook; -exports.Apple = Wrapper.Apple; -exports.Discord = Wrapper.Discord; -exports.GoogleWorkspaces = Wrapper.GoogleWorkspaces; -exports.Bitbucket = Wrapper.Bitbucket; -exports.GitLab = Wrapper.GitLab; -exports.sendEmail = Wrapper.sendEmail; -exports.sendSms = Wrapper.sendSms; diff --git a/lib/build/recipe/thirdpartypasswordless/recipe.d.ts b/lib/build/recipe/thirdpartypasswordless/recipe.d.ts deleted file mode 100644 index 16351e8c5..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipe.d.ts +++ /dev/null @@ -1,64 +0,0 @@ -// @ts-nocheck -import RecipeModule from "../../recipeModule"; -import { NormalisedAppinfo, APIHandled, RecipeListFunction, HTTPMethod } from "../../types"; -import PasswordlessRecipe from "../passwordless/recipe"; -import ThirdPartyRecipe from "../thirdparty/recipe"; -import { BaseRequest, BaseResponse } from "../../framework"; -import STError from "./error"; -import { - TypeInput, - TypeNormalisedInput, - RecipeInterface, - APIInterface, - TypeThirdPartyPasswordlessEmailDeliveryInput, - TypeThirdPartyPasswordlessSmsDeliveryInput, -} from "./types"; -import STErrorPasswordless from "../passwordless/error"; -import STErrorThirdParty from "../thirdparty/error"; -import NormalisedURLPath from "../../normalisedURLPath"; -import EmailDeliveryIngredient from "../../ingredients/emaildelivery"; -import SmsDeliveryIngredient from "../../ingredients/smsdelivery"; -export default class Recipe extends RecipeModule { - private static instance; - static RECIPE_ID: string; - config: TypeNormalisedInput; - passwordlessRecipe: PasswordlessRecipe; - private thirdPartyRecipe; - recipeInterfaceImpl: RecipeInterface; - apiImpl: APIInterface; - emailDelivery: EmailDeliveryIngredient; - smsDelivery: SmsDeliveryIngredient; - isInServerlessEnv: boolean; - constructor( - recipeId: string, - appInfo: NormalisedAppinfo, - isInServerlessEnv: boolean, - config: TypeInput, - recipes: { - thirdPartyInstance: ThirdPartyRecipe | undefined; - passwordlessInstance: PasswordlessRecipe | undefined; - }, - ingredients: { - emailDelivery: EmailDeliveryIngredient | undefined; - smsDelivery: SmsDeliveryIngredient | undefined; - } - ); - static init(config: TypeInput): RecipeListFunction; - static reset(): void; - static getInstanceOrThrowError(): Recipe; - getAPIsHandled: () => APIHandled[]; - handleAPIRequest: ( - id: string, - req: BaseRequest, - res: BaseResponse, - path: NormalisedURLPath, - method: HTTPMethod - ) => Promise; - handleError: ( - err: STErrorPasswordless | STErrorThirdParty, - request: BaseRequest, - response: BaseResponse - ) => Promise; - getAllCORSHeaders: () => string[]; - isErrorFromThisRecipe: (err: any) => err is STError; -} diff --git a/lib/build/recipe/thirdpartypasswordless/recipe.js b/lib/build/recipe/thirdpartypasswordless/recipe.js deleted file mode 100644 index 4bd2883ad..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipe.js +++ /dev/null @@ -1,241 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const recipe_1 = __importDefault(require("../passwordless/recipe")); -const recipe_2 = __importDefault(require("../thirdparty/recipe")); -const error_1 = __importDefault(require("./error")); -const utils_1 = require("./utils"); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const passwordlessRecipeImplementation_1 = __importDefault( - require("./recipeImplementation/passwordlessRecipeImplementation") -); -const thirdPartyRecipeImplementation_1 = __importDefault( - require("./recipeImplementation/thirdPartyRecipeImplementation") -); -const thirdPartyAPIImplementation_1 = __importDefault(require("./api/thirdPartyAPIImplementation")); -const passwordlessAPIImplementation_1 = __importDefault(require("./api/passwordlessAPIImplementation")); -const implementation_1 = __importDefault(require("./api/implementation")); -const querier_1 = require("../../querier"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const emaildelivery_1 = __importDefault(require("../../ingredients/emaildelivery")); -const smsdelivery_1 = __importDefault(require("../../ingredients/smsdelivery")); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config, recipes, ingredients) { - super(recipeId, appInfo); - this.getAPIsHandled = () => { - let apisHandled = [...this.passwordlessRecipe.getAPIsHandled()]; - if (this.thirdPartyRecipe !== undefined) { - apisHandled.push(...this.thirdPartyRecipe.getAPIsHandled()); - } - return apisHandled; - }; - this.handleAPIRequest = (id, req, res, path, method) => - __awaiter(this, void 0, void 0, function* () { - if (this.passwordlessRecipe.returnAPIIdIfCanHandleRequest(path, method) !== undefined) { - return yield this.passwordlessRecipe.handleAPIRequest(id, req, res, path, method); - } - if ( - this.thirdPartyRecipe !== undefined && - this.thirdPartyRecipe.returnAPIIdIfCanHandleRequest(path, method) !== undefined - ) { - return yield this.thirdPartyRecipe.handleAPIRequest(id, req, res, path, method); - } - return false; - }); - this.handleError = (err, request, response) => - __awaiter(this, void 0, void 0, function* () { - if (err.fromRecipe === Recipe.RECIPE_ID) { - throw err; - } else { - if (this.passwordlessRecipe.isErrorFromThisRecipe(err)) { - return yield this.passwordlessRecipe.handleError(err, request, response); - } else if ( - this.thirdPartyRecipe !== undefined && - this.thirdPartyRecipe.isErrorFromThisRecipe(err) - ) { - return yield this.thirdPartyRecipe.handleError(err, request, response); - } - throw err; - } - }); - this.getAllCORSHeaders = () => { - let corsHeaders = [...this.passwordlessRecipe.getAllCORSHeaders()]; - if (this.thirdPartyRecipe !== undefined) { - corsHeaders.push(...this.thirdPartyRecipe.getAllCORSHeaders()); - } - return corsHeaders; - }; - this.isErrorFromThisRecipe = (err) => { - return ( - error_1.default.isErrorFromSuperTokens(err) && - (err.fromRecipe === Recipe.RECIPE_ID || - this.passwordlessRecipe.isErrorFromThisRecipe(err) || - (this.thirdPartyRecipe !== undefined && this.thirdPartyRecipe.isErrorFromThisRecipe(err))) - ); - }; - this.isInServerlessEnv = isInServerlessEnv; - this.config = utils_1.validateAndNormaliseUserInput(appInfo, config); - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default( - querier_1.Querier.getNewInstanceOrThrowError(recipe_1.default.RECIPE_ID), - querier_1.Querier.getNewInstanceOrThrowError(recipe_2.default.RECIPE_ID) - ) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - { - let builder = new supertokens_js_override_1.default(implementation_1.default()); - this.apiImpl = builder.override(this.config.override.apis).build(); - } - this.emailDelivery = - ingredients.emailDelivery === undefined - ? new emaildelivery_1.default( - this.config.getEmailDeliveryConfig(this.recipeInterfaceImpl, this.isInServerlessEnv) - ) - : ingredients.emailDelivery; - this.smsDelivery = - ingredients.smsDelivery === undefined - ? new smsdelivery_1.default(this.config.getSmsDeliveryConfig()) - : ingredients.smsDelivery; - this.passwordlessRecipe = - recipes.passwordlessInstance !== undefined - ? recipes.passwordlessInstance - : new recipe_1.default( - recipeId, - appInfo, - isInServerlessEnv, - Object.assign(Object.assign({}, this.config), { - override: { - functions: (_) => { - return passwordlessRecipeImplementation_1.default(this.recipeInterfaceImpl); - }, - apis: (_) => { - return passwordlessAPIImplementation_1.default(this.apiImpl); - }, - }, - }), - { - emailDelivery: this.emailDelivery, - smsDelivery: this.smsDelivery, - } - ); - if (this.config.providers.length !== 0) { - this.thirdPartyRecipe = - recipes.thirdPartyInstance !== undefined - ? recipes.thirdPartyInstance - : new recipe_2.default( - recipeId, - appInfo, - isInServerlessEnv, - { - override: { - functions: (_) => { - return thirdPartyRecipeImplementation_1.default(this.recipeInterfaceImpl); - }, - apis: (_) => { - return thirdPartyAPIImplementation_1.default(this.apiImpl); - }, - }, - signInAndUpFeature: { - providers: this.config.providers, - }, - }, - {}, - { - emailDelivery: this.emailDelivery, - } - ); - } - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe( - Recipe.RECIPE_ID, - appInfo, - isInServerlessEnv, - config, - { - passwordlessInstance: undefined, - thirdPartyInstance: undefined, - }, - { - emailDelivery: undefined, - smsDelivery: undefined, - } - ); - return Recipe.instance; - } else { - throw new Error( - "ThirdPartyPasswordless recipe has already been initialised. Please check your code for bugs." - ); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } -} -exports.default = Recipe; -Recipe.instance = undefined; -Recipe.RECIPE_ID = "thirdpartypasswordless"; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.d.ts b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.d.ts deleted file mode 100644 index d2d6c2bc2..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../types"; -import { Querier } from "../../../querier"; -export default function getRecipeInterface(passwordlessQuerier: Querier, thirdPartyQuerier?: Querier): RecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.js b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.js deleted file mode 100644 index 0acca2fd6..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/index.js +++ /dev/null @@ -1,192 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const recipeImplementation_1 = __importDefault(require("../../passwordless/recipeImplementation")); -const recipeImplementation_2 = __importDefault(require("../../thirdparty/recipeImplementation")); -const passwordlessRecipeImplementation_1 = __importDefault(require("./passwordlessRecipeImplementation")); -const thirdPartyRecipeImplementation_1 = __importDefault(require("./thirdPartyRecipeImplementation")); -function getRecipeInterface(passwordlessQuerier, thirdPartyQuerier) { - let originalPasswordlessImplementation = recipeImplementation_1.default(passwordlessQuerier); - let originalThirdPartyImplementation; - if (thirdPartyQuerier !== undefined) { - originalThirdPartyImplementation = recipeImplementation_2.default(thirdPartyQuerier); - } - return { - consumeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.consumeCode.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - createCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.createCode.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - createNewCodeForDevice: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.createNewCodeForDevice.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - getUserByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.getUserByPhoneNumber.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - listCodesByDeviceId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.listCodesByDeviceId.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - listCodesByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.listCodesByEmail.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - listCodesByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.listCodesByPhoneNumber.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - listCodesByPreAuthSessionId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.listCodesByPreAuthSessionId.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - revokeAllCodes: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.revokeAllCodes.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - revokeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return originalPasswordlessImplementation.revokeCode.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - updatePasswordlessUser: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield this.getUserById({ userId: input.userId, userContext: input.userContext }); - if (user === undefined) { - return { - status: "UNKNOWN_USER_ID_ERROR", - }; - } else if ("thirdParty" in user) { - throw new Error( - "Cannot update passwordless user info for those who signed up using third party login." - ); - } - return originalPasswordlessImplementation.updateUser.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - }); - }, - thirdPartySignInUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (originalThirdPartyImplementation === undefined) { - throw new Error("No thirdparty provider configured"); - } - return originalThirdPartyImplementation.signInUp.bind(thirdPartyRecipeImplementation_1.default(this))( - input - ); - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield originalPasswordlessImplementation.getUserById.bind( - passwordlessRecipeImplementation_1.default(this) - )(input); - if (user !== undefined) { - return user; - } - if (originalThirdPartyImplementation === undefined) { - return undefined; - } - return yield originalThirdPartyImplementation.getUserById.bind( - thirdPartyRecipeImplementation_1.default(this) - )(input); - }); - }, - getUsersByEmail: function ({ email, userContext }) { - return __awaiter(this, void 0, void 0, function* () { - let userFromEmailPass = yield originalPasswordlessImplementation.getUserByEmail.bind( - passwordlessRecipeImplementation_1.default(this) - )({ email, userContext }); - if (originalThirdPartyImplementation === undefined) { - return userFromEmailPass === undefined ? [] : [userFromEmailPass]; - } - let usersFromThirdParty = yield originalThirdPartyImplementation.getUsersByEmail.bind( - thirdPartyRecipeImplementation_1.default(this) - )({ email, userContext }); - if (userFromEmailPass !== undefined) { - return [...usersFromThirdParty, userFromEmailPass]; - } - return usersFromThirdParty; - }); - }, - getUserByThirdPartyInfo: function (input) { - return __awaiter(this, void 0, void 0, function* () { - if (originalThirdPartyImplementation === undefined) { - return undefined; - } - return originalThirdPartyImplementation.getUserByThirdPartyInfo.bind( - thirdPartyRecipeImplementation_1.default(this) - )(input); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.d.ts b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.d.ts deleted file mode 100644 index aafe44945..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../../passwordless/types"; -import { RecipeInterface as ThirdPartyPasswordlessRecipeInterface } from "../types"; -export default function getRecipeInterface(recipeInterface: ThirdPartyPasswordlessRecipeInterface): RecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.js b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.js deleted file mode 100644 index 34cc8cf85..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/passwordlessRecipeImplementation.js +++ /dev/null @@ -1,120 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getRecipeInterface(recipeInterface) { - return { - consumeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.consumeCode(input); - }); - }, - createCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.createCode(input); - }); - }, - createNewCodeForDevice: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.createNewCodeForDevice(input); - }); - }, - getUserByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let users = yield recipeInterface.getUsersByEmail(input); - for (let i = 0; i < users.length; i++) { - let u = users[i]; - if (!("thirdParty" in u)) { - return u; - } - } - return undefined; - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserById(input); - if (user !== undefined && "thirdParty" in user) { - // this is a thirdparty user. - return undefined; - } - return user; - }); - }, - getUserByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserByPhoneNumber(input); - if (user !== undefined && "thirdParty" in user) { - // this is a thirdparty user. - return undefined; - } - return user; - }); - }, - listCodesByDeviceId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.listCodesByDeviceId(input); - }); - }, - listCodesByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.listCodesByEmail(input); - }); - }, - listCodesByPhoneNumber: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.listCodesByPhoneNumber(input); - }); - }, - listCodesByPreAuthSessionId: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.listCodesByPreAuthSessionId(input); - }); - }, - revokeAllCodes: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.revokeAllCodes(input); - }); - }, - revokeCode: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.revokeCode(input); - }); - }, - updateUser: function (input) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipeInterface.updatePasswordlessUser(input); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.d.ts b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.d.ts deleted file mode 100644 index b93917947..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "../../thirdparty/types"; -import { RecipeInterface as ThirdPartyPasswordlessRecipeInterface } from "../types"; -export default function getRecipeInterface(recipeInterface: ThirdPartyPasswordlessRecipeInterface): RecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.js b/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.js deleted file mode 100644 index 715a0171f..000000000 --- a/lib/build/recipe/thirdpartypasswordless/recipeImplementation/thirdPartyRecipeImplementation.js +++ /dev/null @@ -1,79 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -Object.defineProperty(exports, "__esModule", { value: true }); -function getRecipeInterface(recipeInterface) { - return { - getUserByThirdPartyInfo: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserByThirdPartyInfo(input); - if (user === undefined || !("thirdParty" in user)) { - return undefined; - } - return user; - }); - }, - signInUp: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let result = yield recipeInterface.thirdPartySignInUp(input); - if (!("thirdParty" in result.user)) { - throw new Error("Should never come here"); - } - return { - status: "OK", - createdNewUser: result.createdNewUser, - user: result.user, - }; - }); - }, - getUserById: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let user = yield recipeInterface.getUserById(input); - if (user === undefined || !("thirdParty" in user)) { - // either user is undefined or it's an email password user. - return undefined; - } - return user; - }); - }, - getUsersByEmail: function (input) { - return __awaiter(this, void 0, void 0, function* () { - let users = yield recipeInterface.getUsersByEmail(input); - // we filter out all non thirdparty users. - return users.filter((u) => { - return "thirdParty" in u; - }); - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.d.ts b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.d.ts deleted file mode 100644 index 9e1f9745a..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.d.ts +++ /dev/null @@ -1,28 +0,0 @@ -// @ts-nocheck -import { TypeThirdPartyPasswordlessSmsDeliveryInput } from "../../../types"; -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { NormalisedAppinfo } from "../../../../../types"; -export default class BackwardCompatibilityService - implements SmsDeliveryInterface { - private passwordlessBackwardCompatibilityService; - constructor( - appInfo: NormalisedAppinfo, - passwordlessFeature?: { - createAndSendCustomTextMessage?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - ); - sendSms: ( - input: TypeThirdPartyPasswordlessSmsDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.js b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.js deleted file mode 100644 index 6fb2a2e25..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/backwardCompatibility/index.js +++ /dev/null @@ -1,56 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const backwardCompatibility_1 = __importDefault( - require("../../../../passwordless/smsdelivery/services/backwardCompatibility") -); -class BackwardCompatibilityService { - constructor(appInfo, passwordlessFeature) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.passwordlessBackwardCompatibilityService.sendSms(input); - }); - this.passwordlessBackwardCompatibilityService = new backwardCompatibility_1.default( - appInfo, - passwordlessFeature === null || passwordlessFeature === void 0 - ? void 0 - : passwordlessFeature.createAndSendCustomTextMessage - ); - } -} -exports.default = BackwardCompatibilityService; diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.d.ts b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.d.ts deleted file mode 100644 index f14aacf83..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -// @ts-nocheck -import Twilio from "./twilio"; -import Supertokens from "./supertokens"; -export declare let TwilioService: typeof Twilio; -export declare let SupertokensService: typeof Supertokens; diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.js b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.js deleted file mode 100644 index f85fb8900..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/index.js +++ /dev/null @@ -1,26 +0,0 @@ -"use strict"; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.SupertokensService = exports.TwilioService = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -const twilio_1 = __importDefault(require("./twilio")); -const supertokens_1 = __importDefault(require("./supertokens")); -exports.TwilioService = twilio_1.default; -exports.SupertokensService = supertokens_1.default; diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.d.ts b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.d.ts deleted file mode 100644 index 2be198af4..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.d.ts +++ /dev/null @@ -1,12 +0,0 @@ -// @ts-nocheck -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { TypeThirdPartyPasswordlessSmsDeliveryInput } from "../../../types"; -export default class SupertokensService implements SmsDeliveryInterface { - private passwordlessSupertokensService; - constructor(apiKey: string); - sendSms: ( - input: TypeThirdPartyPasswordlessSmsDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.js b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.js deleted file mode 100644 index 4c764c79d..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/supertokens/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const supertokens_1 = __importDefault(require("../../../../passwordless/smsdelivery/services/supertokens")); -class SupertokensService { - constructor(apiKey) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.passwordlessSupertokensService.sendSms(input); - }); - this.passwordlessSupertokensService = new supertokens_1.default(apiKey); - } -} -exports.default = SupertokensService; diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.d.ts b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.d.ts deleted file mode 100644 index ec73adb1f..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -// @ts-nocheck -import { TypeInput } from "../../../../../ingredients/smsdelivery/services/twilio"; -import { SmsDeliveryInterface } from "../../../../../ingredients/smsdelivery/types"; -import { TypeThirdPartyPasswordlessSmsDeliveryInput } from "../../../types"; -export default class TwilioService implements SmsDeliveryInterface { - private passwordlessTwilioService; - constructor(config: TypeInput); - sendSms: ( - input: TypeThirdPartyPasswordlessSmsDeliveryInput & { - userContext: any; - } - ) => Promise; -} diff --git a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.js b/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.js deleted file mode 100644 index 4dcafed68..000000000 --- a/lib/build/recipe/thirdpartypasswordless/smsdelivery/services/twilio/index.js +++ /dev/null @@ -1,49 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const index_1 = __importDefault(require("../../../../passwordless/smsdelivery/services/twilio/index")); -class TwilioService { - constructor(config) { - this.sendSms = (input) => - __awaiter(this, void 0, void 0, function* () { - yield this.passwordlessTwilioService.sendSms(input); - }); - this.passwordlessTwilioService = new index_1.default(config); - } -} -exports.default = TwilioService; diff --git a/lib/build/recipe/thirdpartypasswordless/types.d.ts b/lib/build/recipe/thirdpartypasswordless/types.d.ts deleted file mode 100644 index 2f63668b3..000000000 --- a/lib/build/recipe/thirdpartypasswordless/types.d.ts +++ /dev/null @@ -1,418 +0,0 @@ -// @ts-nocheck -import { TypeProvider, APIOptions as ThirdPartyAPIOptionsOriginal } from "../thirdparty/types"; -import { - DeviceType as DeviceTypeOriginal, - APIOptions as PasswordlessAPIOptionsOriginal, - TypePasswordlessEmailDeliveryInput, - TypePasswordlessSmsDeliveryInput, -} from "../passwordless/types"; -import OverrideableBuilder from "supertokens-js-override"; -import { SessionContainerInterface } from "../session/types"; -import { - TypeInput as EmailDeliveryTypeInput, - TypeInputWithService as EmailDeliveryTypeInputWithService, -} from "../../ingredients/emaildelivery/types"; -import { - TypeInput as SmsDeliveryTypeInput, - TypeInputWithService as SmsDeliveryTypeInputWithService, -} from "../../ingredients/smsdelivery/types"; -import { GeneralErrorResponse } from "../../types"; -export declare type DeviceType = DeviceTypeOriginal; -export declare type User = ( - | { - email?: string; - phoneNumber?: string; - } - | { - email: string; - thirdParty: { - id: string; - userId: string; - }; - } -) & { - id: string; - timeJoined: number; -}; -export declare type TypeInput = ( - | { - contactMethod: "PHONE"; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - /** - * @deprecated Please use smsDelivery config instead - */ - createAndSendCustomTextMessage?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - | { - contactMethod: "EMAIL"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } - | { - contactMethod: "EMAIL_OR_PHONE"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - /** - * @deprecated Please use emailDelivery config instead - */ - createAndSendCustomEmail?: ( - input: { - email: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - /** - * @deprecated Please use smsDelivery config instead - */ - createAndSendCustomTextMessage?: ( - input: { - phoneNumber: string; - userInputCode?: string; - urlWithLinkCode?: string; - codeLifetime: number; - preAuthSessionId: string; - }, - userContext: any - ) => Promise; - } -) & { - /** - * Unlike passwordless recipe, emailDelivery config is outside here because regardless - * of `contactMethod` value, the config is required for email verification recipe - */ - emailDelivery?: EmailDeliveryTypeInput; - smsDelivery?: SmsDeliveryTypeInput; - providers?: TypeProvider[]; - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - getCustomUserInputCode?: (userContext: any) => Promise | string; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = ( - | { - contactMethod: "PHONE"; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - } - | { - contactMethod: "EMAIL"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - } - | { - contactMethod: "EMAIL_OR_PHONE"; - validateEmailAddress?: (email: string) => Promise | string | undefined; - validatePhoneNumber?: (phoneNumber: string) => Promise | string | undefined; - } -) & { - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - getCustomUserInputCode?: (userContext: any) => Promise | string; - providers: TypeProvider[]; - getEmailDeliveryConfig: ( - recipeImpl: RecipeInterface, - isInServerlessEnv: boolean - ) => EmailDeliveryTypeInputWithService; - getSmsDeliveryConfig: () => SmsDeliveryTypeInputWithService; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type RecipeInterface = { - getUserById(input: { userId: string; userContext: any }): Promise; - getUsersByEmail(input: { email: string; userContext: any }): Promise; - getUserByPhoneNumber: (input: { phoneNumber: string; userContext: any }) => Promise; - getUserByThirdPartyInfo(input: { - thirdPartyId: string; - thirdPartyUserId: string; - userContext: any; - }): Promise; - thirdPartySignInUp(input: { - thirdPartyId: string; - thirdPartyUserId: string; - email: string; - userContext: any; - }): Promise<{ - status: "OK"; - createdNewUser: boolean; - user: User; - }>; - createCode: ( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - userInputCode?: string; - userContext: any; - } - ) => Promise<{ - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - }>; - createNewCodeForDevice: (input: { - deviceId: string; - userInputCode?: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - preAuthSessionId: string; - codeId: string; - deviceId: string; - userInputCode: string; - linkCode: string; - codeLifetime: number; - timeCreated: number; - } - | { - status: "RESTART_FLOW_ERROR" | "USER_INPUT_CODE_ALREADY_USED_ERROR"; - } - >; - consumeCode: ( - input: - | { - userInputCode: string; - deviceId: string; - preAuthSessionId: string; - userContext: any; - } - | { - linkCode: string; - preAuthSessionId: string; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | { - status: "RESTART_FLOW_ERROR"; - } - >; - updatePasswordlessUser: (input: { - userId: string; - email?: string | null; - phoneNumber?: string | null; - userContext: any; - }) => Promise<{ - status: "OK" | "UNKNOWN_USER_ID_ERROR" | "EMAIL_ALREADY_EXISTS_ERROR" | "PHONE_NUMBER_ALREADY_EXISTS_ERROR"; - }>; - revokeAllCodes: ( - input: - | { - email: string; - userContext: any; - } - | { - phoneNumber: string; - userContext: any; - } - ) => Promise<{ - status: "OK"; - }>; - revokeCode: (input: { - codeId: string; - userContext: any; - }) => Promise<{ - status: "OK"; - }>; - listCodesByEmail: (input: { email: string; userContext: any }) => Promise; - listCodesByPhoneNumber: (input: { phoneNumber: string; userContext: any }) => Promise; - listCodesByDeviceId: (input: { deviceId: string; userContext: any }) => Promise; - listCodesByPreAuthSessionId: (input: { - preAuthSessionId: string; - userContext: any; - }) => Promise; -}; -export declare type PasswordlessAPIOptions = PasswordlessAPIOptionsOriginal; -export declare type ThirdPartyAPIOptions = ThirdPartyAPIOptionsOriginal; -export declare type APIInterface = { - authorisationUrlGET: - | undefined - | ((input: { - provider: TypeProvider; - options: ThirdPartyAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - url: string; - } - | GeneralErrorResponse - >); - thirdPartySignInUpPOST: - | undefined - | ((input: { - provider: TypeProvider; - code: string; - redirectURI: string; - authCodeResponse?: any; - clientId?: string; - options: ThirdPartyAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - session: SessionContainerInterface; - authCodeResponse: any; - } - | GeneralErrorResponse - | { - status: "NO_EMAIL_GIVEN_BY_PROVIDER"; - } - >); - appleRedirectHandlerPOST: - | undefined - | ((input: { code: string; state: string; options: ThirdPartyAPIOptions; userContext: any }) => Promise); - createCodePOST: - | undefined - | (( - input: ( - | { - email: string; - } - | { - phoneNumber: string; - } - ) & { - options: PasswordlessAPIOptions; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - deviceId: string; - preAuthSessionId: string; - flowType: "USER_INPUT_CODE" | "MAGIC_LINK" | "USER_INPUT_CODE_AND_MAGIC_LINK"; - } - | GeneralErrorResponse - >); - resendCodePOST: - | undefined - | (( - input: { - deviceId: string; - preAuthSessionId: string; - } & { - options: PasswordlessAPIOptions; - userContext: any; - } - ) => Promise< - | GeneralErrorResponse - | { - status: "RESTART_FLOW_ERROR" | "OK"; - } - >); - consumeCodePOST: - | undefined - | (( - input: ( - | { - userInputCode: string; - deviceId: string; - preAuthSessionId: string; - } - | { - linkCode: string; - preAuthSessionId: string; - } - ) & { - options: PasswordlessAPIOptions; - userContext: any; - } - ) => Promise< - | { - status: "OK"; - createdNewUser: boolean; - user: User; - session: SessionContainerInterface; - } - | { - status: "INCORRECT_USER_INPUT_CODE_ERROR" | "EXPIRED_USER_INPUT_CODE_ERROR"; - failedCodeInputAttemptCount: number; - maximumCodeInputAttempts: number; - } - | GeneralErrorResponse - | { - status: "RESTART_FLOW_ERROR"; - } - >); - passwordlessUserEmailExistsGET: - | undefined - | ((input: { - email: string; - options: PasswordlessAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >); - passwordlessUserPhoneNumberExistsGET: - | undefined - | ((input: { - phoneNumber: string; - options: PasswordlessAPIOptions; - userContext: any; - }) => Promise< - | { - status: "OK"; - exists: boolean; - } - | GeneralErrorResponse - >); -}; -export declare type TypeThirdPartyPasswordlessEmailDeliveryInput = TypePasswordlessEmailDeliveryInput; -export declare type TypeThirdPartyPasswordlessSmsDeliveryInput = TypePasswordlessSmsDeliveryInput; diff --git a/lib/build/recipe/thirdpartypasswordless/types.js b/lib/build/recipe/thirdpartypasswordless/types.js deleted file mode 100644 index c8ad2e549..000000000 --- a/lib/build/recipe/thirdpartypasswordless/types.js +++ /dev/null @@ -1,2 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/thirdpartypasswordless/utils.d.ts b/lib/build/recipe/thirdpartypasswordless/utils.d.ts deleted file mode 100644 index 0fde7f7fd..000000000 --- a/lib/build/recipe/thirdpartypasswordless/utils.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - appInfo: NormalisedAppinfo, - config: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/thirdpartypasswordless/utils.js b/lib/build/recipe/thirdpartypasswordless/utils.js deleted file mode 100644 index ffdfd159c..000000000 --- a/lib/build/recipe/thirdpartypasswordless/utils.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -const backwardCompatibility_1 = __importDefault(require("./emaildelivery/services/backwardCompatibility")); -const backwardCompatibility_2 = __importDefault(require("./smsdelivery/services/backwardCompatibility")); -function validateAndNormaliseUserInput(appInfo, config) { - let providers = config.providers === undefined ? [] : config.providers; - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - function getEmailDeliveryConfig() { - var _a; - let emailService = - (_a = config === null || config === void 0 ? void 0 : config.emailDelivery) === null || _a === void 0 - ? void 0 - : _a.service; - /** - * following code is for backward compatibility. - * if user has not passed emailDelivery config, we - * use the createAndSendCustomEmail config. If the user - * has not passed even that config, we use the default - * createAndSendCustomEmail implementation - */ - if (emailService === undefined) { - emailService = new backwardCompatibility_1.default(appInfo, { - createAndSendCustomEmail: - (config === null || config === void 0 ? void 0 : config.contactMethod) !== "PHONE" - ? config === null || config === void 0 - ? void 0 - : config.createAndSendCustomEmail - : undefined, - }); - } - return Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.emailDelivery), { - /** - * if we do - * let emailDelivery = { - * service: emailService, - * ...config.emailDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: emailService, - }); - } - function getSmsDeliveryConfig() { - var _a; - let smsService = - (_a = config === null || config === void 0 ? void 0 : config.smsDelivery) === null || _a === void 0 - ? void 0 - : _a.service; - /** - * following code is for backward compatibility. - * if user has not passed smsDelivery config, we - * use the createAndSendCustomTextMessage config. If the user - * has not passed even that config, we use the default - * createAndSendCustomTextMessage implementation - */ - if (smsService === undefined) { - smsService = new backwardCompatibility_2.default(appInfo, { - createAndSendCustomTextMessage: - (config === null || config === void 0 ? void 0 : config.contactMethod) !== "EMAIL" - ? config === null || config === void 0 - ? void 0 - : config.createAndSendCustomTextMessage - : undefined, - }); - } - return Object.assign(Object.assign({}, config === null || config === void 0 ? void 0 : config.smsDelivery), { - /** - * if we do - * let smsDelivery = { - * service: smsService, - * ...config.smsDelivery, - * }; - * - * and if the user has passed service as undefined, - * it it again get set to undefined, so we - * set service at the end - */ - service: smsService, - }); - } - return Object.assign(Object.assign({}, config), { - providers, - override, - getEmailDeliveryConfig, - getSmsDeliveryConfig, - }); -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; diff --git a/lib/build/recipe/usermetadata/index.d.ts b/lib/build/recipe/usermetadata/index.d.ts deleted file mode 100644 index 91f6865fa..000000000 --- a/lib/build/recipe/usermetadata/index.d.ts +++ /dev/null @@ -1,33 +0,0 @@ -// @ts-nocheck -import { JSONObject } from "../../types"; -import Recipe from "./recipe"; -import { RecipeInterface } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static getUserMetadata( - userId: string, - userContext?: any - ): Promise<{ - status: "OK"; - metadata: any; - }>; - static updateUserMetadata( - userId: string, - metadataUpdate: JSONObject, - userContext?: any - ): Promise<{ - status: "OK"; - metadata: JSONObject; - }>; - static clearUserMetadata( - userId: string, - userContext?: any - ): Promise<{ - status: "OK"; - }>; -} -export declare const init: typeof Recipe.init; -export declare const getUserMetadata: typeof Wrapper.getUserMetadata; -export declare const updateUserMetadata: typeof Wrapper.updateUserMetadata; -export declare const clearUserMetadata: typeof Wrapper.clearUserMetadata; -export type { RecipeInterface, JSONObject }; diff --git a/lib/build/recipe/usermetadata/index.js b/lib/build/recipe/usermetadata/index.js deleted file mode 100644 index c5d267836..000000000 --- a/lib/build/recipe/usermetadata/index.js +++ /dev/null @@ -1,87 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.clearUserMetadata = exports.updateUserMetadata = exports.getUserMetadata = exports.init = void 0; -const recipe_1 = __importDefault(require("./recipe")); -class Wrapper { - static getUserMetadata(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUserMetadata({ - userId, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static updateUserMetadata(userId, metadataUpdate, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.updateUserMetadata({ - userId, - metadataUpdate, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static clearUserMetadata(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.clearUserMetadata({ - userId, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -exports.init = Wrapper.init; -exports.getUserMetadata = Wrapper.getUserMetadata; -exports.updateUserMetadata = Wrapper.updateUserMetadata; -exports.clearUserMetadata = Wrapper.clearUserMetadata; diff --git a/lib/build/recipe/usermetadata/recipe.d.ts b/lib/build/recipe/usermetadata/recipe.d.ts deleted file mode 100644 index bbce8012b..000000000 --- a/lib/build/recipe/usermetadata/recipe.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-nocheck -import error from "../../error"; -import { BaseRequest, BaseResponse } from "../../framework"; -import normalisedURLPath from "../../normalisedURLPath"; -import RecipeModule from "../../recipeModule"; -import { APIHandled, HTTPMethod, NormalisedAppinfo, RecipeListFunction } from "../../types"; -import { RecipeInterface, TypeInput, TypeNormalisedInput } from "./types"; -export default class Recipe extends RecipeModule { - static RECIPE_ID: string; - private static instance; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - isInServerlessEnv: boolean; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): Recipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled(): APIHandled[]; - handleAPIRequest: ( - _: string, - __: BaseRequest, - ___: BaseResponse, - ____: normalisedURLPath, - _____: HTTPMethod - ) => Promise; - handleError(error: error, _: BaseRequest, __: BaseResponse): Promise; - getAllCORSHeaders(): string[]; - isErrorFromThisRecipe(err: any): err is error; -} diff --git a/lib/build/recipe/usermetadata/recipe.js b/lib/build/recipe/usermetadata/recipe.js deleted file mode 100644 index 1b7ab148b..000000000 --- a/lib/build/recipe/usermetadata/recipe.js +++ /dev/null @@ -1,117 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -const querier_1 = require("../../querier"); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const utils_1 = require("./utils"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - // This stub is required to implement RecipeModule - this.handleAPIRequest = (_, __, ___, ____, _____) => - __awaiter(this, void 0, void 0, function* () { - throw new Error("Should never come here"); - }); - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(querier_1.Querier.getNewInstanceOrThrowError(recipeId)) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - } - /* Init functions */ - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error( - "Initialisation not done. Did you forget to call the UserMetadata.init or SuperTokens.init function?" - ); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return Recipe.instance; - } else { - throw new Error("UserMetadata recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } - /* RecipeModule functions */ - getAPIsHandled() { - return []; - } - handleError(error, _, __) { - throw error; - } - getAllCORSHeaders() { - return []; - } - isErrorFromThisRecipe(err) { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - } -} -exports.default = Recipe; -Recipe.RECIPE_ID = "usermetadata"; -Recipe.instance = undefined; diff --git a/lib/build/recipe/usermetadata/recipeImplementation.d.ts b/lib/build/recipe/usermetadata/recipeImplementation.d.ts deleted file mode 100644 index 0c838d977..000000000 --- a/lib/build/recipe/usermetadata/recipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "."; -import { Querier } from "../../querier"; -export default function getRecipeInterface(querier: Querier): RecipeInterface; diff --git a/lib/build/recipe/usermetadata/recipeImplementation.js b/lib/build/recipe/usermetadata/recipeImplementation.js deleted file mode 100644 index 1f9653e83..000000000 --- a/lib/build/recipe/usermetadata/recipeImplementation.js +++ /dev/null @@ -1,41 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeInterface(querier) { - return { - getUserMetadata: function ({ userId }) { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user/metadata"), { userId }); - }, - updateUserMetadata: function ({ userId, metadataUpdate }) { - return querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/user/metadata"), { - userId, - metadataUpdate, - }); - }, - clearUserMetadata: function ({ userId }) { - return querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/user/metadata/remove"), { - userId, - }); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/usermetadata/types.d.ts b/lib/build/recipe/usermetadata/types.d.ts deleted file mode 100644 index a88b13312..000000000 --- a/lib/build/recipe/usermetadata/types.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -import { JSONObject } from "../../types"; -export declare type TypeInput = { - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type APIInterface = {}; -export declare type RecipeInterface = { - getUserMetadata: (input: { - userId: string; - userContext: any; - }) => Promise<{ - status: "OK"; - metadata: any; - }>; - /** - * Updates the metadata object of the user by doing a shallow merge of the stored and the update JSONs - * and removing properties set to null on the root level of the update object. - * e.g.: - * - stored: `{ "preferences": { "theme":"dark" }, "notifications": { "email": true }, "todos": ["example"] }` - * - update: `{ "notifications": { "sms": true }, "todos": null }` - * - result: `{ "preferences": { "theme":"dark" }, "notifications": { "sms": true } }` - */ - updateUserMetadata: (input: { - userId: string; - metadataUpdate: JSONObject; - userContext: any; - }) => Promise<{ - status: "OK"; - metadata: JSONObject; - }>; - clearUserMetadata: (input: { - userId: string; - userContext: any; - }) => Promise<{ - status: "OK"; - }>; -}; diff --git a/lib/build/recipe/usermetadata/types.js b/lib/build/recipe/usermetadata/types.js deleted file mode 100644 index a7bb3574b..000000000 --- a/lib/build/recipe/usermetadata/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/usermetadata/utils.d.ts b/lib/build/recipe/usermetadata/utils.d.ts deleted file mode 100644 index 4025b1b44..000000000 --- a/lib/build/recipe/usermetadata/utils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - _: Recipe, - __: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/usermetadata/utils.js b/lib/build/recipe/usermetadata/utils.js deleted file mode 100644 index 74993e81f..000000000 --- a/lib/build/recipe/usermetadata/utils.js +++ /dev/null @@ -1,30 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -function validateAndNormaliseUserInput(_, __, config) { - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - return { - override, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; diff --git a/lib/build/recipe/userroles/index.d.ts b/lib/build/recipe/userroles/index.d.ts deleted file mode 100644 index 0e2210593..000000000 --- a/lib/build/recipe/userroles/index.d.ts +++ /dev/null @@ -1,114 +0,0 @@ -// @ts-nocheck -import Recipe from "./recipe"; -import { RecipeInterface } from "./types"; -export default class Wrapper { - static init: typeof Recipe.init; - static PermissionClaim: import("./permissionClaim").PermissionClaimClass; - static UserRoleClaim: import("./userRoleClaim").UserRoleClaimClass; - static addRoleToUser( - userId: string, - role: string, - userContext?: any - ): Promise< - | { - status: "OK"; - didUserAlreadyHaveRole: boolean; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - static removeUserRole( - userId: string, - role: string, - userContext?: any - ): Promise< - | { - status: "OK"; - didUserHaveRole: boolean; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - static getRolesForUser( - userId: string, - userContext?: any - ): Promise<{ - status: "OK"; - roles: string[]; - }>; - static getUsersThatHaveRole( - role: string, - userContext?: any - ): Promise< - | { - status: "OK"; - users: string[]; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - static createNewRoleOrAddPermissions( - role: string, - permissions: string[], - userContext?: any - ): Promise<{ - status: "OK"; - createdNewRole: boolean; - }>; - static getPermissionsForRole( - role: string, - userContext?: any - ): Promise< - | { - status: "OK"; - permissions: string[]; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - static removePermissionsFromRole( - role: string, - permissions: string[], - userContext?: any - ): Promise<{ - status: "OK" | "UNKNOWN_ROLE_ERROR"; - }>; - static getRolesThatHavePermission( - permission: string, - userContext?: any - ): Promise<{ - status: "OK"; - roles: string[]; - }>; - static deleteRole( - role: string, - userContext?: any - ): Promise<{ - status: "OK"; - didRoleExist: boolean; - }>; - static getAllRoles( - userContext?: any - ): Promise<{ - status: "OK"; - roles: string[]; - }>; -} -export declare const init: typeof Recipe.init; -export declare const addRoleToUser: typeof Wrapper.addRoleToUser; -export declare const removeUserRole: typeof Wrapper.removeUserRole; -export declare const getRolesForUser: typeof Wrapper.getRolesForUser; -export declare const getUsersThatHaveRole: typeof Wrapper.getUsersThatHaveRole; -export declare const createNewRoleOrAddPermissions: typeof Wrapper.createNewRoleOrAddPermissions; -export declare const getPermissionsForRole: typeof Wrapper.getPermissionsForRole; -export declare const removePermissionsFromRole: typeof Wrapper.removePermissionsFromRole; -export declare const getRolesThatHavePermission: typeof Wrapper.getRolesThatHavePermission; -export declare const deleteRole: typeof Wrapper.deleteRole; -export declare const getAllRoles: typeof Wrapper.getAllRoles; -export { UserRoleClaim } from "./userRoleClaim"; -export { PermissionClaim } from "./permissionClaim"; -export type { RecipeInterface }; diff --git a/lib/build/recipe/userroles/index.js b/lib/build/recipe/userroles/index.js deleted file mode 100644 index c01687051..000000000 --- a/lib/build/recipe/userroles/index.js +++ /dev/null @@ -1,170 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PermissionClaim = exports.UserRoleClaim = exports.getAllRoles = exports.deleteRole = exports.getRolesThatHavePermission = exports.removePermissionsFromRole = exports.getPermissionsForRole = exports.createNewRoleOrAddPermissions = exports.getUsersThatHaveRole = exports.getRolesForUser = exports.removeUserRole = exports.addRoleToUser = exports.init = void 0; -const permissionClaim_1 = require("./permissionClaim"); -const recipe_1 = __importDefault(require("./recipe")); -const userRoleClaim_1 = require("./userRoleClaim"); -class Wrapper { - static addRoleToUser(userId, role, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.addRoleToUser({ - userId, - role, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static removeUserRole(userId, role, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.removeUserRole({ - userId, - role, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getRolesForUser(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getRolesForUser({ - userId, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getUsersThatHaveRole(role, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getUsersThatHaveRole({ - role, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static createNewRoleOrAddPermissions(role, permissions, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.createNewRoleOrAddPermissions({ - role, - permissions, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getPermissionsForRole(role, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getPermissionsForRole({ - role, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static removePermissionsFromRole(role, permissions, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.removePermissionsFromRole({ - role, - permissions, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getRolesThatHavePermission(permission, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getRolesThatHavePermission({ - permission, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static deleteRole(role, userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.deleteRole({ - role, - userContext: userContext === undefined ? {} : userContext, - }); - }); - } - static getAllRoles(userContext) { - return __awaiter(this, void 0, void 0, function* () { - return yield recipe_1.default.getInstanceOrThrowError().recipeInterfaceImpl.getAllRoles({ - userContext: userContext === undefined ? {} : userContext, - }); - }); - } -} -exports.default = Wrapper; -Wrapper.init = recipe_1.default.init; -Wrapper.PermissionClaim = permissionClaim_1.PermissionClaim; -Wrapper.UserRoleClaim = userRoleClaim_1.UserRoleClaim; -exports.init = Wrapper.init; -exports.addRoleToUser = Wrapper.addRoleToUser; -exports.removeUserRole = Wrapper.removeUserRole; -exports.getRolesForUser = Wrapper.getRolesForUser; -exports.getUsersThatHaveRole = Wrapper.getUsersThatHaveRole; -exports.createNewRoleOrAddPermissions = Wrapper.createNewRoleOrAddPermissions; -exports.getPermissionsForRole = Wrapper.getPermissionsForRole; -exports.removePermissionsFromRole = Wrapper.removePermissionsFromRole; -exports.getRolesThatHavePermission = Wrapper.getRolesThatHavePermission; -exports.deleteRole = Wrapper.deleteRole; -exports.getAllRoles = Wrapper.getAllRoles; -var userRoleClaim_2 = require("./userRoleClaim"); -Object.defineProperty(exports, "UserRoleClaim", { - enumerable: true, - get: function () { - return userRoleClaim_2.UserRoleClaim; - }, -}); -var permissionClaim_2 = require("./permissionClaim"); -Object.defineProperty(exports, "PermissionClaim", { - enumerable: true, - get: function () { - return permissionClaim_2.PermissionClaim; - }, -}); diff --git a/lib/build/recipe/userroles/permissionClaim.d.ts b/lib/build/recipe/userroles/permissionClaim.d.ts deleted file mode 100644 index d0c34d159..000000000 --- a/lib/build/recipe/userroles/permissionClaim.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { PrimitiveArrayClaim } from "../session/claimBaseClasses/primitiveArrayClaim"; -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -export declare class PermissionClaimClass extends PrimitiveArrayClaim { - constructor(); -} -export declare const PermissionClaim: PermissionClaimClass; diff --git a/lib/build/recipe/userroles/permissionClaim.js b/lib/build/recipe/userroles/permissionClaim.js deleted file mode 100644 index 8d68c2fb4..000000000 --- a/lib/build/recipe/userroles/permissionClaim.js +++ /dev/null @@ -1,78 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.PermissionClaim = exports.PermissionClaimClass = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const primitiveArrayClaim_1 = require("../session/claimBaseClasses/primitiveArrayClaim"); -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -class PermissionClaimClass extends primitiveArrayClaim_1.PrimitiveArrayClaim { - constructor() { - super({ - key: "st-perm", - fetchValue(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipe = recipe_1.default.getInstanceOrThrowError(); - // We fetch the roles because the rolesClaim may not be present in the payload - const userRoles = yield recipe.recipeInterfaceImpl.getRolesForUser({ - userId, - userContext, - }); - // We use a set to filter out duplicates - const userPermissions = new Set(); - for (const role of userRoles.roles) { - const rolePermissions = yield recipe.recipeInterfaceImpl.getPermissionsForRole({ - role, - userContext, - }); - if (rolePermissions.status === "OK") { - for (const perm of rolePermissions.permissions) { - userPermissions.add(perm); - } - } - } - return Array.from(userPermissions); - }); - }, - defaultMaxAgeInSeconds: 300, - }); - } -} -exports.PermissionClaimClass = PermissionClaimClass; -exports.PermissionClaim = new PermissionClaimClass(); diff --git a/lib/build/recipe/userroles/recipe.d.ts b/lib/build/recipe/userroles/recipe.d.ts deleted file mode 100644 index bbce8012b..000000000 --- a/lib/build/recipe/userroles/recipe.d.ts +++ /dev/null @@ -1,29 +0,0 @@ -// @ts-nocheck -import error from "../../error"; -import { BaseRequest, BaseResponse } from "../../framework"; -import normalisedURLPath from "../../normalisedURLPath"; -import RecipeModule from "../../recipeModule"; -import { APIHandled, HTTPMethod, NormalisedAppinfo, RecipeListFunction } from "../../types"; -import { RecipeInterface, TypeInput, TypeNormalisedInput } from "./types"; -export default class Recipe extends RecipeModule { - static RECIPE_ID: string; - private static instance; - config: TypeNormalisedInput; - recipeInterfaceImpl: RecipeInterface; - isInServerlessEnv: boolean; - constructor(recipeId: string, appInfo: NormalisedAppinfo, isInServerlessEnv: boolean, config?: TypeInput); - static getInstanceOrThrowError(): Recipe; - static init(config?: TypeInput): RecipeListFunction; - static reset(): void; - getAPIsHandled(): APIHandled[]; - handleAPIRequest: ( - _: string, - __: BaseRequest, - ___: BaseResponse, - ____: normalisedURLPath, - _____: HTTPMethod - ) => Promise; - handleError(error: error, _: BaseRequest, __: BaseResponse): Promise; - getAllCORSHeaders(): string[]; - isErrorFromThisRecipe(err: any): err is error; -} diff --git a/lib/build/recipe/userroles/recipe.js b/lib/build/recipe/userroles/recipe.js deleted file mode 100644 index 92931f54f..000000000 --- a/lib/build/recipe/userroles/recipe.js +++ /dev/null @@ -1,129 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const error_1 = __importDefault(require("../../error")); -const querier_1 = require("../../querier"); -const recipeModule_1 = __importDefault(require("../../recipeModule")); -const recipeImplementation_1 = __importDefault(require("./recipeImplementation")); -const utils_1 = require("./utils"); -const supertokens_js_override_1 = __importDefault(require("supertokens-js-override")); -const postSuperTokensInitCallbacks_1 = require("../../postSuperTokensInitCallbacks"); -const recipe_1 = __importDefault(require("../session/recipe")); -const userRoleClaim_1 = require("./userRoleClaim"); -const permissionClaim_1 = require("./permissionClaim"); -class Recipe extends recipeModule_1.default { - constructor(recipeId, appInfo, isInServerlessEnv, config) { - super(recipeId, appInfo); - // This stub is required to implement RecipeModule - this.handleAPIRequest = (_, __, ___, ____, _____) => - __awaiter(this, void 0, void 0, function* () { - throw new Error("Should never come here"); - }); - this.config = utils_1.validateAndNormaliseUserInput(this, appInfo, config); - this.isInServerlessEnv = isInServerlessEnv; - { - let builder = new supertokens_js_override_1.default( - recipeImplementation_1.default(querier_1.Querier.getNewInstanceOrThrowError(recipeId)) - ); - this.recipeInterfaceImpl = builder.override(this.config.override.functions).build(); - } - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.addPostInitCallback(() => { - if (!this.config.skipAddingRolesToAccessToken) { - recipe_1.default.getInstanceOrThrowError().addClaimFromOtherRecipe(userRoleClaim_1.UserRoleClaim); - } - if (!this.config.skipAddingPermissionsToAccessToken) { - recipe_1.default.getInstanceOrThrowError().addClaimFromOtherRecipe(permissionClaim_1.PermissionClaim); - } - }); - } - /* Init functions */ - static getInstanceOrThrowError() { - if (Recipe.instance !== undefined) { - return Recipe.instance; - } - throw new Error( - "Initialisation not done. Did you forget to call the UserRoles.init or SuperTokens.init functions?" - ); - } - static init(config) { - return (appInfo, isInServerlessEnv) => { - if (Recipe.instance === undefined) { - Recipe.instance = new Recipe(Recipe.RECIPE_ID, appInfo, isInServerlessEnv, config); - return Recipe.instance; - } else { - throw new Error("UserRoles recipe has already been initialised. Please check your code for bugs."); - } - }; - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - Recipe.instance = undefined; - } - /* RecipeModule functions */ - getAPIsHandled() { - return []; - } - handleError(error, _, __) { - throw error; - } - getAllCORSHeaders() { - return []; - } - isErrorFromThisRecipe(err) { - return error_1.default.isErrorFromSuperTokens(err) && err.fromRecipe === Recipe.RECIPE_ID; - } -} -exports.default = Recipe; -Recipe.RECIPE_ID = "userroles"; -Recipe.instance = undefined; diff --git a/lib/build/recipe/userroles/recipeImplementation.d.ts b/lib/build/recipe/userroles/recipeImplementation.d.ts deleted file mode 100644 index 86bf78a27..000000000 --- a/lib/build/recipe/userroles/recipeImplementation.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -import { RecipeInterface } from "./types"; -import { Querier } from "../../querier"; -export default function getRecipeInterface(querier: Querier): RecipeInterface; diff --git a/lib/build/recipe/userroles/recipeImplementation.js b/lib/build/recipe/userroles/recipeImplementation.js deleted file mode 100644 index 459e621f1..000000000 --- a/lib/build/recipe/userroles/recipeImplementation.js +++ /dev/null @@ -1,63 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const normalisedURLPath_1 = __importDefault(require("../../normalisedURLPath")); -function getRecipeInterface(querier) { - return { - addRoleToUser: function ({ userId, role }) { - return querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/user/role"), { userId, role }); - }, - removeUserRole: function ({ userId, role }) { - return querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/user/role/remove"), { - userId, - role, - }); - }, - getRolesForUser: function ({ userId }) { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/user/roles"), { userId }); - }, - getUsersThatHaveRole: function ({ role }) { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/role/users"), { role }); - }, - createNewRoleOrAddPermissions: function ({ role, permissions }) { - return querier.sendPutRequest(new normalisedURLPath_1.default("/recipe/role"), { role, permissions }); - }, - getPermissionsForRole: function ({ role }) { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/role/permissions"), { role }); - }, - removePermissionsFromRole: function ({ role, permissions }) { - return querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/role/permissions/remove"), { - role, - permissions, - }); - }, - getRolesThatHavePermission: function ({ permission }) { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/permission/roles"), { permission }); - }, - deleteRole: function ({ role }) { - return querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/role/remove"), { role }); - }, - getAllRoles: function () { - return querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/roles"), {}); - }, - }; -} -exports.default = getRecipeInterface; diff --git a/lib/build/recipe/userroles/types.d.ts b/lib/build/recipe/userroles/types.d.ts deleted file mode 100644 index 9552d9f54..000000000 --- a/lib/build/recipe/userroles/types.d.ts +++ /dev/null @@ -1,119 +0,0 @@ -// @ts-nocheck -import OverrideableBuilder from "supertokens-js-override"; -export declare type TypeInput = { - skipAddingRolesToAccessToken?: boolean; - skipAddingPermissionsToAccessToken?: boolean; - override?: { - functions?: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis?: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type TypeNormalisedInput = { - skipAddingRolesToAccessToken: boolean; - skipAddingPermissionsToAccessToken: boolean; - override: { - functions: ( - originalImplementation: RecipeInterface, - builder?: OverrideableBuilder - ) => RecipeInterface; - apis: (originalImplementation: APIInterface, builder?: OverrideableBuilder) => APIInterface; - }; -}; -export declare type APIInterface = {}; -export declare type RecipeInterface = { - addRoleToUser: (input: { - userId: string; - role: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - didUserAlreadyHaveRole: boolean; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - removeUserRole: (input: { - userId: string; - role: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - didUserHaveRole: boolean; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - getRolesForUser: (input: { - userId: string; - userContext: any; - }) => Promise<{ - status: "OK"; - roles: string[]; - }>; - getUsersThatHaveRole: (input: { - role: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - users: string[]; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - createNewRoleOrAddPermissions: (input: { - role: string; - permissions: string[]; - userContext: any; - }) => Promise<{ - status: "OK"; - createdNewRole: boolean; - }>; - getPermissionsForRole: (input: { - role: string; - userContext: any; - }) => Promise< - | { - status: "OK"; - permissions: string[]; - } - | { - status: "UNKNOWN_ROLE_ERROR"; - } - >; - removePermissionsFromRole: (input: { - role: string; - permissions: string[]; - userContext: any; - }) => Promise<{ - status: "OK" | "UNKNOWN_ROLE_ERROR"; - }>; - getRolesThatHavePermission: (input: { - permission: string; - userContext: any; - }) => Promise<{ - status: "OK"; - roles: string[]; - }>; - deleteRole: (input: { - role: string; - userContext: any; - }) => Promise<{ - status: "OK"; - didRoleExist: boolean; - }>; - getAllRoles: (input: { - userContext: any; - }) => Promise<{ - status: "OK"; - roles: string[]; - }>; -}; diff --git a/lib/build/recipe/userroles/types.js b/lib/build/recipe/userroles/types.js deleted file mode 100644 index a7bb3574b..000000000 --- a/lib/build/recipe/userroles/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/recipe/userroles/userRoleClaim.d.ts b/lib/build/recipe/userroles/userRoleClaim.d.ts deleted file mode 100644 index 75c0635d5..000000000 --- a/lib/build/recipe/userroles/userRoleClaim.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { PrimitiveArrayClaim } from "../session/claimBaseClasses/primitiveArrayClaim"; -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -export declare class UserRoleClaimClass extends PrimitiveArrayClaim { - constructor(); -} -export declare const UserRoleClaim: UserRoleClaimClass; diff --git a/lib/build/recipe/userroles/userRoleClaim.js b/lib/build/recipe/userroles/userRoleClaim.js deleted file mode 100644 index 9f0a777aa..000000000 --- a/lib/build/recipe/userroles/userRoleClaim.js +++ /dev/null @@ -1,64 +0,0 @@ -"use strict"; -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.UserRoleClaim = exports.UserRoleClaimClass = void 0; -const recipe_1 = __importDefault(require("./recipe")); -const primitiveArrayClaim_1 = require("../session/claimBaseClasses/primitiveArrayClaim"); -/** - * We include "Class" in the class name, because it makes it easier to import the right thing (the instance) instead of this. - * */ -class UserRoleClaimClass extends primitiveArrayClaim_1.PrimitiveArrayClaim { - constructor() { - super({ - key: "st-role", - fetchValue(userId, userContext) { - return __awaiter(this, void 0, void 0, function* () { - const recipe = recipe_1.default.getInstanceOrThrowError(); - const res = yield recipe.recipeInterfaceImpl.getRolesForUser({ - userId, - userContext, - }); - return res.roles; - }); - }, - defaultMaxAgeInSeconds: 300, - }); - } -} -exports.UserRoleClaimClass = UserRoleClaimClass; -exports.UserRoleClaim = new UserRoleClaimClass(); diff --git a/lib/build/recipe/userroles/utils.d.ts b/lib/build/recipe/userroles/utils.d.ts deleted file mode 100644 index 4025b1b44..000000000 --- a/lib/build/recipe/userroles/utils.d.ts +++ /dev/null @@ -1,9 +0,0 @@ -// @ts-nocheck -import { NormalisedAppinfo } from "../../types"; -import Recipe from "./recipe"; -import { TypeInput, TypeNormalisedInput } from "./types"; -export declare function validateAndNormaliseUserInput( - _: Recipe, - __: NormalisedAppinfo, - config?: TypeInput -): TypeNormalisedInput; diff --git a/lib/build/recipe/userroles/utils.js b/lib/build/recipe/userroles/utils.js deleted file mode 100644 index 7023b84d5..000000000 --- a/lib/build/recipe/userroles/utils.js +++ /dev/null @@ -1,34 +0,0 @@ -"use strict"; -/* Copyright (c) 2022, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -exports.validateAndNormaliseUserInput = void 0; -function validateAndNormaliseUserInput(_, __, config) { - let override = Object.assign( - { - functions: (originalImplementation) => originalImplementation, - apis: (originalImplementation) => originalImplementation, - }, - config === null || config === void 0 ? void 0 : config.override - ); - return { - skipAddingRolesToAccessToken: - (config === null || config === void 0 ? void 0 : config.skipAddingRolesToAccessToken) === true, - skipAddingPermissionsToAccessToken: - (config === null || config === void 0 ? void 0 : config.skipAddingPermissionsToAccessToken) === true, - override, - }; -} -exports.validateAndNormaliseUserInput = validateAndNormaliseUserInput; diff --git a/lib/build/recipeModule.d.ts b/lib/build/recipeModule.d.ts deleted file mode 100644 index aef4fd4c8..000000000 --- a/lib/build/recipeModule.d.ts +++ /dev/null @@ -1,24 +0,0 @@ -// @ts-nocheck -import STError from "./error"; -import { NormalisedAppinfo, APIHandled, HTTPMethod } from "./types"; -import NormalisedURLPath from "./normalisedURLPath"; -import { BaseRequest, BaseResponse } from "./framework"; -export default abstract class RecipeModule { - private recipeId; - private appInfo; - constructor(recipeId: string, appInfo: NormalisedAppinfo); - getRecipeId: () => string; - getAppInfo: () => NormalisedAppinfo; - returnAPIIdIfCanHandleRequest: (path: NormalisedURLPath, method: HTTPMethod) => string | undefined; - abstract getAPIsHandled(): APIHandled[]; - abstract handleAPIRequest( - id: string, - req: BaseRequest, - response: BaseResponse, - path: NormalisedURLPath, - method: HTTPMethod - ): Promise; - abstract handleError(error: STError, request: BaseRequest, response: BaseResponse): Promise; - abstract getAllCORSHeaders(): string[]; - abstract isErrorFromThisRecipe(err: any): err is STError; -} diff --git a/lib/build/recipeModule.js b/lib/build/recipeModule.js deleted file mode 100644 index efdd876f1..000000000 --- a/lib/build/recipeModule.js +++ /dev/null @@ -1,43 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); -class RecipeModule { - constructor(recipeId, appInfo) { - this.getRecipeId = () => { - return this.recipeId; - }; - this.getAppInfo = () => { - return this.appInfo; - }; - this.returnAPIIdIfCanHandleRequest = (path, method) => { - let apisHandled = this.getAPIsHandled(); - for (let i = 0; i < apisHandled.length; i++) { - let currAPI = apisHandled[i]; - if ( - !currAPI.disabled && - currAPI.method === method && - this.appInfo.apiBasePath.appendPath(currAPI.pathWithoutApiBasePath).equals(path) - ) { - return currAPI.id; - } - } - return undefined; - }; - this.recipeId = recipeId; - this.appInfo = appInfo; - } -} -exports.default = RecipeModule; diff --git a/lib/build/supertokens.d.ts b/lib/build/supertokens.d.ts deleted file mode 100644 index 682219bc4..000000000 --- a/lib/build/supertokens.d.ts +++ /dev/null @@ -1,93 +0,0 @@ -// @ts-nocheck -import { TypeInput, NormalisedAppinfo, HTTPMethod, SuperTokensInfo } from "./types"; -import RecipeModule from "./recipeModule"; -import NormalisedURLPath from "./normalisedURLPath"; -import { BaseRequest, BaseResponse } from "./framework"; -import { TypeFramework } from "./framework/types"; -export default class SuperTokens { - private static instance; - framework: TypeFramework; - appInfo: NormalisedAppinfo; - isInServerlessEnv: boolean; - recipeModules: RecipeModule[]; - supertokens: undefined | SuperTokensInfo; - telemetryEnabled: boolean; - constructor(config: TypeInput); - static init(config: TypeInput): void; - static reset(): void; - static getInstanceOrThrowError(): SuperTokens; - handleAPI: ( - matchedRecipe: RecipeModule, - id: string, - request: BaseRequest, - response: BaseResponse, - path: NormalisedURLPath, - method: HTTPMethod - ) => Promise; - getAllCORSHeaders: () => string[]; - getUserCount: (includeRecipeIds?: string[] | undefined) => Promise; - getUsers: (input: { - timeJoinedOrder: "ASC" | "DESC"; - limit?: number; - paginationToken?: string; - includeRecipeIds?: string[]; - query?: object; - }) => Promise<{ - users: { - recipeId: string; - user: any; - }[]; - nextPaginationToken?: string; - }>; - deleteUser: (input: { - userId: string; - }) => Promise<{ - status: "OK"; - }>; - createUserIdMapping: (input: { - superTokensUserId: string; - externalUserId: string; - externalUserIdInfo?: string; - force?: boolean; - }) => Promise< - | { - status: "OK" | "UNKNOWN_SUPERTOKENS_USER_ID_ERROR"; - } - | { - status: "USER_ID_MAPPING_ALREADY_EXISTS_ERROR"; - doesSuperTokensUserIdExist: boolean; - doesExternalUserIdExist: boolean; - } - >; - getUserIdMapping: (input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - }) => Promise< - | { - status: "OK"; - superTokensUserId: string; - externalUserId: string; - externalUserIdInfo: string | undefined; - } - | { - status: "UNKNOWN_MAPPING_ERROR"; - } - >; - deleteUserIdMapping: (input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - force?: boolean; - }) => Promise<{ - status: "OK"; - didMappingExist: boolean; - }>; - updateOrDeleteUserIdMappingInfo: (input: { - userId: string; - userIdType?: "SUPERTOKENS" | "EXTERNAL" | "ANY"; - externalUserIdInfo?: string; - }) => Promise<{ - status: "OK" | "UNKNOWN_MAPPING_ERROR"; - }>; - middleware: (request: BaseRequest, response: BaseResponse) => Promise; - errorHandler: (err: any, request: BaseRequest, response: BaseResponse) => Promise; -} diff --git a/lib/build/supertokens.js b/lib/build/supertokens.js deleted file mode 100644 index 3e06d0d9b..000000000 --- a/lib/build/supertokens.js +++ /dev/null @@ -1,375 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -var __awaiter = - (this && this.__awaiter) || - function (thisArg, _arguments, P, generator) { - function adopt(value) { - return value instanceof P - ? value - : new P(function (resolve) { - resolve(value); - }); - } - return new (P || (P = Promise))(function (resolve, reject) { - function fulfilled(value) { - try { - step(generator.next(value)); - } catch (e) { - reject(e); - } - } - function rejected(value) { - try { - step(generator["throw"](value)); - } catch (e) { - reject(e); - } - } - function step(result) { - result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); - } - step((generator = generator.apply(thisArg, _arguments || [])).next()); - }); - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -const utils_1 = require("./utils"); -const querier_1 = require("./querier"); -const constants_1 = require("./constants"); -const normalisedURLDomain_1 = __importDefault(require("./normalisedURLDomain")); -const normalisedURLPath_1 = __importDefault(require("./normalisedURLPath")); -const error_1 = __importDefault(require("./error")); -const logger_1 = require("./logger"); -const postSuperTokensInitCallbacks_1 = require("./postSuperTokensInitCallbacks"); -class SuperTokens { - constructor(config) { - var _a, _b; - this.handleAPI = (matchedRecipe, id, request, response, path, method) => - __awaiter(this, void 0, void 0, function* () { - return yield matchedRecipe.handleAPIRequest(id, request, response, path, method); - }); - this.getAllCORSHeaders = () => { - let headerSet = new Set(); - headerSet.add(constants_1.HEADER_RID); - headerSet.add(constants_1.HEADER_FDI); - this.recipeModules.forEach((recipe) => { - let headers = recipe.getAllCORSHeaders(); - headers.forEach((h) => { - headerSet.add(h); - }); - }); - return Array.from(headerSet); - }; - this.getUserCount = (includeRecipeIds) => - __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let apiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion(apiVersion, "2.7") === "2.7") { - throw new Error( - "Please use core version >= 3.5 to call this function. Otherwise, you can call .getUserCount() instead (for example, EmailPassword.getUserCount())" - ); - } - let includeRecipeIdsStr = undefined; - if (includeRecipeIds !== undefined) { - includeRecipeIdsStr = includeRecipeIds.join(","); - } - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/users/count"), { - includeRecipeIds: includeRecipeIdsStr, - }); - return Number(response.count); - }); - this.getUsers = (input) => - __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let apiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion(apiVersion, "2.7") === "2.7") { - throw new Error( - "Please use core version >= 3.5 to call this function. Otherwise, you can call .getUsersOldestFirst() or .getUsersNewestFirst() instead (for example, EmailPassword.getUsersOldestFirst())" - ); - } - let includeRecipeIdsStr = undefined; - if (input.includeRecipeIds !== undefined) { - includeRecipeIdsStr = input.includeRecipeIds.join(","); - } - let response = yield querier.sendGetRequest( - new normalisedURLPath_1.default("/users"), - Object.assign(Object.assign({}, input.query), { - includeRecipeIds: includeRecipeIdsStr, - timeJoinedOrder: input.timeJoinedOrder, - limit: input.limit, - paginationToken: input.paginationToken, - }) - ); - return { - users: response.users, - nextPaginationToken: response.nextPaginationToken, - }; - }); - this.deleteUser = (input) => - __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let cdiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion("2.10", cdiVersion) === cdiVersion) { - // delete user is only available >= CDI 2.10 - yield querier.sendPostRequest(new normalisedURLPath_1.default("/user/remove"), { - userId: input.userId, - }); - return { - status: "OK", - }; - } else { - throw new global.Error("Please upgrade the SuperTokens core to >= 3.7.0"); - } - }); - this.createUserIdMapping = function (input) { - return __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let cdiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion("2.15", cdiVersion) === cdiVersion) { - // create userId mapping is only available >= CDI 2.15 - return yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/userid/map"), { - superTokensUserId: input.superTokensUserId, - externalUserId: input.externalUserId, - externalUserIdInfo: input.externalUserIdInfo, - force: input.force, - }); - } else { - throw new global.Error("Please upgrade the SuperTokens core to >= 3.15.0"); - } - }); - }; - this.getUserIdMapping = function (input) { - return __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let cdiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion("2.15", cdiVersion) === cdiVersion) { - // create userId mapping is only available >= CDI 2.15 - let response = yield querier.sendGetRequest(new normalisedURLPath_1.default("/recipe/userid/map"), { - userId: input.userId, - userIdType: input.userIdType, - }); - return response; - } else { - throw new global.Error("Please upgrade the SuperTokens core to >= 3.15.0"); - } - }); - }; - this.deleteUserIdMapping = function (input) { - return __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let cdiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion("2.15", cdiVersion) === cdiVersion) { - return yield querier.sendPostRequest(new normalisedURLPath_1.default("/recipe/userid/map/remove"), { - userId: input.userId, - userIdType: input.userIdType, - force: input.force, - }); - } else { - throw new global.Error("Please upgrade the SuperTokens core to >= 3.15.0"); - } - }); - }; - this.updateOrDeleteUserIdMappingInfo = function (input) { - return __awaiter(this, void 0, void 0, function* () { - let querier = querier_1.Querier.getNewInstanceOrThrowError(undefined); - let cdiVersion = yield querier.getAPIVersion(); - if (utils_1.maxVersion("2.15", cdiVersion) === cdiVersion) { - return yield querier.sendPutRequest( - new normalisedURLPath_1.default("/recipe/userid/external-user-id-info"), - { - userId: input.userId, - userIdType: input.userIdType, - externalUserIdInfo: input.externalUserIdInfo, - } - ); - } else { - throw new global.Error("Please upgrade the SuperTokens core to >= 3.15.0"); - } - }); - }; - this.middleware = (request, response) => - __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("middleware: Started"); - let path = this.appInfo.apiGatewayPath.appendPath( - new normalisedURLPath_1.default(request.getOriginalURL()) - ); - let method = utils_1.normaliseHttpMethod(request.getMethod()); - // if the prefix of the URL doesn't match the base path, we skip - if (!path.startsWith(this.appInfo.apiBasePath)) { - logger_1.logDebugMessage( - "middleware: Not handling because request path did not start with config path. Request path: " + - path.getAsStringDangerous() - ); - return false; - } - let requestRID = utils_1.getRidFromHeader(request); - logger_1.logDebugMessage("middleware: requestRID is: " + requestRID); - if (requestRID === "anti-csrf") { - // see https://github.com/supertokens/supertokens-node/issues/202 - requestRID = undefined; - } - if (requestRID !== undefined) { - let matchedRecipe = undefined; - // we loop through all recipe modules to find the one with the matching rId - for (let i = 0; i < this.recipeModules.length; i++) { - logger_1.logDebugMessage( - "middleware: Checking recipe ID for match: " + this.recipeModules[i].getRecipeId() - ); - if (this.recipeModules[i].getRecipeId() === requestRID) { - matchedRecipe = this.recipeModules[i]; - break; - } - } - if (matchedRecipe === undefined) { - logger_1.logDebugMessage("middleware: Not handling because no recipe matched"); - // we could not find one, so we skip - return false; - } - logger_1.logDebugMessage("middleware: Matched with recipe ID: " + matchedRecipe.getRecipeId()); - let id = matchedRecipe.returnAPIIdIfCanHandleRequest(path, method); - if (id === undefined) { - logger_1.logDebugMessage( - "middleware: Not handling because recipe doesn't handle request path or method. Request path: " + - path.getAsStringDangerous() + - ", request method: " + - method - ); - // the matched recipe doesn't handle this path and http method - return false; - } - logger_1.logDebugMessage("middleware: Request being handled by recipe. ID is: " + id); - // give task to the matched recipe - let requestHandled = yield matchedRecipe.handleAPIRequest(id, request, response, path, method); - if (!requestHandled) { - logger_1.logDebugMessage( - "middleware: Not handled because API returned requestHandled as false" - ); - return false; - } - logger_1.logDebugMessage("middleware: Ended"); - return true; - } else { - // we loop through all recipe modules to find the one with the matching path and method - for (let i = 0; i < this.recipeModules.length; i++) { - logger_1.logDebugMessage( - "middleware: Checking recipe ID for match: " + this.recipeModules[i].getRecipeId() - ); - let id = this.recipeModules[i].returnAPIIdIfCanHandleRequest(path, method); - if (id !== undefined) { - logger_1.logDebugMessage("middleware: Request being handled by recipe. ID is: " + id); - let requestHandled = yield this.recipeModules[i].handleAPIRequest( - id, - request, - response, - path, - method - ); - if (!requestHandled) { - logger_1.logDebugMessage( - "middleware: Not handled because API returned requestHandled as false" - ); - return false; - } - logger_1.logDebugMessage("middleware: Ended"); - return true; - } - } - logger_1.logDebugMessage("middleware: Not handling because no recipe matched"); - return false; - } - }); - this.errorHandler = (err, request, response) => - __awaiter(this, void 0, void 0, function* () { - logger_1.logDebugMessage("errorHandler: Started"); - if (error_1.default.isErrorFromSuperTokens(err)) { - logger_1.logDebugMessage("errorHandler: Error is from SuperTokens recipe. Message: " + err.message); - if (err.type === error_1.default.BAD_INPUT_ERROR) { - logger_1.logDebugMessage("errorHandler: Sending 400 status code response"); - return utils_1.sendNon200ResponseWithMessage(response, err.message, 400); - } - for (let i = 0; i < this.recipeModules.length; i++) { - logger_1.logDebugMessage( - "errorHandler: Checking recipe for match: " + this.recipeModules[i].getRecipeId() - ); - if (this.recipeModules[i].isErrorFromThisRecipe(err)) { - logger_1.logDebugMessage( - "errorHandler: Matched with recipeID: " + this.recipeModules[i].getRecipeId() - ); - return yield this.recipeModules[i].handleError(err, request, response); - } - } - } - throw err; - }); - logger_1.logDebugMessage("Started SuperTokens with debug logging (supertokens.init called)"); - logger_1.logDebugMessage("appInfo: " + JSON.stringify(config.appInfo)); - this.framework = config.framework !== undefined ? config.framework : "express"; - logger_1.logDebugMessage("framework: " + this.framework); - this.appInfo = utils_1.normaliseInputAppInfoOrThrowError(config.appInfo); - this.supertokens = config.supertokens; - querier_1.Querier.init( - (_a = config.supertokens) === null || _a === void 0 - ? void 0 - : _a.connectionURI - .split(";") - .filter((h) => h !== "") - .map((h) => { - return { - domain: new normalisedURLDomain_1.default(h.trim()), - basePath: new normalisedURLPath_1.default(h.trim()), - }; - }), - (_b = config.supertokens) === null || _b === void 0 ? void 0 : _b.apiKey - ); - if (config.recipeList === undefined || config.recipeList.length === 0) { - throw new Error("Please provide at least one recipe to the supertokens.init function call"); - } - // @ts-ignore - if (config.recipeList.includes(undefined)) { - // related to issue #270. If user makes mistake by adding empty items in the recipeList, this will catch the mistake and throw relevant error - throw new Error("Please remove empty items from recipeList"); - } - this.isInServerlessEnv = config.isInServerlessEnv === undefined ? false : config.isInServerlessEnv; - this.recipeModules = config.recipeList.map((func) => { - return func(this.appInfo, this.isInServerlessEnv); - }); - this.telemetryEnabled = config.telemetry === undefined ? process.env.TEST_MODE !== "testing" : config.telemetry; - } - static init(config) { - if (SuperTokens.instance === undefined) { - SuperTokens.instance = new SuperTokens(config); - postSuperTokensInitCallbacks_1.PostSuperTokensInitCallbacks.runPostInitCallbacks(); - } - } - static reset() { - if (process.env.TEST_MODE !== "testing") { - throw new Error("calling testing function in non testing env"); - } - querier_1.Querier.reset(); - SuperTokens.instance = undefined; - } - static getInstanceOrThrowError() { - if (SuperTokens.instance !== undefined) { - return SuperTokens.instance; - } - throw new Error("Initialisation not done. Did you forget to call the SuperTokens.init function?"); - } -} -exports.default = SuperTokens; diff --git a/lib/build/types.d.ts b/lib/build/types.d.ts deleted file mode 100644 index 424dbdb3c..000000000 --- a/lib/build/types.d.ts +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-nocheck -import RecipeModule from "./recipeModule"; -import NormalisedURLDomain from "./normalisedURLDomain"; -import NormalisedURLPath from "./normalisedURLPath"; -import { TypeFramework } from "./framework/types"; -export declare type AppInfo = { - appName: string; - websiteDomain: string; - websiteBasePath?: string; - apiDomain: string; - apiBasePath?: string; - apiGatewayPath?: string; -}; -export declare type NormalisedAppinfo = { - appName: string; - websiteDomain: NormalisedURLDomain; - apiDomain: NormalisedURLDomain; - topLevelAPIDomain: string; - topLevelWebsiteDomain: string; - apiBasePath: NormalisedURLPath; - apiGatewayPath: NormalisedURLPath; - websiteBasePath: NormalisedURLPath; -}; -export declare type SuperTokensInfo = { - connectionURI: string; - apiKey?: string; -}; -export declare type TypeInput = { - supertokens?: SuperTokensInfo; - framework?: TypeFramework; - appInfo: AppInfo; - recipeList: RecipeListFunction[]; - telemetry?: boolean; - isInServerlessEnv?: boolean; -}; -export declare type RecipeListFunction = (appInfo: NormalisedAppinfo, isInServerlessEnv: boolean) => RecipeModule; -export declare type APIHandled = { - pathWithoutApiBasePath: NormalisedURLPath; - method: HTTPMethod; - id: string; - disabled: boolean; -}; -export declare type HTTPMethod = "post" | "get" | "delete" | "put" | "options" | "trace"; -export declare type JSONPrimitive = string | number | boolean | null; -export declare type JSONArray = Array; -export declare type JSONValue = JSONPrimitive | JSONObject | JSONArray | undefined; -export interface JSONObject { - [ind: string]: JSONValue; -} -export declare type GeneralErrorResponse = { - status: "GENERAL_ERROR"; - message: string; -}; diff --git a/lib/build/types.js b/lib/build/types.js deleted file mode 100644 index a098ca1d7..000000000 --- a/lib/build/types.js +++ /dev/null @@ -1,16 +0,0 @@ -"use strict"; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -Object.defineProperty(exports, "__esModule", { value: true }); diff --git a/lib/build/utils.d.ts b/lib/build/utils.d.ts deleted file mode 100644 index 5a95076cb..000000000 --- a/lib/build/utils.d.ts +++ /dev/null @@ -1,18 +0,0 @@ -// @ts-nocheck -import type { AppInfo, NormalisedAppinfo, HTTPMethod, JSONObject } from "./types"; -import type { BaseRequest, BaseResponse } from "./framework"; -export declare function getLargestVersionFromIntersection(v1: string[], v2: string[]): string | undefined; -export declare function maxVersion(version1: string, version2: string): string; -export declare function normaliseInputAppInfoOrThrowError(appInfo: AppInfo): NormalisedAppinfo; -export declare function normaliseHttpMethod(method: string): HTTPMethod; -export declare function sendNon200ResponseWithMessage(res: BaseResponse, message: string, statusCode: number): void; -export declare function sendNon200Response(res: BaseResponse, statusCode: number, body: JSONObject): void; -export declare function send200Response(res: BaseResponse, responseJson: any): void; -export declare function isAnIpAddress(ipaddress: string): boolean; -export declare function getRidFromHeader(req: BaseRequest): string | undefined; -export declare function frontendHasInterceptor(req: BaseRequest): boolean; -export declare function humaniseMilliseconds(ms: number): string; -export declare function makeDefaultUserContextFromAPI(request: BaseRequest): any; -export declare function setRequestInUserContextIfNotDefined(userContext: any | undefined, request: BaseRequest): any; -export declare function getTopLevelDomainForSameSiteResolution(url: string): string; -export declare function getFromObjectCaseInsensitive(key: string, object: Record): T | undefined; diff --git a/lib/build/utils.js b/lib/build/utils.js deleted file mode 100644 index 119069d47..000000000 --- a/lib/build/utils.js +++ /dev/null @@ -1,213 +0,0 @@ -"use strict"; -var __createBinding = - (this && this.__createBinding) || - (Object.create - ? function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - Object.defineProperty(o, k2, { - enumerable: true, - get: function () { - return m[k]; - }, - }); - } - : function (o, m, k, k2) { - if (k2 === undefined) k2 = k; - o[k2] = m[k]; - }); -var __setModuleDefault = - (this && this.__setModuleDefault) || - (Object.create - ? function (o, v) { - Object.defineProperty(o, "default", { enumerable: true, value: v }); - } - : function (o, v) { - o["default"] = v; - }); -var __importStar = - (this && this.__importStar) || - function (mod) { - if (mod && mod.__esModule) return mod; - var result = {}; - if (mod != null) - for (var k in mod) - if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); - __setModuleDefault(result, mod); - return result; - }; -var __importDefault = - (this && this.__importDefault) || - function (mod) { - return mod && mod.__esModule ? mod : { default: mod }; - }; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.getFromObjectCaseInsensitive = exports.getTopLevelDomainForSameSiteResolution = exports.setRequestInUserContextIfNotDefined = exports.makeDefaultUserContextFromAPI = exports.humaniseMilliseconds = exports.frontendHasInterceptor = exports.getRidFromHeader = exports.isAnIpAddress = exports.send200Response = exports.sendNon200Response = exports.sendNon200ResponseWithMessage = exports.normaliseHttpMethod = exports.normaliseInputAppInfoOrThrowError = exports.maxVersion = exports.getLargestVersionFromIntersection = void 0; -const psl = __importStar(require("psl")); -const normalisedURLDomain_1 = __importDefault(require("./normalisedURLDomain")); -const normalisedURLPath_1 = __importDefault(require("./normalisedURLPath")); -const logger_1 = require("./logger"); -const constants_1 = require("./constants"); -function getLargestVersionFromIntersection(v1, v2) { - let intersection = v1.filter((value) => v2.indexOf(value) !== -1); - if (intersection.length === 0) { - return undefined; - } - let maxVersionSoFar = intersection[0]; - for (let i = 1; i < intersection.length; i++) { - maxVersionSoFar = maxVersion(intersection[i], maxVersionSoFar); - } - return maxVersionSoFar; -} -exports.getLargestVersionFromIntersection = getLargestVersionFromIntersection; -function maxVersion(version1, version2) { - let splittedv1 = version1.split("."); - let splittedv2 = version2.split("."); - let minLength = Math.min(splittedv1.length, splittedv2.length); - for (let i = 0; i < minLength; i++) { - let v1 = Number(splittedv1[i]); - let v2 = Number(splittedv2[i]); - if (v1 > v2) { - return version1; - } else if (v2 > v1) { - return version2; - } - } - if (splittedv1.length >= splittedv2.length) { - return version1; - } - return version2; -} -exports.maxVersion = maxVersion; -function normaliseInputAppInfoOrThrowError(appInfo) { - if (appInfo === undefined) { - throw new Error("Please provide the appInfo object when calling supertokens.init"); - } - if (appInfo.apiDomain === undefined) { - throw new Error("Please provide your apiDomain inside the appInfo object when calling supertokens.init"); - } - if (appInfo.appName === undefined) { - throw new Error("Please provide your appName inside the appInfo object when calling supertokens.init"); - } - if (appInfo.websiteDomain === undefined) { - throw new Error("Please provide your websiteDomain inside the appInfo object when calling supertokens.init"); - } - let apiGatewayPath = - appInfo.apiGatewayPath !== undefined - ? new normalisedURLPath_1.default(appInfo.apiGatewayPath) - : new normalisedURLPath_1.default(""); - const websiteDomain = new normalisedURLDomain_1.default(appInfo.websiteDomain); - const apiDomain = new normalisedURLDomain_1.default(appInfo.apiDomain); - const topLevelAPIDomain = getTopLevelDomainForSameSiteResolution(apiDomain.getAsStringDangerous()); - const topLevelWebsiteDomain = getTopLevelDomainForSameSiteResolution(websiteDomain.getAsStringDangerous()); - return { - appName: appInfo.appName, - websiteDomain, - apiDomain, - apiBasePath: apiGatewayPath.appendPath( - appInfo.apiBasePath === undefined - ? new normalisedURLPath_1.default("/auth") - : new normalisedURLPath_1.default(appInfo.apiBasePath) - ), - websiteBasePath: - appInfo.websiteBasePath === undefined - ? new normalisedURLPath_1.default("/auth") - : new normalisedURLPath_1.default(appInfo.websiteBasePath), - apiGatewayPath, - topLevelAPIDomain, - topLevelWebsiteDomain, - }; -} -exports.normaliseInputAppInfoOrThrowError = normaliseInputAppInfoOrThrowError; -function normaliseHttpMethod(method) { - return method.toLowerCase(); -} -exports.normaliseHttpMethod = normaliseHttpMethod; -function sendNon200ResponseWithMessage(res, message, statusCode) { - sendNon200Response(res, statusCode, { message }); -} -exports.sendNon200ResponseWithMessage = sendNon200ResponseWithMessage; -function sendNon200Response(res, statusCode, body) { - if (statusCode < 300) { - throw new Error("Calling sendNon200Response with status code < 300"); - } - logger_1.logDebugMessage("Sending response to client with status code: " + statusCode); - res.setStatusCode(statusCode); - res.sendJSONResponse(body); -} -exports.sendNon200Response = sendNon200Response; -function send200Response(res, responseJson) { - logger_1.logDebugMessage("Sending response to client with status code: 200"); - res.setStatusCode(200); - res.sendJSONResponse(responseJson); -} -exports.send200Response = send200Response; -function isAnIpAddress(ipaddress) { - return /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test( - ipaddress - ); -} -exports.isAnIpAddress = isAnIpAddress; -function getRidFromHeader(req) { - return req.getHeaderValue(constants_1.HEADER_RID); -} -exports.getRidFromHeader = getRidFromHeader; -function frontendHasInterceptor(req) { - return getRidFromHeader(req) !== undefined; -} -exports.frontendHasInterceptor = frontendHasInterceptor; -function humaniseMilliseconds(ms) { - let t = Math.floor(ms / 1000); - let suffix = ""; - if (t < 60) { - if (t > 1) suffix = "s"; - return `${t} second${suffix}`; - } else if (t < 3600) { - const m = Math.floor(t / 60); - if (m > 1) suffix = "s"; - return `${m} minute${suffix}`; - } else { - const h = Math.floor(t / 360) / 10; - if (h > 1) suffix = "s"; - return `${h} hour${suffix}`; - } -} -exports.humaniseMilliseconds = humaniseMilliseconds; -function makeDefaultUserContextFromAPI(request) { - return setRequestInUserContextIfNotDefined({}, request); -} -exports.makeDefaultUserContextFromAPI = makeDefaultUserContextFromAPI; -function setRequestInUserContextIfNotDefined(userContext, request) { - if (userContext === undefined) { - userContext = {}; - } - if (userContext._default === undefined) { - userContext._default = {}; - } - if (typeof userContext._default === "object") { - userContext._default.request = request; - } - return userContext; -} -exports.setRequestInUserContextIfNotDefined = setRequestInUserContextIfNotDefined; -function getTopLevelDomainForSameSiteResolution(url) { - let urlObj = new URL(url); - let hostname = urlObj.hostname; - if (hostname.startsWith("localhost") || hostname.startsWith("localhost.org") || isAnIpAddress(hostname)) { - // we treat these as the same TLDs since we can use sameSite lax for all of them. - return "localhost"; - } - let parsedURL = psl.parse(hostname); - if (parsedURL.domain === null) { - throw new Error("Please make sure that the apiDomain and websiteDomain have correct values"); - } - return parsedURL.domain; -} -exports.getTopLevelDomainForSameSiteResolution = getTopLevelDomainForSameSiteResolution; -function getFromObjectCaseInsensitive(key, object) { - const matchedKeys = Object.keys(object).filter((i) => i.toLocaleLowerCase() === key.toLocaleLowerCase()); - if (matchedKeys.length === 0) { - return undefined; - } - return object[matchedKeys[0]]; -} -exports.getFromObjectCaseInsensitive = getFromObjectCaseInsensitive; diff --git a/lib/build/version.d.ts b/lib/build/version.d.ts deleted file mode 100644 index 13da2ed87..000000000 --- a/lib/build/version.d.ts +++ /dev/null @@ -1,4 +0,0 @@ -// @ts-nocheck -export declare const version = "14.0.2"; -export declare const cdiSupported: string[]; -export declare const dashboardVersion = "0.6"; diff --git a/lib/build/version.js b/lib/build/version.js deleted file mode 100644 index 9bea869b7..000000000 --- a/lib/build/version.js +++ /dev/null @@ -1,21 +0,0 @@ -"use strict"; -Object.defineProperty(exports, "__esModule", { value: true }); -exports.dashboardVersion = exports.cdiSupported = exports.version = void 0; -/* Copyright (c) 2021, VRAI Labs and/or its affiliates. All rights reserved. - * - * This software is licensed under the Apache License, Version 2.0 (the - * "License") as published by the Apache Software Foundation. - * - * You may not use this file except in compliance with the License. You may - * obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT - * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the - * License for the specific language governing permissions and limitations - * under the License. - */ -exports.version = "14.0.2"; -exports.cdiSupported = ["2.21"]; -// Note: The actual script import for dashboard uses v{DASHBOARD_VERSION} -exports.dashboardVersion = "0.6"; diff --git a/lib/ts/framework/hapi/framework.ts b/lib/ts/framework/hapi/framework.ts index 40cc92ee9..16dee0d0a 100644 --- a/lib/ts/framework/hapi/framework.ts +++ b/lib/ts/framework/hapi/framework.ts @@ -14,6 +14,7 @@ */ import type { Request, ResponseToolkit, Plugin, ResponseObject, ServerRoute } from "@hapi/hapi"; +// @ts-ignore import type { Boom } from "@hapi/boom"; import type { HTTPMethod } from "../../types"; import { normaliseHttpMethod } from "../../utils"; diff --git a/lib/ts/framework/utils.ts b/lib/ts/framework/utils.ts index 455feeaba..006023142 100644 --- a/lib/ts/framework/utils.ts +++ b/lib/ts/framework/utils.ts @@ -138,7 +138,7 @@ export async function assertThatBodyParserHasBeenUsedForExpressLikeRequest( let err = await new Promise((resolve) => { let resolvedCalled = false; if (request.readable) { - jsonParser(request, new ServerResponse(request), (e) => { + jsonParser(request, new ServerResponse(request), (e: any) => { if (!resolvedCalled) { resolvedCalled = true; resolve(e); @@ -175,7 +175,7 @@ export async function assertFormDataBodyParserHasBeenUsedForExpressLikeRequest( let parser = urlencoded({ extended: true }); let err = await new Promise((resolve) => { if (request.readable) { - parser(request, new ServerResponse(request), (e) => { + parser(request, new ServerResponse(request), (e:any) => { resolve(e); }); } else { diff --git a/lib/ts/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.ts b/lib/ts/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.ts index a140fb03c..a5d676043 100644 --- a/lib/ts/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.ts +++ b/lib/ts/recipe/passwordless/smsdelivery/services/backwardCompatibility/index.ts @@ -71,7 +71,10 @@ function defaultCreateAndSendCustomSms(_: NormalisedAppinfo) { * if the error is thrown from API, the response object * will be of type `{err: string}` */ + // TODO: check if this is the correct way to check for error + // @ts-ignore if (err.response.data.err !== undefined) { + // @ts-ignore throw Error(err.response.data.err); } else { throw err; diff --git a/lib/ts/recipe/thirdpartyemailpassword/api/implementation.ts b/lib/ts/recipe/thirdpartyemailpassword/api/implementation.ts index 534db5c56..621d72d96 100644 --- a/lib/ts/recipe/thirdpartyemailpassword/api/implementation.ts +++ b/lib/ts/recipe/thirdpartyemailpassword/api/implementation.ts @@ -1,3 +1,5 @@ +// TODO: error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +// @ts-nocheck import { APIInterface } from "../"; import EmailPasswordAPIImplementation from "../../emailpassword/api/implementation"; import ThirdPartyAPIImplementation from "../../thirdparty/api/implementation"; diff --git a/lib/ts/recipe/thirdpartypasswordless/api/implementation.ts b/lib/ts/recipe/thirdpartypasswordless/api/implementation.ts index a7e47a52f..1e35c0550 100644 --- a/lib/ts/recipe/thirdpartypasswordless/api/implementation.ts +++ b/lib/ts/recipe/thirdpartypasswordless/api/implementation.ts @@ -1,3 +1,5 @@ +// TODO: error TS2683: 'this' implicitly has type 'any' because it does not have a type annotation. +// @ts-nocheck import { APIInterface } from "../types"; import PasswordlessAPIImplementation from "../../passwordless/api/implementation"; import ThirdPartyAPIImplementation from "../../thirdparty/api/implementation"; diff --git a/lib/tsconfig.json b/lib/tsconfig.json deleted file mode 100644 index 537bb3a43..000000000 --- a/lib/tsconfig.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2016", - "strictNullChecks": true, - "declaration": true, - "module": "commonJS", - "outDir": "build", - "moduleResolution": "Node", - "noImplicitAny": true, - "sourceMap": false, - "noImplicitThis": false, - "skipLibCheck": true, - "strict": true, - "noUnusedLocals": true, - "noUnusedParameters": true, - "noImplicitReturns": true, - "noFallthroughCasesInSwitch": true, - "lib": ["ES2017"], - "esModuleInterop": true - }, - "include": ["ts/**/*"], - "exclude": ["build"], - "compileOnSave": true -} diff --git a/nextjs/index.d.ts b/nextjs/index.d.ts deleted file mode 100644 index 8a9bc0b8f..000000000 --- a/nextjs/index.d.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from "../lib/build/nextjs"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ - -import * as _default from "../lib/build/nextjs"; -export default _default; diff --git a/nextjs/index.js b/nextjs/index.js deleted file mode 100644 index d95450f5c..000000000 --- a/nextjs/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../lib/build/nextjs")); diff --git a/package-lock.json b/package-lock.json deleted file mode 100644 index 5223d25cd..000000000 --- a/package-lock.json +++ /dev/null @@ -1,9720 +0,0 @@ -{ - "name": "supertokens-node", - "version": "14.0.2", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "supertokens-node", - "version": "14.0.2", - "license": "Apache-2.0", - "dependencies": { - "axios": "0.21.4", - "body-parser": "1.20.1", - "co-body": "6.1.0", - "cookie": "0.4.0", - "debug": "^4.3.3", - "jose": "^4.13.1", - "jsonwebtoken": "^9.0.0", - "jwks-rsa": "^2.0.5", - "libphonenumber-js": "^1.9.44", - "nodemailer": "^6.7.2", - "psl": "1.8.0", - "supertokens-js-override": "^0.0.4", - "twilio": "^4.7.2", - "verify-apple-id-token": "^3.0.1" - }, - "devDependencies": { - "@hapi/hapi": "^20.2.0", - "@koa/router": "^10.1.1", - "@loopback/core": "2.16.2", - "@loopback/repository": "3.7.1", - "@loopback/rest": "9.3.0", - "@types/aws-lambda": "8.10.77", - "@types/co-body": "^5.1.1", - "@types/cookie": "0.3.3", - "@types/express": "4.16.1", - "@types/hapi__hapi": "20.0.8", - "@types/jsonwebtoken": "9.0.0", - "@types/koa": "^2.13.4", - "@types/koa-bodyparser": "^4.3.3", - "@types/nodemailer": "^6.4.4", - "@types/psl": "1.1.0", - "@types/validator": "10.11.0", - "aws-sdk-mock": "^5.4.0", - "cookie-parser": "^1.4.5", - "express": "^4.18.2", - "fastify": "3.18.1", - "glob": "7.1.7", - "koa": "^2.13.3", - "lambda-tester": "^4.0.1", - "loopback-datasource-juggler": "^4.26.0", - "mocha": "6.1.4", - "next": "11.1.3", - "next-test-api-route-handler": "^3.1.8", - "nock": "11.7.0", - "prettier": "2.0.5", - "pretty-quick": "^3.1.1", - "react": "^17.0.2", - "sinon": "^14.0.0", - "supertest": "4.0.2", - "typedoc": "^0.22.5", - "typescript": "4.2" - } - }, - "node_modules/@ampproject/remapping": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", - "integrity": "sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/gen-mapping": "^0.1.0", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.12.11.tgz", - "integrity": "sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.10.4" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.21.0.tgz", - "integrity": "sha512-gMuZsmsgxk/ENC3O/fRw5QY8A9/uxQbbCEypnLIiYYc/qVJtEV7ouxC3EllIIwNzMqAQee5tanFabWsUOutS7g==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.21.0.tgz", - "integrity": "sha512-PuxUbxcW6ZYe656yL3EAhpy7qXKq0DmYsrJLpbB8XrsCP9Nm+XCg9XFMb5vIDliPD7+U/+M+QJlH17XOcB7eXA==", - "dev": true, - "peer": true, - "dependencies": { - "@ampproject/remapping": "^2.2.0", - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.0", - "@babel/helper-compilation-targets": "^7.20.7", - "@babel/helper-module-transforms": "^7.21.0", - "@babel/helpers": "^7.21.0", - "@babel/parser": "^7.21.0", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.2.2", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.21.1", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.21.1.tgz", - "integrity": "sha512-1lT45bAYlQhFn/BHivJs43AiW2rg3/UbLyShGfF3C0KmHvO5fSghWd5kBJy30kpRRucGzXStvnnCFniCR2kXAA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.21.0", - "@jridgewell/gen-mapping": "^0.3.2", - "@jridgewell/trace-mapping": "^0.3.17", - "jsesc": "^2.5.1" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/generator/node_modules/@jridgewell/gen-mapping": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz", - "integrity": "sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.1", - "@jridgewell/sourcemap-codec": "^1.4.10", - "@jridgewell/trace-mapping": "^0.3.9" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.20.7.tgz", - "integrity": "sha512-4tGORmfQcrc+bvrjb5y3dG9Mx1IOZjsHqQVUz7XCNHO+iTmqxWnVg3KRygjGmpRLJGdQSKuvFinbIb0CnZwHAQ==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/compat-data": "^7.20.5", - "@babel/helper-validator-option": "^7.18.6", - "browserslist": "^4.21.3", - "lru-cache": "^5.1.1", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/browserslist": { - "version": "4.21.5", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.21.5.tgz", - "integrity": "sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "peer": true, - "dependencies": { - "caniuse-lite": "^1.0.30001449", - "electron-to-chromium": "^1.4.284", - "node-releases": "^2.0.8", - "update-browserslist-db": "^1.0.10" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/lru-cache": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", - "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", - "dev": true, - "peer": true, - "dependencies": { - "yallist": "^3.0.2" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/node-releases": { - "version": "2.0.10", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.10.tgz", - "integrity": "sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==", - "dev": true, - "peer": true - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "peer": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/update-browserslist-db": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.10.tgz", - "integrity": "sha512-OztqDenkfFkbSG+tRxBeAnCVPckDBcvibKd35yDONx6OU8N7sqgwc7rCbkJ/WcYtVRZ4ba68d6byhC21GFh7sQ==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/browserslist" - } - ], - "peer": true, - "dependencies": { - "escalade": "^3.1.1", - "picocolors": "^1.0.0" - }, - "bin": { - "browserslist-lint": "cli.js" - }, - "peerDependencies": { - "browserslist": ">= 4.21.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/yallist": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", - "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", - "dev": true, - "peer": true - }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.18.9", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz", - "integrity": "sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.21.0.tgz", - "integrity": "sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz", - "integrity": "sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz", - "integrity": "sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.21.2.tgz", - "integrity": "sha512-79yj2AR4U/Oqq/WOV7Lx6hUjau1Zfo4cI+JLAVYeMV5XIlbOhmjEk5ulbTc9fMpmlojzZHkUUxAiK+UKn+hNQQ==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-module-imports": "^7.18.6", - "@babel/helper-simple-access": "^7.20.2", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/helper-validator-identifier": "^7.19.1", - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.2", - "@babel/types": "^7.21.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.16.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz", - "integrity": "sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.20.2", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.20.2.tgz", - "integrity": "sha512-+0woI/WPq59IrqDYbVGfshjT5Dmk/nnbdpcF8SnMhhXObpTq2KNBdLFRFrkVdbDOyUmHBCxzm5FHV1rACIkIbA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.20.2" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz", - "integrity": "sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/types": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-string-parser": { - "version": "7.19.4", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.19.4.tgz", - "integrity": "sha512-nHtDoQcuqFmwYNYPz3Rah5ph2p8PFeFCsZk9A/48dPc/rGocJ5J3hAAZ7pb76VWX3fZKu+uEr/FhH5jLx7umrw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.19.1", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.19.1.tgz", - "integrity": "sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.21.0.tgz", - "integrity": "sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.21.0", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.21.0.tgz", - "integrity": "sha512-XXve0CBtOW0pd7MRzzmoyuSj0e3SEzj8pgyFxnTT1NJZL38BD1MK7yYrm8yefRPIDvNNe14xR4FdbHwpInD4rA==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/template": "^7.20.7", - "@babel/traverse": "^7.21.0", - "@babel/types": "^7.21.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.18.6.tgz", - "integrity": "sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.18.6", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz", - "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ==", - "dev": true, - "peer": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-syntax-jsx": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.14.5.tgz", - "integrity": "sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.3.tgz", - "integrity": "sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.20.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.20.7.tgz", - "integrity": "sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/parser": "^7.20.7", - "@babel/types": "^7.20.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.21.2.tgz", - "integrity": "sha512-ts5FFU/dSUPS13tv8XiEObDu9K+iagEKME9kAbaP7r0Y9KtZJZ+NGndDvWoRAYNpeWafbpFeki3q9QoMD6gxyw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/code-frame": "^7.18.6", - "@babel/generator": "^7.21.1", - "@babel/helper-environment-visitor": "^7.18.9", - "@babel/helper-function-name": "^7.21.0", - "@babel/helper-hoist-variables": "^7.18.6", - "@babel/helper-split-export-declaration": "^7.18.6", - "@babel/parser": "^7.21.2", - "@babel/types": "^7.21.2", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/code-frame": { - "version": "7.18.6", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.18.6.tgz", - "integrity": "sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/highlight": "^7.18.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse/node_modules/@babel/types": { - "version": "7.21.2", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.21.2.tgz", - "integrity": "sha512-3wRZSs7jiFaB8AjxiiD+VqN5DTG2iRvJGQ+qYFrs/654lg6kGTQWIOFjlBo5RaXuAZjBmP3+OQH4dmhqiiyYxw==", - "dev": true, - "peer": true, - "dependencies": { - "@babel/helper-string-parser": "^7.19.4", - "@babel/helper-validator-identifier": "^7.19.1", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.0.tgz", - "integrity": "sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@extra-number/significant-digits": { - "version": "1.3.9", - "resolved": "https://registry.npmjs.org/@extra-number/significant-digits/-/significant-digits-1.3.9.tgz", - "integrity": "sha512-E5PY/bCwrNqEHh4QS6AQBinLZ+sxM1lT8tsSVYk8VwhWIPp6fCU/BMRVq0V8iJ8LwS3FHmaA4vUzb78s4BIIyA==", - "dev": true - }, - "node_modules/@fastify/ajv-compiler": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@fastify/ajv-compiler/-/ajv-compiler-1.1.0.tgz", - "integrity": "sha512-gvCOUNpXsWrIQ3A4aXCLIdblL0tDq42BG/2Xw7oxbil9h11uow10ztS2GuFazNBfjbrsZ5nl+nPl5jDSjj5TSg==", - "dev": true, - "dependencies": { - "ajv": "^6.12.6" - } - }, - "node_modules/@hapi/accept": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/accept/-/accept-5.0.2.tgz", - "integrity": "sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/ammo": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/ammo/-/ammo-5.0.1.tgz", - "integrity": "sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/b64": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/@hapi/b64/-/b64-5.0.0.tgz", - "integrity": "sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/boom": { - "version": "9.1.4", - "resolved": "https://registry.npmjs.org/@hapi/boom/-/boom-9.1.4.tgz", - "integrity": "sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/bounce": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bounce/-/bounce-2.0.0.tgz", - "integrity": "sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/bourne": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/bourne/-/bourne-2.0.0.tgz", - "integrity": "sha512-WEezM1FWztfbzqIUbsDzFRVMxSoLy3HugVcux6KDDtTqzPsLE8NDRHfXvev66aH1i2oOKKar3/XDjbvh/OUBdg==", - "dev": true - }, - "node_modules/@hapi/call": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/@hapi/call/-/call-8.0.1.tgz", - "integrity": "sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/catbox": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox/-/catbox-11.1.1.tgz", - "integrity": "sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/podium": "4.x.x", - "@hapi/validate": "1.x.x" - } - }, - "node_modules/@hapi/catbox-memory": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/@hapi/catbox-memory/-/catbox-memory-5.0.1.tgz", - "integrity": "sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/content": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/@hapi/content/-/content-5.0.2.tgz", - "integrity": "sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x" - } - }, - "node_modules/@hapi/cryptiles": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/cryptiles/-/cryptiles-5.1.0.tgz", - "integrity": "sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@hapi/file": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@hapi/file/-/file-2.0.0.tgz", - "integrity": "sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==", - "dev": true - }, - "node_modules/@hapi/hapi": { - "version": "20.2.1", - "resolved": "https://registry.npmjs.org/@hapi/hapi/-/hapi-20.2.1.tgz", - "integrity": "sha512-OXAU+yWLwkMfPFic+KITo+XPp6Oxpgc9WUH+pxXWcTIuvWbgco5TC/jS8UDvz+NFF5IzRgF2CL6UV/KLdQYUSQ==", - "dev": true, - "dependencies": { - "@hapi/accept": "^5.0.1", - "@hapi/ammo": "^5.0.1", - "@hapi/boom": "^9.1.0", - "@hapi/bounce": "^2.0.0", - "@hapi/call": "^8.0.0", - "@hapi/catbox": "^11.1.1", - "@hapi/catbox-memory": "^5.0.0", - "@hapi/heavy": "^7.0.1", - "@hapi/hoek": "^9.0.4", - "@hapi/mimos": "^6.0.0", - "@hapi/podium": "^4.1.1", - "@hapi/shot": "^5.0.5", - "@hapi/somever": "^3.0.0", - "@hapi/statehood": "^7.0.3", - "@hapi/subtext": "^7.0.3", - "@hapi/teamwork": "^5.1.0", - "@hapi/topo": "^5.0.0", - "@hapi/validate": "^1.1.1" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@hapi/heavy": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/@hapi/heavy/-/heavy-7.0.1.tgz", - "integrity": "sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" - } - }, - "node_modules/@hapi/hoek": { - "version": "9.2.1", - "resolved": "https://registry.npmjs.org/@hapi/hoek/-/hoek-9.2.1.tgz", - "integrity": "sha512-gfta+H8aziZsm8pZa0vj04KO6biEiisppNgA1kbJvFrrWu9Vm7eaUEy76DIxsuTaWvti5fkJVhllWc6ZTE+Mdw==", - "dev": true - }, - "node_modules/@hapi/iron": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/iron/-/iron-6.0.0.tgz", - "integrity": "sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==", - "dev": true, - "dependencies": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/mimos": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/@hapi/mimos/-/mimos-6.0.0.tgz", - "integrity": "sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x", - "mime-db": "1.x.x" - } - }, - "node_modules/@hapi/nigel": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/@hapi/nigel/-/nigel-4.0.2.tgz", - "integrity": "sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.4", - "@hapi/vise": "^4.0.0" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@hapi/pez": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/@hapi/pez/-/pez-5.0.3.tgz", - "integrity": "sha512-mpikYRJjtrbJgdDHG/H9ySqYqwJ+QU/D7FXsYciS9P7NYBXE2ayKDAy3H0ou6CohOCaxPuTV4SZ0D936+VomHA==", - "dev": true, - "dependencies": { - "@hapi/b64": "5.x.x", - "@hapi/boom": "9.x.x", - "@hapi/content": "^5.0.2", - "@hapi/hoek": "9.x.x", - "@hapi/nigel": "4.x.x" - } - }, - "node_modules/@hapi/podium": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@hapi/podium/-/podium-4.1.3.tgz", - "integrity": "sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x", - "@hapi/teamwork": "5.x.x", - "@hapi/validate": "1.x.x" - } - }, - "node_modules/@hapi/shot": { - "version": "5.0.5", - "resolved": "https://registry.npmjs.org/@hapi/shot/-/shot-5.0.5.tgz", - "integrity": "sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x", - "@hapi/validate": "1.x.x" - } - }, - "node_modules/@hapi/somever": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@hapi/somever/-/somever-3.0.1.tgz", - "integrity": "sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==", - "dev": true, - "dependencies": { - "@hapi/bounce": "2.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/statehood": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@hapi/statehood/-/statehood-7.0.3.tgz", - "integrity": "sha512-pYB+pyCHkf2Amh67QAXz7e/DN9jcMplIL7Z6N8h0K+ZTy0b404JKPEYkbWHSnDtxLjJB/OtgElxocr2fMH4G7w==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bounce": "2.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/cryptiles": "5.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/iron": "6.x.x", - "@hapi/validate": "1.x.x" - } - }, - "node_modules/@hapi/subtext": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/@hapi/subtext/-/subtext-7.0.3.tgz", - "integrity": "sha512-CekDizZkDGERJ01C0+TzHlKtqdXZxzSWTOaH6THBrbOHnsr3GY+yiMZC+AfNCypfE17RaIakGIAbpL2Tk1z2+A==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/content": "^5.0.2", - "@hapi/file": "2.x.x", - "@hapi/hoek": "9.x.x", - "@hapi/pez": "^5.0.1", - "@hapi/wreck": "17.x.x" - } - }, - "node_modules/@hapi/teamwork": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/teamwork/-/teamwork-5.1.0.tgz", - "integrity": "sha512-llqoQTrAJDTXxG3c4Kz/uzhBS1TsmSBa/XG5SPcVXgmffHE1nFtyLIK0hNJHCB3EuBKT84adzd1hZNY9GJLWtg==", - "dev": true, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/@hapi/topo": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@hapi/topo/-/topo-5.1.0.tgz", - "integrity": "sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@hapi/validate": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@hapi/validate/-/validate-1.1.3.tgz", - "integrity": "sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0" - } - }, - "node_modules/@hapi/vise": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/@hapi/vise/-/vise-4.0.0.tgz", - "integrity": "sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==", - "dev": true, - "dependencies": { - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@hapi/wreck": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/@hapi/wreck/-/wreck-17.1.0.tgz", - "integrity": "sha512-nx6sFyfqOpJ+EFrHX+XWwJAxs3ju4iHdbB/bwR8yTNZOiYmuhA8eCe7lYPtYmb4j7vyK/SlbaQsmTtUrMvPEBw==", - "dev": true, - "dependencies": { - "@hapi/boom": "9.x.x", - "@hapi/bourne": "2.x.x", - "@hapi/hoek": "9.x.x" - } - }, - "node_modules/@jridgewell/gen-mapping": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz", - "integrity": "sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/set-array": "^1.0.0", - "@jridgewell/sourcemap-codec": "^1.4.10" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/resolve-uri": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz", - "integrity": "sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/set-array": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", - "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", - "dev": true, - "peer": true - }, - "node_modules/@jridgewell/trace-mapping": { - "version": "0.3.17", - "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.17.tgz", - "integrity": "sha512-MCNzAp77qzKca9+W/+I0+sEpaUnZoeasnghNeVc41VZCEKaCH73Vq3BZZ/SzWIgrqE4H4ceI+p+b6C0mHf9T4g==", - "dev": true, - "peer": true, - "dependencies": { - "@jridgewell/resolve-uri": "3.1.0", - "@jridgewell/sourcemap-codec": "1.4.14" - } - }, - "node_modules/@koa/router": { - "version": "10.1.1", - "resolved": "https://registry.npmjs.org/@koa/router/-/router-10.1.1.tgz", - "integrity": "sha512-ORNjq5z4EmQPriKbR0ER3k4Gh7YGNhWDL7JBW+8wXDrHLbWYKYSJaOJ9aN06npF5tbTxe2JBOsurpJDAvjiXKw==", - "dev": true, - "dependencies": { - "debug": "^4.1.1", - "http-errors": "^1.7.3", - "koa-compose": "^4.1.0", - "methods": "^1.1.2", - "path-to-regexp": "^6.1.0" - }, - "engines": { - "node": ">= 8.0.0" - } - }, - "node_modules/@loopback/context": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/@loopback/context/-/context-3.18.0.tgz", - "integrity": "sha512-PKx0rTguqBj6mUHBbEHLF031MnP6KiSkMLE4E8Hpy2KPJxG97HUT2ZUACHCP6qm8yS9spWQQ6g72VYAWxDrN+g==", - "dev": true, - "dependencies": { - "@loopback/metadata": "^3.3.4", - "@types/debug": "^4.1.7", - "debug": "^4.3.2", - "hyperid": "^2.3.1", - "p-event": "^4.2.0", - "tslib": "^2.3.1", - "uuid": "^8.3.2" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - } - }, - "node_modules/@loopback/core": { - "version": "2.16.2", - "resolved": "https://registry.npmjs.org/@loopback/core/-/core-2.16.2.tgz", - "integrity": "sha512-KtkNv6HIh8TFBOxTkfPp/BQbVqjDsGef/DtbNHH1ZHs3gSbofhkZs3IqQdYQzpkUq71mQjz5RJ/yUYY5Sqva9w==", - "dev": true, - "dependencies": { - "@loopback/context": "^3.17.1", - "debug": "^4.3.1", - "tslib": "^2.3.0" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - } - }, - "node_modules/@loopback/filter": { - "version": "1.5.4", - "resolved": "https://registry.npmjs.org/@loopback/filter/-/filter-1.5.4.tgz", - "integrity": "sha512-kfdCgSy0YoAFNYXJOpag5uJnlErYcROIeJqeAglkwOa3hSw2BYIudurU8hoqsiOBIGhI5BF4A3S8u4q089xWlg==", - "dev": true, - "dependencies": { - "tslib": "^2.3.1" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - } - }, - "node_modules/@loopback/http-server": { - "version": "2.5.4", - "resolved": "https://registry.npmjs.org/@loopback/http-server/-/http-server-2.5.4.tgz", - "integrity": "sha512-M7w+4AEhwDn7q00soCe8yYQDUS+n87ppuXQ1rJ9a1b9TdnEh+7nPFVrVpwiEKBGyVGIJWDq5BMSZYo1zMIPFUA==", - "dev": true, - "dependencies": { - "debug": "^4.3.2", - "stoppable": "^1.1.0", - "tslib": "^2.3.1" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - } - }, - "node_modules/@loopback/metadata": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@loopback/metadata/-/metadata-3.3.4.tgz", - "integrity": "sha512-FISs8OVYKB+wmL0VZdsDZzMOc/KC6anOf3ORpFRO2Mgl9dKCOD8IELKc8r/nr2kyD4r7/pjr5GfLy4nirS1vnQ==", - "dev": true, - "dependencies": { - "debug": "^4.3.2", - "lodash": "^4.17.21", - "reflect-metadata": "^0.1.13", - "tslib": "^2.3.1" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - } - }, - "node_modules/@loopback/repository": { - "version": "3.7.1", - "resolved": "https://registry.npmjs.org/@loopback/repository/-/repository-3.7.1.tgz", - "integrity": "sha512-q9vpgQ5MSZqI/ww2TTuDy0Y34NZaapS0+4ZKcwVgwH0XJFxgGwznc5W0l1Esu1lplijejpza4ItKwnlGmvYcJg==", - "dev": true, - "dependencies": { - "@loopback/filter": "^1.5.2", - "@types/debug": "^4.1.5", - "debug": "^4.3.1", - "lodash": "^4.17.21", - "loopback-datasource-juggler": "^4.26.0", - "tslib": "^2.3.0" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - }, - "peerDependencies": { - "@loopback/core": "^2.16.2" - } - }, - "node_modules/@loopback/rest": { - "version": "9.3.0", - "resolved": "https://registry.npmjs.org/@loopback/rest/-/rest-9.3.0.tgz", - "integrity": "sha512-Qwn5WXctQ2AV6Duze/x7ks9Tb/Oy6FSs0Hhyuhzz7aassKbu1m/GiJLB7bvpJVUN+qVZ2+vQZZ6Y3F+znzH4og==", - "dev": true, - "dependencies": { - "@loopback/express": "^3.3.0", - "@loopback/http-server": "^2.5.0", - "@loopback/openapi-v3": "^5.3.0", - "@openapi-contrib/openapi-schema-to-json-schema": "^3.1.0", - "@types/body-parser": "^1.19.0", - "@types/cors": "^2.8.10", - "@types/express": "^4.17.11", - "@types/express-serve-static-core": "^4.17.19", - "@types/http-errors": "^1.8.0", - "@types/on-finished": "^2.3.1", - "@types/serve-static": "1.13.9", - "@types/type-is": "^1.6.3", - "ajv": "^6.12.6", - "ajv-errors": "^1.0.1", - "ajv-keywords": "^3.5.2", - "body-parser": "^1.19.0", - "cors": "^2.8.5", - "debug": "^4.3.1", - "express": "^4.17.1", - "http-errors": "^1.8.0", - "js-yaml": "^4.1.0", - "json-schema-compare": "^0.2.2", - "lodash": "^4.17.21", - "on-finished": "^2.3.0", - "path-to-regexp": "^6.2.0", - "qs": "^6.10.1", - "strong-error-handler": "^4.0.0", - "tslib": "^2.2.0", - "type-is": "^1.6.18", - "validator": "^13.6.0" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - }, - "peerDependencies": { - "@loopback/core": "^2.16.0" - } - }, - "node_modules/@loopback/rest/node_modules/@loopback/express": { - "version": "3.3.4", - "resolved": "https://registry.npmjs.org/@loopback/express/-/express-3.3.4.tgz", - "integrity": "sha512-y+7fu/aXGp7+5QhEnKhwmI/vKLAQtsyvEXTiT8stbj4VHWvNbUbYVwfud5IOeH7d+lhxlNQ5aEJ7IDwoM8xD6Q==", - "dev": true, - "dependencies": { - "@loopback/http-server": "^2.5.4", - "@types/body-parser": "^1.19.1", - "@types/express": "^4.17.13", - "@types/express-serve-static-core": "^4.17.24", - "@types/http-errors": "^1.8.1", - "body-parser": "^1.19.0", - "debug": "^4.3.2", - "express": "^4.17.1", - "http-errors": "^1.8.0", - "on-finished": "^2.3.0", - "toposort": "^2.0.2", - "tslib": "^2.3.1" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - }, - "peerDependencies": { - "@loopback/core": "^2.18.0" - } - }, - "node_modules/@loopback/rest/node_modules/@loopback/openapi-v3": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/@loopback/openapi-v3/-/openapi-v3-5.3.1.tgz", - "integrity": "sha512-MBVamgxDDbgQQlQjIxSOnaVXLx6plxzn3e8CW8YbNc3TNiS1P8EFa5vNBp8wIzSDTeEd3ic6qzUxCUZIICiFNA==", - "dev": true, - "dependencies": { - "@loopback/repository-json-schema": "^3.4.1", - "debug": "^4.3.1", - "http-status": "^1.5.0", - "json-merge-patch": "^1.0.1", - "lodash": "^4.17.21", - "openapi3-ts": "^2.0.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - }, - "peerDependencies": { - "@loopback/core": "^2.16.1" - } - }, - "node_modules/@loopback/rest/node_modules/@loopback/openapi-v3/node_modules/@loopback/repository-json-schema": { - "version": "3.4.1", - "resolved": "https://registry.npmjs.org/@loopback/repository-json-schema/-/repository-json-schema-3.4.1.tgz", - "integrity": "sha512-E9UKegav+8Bp0MLPQu33c7tWUmWbnKARy0Uu2m7nvP3e3t3WOwB8U9hMjX/wBOhJ4UFJCXAXlq1MulQ/R3dyTw==", - "dev": true, - "dependencies": { - "@types/json-schema": "^7.0.7", - "debug": "^4.3.1", - "tslib": "^2.2.0" - }, - "engines": { - "node": "^10.16 || 12 || 14 || 16" - }, - "peerDependencies": { - "@loopback/core": "^2.16.1", - "@loopback/repository": "^3.7.0" - } - }, - "node_modules/@loopback/rest/node_modules/@types/express": { - "version": "4.17.13", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.13.tgz", - "integrity": "sha512-6bSZTPaTIACxn48l50SR+axgrqm6qXFIxrdAKaG6PaJk3+zuUr35hBlgT7vOmJcum+OEaIBLtHV/qloEAFITeA==", - "dev": true, - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.18", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@napi-rs/triples": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@napi-rs/triples/-/triples-1.1.0.tgz", - "integrity": "sha512-XQr74QaLeMiqhStEhLn1im9EOMnkypp7MZOwQhGzqp2Weu5eQJbpPxWxixxlYRKWPOmJjsk6qYfYH9kq43yc2w==", - "dev": true - }, - "node_modules/@next/env": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/env/-/env-11.1.3.tgz", - "integrity": "sha512-5+vaeooJuWmICSlmVaAC8KG3O8hwKasACVfkHj58xQuCB5SW0TKW3hWxgxkBuefMBn1nM0yEVPKokXCsYjBtng==", - "dev": true - }, - "node_modules/@next/polyfill-module": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/polyfill-module/-/polyfill-module-11.1.3.tgz", - "integrity": "sha512-7yr9cr4a0SrBoVE8psxXWK1wTFc8UzsY8Wc2cWGL7qA0hgtqACHaXC47M1ByJB410hFZenGrpE+KFaT1unQMyw==", - "dev": true - }, - "node_modules/@next/react-dev-overlay": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/react-dev-overlay/-/react-dev-overlay-11.1.3.tgz", - "integrity": "sha512-zIwtMliSUR+IKl917ToFNB+0fD7bI5kYMdjHU/UEKpfIXAZPnXRHHISCvPDsczlr+bRsbjlUFW1CsNiuFedeuQ==", - "dev": true, - "dependencies": { - "@babel/code-frame": "7.12.11", - "anser": "1.4.9", - "chalk": "4.0.0", - "classnames": "2.2.6", - "css.escape": "1.5.1", - "data-uri-to-buffer": "3.0.1", - "platform": "1.3.6", - "shell-quote": "1.7.2", - "source-map": "0.8.0-beta.0", - "stacktrace-parser": "0.1.10", - "strip-ansi": "6.0.0" - }, - "peerDependencies": { - "react": "^17.0.2", - "react-dom": "^17.0.2" - } - }, - "node_modules/@next/react-dev-overlay/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/@next/react-dev-overlay/node_modules/chalk": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.0.0.tgz", - "integrity": "sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/@next/react-dev-overlay/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/@next/react-dev-overlay/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/@next/react-dev-overlay/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/@next/react-dev-overlay/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@next/react-refresh-utils": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/react-refresh-utils/-/react-refresh-utils-11.1.3.tgz", - "integrity": "sha512-144kD8q2nChw67V3AJJlPQ6NUJVFczyn10bhTynn9o2rY5DEnkzuBipcyMuQl2DqfxMkV7sn+yOCOYbrLCk9zg==", - "dev": true, - "peerDependencies": { - "react-refresh": "0.8.3", - "webpack": "^4 || ^5" - }, - "peerDependenciesMeta": { - "webpack": { - "optional": true - } - } - }, - "node_modules/@next/swc-darwin-arm64": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-arm64/-/swc-darwin-arm64-11.1.3.tgz", - "integrity": "sha512-TwP4krjhs+uU9pesDYCShEXZrLSbJr78p12e7XnLBBaNf20SgWLlVmQUT9gX9KbWan5V0sUbJfmcS8MRNHgYuA==", - "cpu": [ - "arm64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-darwin-x64": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-darwin-x64/-/swc-darwin-x64-11.1.3.tgz", - "integrity": "sha512-ZSWmkg/PxccHFNUSeBdrfaH8KwSkoeUtewXKvuYYt7Ph0yRsbqSyNIvhUezDua96lApiXXq6EL2d1THfeWomvw==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-linux-x64-gnu": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-11.1.3.tgz", - "integrity": "sha512-PrTBN0iZudAuj4jSbtXcdBdmfpaDCPIneG4Oms4zcs93KwMgLhivYW082Mvlgx9QVEiRm7+RkFpIVtG/i7JitA==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "linux" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@next/swc-win32-x64-msvc": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-11.1.3.tgz", - "integrity": "sha512-mRwbscVjRoHk+tDY7XbkT5d9FCwujFIQJpGp0XNb1i5OHCSDO8WW/C9cLEWS4LxKRbIZlTLYg1MTXqLQkvva8w==", - "cpu": [ - "x64" - ], - "dev": true, - "optional": true, - "os": [ - "win32" - ], - "engines": { - "node": ">= 10" - } - }, - "node_modules/@node-rs/helper": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/@node-rs/helper/-/helper-1.2.1.tgz", - "integrity": "sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==", - "dev": true, - "dependencies": { - "@napi-rs/triples": "^1.0.3" - } - }, - "node_modules/@openapi-contrib/openapi-schema-to-json-schema": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/@openapi-contrib/openapi-schema-to-json-schema/-/openapi-schema-to-json-schema-3.1.1.tgz", - "integrity": "sha512-FMvdhv9Jr9tULjJAQaQzhCmNYYj2vQFVnl7CGlLAImZvJal71oedXMGszpPaZTLftAk5TCHqjnirig+P6LZxug==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - } - }, - "node_modules/@panva/asn1.js": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@panva/asn1.js/-/asn1.js-1.0.0.tgz", - "integrity": "sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==", - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/@sideway/address": { - "version": "4.1.3", - "resolved": "https://registry.npmjs.org/@sideway/address/-/address-4.1.3.tgz", - "integrity": "sha512-8ncEUtmnTsMmL7z1YPB47kPUq7LpKWJNFPsRzHiIajGC5uXlWGn+AmkYPcHNl8S4tcEGx+cnORnNYaw2wvL+LQ==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0" - } - }, - "node_modules/@sideway/formula": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@sideway/formula/-/formula-3.0.0.tgz", - "integrity": "sha512-vHe7wZ4NOXVfkoRb8T5otiENVlT7a3IAiw7H5M2+GO+9CDgcVUUsX1zalAztCmwyOr2RUTGJdgB+ZvSVqmdHmg==", - "dev": true - }, - "node_modules/@sideway/pinpoint": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/@sideway/pinpoint/-/pinpoint-2.0.0.tgz", - "integrity": "sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==", - "dev": true - }, - "node_modules/@sinonjs/commons": { - "version": "1.8.3", - "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-1.8.3.tgz", - "integrity": "sha512-xkNcLAn/wZaX14RPlwizcKicDk9G3F8m2nU3L7Ukm5zBgTwiT0wsoFAHx9Jq56fJA1z/7uKGtCRu16sOUCLIHQ==", - "dev": true, - "dependencies": { - "type-detect": "4.0.8" - } - }, - "node_modules/@sinonjs/fake-timers": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz", - "integrity": "sha512-iQADsW4LBMISqZ6Ci1dupJL9pprqwcVFTcOsEmQOEhW+KLCVn/Y4Jrvg2k19fIHCp+iFprriYPTdRcQR8NbUPg==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/@sinonjs/samsam": { - "version": "6.1.1", - "resolved": "https://registry.npmjs.org/@sinonjs/samsam/-/samsam-6.1.1.tgz", - "integrity": "sha512-cZ7rKJTLiE7u7Wi/v9Hc2fs3Ucc3jrWeMgPHbbTCeVAB2S0wOBbYlkJVeNSL04i7fdhT8wIbDq1zhC/PXTD2SA==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.6.0", - "lodash.get": "^4.4.2", - "type-detect": "^4.0.8" - } - }, - "node_modules/@sinonjs/text-encoding": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz", - "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", - "dev": true - }, - "node_modules/@types/accepts": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.5.tgz", - "integrity": "sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/aws-lambda": { - "version": "8.10.77", - "resolved": "https://registry.npmjs.org/@types/aws-lambda/-/aws-lambda-8.10.77.tgz", - "integrity": "sha512-n0EMFJU/7u3KvHrR83l/zrKOVURXl5pUJPNED/Bzjah89QKCHwCiKCBoVUXRwTGRfCYGIDdinJaAlKDHZdp/Ng==", - "dev": true - }, - "node_modules/@types/body-parser": { - "version": "1.19.2", - "resolved": "https://registry.npmjs.org/@types/body-parser/-/body-parser-1.19.2.tgz", - "integrity": "sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==", - "dependencies": { - "@types/connect": "*", - "@types/node": "*" - } - }, - "node_modules/@types/co-body": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@types/co-body/-/co-body-5.1.1.tgz", - "integrity": "sha512-0/6AjTfQc5OJUchOS4OHiXNPZVuk+5XvEC2vdcizw/bwx0yb0xY7TKSf8JYvQYZ/OJDiAEjWzxnMjGPnSVlPmA==", - "dev": true, - "dependencies": { - "@types/node": "*", - "@types/qs": "*" - } - }, - "node_modules/@types/connect": { - "version": "3.4.35", - "resolved": "https://registry.npmjs.org/@types/connect/-/connect-3.4.35.tgz", - "integrity": "sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/@types/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-0mPF08jn9zYI0n0Q/Pnz7C4kThdSt+6LD4amsrYDDpgBfrVWa3TcCOxKX1zkGgYniGagRv8heN2cbh+CAn+uuQ==", - "dev": true - }, - "node_modules/@types/cookie": { - "version": "0.3.3", - "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.3.3.tgz", - "integrity": "sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==", - "dev": true - }, - "node_modules/@types/cookies": { - "version": "0.7.7", - "resolved": "https://registry.npmjs.org/@types/cookies/-/cookies-0.7.7.tgz", - "integrity": "sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==", - "dev": true, - "dependencies": { - "@types/connect": "*", - "@types/express": "*", - "@types/keygrip": "*", - "@types/node": "*" - } - }, - "node_modules/@types/cors": { - "version": "2.8.12", - "resolved": "https://registry.npmjs.org/@types/cors/-/cors-2.8.12.tgz", - "integrity": "sha512-vt+kDhq/M2ayberEtJcIN/hxXy1Pk+59g2FV/ZQceeaTyCtCucjL2Q7FXlFjtWn4n15KCr1NE2lNNFhp0lEThw==", - "dev": true - }, - "node_modules/@types/debug": { - "version": "4.1.7", - "resolved": "https://registry.npmjs.org/@types/debug/-/debug-4.1.7.tgz", - "integrity": "sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==", - "dev": true, - "dependencies": { - "@types/ms": "*" - } - }, - "node_modules/@types/express": { - "version": "4.16.1", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.16.1.tgz", - "integrity": "sha512-V0clmJow23WeyblmACoxbHBu2JKlE5TiIme6Lem14FnPW9gsttyHtk6wq7njcdIWH1njAaFgR8gW09lgY98gQg==", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "*", - "@types/serve-static": "*" - } - }, - "node_modules/@types/express-jwt": { - "version": "0.0.42", - "resolved": "https://registry.npmjs.org/@types/express-jwt/-/express-jwt-0.0.42.tgz", - "integrity": "sha512-WszgUddvM1t5dPpJ3LhWNH8kfNN8GPIBrAGxgIYXVCEGx6Bx4A036aAuf/r5WH9DIEdlmp7gHOYvSM6U87B0ag==", - "dependencies": { - "@types/express": "*", - "@types/express-unless": "*" - } - }, - "node_modules/@types/express-serve-static-core": { - "version": "4.17.33", - "resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.33.tgz", - "integrity": "sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==", - "dependencies": { - "@types/node": "*", - "@types/qs": "*", - "@types/range-parser": "*" - } - }, - "node_modules/@types/express-unless": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/@types/express-unless/-/express-unless-0.5.3.tgz", - "integrity": "sha512-TyPLQaF6w8UlWdv4gj8i46B+INBVzURBNRahCozCSXfsK2VTlL1wNyTlMKw817VHygBtlcl5jfnPadlydr06Yw==", - "dependencies": { - "@types/express": "*" - } - }, - "node_modules/@types/hapi__catbox": { - "version": "10.2.4", - "resolved": "https://registry.npmjs.org/@types/hapi__catbox/-/hapi__catbox-10.2.4.tgz", - "integrity": "sha512-A6ivRrXD5glmnJna1UAGw87QNZRp/vdFO9U4GS+WhOMWzHnw+oTGkMvg0g6y1930CbeheGOCm7A1qHsqH7AXqg==", - "dev": true - }, - "node_modules/@types/hapi__hapi": { - "version": "20.0.8", - "resolved": "https://registry.npmjs.org/@types/hapi__hapi/-/hapi__hapi-20.0.8.tgz", - "integrity": "sha512-NNslrYq2XQwm4uOqNcSWKpYtaeMr4DkQdrFzSB7p9rKB9ppJLh3mgP2wak9vBZl7/Cnhhb+JVBcUZCOUcW0JPA==", - "dev": true, - "dependencies": { - "@hapi/boom": "^9.0.0", - "@hapi/iron": "^6.0.0", - "@hapi/podium": "^4.1.3", - "@types/hapi__catbox": "*", - "@types/hapi__mimos": "*", - "@types/hapi__shot": "*", - "@types/node": "*", - "joi": "^17.3.0" - } - }, - "node_modules/@types/hapi__mimos": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/@types/hapi__mimos/-/hapi__mimos-4.1.4.tgz", - "integrity": "sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==", - "dev": true, - "dependencies": { - "@types/mime-db": "*" - } - }, - "node_modules/@types/hapi__shot": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/@types/hapi__shot/-/hapi__shot-4.1.2.tgz", - "integrity": "sha512-8wWgLVP1TeGqgzZtCdt+F+k15DWQvLG1Yv6ZzPfb3D5WIo5/S+GGKtJBVo2uNEcqabP5Ifc71QnJTDnTmw1axA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/http-assert": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/@types/http-assert/-/http-assert-1.5.3.tgz", - "integrity": "sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==", - "dev": true - }, - "node_modules/@types/http-errors": { - "version": "1.8.2", - "resolved": "https://registry.npmjs.org/@types/http-errors/-/http-errors-1.8.2.tgz", - "integrity": "sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==", - "dev": true - }, - "node_modules/@types/json-schema": { - "version": "7.0.9", - "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.9.tgz", - "integrity": "sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ==", - "dev": true - }, - "node_modules/@types/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/@types/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-mM4TkDpA9oixqg1Fv2vVpOFyIVLJjm5x4k0V+K/rEsizfjD7Tk7LKk3GTtbB7KCfP0FEHQtsZqFxYA0+sijNVg==", - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/keygrip": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/@types/keygrip/-/keygrip-1.0.2.tgz", - "integrity": "sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==", - "dev": true - }, - "node_modules/@types/koa": { - "version": "2.13.4", - "resolved": "https://registry.npmjs.org/@types/koa/-/koa-2.13.4.tgz", - "integrity": "sha512-dfHYMfU+z/vKtQB7NUrthdAEiSvnLebvBjwHtfFmpZmB7em2N3WVQdHgnFq+xvyVgxW5jKDmjWfLD3lw4g4uTw==", - "dev": true, - "dependencies": { - "@types/accepts": "*", - "@types/content-disposition": "*", - "@types/cookies": "*", - "@types/http-assert": "*", - "@types/http-errors": "*", - "@types/keygrip": "*", - "@types/koa-compose": "*", - "@types/node": "*" - } - }, - "node_modules/@types/koa-bodyparser": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@types/koa-bodyparser/-/koa-bodyparser-4.3.5.tgz", - "integrity": "sha512-NRqqoTtt7cfdDk/KNo+EwCIKRuzPAu/wsaZ7tgIvSIBtNfxuZHYueaLoWdxX3ZftWavQv07NE46TcpyoZGqpgQ==", - "dev": true, - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/koa-compose": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@types/koa-compose/-/koa-compose-3.2.5.tgz", - "integrity": "sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==", - "dev": true, - "dependencies": { - "@types/koa": "*" - } - }, - "node_modules/@types/mime": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@types/mime/-/mime-1.3.2.tgz", - "integrity": "sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==" - }, - "node_modules/@types/mime-db": { - "version": "1.43.1", - "resolved": "https://registry.npmjs.org/@types/mime-db/-/mime-db-1.43.1.tgz", - "integrity": "sha512-kGZJY+R+WnR5Rk+RPHUMERtb2qBRViIHCBdtUrY+NmwuGb8pQdfTqQiCKPrxpdoycl8KWm2DLdkpoSdt479XoQ==", - "dev": true - }, - "node_modules/@types/minimatch": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.5.tgz", - "integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==", - "dev": true - }, - "node_modules/@types/ms": { - "version": "0.7.31", - "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", - "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", - "dev": true - }, - "node_modules/@types/node": { - "version": "17.0.18", - "resolved": "https://registry.npmjs.org/@types/node/-/node-17.0.18.tgz", - "integrity": "sha512-eKj4f/BsN/qcculZiRSujogjvp5O/k4lOW5m35NopjZM/QwLOR075a8pJW5hD+Rtdm2DaCVPENS6KtSQnUD6BA==" - }, - "node_modules/@types/nodemailer": { - "version": "6.4.4", - "resolved": "https://registry.npmjs.org/@types/nodemailer/-/nodemailer-6.4.4.tgz", - "integrity": "sha512-Ksw4t7iliXeYGvIQcSIgWQ5BLuC/mljIEbjf615svhZL10PE9t+ei8O9gDaD3FPCasUJn9KTLwz2JFJyiiyuqw==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/on-finished": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/@types/on-finished/-/on-finished-2.3.1.tgz", - "integrity": "sha512-mzVYaYcFs5Jd2n/O6uYIRUsFRR1cHyZLRvkLCU0E7+G5WhY0qBDAR5fUCeZbvecYOSh9ikhlesyi2UfI8B9ckQ==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/psl": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@types/psl/-/psl-1.1.0.tgz", - "integrity": "sha512-HhZnoLAvI2koev3czVPzBNRYvdrzJGLjQbWZhqFmS9Q6a0yumc5qtfSahBGb5g+6qWvA8iiQktqGkwoIXa/BNQ==", - "dev": true - }, - "node_modules/@types/qs": { - "version": "6.9.7", - "resolved": "https://registry.npmjs.org/@types/qs/-/qs-6.9.7.tgz", - "integrity": "sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==" - }, - "node_modules/@types/range-parser": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/@types/range-parser/-/range-parser-1.2.4.tgz", - "integrity": "sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==" - }, - "node_modules/@types/serve-static": { - "version": "1.13.9", - "resolved": "https://registry.npmjs.org/@types/serve-static/-/serve-static-1.13.9.tgz", - "integrity": "sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA==", - "dependencies": { - "@types/mime": "^1", - "@types/node": "*" - } - }, - "node_modules/@types/type-is": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@types/type-is/-/type-is-1.6.3.tgz", - "integrity": "sha512-PNs5wHaNcBgCQG5nAeeZ7OvosrEsI9O4W2jAOO9BCCg4ux9ZZvH2+0iSCOIDBiKuQsiNS8CBlmfX9f5YBQ22cA==", - "dev": true, - "dependencies": { - "@types/node": "*" - } - }, - "node_modules/@types/validator": { - "version": "10.11.0", - "resolved": "https://registry.npmjs.org/@types/validator/-/validator-10.11.0.tgz", - "integrity": "sha512-i1aY7RKb6HmQIEnK0cBmUZUp1URx0riIHw/GYNoZ46Su0GWfLiDmMI8zMRmaauMnOTg2bQag0qfwcyUFC9Tn+A==", - "dev": true - }, - "node_modules/abstract-logging": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz", - "integrity": "sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==", - "dev": true - }, - "node_modules/accept-language": { - "version": "3.0.18", - "resolved": "https://registry.npmjs.org/accept-language/-/accept-language-3.0.18.tgz", - "integrity": "sha1-9QJfF79lpGaoRYOMz5jNuHfYM4Q=", - "dev": true, - "dependencies": { - "bcp47": "^1.1.2", - "stable": "^0.1.6" - } - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/agent-base": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", - "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", - "dependencies": { - "debug": "4" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/ajv-errors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", - "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true, - "peerDependencies": { - "ajv": ">=5.0.0" - } - }, - "node_modules/ajv-keywords": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", - "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true, - "peerDependencies": { - "ajv": "^6.9.1" - } - }, - "node_modules/anser": { - "version": "1.4.9", - "resolved": "https://registry.npmjs.org/anser/-/anser-1.4.9.tgz", - "integrity": "sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==", - "dev": true - }, - "node_modules/ansi-colors": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-3.2.3.tgz", - "integrity": "sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/app-root-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/app-root-path/-/app-root-path-3.0.0.tgz", - "integrity": "sha512-qMcx+Gy2UZynHjOHOIXPNvpf+9cjvk3cWrBBK7zg4gH9+clobJRb9NGzcT7mQTcV/6Gm/1WelUtqxVXnNlrwcw==", - "dev": true, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/archy": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", - "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", - "dev": true - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/array-differ": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/array-differ/-/array-differ-3.0.0.tgz", - "integrity": "sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/array-flatten": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/array-flatten/-/array-flatten-1.1.1.tgz", - "integrity": "sha1-ml9pkFGx5wczKPKgCJaLZOopVdI=", - "dev": true - }, - "node_modules/array-union": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", - "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/arrify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/arrify/-/arrify-2.0.1.tgz", - "integrity": "sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/asn1.js": { - "version": "5.4.1", - "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", - "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/asn1.js/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/assert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-2.0.0.tgz", - "integrity": "sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==", - "dev": true, - "dependencies": { - "es6-object-assign": "^1.1.0", - "is-nan": "^1.2.1", - "object-is": "^1.0.1", - "util": "^0.12.0" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/ast-types": { - "version": "0.13.2", - "resolved": "https://registry.npmjs.org/ast-types/-/ast-types-0.13.2.tgz", - "integrity": "sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/async": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.3.tgz", - "integrity": "sha512-spZRyzKL5l5BZQrr/6m/SqFdBN0q3OCI0f9rjfBzCMBIP4p75P620rR3gTmaksNOhmzgdxcaxdNfMy6anrbM0g==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", - "dev": true - }, - "node_modules/atomic-sleep": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/atomic-sleep/-/atomic-sleep-1.0.0.tgz", - "integrity": "sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==", - "dev": true, - "engines": { - "node": ">=8.0.0" - } - }, - "node_modules/available-typed-arrays": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", - "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/avvio": { - "version": "7.2.2", - "resolved": "https://registry.npmjs.org/avvio/-/avvio-7.2.2.tgz", - "integrity": "sha512-XW2CMCmZaCmCCsIaJaLKxAzPwF37fXi1KGxNOvedOpeisLdmxZnblGc3hpHWYnlP+KOUxZsazh43WXNHgXpbqw==", - "dev": true, - "dependencies": { - "archy": "^1.0.0", - "debug": "^4.0.0", - "fastq": "^1.6.1", - "queue-microtask": "^1.1.2" - } - }, - "node_modules/aws-sdk": { - "version": "2.1077.0", - "resolved": "https://registry.npmjs.org/aws-sdk/-/aws-sdk-2.1077.0.tgz", - "integrity": "sha512-orJvJROs8hJaQRfHsX7Zl5PxEgrD/uTXyqXz9Yu9Io5VVxzvnOty9oHmvEMSlgTIf1qd01gnev/vpvP1HgzKtw==", - "dev": true, - "dependencies": { - "buffer": "4.9.2", - "events": "1.1.1", - "ieee754": "1.1.13", - "jmespath": "0.16.0", - "querystring": "0.2.0", - "sax": "1.2.1", - "url": "0.10.3", - "uuid": "3.3.2", - "xml2js": "0.4.19" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/aws-sdk-mock": { - "version": "5.6.2", - "resolved": "https://registry.npmjs.org/aws-sdk-mock/-/aws-sdk-mock-5.6.2.tgz", - "integrity": "sha512-GRJg8kjRJFLm2aLiPkYSqe/RreHqlqncAeFtWdAbtSxzBdct9EaV6rqSqjyWXKNJG45Rzn2Ojo3F6qVIgkQnSg==", - "dev": true, - "dependencies": { - "aws-sdk": "^2.928.0", - "sinon": "^11.1.1", - "traverse": "^0.6.6" - } - }, - "node_modules/aws-sdk-mock/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/aws-sdk-mock/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-sdk-mock/node_modules/sinon": { - "version": "11.1.2", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-11.1.2.tgz", - "integrity": "sha512-59237HChms4kg7/sXhiRcUzdSkKuydDeTiamT/jesUVHshBgL8XAmhgFo0GfK6RruMDM/iRSij1EybmMog9cJw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^7.1.2", - "@sinonjs/samsam": "^6.0.2", - "diff": "^5.0.0", - "nise": "^5.1.0", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/aws-sdk-mock/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/aws-sdk/node_modules/uuid": { - "version": "3.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.3.2.tgz", - "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/axios": { - "version": "0.21.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.4.tgz", - "integrity": "sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==", - "dependencies": { - "follow-redirects": "^1.14.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bcp47": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/bcp47/-/bcp47-1.1.2.tgz", - "integrity": "sha1-NUvjMH/9CEM6ePXh4glYRfifx/4=", - "dev": true, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/big.js": { - "version": "5.2.2", - "resolved": "https://registry.npmjs.org/big.js/-/big.js-5.2.2.tgz", - "integrity": "sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/bl": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/bl/-/bl-2.2.1.tgz", - "integrity": "sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==", - "dev": true, - "dependencies": { - "readable-stream": "^2.3.5", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/bl/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/bl/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/bluebird": { - "version": "3.7.2", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", - "integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==", - "dev": true - }, - "node_modules/bn.js": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.2.0.tgz", - "integrity": "sha512-D7iWRBvnZE8ecXiLj/9wbxH7Tk79fAh8IHaTNq1RWRixsS02W+5qS+iE9yq6RYl0asXx5tw0bLhmT5pIfbSquw==", - "dev": true - }, - "node_modules/body-parser": { - "version": "1.20.1", - "resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.1.tgz", - "integrity": "sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==", - "dependencies": { - "bytes": "3.1.2", - "content-type": "~1.0.4", - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "on-finished": "2.4.1", - "qs": "6.11.0", - "raw-body": "2.5.1", - "type-is": "~1.6.18", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/body-parser/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/body-parser/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/body-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=" - }, - "node_modules/body-parser/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/body-parser/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/brorand": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", - "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", - "dev": true - }, - "node_modules/browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "node_modules/browserify-aes": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", - "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", - "dev": true, - "dependencies": { - "buffer-xor": "^1.0.3", - "cipher-base": "^1.0.0", - "create-hash": "^1.1.0", - "evp_bytestokey": "^1.0.3", - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/browserify-cipher": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", - "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", - "dev": true, - "dependencies": { - "browserify-aes": "^1.0.4", - "browserify-des": "^1.0.0", - "evp_bytestokey": "^1.0.0" - } - }, - "node_modules/browserify-des": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", - "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "des.js": "^1.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/browserify-rsa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.1.0.tgz", - "integrity": "sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==", - "dev": true, - "dependencies": { - "bn.js": "^5.0.0", - "randombytes": "^2.0.1" - } - }, - "node_modules/browserify-sign": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", - "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", - "dev": true, - "dependencies": { - "bn.js": "^5.1.1", - "browserify-rsa": "^4.0.1", - "create-hash": "^1.2.0", - "create-hmac": "^1.1.7", - "elliptic": "^6.5.3", - "inherits": "^2.0.4", - "parse-asn1": "^5.1.5", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - } - }, - "node_modules/browserify-sign/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/browserify-zlib": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", - "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", - "dev": true, - "dependencies": { - "pako": "~1.0.5" - } - }, - "node_modules/browserslist": { - "version": "4.16.6", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", - "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001219", - "colorette": "^1.2.2", - "electron-to-chromium": "^1.3.723", - "escalade": "^3.1.1", - "node-releases": "^1.1.71" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/buffer": { - "version": "4.9.2", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-4.9.2.tgz", - "integrity": "sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4", - "isarray": "^1.0.0" - } - }, - "node_modules/buffer-equal-constant-time": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz", - "integrity": "sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==" - }, - "node_modules/buffer-xor": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", - "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", - "dev": true - }, - "node_modules/builtin-status-codes": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", - "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", - "dev": true - }, - "node_modules/bytes": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.0.tgz", - "integrity": "sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cache-content-type": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cache-content-type/-/cache-content-type-1.0.1.tgz", - "integrity": "sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==", - "dev": true, - "dependencies": { - "mime-types": "^2.1.18", - "ylru": "^1.2.0" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/camel-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-4.1.2.tgz", - "integrity": "sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==", - "dev": true, - "dependencies": { - "pascal-case": "^3.1.2", - "tslib": "^2.0.3" - } - }, - "node_modules/camelcase": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", - "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001465", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001465.tgz", - "integrity": "sha512-HvjgL3MYAJjceTDCcjRnQGjwUz/5qec9n7JPOzUursUoOTIsYCSDOb1l7RsnZE8mjbxG78zVRCKfrBXyvChBag==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/caniuse-lite" - } - ] - }, - "node_modules/capital-case": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/capital-case/-/capital-case-1.0.4.tgz", - "integrity": "sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/chai": { - "version": "4.3.6", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.3.6.tgz", - "integrity": "sha512-bbcp3YfHCUzMOvKqsztczerVgBKSsEijCySNlHHbX3VG1nskvqjz5Rfso1gGwD6w6oOV3eI60pKuMOV5MV7p3Q==", - "dev": true, - "dependencies": { - "assertion-error": "^1.1.0", - "check-error": "^1.0.2", - "deep-eql": "^3.0.1", - "get-func-name": "^2.0.0", - "loupe": "^2.3.1", - "pathval": "^1.1.1", - "type-detect": "^4.0.5" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk/node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/change-case": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/change-case/-/change-case-4.1.2.tgz", - "integrity": "sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==", - "dev": true, - "dependencies": { - "camel-case": "^4.1.2", - "capital-case": "^1.0.4", - "constant-case": "^3.0.4", - "dot-case": "^3.0.4", - "header-case": "^2.0.4", - "no-case": "^3.0.4", - "param-case": "^3.0.4", - "pascal-case": "^3.1.2", - "path-case": "^3.0.4", - "sentence-case": "^3.0.4", - "snake-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/charenc": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", - "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/chokidar": { - "version": "3.5.1", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.1.tgz", - "integrity": "sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==", - "dev": true, - "dependencies": { - "anymatch": "~3.1.1", - "braces": "~3.0.2", - "glob-parent": "~5.1.0", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.5.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.1" - } - }, - "node_modules/cipher-base": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", - "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/classnames": { - "version": "2.2.6", - "resolved": "https://registry.npmjs.org/classnames/-/classnames-2.2.6.tgz", - "integrity": "sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==", - "dev": true - }, - "node_modules/cldrjs": { - "version": "0.5.5", - "resolved": "https://registry.npmjs.org/cldrjs/-/cldrjs-0.5.5.tgz", - "integrity": "sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==", - "dev": true - }, - "node_modules/cliui": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", - "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", - "dev": true, - "dependencies": { - "string-width": "^2.1.1", - "strip-ansi": "^4.0.0", - "wrap-ansi": "^2.0.0" - } - }, - "node_modules/cliui/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/cliui/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/clone-deep": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", - "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, - "dependencies": { - "is-plain-object": "^2.0.4", - "kind-of": "^6.0.2", - "shallow-clone": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/co": { - "version": "4.6.0", - "resolved": "https://registry.npmjs.org/co/-/co-4.6.0.tgz", - "integrity": "sha1-bqa989hTrlTMuOR7+gvz+QMfsYQ=", - "dev": true, - "engines": { - "iojs": ">= 1.0.0", - "node": ">= 0.12.0" - } - }, - "node_modules/co-body": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/co-body/-/co-body-6.1.0.tgz", - "integrity": "sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==", - "dependencies": { - "inflation": "^2.0.0", - "qs": "^6.5.2", - "raw-body": "^2.3.3", - "type-is": "^1.6.16" - } - }, - "node_modules/code-point-at": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", - "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "dev": true - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commondir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", - "integrity": "sha1-3dgA2gxmEnOTzKWVDqloo6rxJTs=", - "dev": true - }, - "node_modules/component-emitter": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", - "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/console-browserify": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", - "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", - "dev": true - }, - "node_modules/constant-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/constant-case/-/constant-case-3.0.4.tgz", - "integrity": "sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case": "^2.0.2" - } - }, - "node_modules/constants-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", - "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", - "dev": true - }, - "node_modules/content-disposition": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.4.tgz", - "integrity": "sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==", - "dev": true, - "dependencies": { - "safe-buffer": "5.2.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/content-disposition/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/content-type": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/content-type/-/content-type-1.0.4.tgz", - "integrity": "sha512-hIP3EEPs8tB9AT1L+NUqtwOAps4mk2Zob89MWXMHjHWg9milF/j4osnnQLXBCBFBk/tvIG/tUc9mOUJiPBhPXA==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/convert-source-map": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", - "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/cookie": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.0.tgz", - "integrity": "sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-parser": { - "version": "1.4.6", - "resolved": "https://registry.npmjs.org/cookie-parser/-/cookie-parser-1.4.6.tgz", - "integrity": "sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==", - "dev": true, - "dependencies": { - "cookie": "0.4.1", - "cookie-signature": "1.0.6" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/cookie-parser/node_modules/cookie": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.4.1.tgz", - "integrity": "sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/cookie-signature": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/cookie-signature/-/cookie-signature-1.0.6.tgz", - "integrity": "sha1-4wOogrNCzD7oylE6eZmXNNqzriw=", - "dev": true - }, - "node_modules/cookiejar": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/cookiejar/-/cookiejar-2.1.3.tgz", - "integrity": "sha512-JxbCBUdrfr6AQjOXrxoTvAMJO4HBTUIlBzslcJPAz+/KT8yk53fXun51u+RenNYvad/+Vc2DIz5o9UxlCDymFQ==", - "dev": true - }, - "node_modules/cookies": { - "version": "0.8.0", - "resolved": "https://registry.npmjs.org/cookies/-/cookies-0.8.0.tgz", - "integrity": "sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==", - "dev": true, - "dependencies": { - "depd": "~2.0.0", - "keygrip": "~1.1.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/cookies/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/cors": { - "version": "2.8.5", - "resolved": "https://registry.npmjs.org/cors/-/cors-2.8.5.tgz", - "integrity": "sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==", - "dev": true, - "dependencies": { - "object-assign": "^4", - "vary": "^1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/create-ecdh": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", - "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "elliptic": "^6.5.3" - } - }, - "node_modules/create-ecdh/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/create-hash": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", - "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.1", - "inherits": "^2.0.1", - "md5.js": "^1.3.4", - "ripemd160": "^2.0.1", - "sha.js": "^2.4.0" - } - }, - "node_modules/create-hmac": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", - "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", - "dev": true, - "dependencies": { - "cipher-base": "^1.0.3", - "create-hash": "^1.1.0", - "inherits": "^2.0.1", - "ripemd160": "^2.0.0", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - } - }, - "node_modules/cross-spawn": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", - "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==", - "dev": true, - "dependencies": { - "path-key": "^3.1.0", - "shebang-command": "^2.0.0", - "which": "^2.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/cross-spawn/node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/crypt": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", - "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/crypto-browserify": { - "version": "3.12.0", - "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", - "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", - "dev": true, - "dependencies": { - "browserify-cipher": "^1.0.0", - "browserify-sign": "^4.0.0", - "create-ecdh": "^4.0.0", - "create-hash": "^1.1.0", - "create-hmac": "^1.1.0", - "diffie-hellman": "^5.0.0", - "inherits": "^2.0.1", - "pbkdf2": "^3.0.3", - "public-encrypt": "^4.0.0", - "randombytes": "^2.0.0", - "randomfill": "^1.0.3" - }, - "engines": { - "node": "*" - } - }, - "node_modules/css.escape": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz", - "integrity": "sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s=", - "dev": true - }, - "node_modules/cssnano-preset-simple": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssnano-preset-simple/-/cssnano-preset-simple-3.0.0.tgz", - "integrity": "sha512-vxQPeoMRqUT3c/9f0vWeVa2nKQIHFpogtoBvFdW4GQ3IvEJ6uauCP6p3Y5zQDLFcI7/+40FTgX12o7XUL0Ko+w==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001202" - }, - "peerDependencies": { - "postcss": "^8.2.15" - } - }, - "node_modules/cssnano-simple": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/cssnano-simple/-/cssnano-simple-3.0.0.tgz", - "integrity": "sha512-oU3ueli5Dtwgh0DyeohcIEE00QVfbPR3HzyXdAl89SfnQG3y0/qcpfLVW+jPIh3/rgMZGwuW96rejZGaYE9eUg==", - "dev": true, - "dependencies": { - "cssnano-preset-simple": "^3.0.0" - }, - "peerDependencies": { - "postcss": "^8.2.15" - }, - "peerDependenciesMeta": { - "postcss": { - "optional": true - } - } - }, - "node_modules/data-uri-to-buffer": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-3.0.1.tgz", - "integrity": "sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/dayjs": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.0.tgz", - "integrity": "sha512-JLC809s6Y948/FuCZPm5IX8rRhQwOiyMb2TfVVQEixG7P8Lm/gt5S7yoQZmC8x1UehI9Pb7sksEt4xx14m+7Ug==" - }, - "node_modules/debug": { - "version": "4.3.4", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", - "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/deep-equal": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.0.1.tgz", - "integrity": "sha1-9dJgKStmDghO/0zbyfCK0yR0SLU=", - "dev": true - }, - "node_modules/deepmerge": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.2.2.tgz", - "integrity": "sha512-FJ3UgI4gIl+PHZm53knsuSFpE+nESMr7M4v9QcgB7S63Kj/6WqMiFQJpBBYz1Pt+66bZpP3Q7Lye0Oo9MPKEdg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/delegates": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", - "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=", - "dev": true - }, - "node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha1-m81S4UwJd2PnSbJ0xDRu0uVgtak=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/des.js": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", - "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "minimalistic-assert": "^1.0.0" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/diff": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", - "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/diffie-hellman": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", - "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "miller-rabin": "^4.0.0", - "randombytes": "^2.0.0" - } - }, - "node_modules/diffie-hellman/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/domain-browser": { - "version": "4.19.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-4.19.0.tgz", - "integrity": "sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://bevry.me/fund" - } - }, - "node_modules/dot-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/dot-case/-/dot-case-3.0.4.tgz", - "integrity": "sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/dotenv": { - "version": "8.6.0", - "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-8.6.0.tgz", - "integrity": "sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/dotenv-json": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/dotenv-json/-/dotenv-json-1.0.0.tgz", - "integrity": "sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ==", - "dev": true - }, - "node_modules/ecdsa-sig-formatter": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz", - "integrity": "sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==", - "dependencies": { - "safe-buffer": "^5.0.1" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha1-WQxhFWsK4vTwJVcyoViyZrxWsh0=" - }, - "node_modules/ejs": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/ejs/-/ejs-3.1.8.tgz", - "integrity": "sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==", - "dev": true, - "dependencies": { - "jake": "^10.8.5" - }, - "bin": { - "ejs": "bin/cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.4.328", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.328.tgz", - "integrity": "sha512-DE9tTy2PNmy1v55AZAO542ui+MLC2cvINMK4P2LXGsJdput/ThVG9t+QGecPuAZZSgC8XoI+Jh9M1OG9IoNSCw==", - "dev": true - }, - "node_modules/elliptic": { - "version": "6.5.4", - "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.4.tgz", - "integrity": "sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==", - "dev": true, - "dependencies": { - "bn.js": "^4.11.9", - "brorand": "^1.1.0", - "hash.js": "^1.0.0", - "hmac-drbg": "^1.0.1", - "inherits": "^2.0.4", - "minimalistic-assert": "^1.0.1", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/elliptic/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "7.0.3", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", - "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", - "dev": true - }, - "node_modules/emojis-list": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/emojis-list/-/emojis-list-2.1.0.tgz", - "integrity": "sha1-TapNnbAPmBmIDHn6RXrlsJof04k=", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/encoding": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", - "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", - "dev": true, - "dependencies": { - "iconv-lite": "^0.6.2" - } - }, - "node_modules/encoding/node_modules/iconv-lite": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", - "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/es-abstract": { - "version": "1.19.1", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.19.1.tgz", - "integrity": "sha512-2vJ6tjA/UfqLm2MPs7jxVybLoB8i1t1Jd9R3kISld20sIxPcTbLuggQOUxeWeAvIUkduv/CfMjuh4WmiXr2v9w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "get-intrinsic": "^1.1.1", - "get-symbol-description": "^1.0.0", - "has": "^1.0.3", - "has-symbols": "^1.0.2", - "internal-slot": "^1.0.3", - "is-callable": "^1.2.4", - "is-negative-zero": "^2.0.1", - "is-regex": "^1.1.4", - "is-shared-array-buffer": "^1.0.1", - "is-string": "^1.0.7", - "is-weakref": "^1.0.1", - "object-inspect": "^1.11.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.2", - "string.prototype.trimend": "^1.0.4", - "string.prototype.trimstart": "^1.0.4", - "unbox-primitive": "^1.0.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-abstract/node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "dependencies": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/es6-object-assign": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/es6-object-assign/-/es6-object-assign-1.1.0.tgz", - "integrity": "sha1-wsNYJlYkfDnqEHyx5mUrb58kUjw=", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg=", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha1-Qa4u62XvpiJorr/qg6x9eSmbCIc=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/events": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/events/-/events-1.1.1.tgz", - "integrity": "sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ=", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/evp_bytestokey": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", - "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", - "dev": true, - "dependencies": { - "md5.js": "^1.3.4", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/execa": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-4.1.0.tgz", - "integrity": "sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==", - "dev": true, - "dependencies": { - "cross-spawn": "^7.0.0", - "get-stream": "^5.0.0", - "human-signals": "^1.1.1", - "is-stream": "^2.0.0", - "merge-stream": "^2.0.0", - "npm-run-path": "^4.0.0", - "onetime": "^5.1.0", - "signal-exit": "^3.0.2", - "strip-final-newline": "^2.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sindresorhus/execa?sponsor=1" - } - }, - "node_modules/express": { - "version": "4.18.2", - "resolved": "https://registry.npmjs.org/express/-/express-4.18.2.tgz", - "integrity": "sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==", - "dev": true, - "dependencies": { - "accepts": "~1.3.8", - "array-flatten": "1.1.1", - "body-parser": "1.20.1", - "content-disposition": "0.5.4", - "content-type": "~1.0.4", - "cookie": "0.5.0", - "cookie-signature": "1.0.6", - "debug": "2.6.9", - "depd": "2.0.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "finalhandler": "1.2.0", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "merge-descriptors": "1.0.1", - "methods": "~1.1.2", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "path-to-regexp": "0.1.7", - "proxy-addr": "~2.0.7", - "qs": "6.11.0", - "range-parser": "~1.2.1", - "safe-buffer": "5.2.1", - "send": "0.18.0", - "serve-static": "1.15.0", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "type-is": "~1.6.18", - "utils-merge": "1.0.1", - "vary": "~1.1.2" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/express/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/express/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/express/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/express/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/express/node_modules/path-to-regexp": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", - "integrity": "sha1-32BBeABfUi8V60SQ5yR6G/qmf4w=", - "dev": true - }, - "node_modules/express/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/express/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/express/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/fast-decode-uri-component": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/fast-decode-uri-component/-/fast-decode-uri-component-1.0.1.tgz", - "integrity": "sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==", - "dev": true - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-json-stringify": { - "version": "2.7.13", - "resolved": "https://registry.npmjs.org/fast-json-stringify/-/fast-json-stringify-2.7.13.tgz", - "integrity": "sha512-ar+hQ4+OIurUGjSJD1anvYSDcUflywhKjfxnsW4TBTD7+u0tJufv6DKRWoQk3vI6YBOWMoz0TQtfbe7dxbQmvA==", - "dev": true, - "dependencies": { - "ajv": "^6.11.0", - "deepmerge": "^4.2.2", - "rfdc": "^1.2.0", - "string-similarity": "^4.0.1" - }, - "engines": { - "node": ">= 10.0.0" - } - }, - "node_modules/fast-redact": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/fast-redact/-/fast-redact-3.1.0.tgz", - "integrity": "sha512-dir8LOnvialLxiXDPESMDHGp82CHi6ZEYTVkcvdn5d7psdv9ZkkButXrOeXST4aqreIRR+N7CYlsrwFuorurVg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/fast-safe-stringify": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.1.1.tgz", - "integrity": "sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==", - "dev": true - }, - "node_modules/fastify": { - "version": "3.18.1", - "resolved": "https://registry.npmjs.org/fastify/-/fastify-3.18.1.tgz", - "integrity": "sha512-OA0imy/bQCMzf7LUCb/1JI3ZSoA0Jo0MLpYULxV7gpppOpJ8NBxDp2PQoQ0FDqJevZPb7tlZf5JacIQft8x9yw==", - "dev": true, - "dependencies": { - "@fastify/ajv-compiler": "^1.0.0", - "abstract-logging": "^2.0.0", - "avvio": "^7.1.2", - "fast-json-stringify": "^2.5.2", - "fastify-error": "^0.3.0", - "fastify-warning": "^0.2.0", - "find-my-way": "^4.0.0", - "flatstr": "^1.0.12", - "light-my-request": "^4.2.0", - "pino": "^6.2.1", - "proxy-addr": "^2.0.7", - "readable-stream": "^3.4.0", - "rfdc": "^1.1.4", - "secure-json-parse": "^2.0.0", - "semver": "^7.3.2", - "tiny-lru": "^7.0.0" - } - }, - "node_modules/fastify-error": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/fastify-error/-/fastify-error-0.3.1.tgz", - "integrity": "sha512-oCfpcsDndgnDVgiI7bwFKAun2dO+4h84vBlkWsWnz/OUK9Reff5UFoFl241xTiLeHWX/vU9zkDVXqYUxjOwHcQ==", - "dev": true - }, - "node_modules/fastify-warning": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/fastify-warning/-/fastify-warning-0.2.0.tgz", - "integrity": "sha512-s1EQguBw/9qtc1p/WTY4eq9WMRIACkj+HTcOIK1in4MV5aFaQC9ZCIt0dJ7pr5bIf4lPpHvAtP2ywpTNgs7hqw==", - "deprecated": "This module renamed to process-warning", - "dev": true - }, - "node_modules/fastq": { - "version": "1.13.0", - "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.13.0.tgz", - "integrity": "sha512-YpkpUnK8od0o1hmeSc7UUs/eB/vIPWJYjKck2QKIzAf71Vm1AAQ3EbuZB3g2JIy+pg+ERD0vqI79KyZiB2e2Nw==", - "dev": true, - "dependencies": { - "reusify": "^1.0.4" - } - }, - "node_modules/filelist": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/filelist/-/filelist-1.0.4.tgz", - "integrity": "sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==", - "dev": true, - "dependencies": { - "minimatch": "^5.0.1" - } - }, - "node_modules/filelist/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/filelist/node_modules/minimatch": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.1.tgz", - "integrity": "sha512-362NP+zlprccbEt/SkxKfRMHnNY85V74mVnpUpNyr3F35covl09Kec7/sEFLt3RA4oXmewtoaanoIf67SE5Y5g==", - "dev": true, - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.2.0.tgz", - "integrity": "sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "2.4.1", - "parseurl": "~1.3.3", - "statuses": "2.0.1", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/finalhandler/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/finalhandler/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/finalhandler/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/find-cache-dir": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/find-cache-dir/-/find-cache-dir-3.3.1.tgz", - "integrity": "sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==", - "dev": true, - "dependencies": { - "commondir": "^1.0.1", - "make-dir": "^3.0.2", - "pkg-dir": "^4.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/avajs/find-cache-dir?sponsor=1" - } - }, - "node_modules/find-my-way": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/find-my-way/-/find-my-way-4.5.1.tgz", - "integrity": "sha512-kE0u7sGoUFbMXcOG/xpkmz4sRLCklERnBcg7Ftuu1iAxsfEt2S46RLJ3Sq7vshsEy2wJT2hZxE58XZK27qa8kg==", - "dev": true, - "dependencies": { - "fast-decode-uri-component": "^1.0.1", - "fast-deep-equal": "^3.1.3", - "safe-regex2": "^2.0.0", - "semver-store": "^0.3.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/find-up": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", - "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", - "dev": true, - "dependencies": { - "locate-path": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/flat": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.1.tgz", - "integrity": "sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==", - "dev": true, - "dependencies": { - "is-buffer": "~2.0.3" - }, - "bin": { - "flat": "cli.js" - } - }, - "node_modules/flat/node_modules/is-buffer": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.5.tgz", - "integrity": "sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "engines": { - "node": ">=4" - } - }, - "node_modules/flatstr": { - "version": "1.0.12", - "resolved": "https://registry.npmjs.org/flatstr/-/flatstr-1.0.12.tgz", - "integrity": "sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==", - "dev": true - }, - "node_modules/follow-redirects": { - "version": "1.14.9", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz", - "integrity": "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==", - "funding": [ - { - "type": "individual", - "url": "https://github.com/sponsors/RubenVerborgh" - } - ], - "engines": { - "node": ">=4.0" - }, - "peerDependenciesMeta": { - "debug": { - "optional": true - } - } - }, - "node_modules/foreach": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/foreach/-/foreach-2.0.5.tgz", - "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=", - "dev": true - }, - "node_modules/form-data": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.5.1.tgz", - "integrity": "sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/formidable": { - "version": "1.2.6", - "resolved": "https://registry.npmjs.org/formidable/-/formidable-1.2.6.tgz", - "integrity": "sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==", - "deprecated": "Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau", - "dev": true, - "funding": { - "url": "https://ko-fi.com/tunnckoCore/commissions" - } - }, - "node_modules/forwarded": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", - "integrity": "sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha1-PYyt2Q2XZWn6g1qx+OSyOhBWBac=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "peer": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true, - "engines": { - "node": "6.* || 8.* || >= 10.*" - } - }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/get-orientation": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/get-orientation/-/get-orientation-1.1.2.tgz", - "integrity": "sha512-/pViTfifW+gBbh/RnlFYHINvELT9Znt+SYyDKAUL6uV6By019AK/s+i9XP4jSwq7lwP38Fd8HVeTxym3+hkwmQ==", - "dev": true, - "dependencies": { - "stream-parser": "^0.3.1" - } - }, - "node_modules/get-stream": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-5.2.0.tgz", - "integrity": "sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/get-symbol-description": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz", - "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "get-intrinsic": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/glob-to-regexp": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz", - "integrity": "sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==", - "dev": true - }, - "node_modules/globalize": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/globalize/-/globalize-1.7.0.tgz", - "integrity": "sha512-faR46vTIbFCeAemyuc9E6/d7Wrx9k2ae2L60UhakztFg6VuE42gENVJNuPFtt7Sdjrk9m2w8+py7Jj+JTNy59w==", - "dev": true, - "dependencies": { - "cldrjs": "^0.5.4" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "peer": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.9", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.9.tgz", - "integrity": "sha512-NtNxqUcXgpW2iMrfqSfR73Glt39K+BLwWsPs94yR63v45T0Wbej7eRmL5cWfwEgqXnmjQp3zaJTshdRW/qC2ZQ==", - "dev": true - }, - "node_modules/growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-bigints": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/has-tostringtag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz", - "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hash-base": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", - "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "safe-buffer": "^5.2.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/hash-base/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/hash.js": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", - "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "minimalistic-assert": "^1.0.1" - } - }, - "node_modules/he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/header-case": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/header-case/-/header-case-2.0.4.tgz", - "integrity": "sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==", - "dev": true, - "dependencies": { - "capital-case": "^1.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/hmac-drbg": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", - "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", - "dev": true, - "dependencies": { - "hash.js": "^1.0.3", - "minimalistic-assert": "^1.0.0", - "minimalistic-crypto-utils": "^1.0.1" - } - }, - "node_modules/http-assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/http-assert/-/http-assert-1.5.0.tgz", - "integrity": "sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==", - "dev": true, - "dependencies": { - "deep-equal": "~1.0.1", - "http-errors": "~1.8.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/http-errors": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.8.1.tgz", - "integrity": "sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/http-status": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/http-status/-/http-status-1.5.0.tgz", - "integrity": "sha512-wcGvY31MpFNHIkUcXHHnvrE4IKYlpvitJw5P/1u892gMBAM46muQ+RH7UN1d+Ntnfx5apnOnVY6vcLmrWHOLwg==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/https-browserify": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", - "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", - "dev": true - }, - "node_modules/https-proxy-agent": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.0.tgz", - "integrity": "sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==", - "dependencies": { - "agent-base": "6", - "debug": "4" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/human-signals": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/human-signals/-/human-signals-1.1.1.tgz", - "integrity": "sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==", - "dev": true, - "engines": { - "node": ">=8.12.0" - } - }, - "node_modules/hyperid": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/hyperid/-/hyperid-2.3.1.tgz", - "integrity": "sha512-mIbI7Ymn6MCdODaW1/6wdf5lvvXzmPsARN4zTLakMmcziBOuP4PxCBJvHF6kbAIHX6H4vAELx/pDmt0j6Th5RQ==", - "dev": true, - "dependencies": { - "uuid": "^8.3.2", - "uuid-parse": "^1.1.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ieee754": { - "version": "1.1.13", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", - "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", - "dev": true - }, - "node_modules/ignore": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz", - "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==", - "dev": true, - "engines": { - "node": ">= 4" - } - }, - "node_modules/image-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.0.tgz", - "integrity": "sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==", - "dev": true, - "dependencies": { - "queue": "6.0.2" - }, - "bin": { - "image-size": "bin/image-size.js" - }, - "engines": { - "node": ">=12.0.0" - } - }, - "node_modules/inflation": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/inflation/-/inflation-2.0.0.tgz", - "integrity": "sha1-i0F+R8KPklpFEz2RTKH9OJEH8w8=", - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/inflection": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/inflection/-/inflection-1.13.2.tgz", - "integrity": "sha512-cmZlljCRTBFouT8UzMzrGcVEvkv6D/wBdcdKG7J1QH5cXjtU75Dm+P27v9EKu/Y43UYyCJd1WC4zLebRrC8NBw==", - "dev": true, - "engines": [ - "node >= 0.4.0" - ] - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/internal-slot": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.3.tgz", - "integrity": "sha512-O0DB1JC/sPyZl7cIo78n5dR7eUSwwpYPiXRhTzNxZVAMUuB8vlnRFyLxdrVToks6XPLVnFfbzaVd5WLjhgg+vA==", - "dev": true, - "dependencies": { - "get-intrinsic": "^1.1.0", - "has": "^1.0.3", - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/invert-kv": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-3.0.1.tgz", - "integrity": "sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sindresorhus/invert-kv?sponsor=1" - } - }, - "node_modules/ipaddr.js": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/ipaddr.js/-/ipaddr.js-1.9.1.tgz", - "integrity": "sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/is-arguments": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.1.tgz", - "integrity": "sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", - "dev": true, - "dependencies": { - "has-bigints": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-buffer": { - "version": "1.1.6", - "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true - }, - "node_modules/is-callable": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.4.tgz", - "integrity": "sha512-nsuwtxZfMX67Oryl9LCQ+upnC0Z0BgpwntpS89m1H/TLF0zNfzfLMV/9Wa/6MZsj0acpEjAO0KF1xT6ZdLl95w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/is-generator-function": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/is-generator-function/-/is-generator-function-1.0.10.tgz", - "integrity": "sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-nan": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/is-nan/-/is-nan-1.3.2.tgz", - "integrity": "sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-negative-zero": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz", - "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-number-object": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.6.tgz", - "integrity": "sha512-bEVOqiRcvo3zO1+G2lVMy+gkkEm9Yh7cDMRusKKu5ZJKPUYSJwICTKZrNKHA2EbSP0Tu0+6B/emsYNHZyn6K8g==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-shared-array-buffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", - "integrity": "sha512-IU0NmyknYZN0rChcKhRO1X8LYz5Isj/Fsqh8NJOSf+N/hCOTwy29F32Ik7a+QszE63IdvmwdTPDd6cZ5pg4cwA==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-stream": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-2.0.1.tgz", - "integrity": "sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==", - "dev": true, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", - "dev": true, - "dependencies": { - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, - "dependencies": { - "has-symbols": "^1.0.2" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-typed-array": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.8.tgz", - "integrity": "sha512-HqH41TNZq2fgtGT8WHVFVJhBVGuY3AnP3Q36K8JKXUxSxRgk/d+7NjmwG2vo2mYmXK8UYZKu0qH8bVP5gEisjA==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-weakref": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz", - "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/jake": { - "version": "10.8.5", - "resolved": "https://registry.npmjs.org/jake/-/jake-10.8.5.tgz", - "integrity": "sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==", - "dev": true, - "dependencies": { - "async": "^3.2.3", - "chalk": "^4.0.2", - "filelist": "^1.0.1", - "minimatch": "^3.0.4" - }, - "bin": { - "jake": "bin/cli.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/jake/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/jake/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/jake/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/jake/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/jake/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jake/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker": { - "version": "27.0.0-next.5", - "resolved": "https://registry.npmjs.org/jest-worker/-/jest-worker-27.0.0-next.5.tgz", - "integrity": "sha512-mk0umAQ5lT+CaOJ+Qp01N6kz48sJG2kr2n1rX0koqKf6FIygQV0qLOdN9SCYID4IVeSigDOcPeGLozdMLYfb5g==", - "dev": true, - "dependencies": { - "@types/node": "*", - "merge-stream": "^2.0.0", - "supports-color": "^8.0.0" - }, - "engines": { - "node": "^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0" - } - }, - "node_modules/jest-worker/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-worker/node_modules/supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/supports-color?sponsor=1" - } - }, - "node_modules/jmespath": { - "version": "0.16.0", - "resolved": "https://registry.npmjs.org/jmespath/-/jmespath-0.16.0.tgz", - "integrity": "sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/joi": { - "version": "17.6.0", - "resolved": "https://registry.npmjs.org/joi/-/joi-17.6.0.tgz", - "integrity": "sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==", - "dev": true, - "dependencies": { - "@hapi/hoek": "^9.0.0", - "@hapi/topo": "^5.0.0", - "@sideway/address": "^4.1.3", - "@sideway/formula": "^3.0.0", - "@sideway/pinpoint": "^2.0.0" - } - }, - "node_modules/jose": { - "version": "4.13.1", - "resolved": "https://registry.npmjs.org/jose/-/jose-4.13.1.tgz", - "integrity": "sha512-MSJQC5vXco5Br38mzaQKiq9mwt7lwj2eXpgpRyQYNHYt2lq1PjkWa7DLXX0WVcQLE9HhMh3jPiufS7fhJf+CLQ==", - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/js2xmlparser": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/js2xmlparser/-/js2xmlparser-4.0.2.tgz", - "integrity": "sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==", - "dev": true, - "dependencies": { - "xmlcreate": "^2.0.4" - } - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "peer": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json-merge-patch": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/json-merge-patch/-/json-merge-patch-1.0.2.tgz", - "integrity": "sha512-M6Vp2GN9L7cfuMXiWOmHj9bEFbeC250iVtcKQbqVgEsDVYnIsrNsbU+h/Y/PkbBQCtEa4Bez+Ebv0zfbC8ObLg==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.3" - } - }, - "node_modules/json-schema-compare": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", - "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", - "dev": true, - "dependencies": { - "lodash": "^4.17.4" - } - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=", - "dev": true - }, - "node_modules/json5": { - "version": "2.2.3", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", - "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", - "dev": true, - "peer": true, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/jsonc-parser": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.0.0.tgz", - "integrity": "sha512-fQzRfAbIBnR0IQvftw9FJveWiHp72Fg20giDrHz6TdfB12UH/uue0D3hm57UB5KgAVuniLMCaS8P1IMj9NR7cA==", - "dev": true - }, - "node_modules/jsonwebtoken": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/jsonwebtoken/-/jsonwebtoken-9.0.0.tgz", - "integrity": "sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==", - "dependencies": { - "jws": "^3.2.2", - "lodash": "^4.17.21", - "ms": "^2.1.1", - "semver": "^7.3.8" - }, - "engines": { - "node": ">=12", - "npm": ">=6" - } - }, - "node_modules/just-extend": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/just-extend/-/just-extend-4.2.1.tgz", - "integrity": "sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==", - "dev": true - }, - "node_modules/jwa": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/jwa/-/jwa-1.4.1.tgz", - "integrity": "sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==", - "dependencies": { - "buffer-equal-constant-time": "1.0.1", - "ecdsa-sig-formatter": "1.0.11", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/jwks-rsa": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-2.0.5.tgz", - "integrity": "sha512-fliHfsiBRzEU0nXzSvwnh0hynzGB0WihF+CinKbSRlaqRxbqqKf2xbBPgwc8mzf18/WgwlG8e5eTpfSTBcU4DQ==", - "dependencies": { - "@types/express-jwt": "0.0.42", - "debug": "^4.3.2", - "jose": "^2.0.5", - "limiter": "^1.1.5", - "lru-memoizer": "^2.1.4" - }, - "engines": { - "node": ">=10 < 13 || >=14" - } - }, - "node_modules/jwks-rsa/node_modules/jose": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/jose/-/jose-2.0.6.tgz", - "integrity": "sha512-FVoPY7SflDodE4lknJmbAHSUjLCzE2H1F6MS0RYKMQ8SR+lNccpMf8R4eqkNYyyUjR5qZReOzZo5C5YiHOCjjg==", - "dependencies": { - "@panva/asn1.js": "^1.0.0" - }, - "engines": { - "node": ">=10.13.0 < 13 || >=13.7.0" - }, - "funding": { - "url": "https://github.com/sponsors/panva" - } - }, - "node_modules/jws": { - "version": "3.2.2", - "resolved": "https://registry.npmjs.org/jws/-/jws-3.2.2.tgz", - "integrity": "sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==", - "dependencies": { - "jwa": "^1.4.1", - "safe-buffer": "^5.0.1" - } - }, - "node_modules/keygrip": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/keygrip/-/keygrip-1.1.0.tgz", - "integrity": "sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==", - "dev": true, - "dependencies": { - "tsscmp": "1.0.6" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/koa": { - "version": "2.13.4", - "resolved": "https://registry.npmjs.org/koa/-/koa-2.13.4.tgz", - "integrity": "sha512-43zkIKubNbnrULWlHdN5h1g3SEKXOEzoAlRsHOTFpnlDu8JlAOZSMJBLULusuXRequboiwJcj5vtYXKB3k7+2g==", - "dev": true, - "dependencies": { - "accepts": "^1.3.5", - "cache-content-type": "^1.0.0", - "content-disposition": "~0.5.2", - "content-type": "^1.0.4", - "cookies": "~0.8.0", - "debug": "^4.3.2", - "delegates": "^1.0.0", - "depd": "^2.0.0", - "destroy": "^1.0.4", - "encodeurl": "^1.0.2", - "escape-html": "^1.0.3", - "fresh": "~0.5.2", - "http-assert": "^1.3.0", - "http-errors": "^1.6.3", - "is-generator-function": "^1.0.7", - "koa-compose": "^4.1.0", - "koa-convert": "^2.0.0", - "on-finished": "^2.3.0", - "only": "~0.0.2", - "parseurl": "^1.3.2", - "statuses": "^1.5.0", - "type-is": "^1.6.16", - "vary": "^1.1.2" - }, - "engines": { - "node": "^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4" - } - }, - "node_modules/koa-compose": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/koa-compose/-/koa-compose-4.1.0.tgz", - "integrity": "sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==", - "dev": true - }, - "node_modules/koa-convert": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/koa-convert/-/koa-convert-2.0.0.tgz", - "integrity": "sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==", - "dev": true, - "dependencies": { - "co": "^4.6.0", - "koa-compose": "^4.1.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/koa/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/lambda-event-mock": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/lambda-event-mock/-/lambda-event-mock-1.5.0.tgz", - "integrity": "sha512-vx1d+vZqi7FF6B3+mAfHnY/6Tlp6BheL2ta0MJS0cIRB3Rc4I5cviHTkiJxHdE156gXx3ZjlQRJrS4puXvtrhA==", - "dev": true, - "dependencies": { - "@extra-number/significant-digits": "^1.1.1", - "clone-deep": "^4.0.1", - "uuid": "^3.3.3", - "vandium-utils": "^1.2.0" - }, - "engines": { - "node": ">=12.13" - } - }, - "node_modules/lambda-event-mock/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/lambda-event-mock/node_modules/vandium-utils": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/vandium-utils/-/vandium-utils-1.2.0.tgz", - "integrity": "sha1-RHNd5LdkGgXeWevpRfF05YLbT1k=", - "dev": true - }, - "node_modules/lambda-leak": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lambda-leak/-/lambda-leak-2.0.0.tgz", - "integrity": "sha1-dxmF02KEh/boha+uK1RRDc+yzX4=", - "dev": true, - "engines": { - "node": ">=6.10.0" - } - }, - "node_modules/lambda-tester": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/lambda-tester/-/lambda-tester-4.0.1.tgz", - "integrity": "sha512-ft6XHk84B6/dYEzyI3anKoGWz08xQ5allEHiFYDUzaYTymgVK7tiBkCEbuWx+MFvH7OpFNsJXVtjXm0X8iH3Iw==", - "dev": true, - "dependencies": { - "app-root-path": "^3.0.0", - "dotenv": "^8.0.0", - "dotenv-json": "^1.0.0", - "lambda-event-mock": "^1.5.0", - "lambda-leak": "^2.0.0", - "semver": "^6.1.1", - "uuid": "^3.3.3", - "vandium-utils": "^2.0.0" - }, - "engines": { - "node": ">=10.0" - } - }, - "node_modules/lambda-tester/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/lambda-tester/node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/lcid": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-3.1.1.tgz", - "integrity": "sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==", - "dev": true, - "dependencies": { - "invert-kv": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/libphonenumber-js": { - "version": "1.9.49", - "resolved": "https://registry.npmjs.org/libphonenumber-js/-/libphonenumber-js-1.9.49.tgz", - "integrity": "sha512-/wEOIONcVboFky+lWlCaF7glm1FhBz11M5PHeCApA+xDdVfmhKjHktHS8KjyGxouV5CSXIr4f3GvLSpJa4qMSg==" - }, - "node_modules/light-my-request": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/light-my-request/-/light-my-request-4.8.0.tgz", - "integrity": "sha512-C2XESrTRsZnI59NSQigOsS6IuTxpj8OhSBvZS9fhgBMsamBsAuWN1s4hj/nCi8EeZcyAA6xbROhsZy7wKdfckg==", - "dev": true, - "dependencies": { - "ajv": "^8.1.0", - "cookie": "^0.4.0", - "process-warning": "^1.0.0", - "set-cookie-parser": "^2.4.1" - } - }, - "node_modules/light-my-request/node_modules/ajv": { - "version": "8.10.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.10.0.tgz", - "integrity": "sha512-bzqAEZOjkrUMl2afH8dknrq5KEk2SrwdBROR+vH1EKVQTqaUbJVPdc/gEdggTMM0Se+s+Ja4ju4TlNcStKl2Hw==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/light-my-request/node_modules/json-schema-traverse": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", - "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", - "dev": true - }, - "node_modules/limiter": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/limiter/-/limiter-1.1.5.tgz", - "integrity": "sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==" - }, - "node_modules/loader-utils": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/loader-utils/-/loader-utils-1.2.3.tgz", - "integrity": "sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==", - "dev": true, - "dependencies": { - "big.js": "^5.2.2", - "emojis-list": "^2.0.0", - "json5": "^1.0.1" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/loader-utils/node_modules/json5": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.1.tgz", - "integrity": "sha512-aKS4WQjPenRxiQsC93MNfjx+nbF4PAdYzmd/1JIj8HYzqfbu86beTuNgXDzPknWk0n0uARlyewZo4s++ES36Ow==", - "dev": true, - "dependencies": { - "minimist": "^1.2.0" - }, - "bin": { - "json5": "lib/cli.js" - } - }, - "node_modules/loader-utils/node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/locate-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", - "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", - "dev": true, - "dependencies": { - "p-locate": "^3.0.0", - "path-exists": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==" - }, - "node_modules/lodash.clonedeep": { - "version": "4.5.0", - "resolved": "https://registry.npmjs.org/lodash.clonedeep/-/lodash.clonedeep-4.5.0.tgz", - "integrity": "sha1-4j8/nE+Pvd6HJSnBBxhXoIblzO8=" - }, - "node_modules/lodash.get": { - "version": "4.4.2", - "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", - "integrity": "sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk=", - "dev": true - }, - "node_modules/lodash.sortby": { - "version": "4.7.0", - "resolved": "https://registry.npmjs.org/lodash.sortby/-/lodash.sortby-4.7.0.tgz", - "integrity": "sha1-7dFMgk4sycHgsKG0K7UhBRakJDg=", - "dev": true - }, - "node_modules/log-symbols": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-2.2.0.tgz", - "integrity": "sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==", - "dev": true, - "dependencies": { - "chalk": "^2.0.1" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/loopback-connector": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/loopback-connector/-/loopback-connector-5.0.1.tgz", - "integrity": "sha512-aSPT6x5WZdoW9ylyNE4CxGqFbIqC9cSEZJwWkCincso27PXlZPj52POoF6pgxug9mkH7MrbXuP3SSDLkLq5oQQ==", - "dev": true, - "dependencies": { - "async": "^3.2.0", - "bluebird": "^3.7.2", - "debug": "^4.1.1", - "msgpack5": "^4.2.0", - "strong-globalize": "^6.0.4", - "uuid": "^8.3.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/loopback-datasource-juggler": { - "version": "4.26.0", - "resolved": "https://registry.npmjs.org/loopback-datasource-juggler/-/loopback-datasource-juggler-4.26.0.tgz", - "integrity": "sha512-/R40jUGDrnRBgTh121L4Y7sHDF0KxbgSAN4gLJKp8xGNQ6KpkSQyqZkmap98eN7B75RES78DS3MGghsYMvAJ3Q==", - "dev": true, - "dependencies": { - "async": "^3.1.0", - "change-case": "^4.1.1", - "debug": "^4.1.0", - "depd": "^2.0.0", - "inflection": "^1.6.0", - "lodash": "^4.17.11", - "loopback-connector": "^5.0.0", - "minimatch": "^3.0.3", - "qs": "^6.5.0", - "shortid": "^2.2.6", - "strong-globalize": "^6.0.5", - "traverse": "^0.6.6", - "uuid": "^8.3.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/loopback-datasource-juggler/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/loose-envify": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz", - "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==", - "dev": true, - "dependencies": { - "js-tokens": "^3.0.0 || ^4.0.0" - }, - "bin": { - "loose-envify": "cli.js" - } - }, - "node_modules/loupe": { - "version": "2.3.4", - "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.4.tgz", - "integrity": "sha512-OvKfgCC2Ndby6aSTREl5aCCPTNIzlDfQZvZxNUrBrihDhL3xcrYegTblhmEiCrg2kKQz4XsFIaemE5BF4ybSaQ==", - "dev": true, - "dependencies": { - "get-func-name": "^2.0.0" - } - }, - "node_modules/lower-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-2.0.2.tgz", - "integrity": "sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/lru-cache": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-4.0.2.tgz", - "integrity": "sha1-HRdnnAac2l0ECZGgnbwsDbN35V4=", - "dependencies": { - "pseudomap": "^1.0.1", - "yallist": "^2.0.0" - } - }, - "node_modules/lru-memoizer": { - "version": "2.1.4", - "resolved": "https://registry.npmjs.org/lru-memoizer/-/lru-memoizer-2.1.4.tgz", - "integrity": "sha512-IXAq50s4qwrOBrXJklY+KhgZF+5y98PDaNo0gi/v2KQBFLyWr+JyFvijZXkGKjQj/h9c0OwoE+JZbwUXce76hQ==", - "dependencies": { - "lodash.clonedeep": "^4.5.0", - "lru-cache": "~4.0.0" - } - }, - "node_modules/lunr": { - "version": "2.3.9", - "resolved": "https://registry.npmjs.org/lunr/-/lunr-2.3.9.tgz", - "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", - "dev": true - }, - "node_modules/make-dir": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", - "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", - "dev": true, - "dependencies": { - "semver": "^6.0.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/make-dir/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/map-age-cleaner": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", - "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", - "dev": true, - "dependencies": { - "p-defer": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/marked": { - "version": "4.0.12", - "resolved": "https://registry.npmjs.org/marked/-/marked-4.0.12.tgz", - "integrity": "sha512-hgibXWrEDNBWgGiK18j/4lkS6ihTe9sxtV4Q1OQppb/0zzyPSzoFANBa5MfsG/zgsWklmNnhm0XACZOH/0HBiQ==", - "dev": true, - "bin": { - "marked": "bin/marked.js" - }, - "engines": { - "node": ">= 12" - } - }, - "node_modules/md5": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", - "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dev": true, - "dependencies": { - "charenc": "0.0.2", - "crypt": "0.0.2", - "is-buffer": "~1.1.6" - } - }, - "node_modules/md5.js": { - "version": "1.3.5", - "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", - "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/media-typer": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/media-typer/-/media-typer-0.3.0.tgz", - "integrity": "sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g=", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mem": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/mem/-/mem-5.1.1.tgz", - "integrity": "sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==", - "dev": true, - "dependencies": { - "map-age-cleaner": "^0.1.3", - "mimic-fn": "^2.1.0", - "p-is-promise": "^2.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/merge-descriptors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/merge-descriptors/-/merge-descriptors-1.0.1.tgz", - "integrity": "sha1-sAqqVW3YtEVoFQ7J0blT8/kMu2E=", - "dev": true - }, - "node_modules/merge-stream": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/merge-stream/-/merge-stream-2.0.0.tgz", - "integrity": "sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==", - "dev": true - }, - "node_modules/methods": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/methods/-/methods-1.1.2.tgz", - "integrity": "sha1-VSmk1nZUE07cxSZmVoNbD4Ua/O4=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/miller-rabin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", - "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", - "dev": true, - "dependencies": { - "bn.js": "^4.0.0", - "brorand": "^1.0.1" - }, - "bin": { - "miller-rabin": "bin/miller-rabin" - } - }, - "node_modules/miller-rabin/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.51.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.51.0.tgz", - "integrity": "sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==", - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.34", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.34.tgz", - "integrity": "sha512-6cP692WwGIs9XXdOO4++N+7qjqv0rqxxVvJ3VHPh/Sc9mVZcQP+ZGhkKiTvWMQRr2tbHkJP/Yn7Y0npb3ZBs4A==", - "dependencies": { - "mime-db": "1.51.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mimic-fn": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", - "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimalistic-assert": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", - "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", - "dev": true - }, - "node_modules/minimalistic-crypto-utils": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", - "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", - "dev": true - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", - "dev": true - }, - "node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "dev": true, - "dependencies": { - "minimist": "0.0.8" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha": { - "version": "6.1.4", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-6.1.4.tgz", - "integrity": "sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==", - "dev": true, - "dependencies": { - "ansi-colors": "3.2.3", - "browser-stdout": "1.3.1", - "debug": "3.2.6", - "diff": "3.5.0", - "escape-string-regexp": "1.0.5", - "find-up": "3.0.0", - "glob": "7.1.3", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "3.13.1", - "log-symbols": "2.2.0", - "minimatch": "3.0.4", - "mkdirp": "0.5.1", - "ms": "2.1.1", - "node-environment-flags": "1.0.5", - "object.assign": "4.1.0", - "strip-json-comments": "2.0.1", - "supports-color": "6.0.0", - "which": "1.3.1", - "wide-align": "1.1.3", - "yargs": "13.2.2", - "yargs-parser": "13.0.0", - "yargs-unparser": "1.5.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 6.0.0" - } - }, - "node_modules/mocha/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/mocha/node_modules/debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "deprecated": "Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797)", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.3.tgz", - "integrity": "sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/glob/node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/js-yaml": { - "version": "3.13.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz", - "integrity": "sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/mocha/node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==", - "dev": true - }, - "node_modules/mri": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", - "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" - }, - "node_modules/msgpack5": { - "version": "4.5.1", - "resolved": "https://registry.npmjs.org/msgpack5/-/msgpack5-4.5.1.tgz", - "integrity": "sha512-zC1vkcliryc4JGlL6OfpHumSYUHWFGimSI+OgfRCjTFLmKA2/foR9rMTOhWiqfOrfxJOctrpWPvrppf8XynJxw==", - "dev": true, - "dependencies": { - "bl": "^2.0.1", - "inherits": "^2.0.3", - "readable-stream": "^2.3.6", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/msgpack5/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/msgpack5/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/multimatch": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/multimatch/-/multimatch-4.0.0.tgz", - "integrity": "sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==", - "dev": true, - "dependencies": { - "@types/minimatch": "^3.0.3", - "array-differ": "^3.0.0", - "array-union": "^2.1.0", - "arrify": "^2.0.1", - "minimatch": "^3.0.4" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/nanoid": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.1.tgz", - "integrity": "sha512-n6Vs/3KGyxPQd6uO0eH4Bv0ojGSUvuLlIHtC3Y0kEO23YRge8H9x1GCzLn28YX0H66pMkxuaeESFq4tKISKwdw==", - "dev": true, - "bin": { - "nanoid": "bin/nanoid.cjs" - }, - "engines": { - "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" - } - }, - "node_modules/native-url": { - "version": "0.3.4", - "resolved": "https://registry.npmjs.org/native-url/-/native-url-0.3.4.tgz", - "integrity": "sha512-6iM8R99ze45ivyH8vybJ7X0yekIcPf5GgLV5K0ENCbmRcaRIDoj37BC8iLEmaaBfqqb8enuZ5p0uhY+lVAbAcA==", - "dev": true, - "dependencies": { - "querystring": "^0.2.0" - } - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/next": { - "version": "11.1.3", - "resolved": "https://registry.npmjs.org/next/-/next-11.1.3.tgz", - "integrity": "sha512-ud/gKmnKQ8wtHC+pd1ZiqPRa7DdgulPkAk94MbpsspfNliwZkYs9SIYWhlLSyg+c661LzdUI2nZshvrtggSYWA==", - "dev": true, - "dependencies": { - "@babel/runtime": "7.15.3", - "@hapi/accept": "5.0.2", - "@next/env": "11.1.3", - "@next/polyfill-module": "11.1.3", - "@next/react-dev-overlay": "11.1.3", - "@next/react-refresh-utils": "11.1.3", - "@node-rs/helper": "1.2.1", - "assert": "2.0.0", - "ast-types": "0.13.2", - "browserify-zlib": "0.2.0", - "browserslist": "4.16.6", - "buffer": "5.6.0", - "caniuse-lite": "^1.0.30001228", - "chalk": "2.4.2", - "chokidar": "3.5.1", - "constants-browserify": "1.0.0", - "crypto-browserify": "3.12.0", - "cssnano-simple": "3.0.0", - "domain-browser": "4.19.0", - "encoding": "0.1.13", - "etag": "1.8.1", - "find-cache-dir": "3.3.1", - "get-orientation": "1.1.2", - "https-browserify": "1.0.0", - "image-size": "1.0.0", - "jest-worker": "27.0.0-next.5", - "native-url": "0.3.4", - "node-fetch": "2.6.1", - "node-html-parser": "1.4.9", - "node-libs-browser": "^2.2.1", - "os-browserify": "0.3.0", - "p-limit": "3.1.0", - "path-browserify": "1.0.1", - "pnp-webpack-plugin": "1.6.4", - "postcss": "8.2.15", - "process": "0.11.10", - "querystring-es3": "0.2.1", - "raw-body": "2.4.1", - "react-is": "17.0.2", - "react-refresh": "0.8.3", - "stream-browserify": "3.0.0", - "stream-http": "3.1.1", - "string_decoder": "1.3.0", - "styled-jsx": "4.0.1", - "timers-browserify": "2.0.12", - "tty-browserify": "0.0.1", - "use-subscription": "1.5.1", - "util": "0.12.4", - "vm-browserify": "1.1.2", - "watchpack": "2.1.1" - }, - "bin": { - "next": "dist/bin/next" - }, - "engines": { - "node": ">=12.0.0" - }, - "optionalDependencies": { - "@next/swc-darwin-arm64": "11.1.3", - "@next/swc-darwin-x64": "11.1.3", - "@next/swc-linux-x64-gnu": "11.1.3", - "@next/swc-win32-x64-msvc": "11.1.3" - }, - "peerDependencies": { - "fibers": ">= 3.1.0", - "node-sass": "^4.0.0 || ^5.0.0", - "react": "^17.0.2", - "react-dom": "^17.0.2", - "sass": "^1.3.0" - }, - "peerDependenciesMeta": { - "fibers": { - "optional": true - }, - "node-sass": { - "optional": true - }, - "sass": { - "optional": true - } - } - }, - "node_modules/next-test-api-route-handler": { - "version": "3.1.8", - "resolved": "https://registry.npmjs.org/next-test-api-route-handler/-/next-test-api-route-handler-3.1.8.tgz", - "integrity": "sha512-8o+TjtlQdvLv7YmR5NOl+AQCM/tEZqB1mvqBeGFQscuGtL+42fOrOsDFv2QsFUWieUMKv7j7NqOmYMpJRPu3/w==", - "dev": true, - "dependencies": { - "cookie": "^0.5.0", - "node-fetch": "^2.6.7" - }, - "engines": { - "node": ">=12" - }, - "peerDependencies": { - "next": ">=9" - } - }, - "node_modules/next-test-api-route-handler/node_modules/cookie": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", - "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/next-test-api-route-handler/node_modules/node-fetch": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.9.tgz", - "integrity": "sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==", - "dev": true, - "dependencies": { - "whatwg-url": "^5.0.0" - }, - "engines": { - "node": "4.x || >=6.0.0" - }, - "peerDependencies": { - "encoding": "^0.1.0" - }, - "peerDependenciesMeta": { - "encoding": { - "optional": true - } - } - }, - "node_modules/next/node_modules/buffer": { - "version": "5.6.0", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.6.0.tgz", - "integrity": "sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==", - "dev": true, - "dependencies": { - "base64-js": "^1.0.2", - "ieee754": "^1.1.4" - } - }, - "node_modules/next/node_modules/http-errors": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.7.3.tgz", - "integrity": "sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.4", - "setprototypeof": "1.1.1", - "statuses": ">= 1.5.0 < 2", - "toidentifier": "1.0.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/next/node_modules/raw-body": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.4.1.tgz", - "integrity": "sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==", - "dev": true, - "dependencies": { - "bytes": "3.1.0", - "http-errors": "1.7.3", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/next/node_modules/toidentifier": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.0.tgz", - "integrity": "sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/nice-try": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", - "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", - "dev": true - }, - "node_modules/nise": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/nise/-/nise-5.1.1.tgz", - "integrity": "sha512-yr5kW2THW1AkxVmCnKEh4nbYkJdB3I7LUkiUgOvEkOp414mc2UMaHMA7pjq1nYowhdoJZGwEKGaQVbxfpWj10A==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": ">=5", - "@sinonjs/text-encoding": "^0.7.1", - "just-extend": "^4.0.2", - "path-to-regexp": "^1.7.0" - } - }, - "node_modules/nise/node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", - "dev": true - }, - "node_modules/nise/node_modules/path-to-regexp": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-1.8.0.tgz", - "integrity": "sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==", - "dev": true, - "dependencies": { - "isarray": "0.0.1" - } - }, - "node_modules/no-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/no-case/-/no-case-3.0.4.tgz", - "integrity": "sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==", - "dev": true, - "dependencies": { - "lower-case": "^2.0.2", - "tslib": "^2.0.3" - } - }, - "node_modules/nock": { - "version": "11.7.0", - "resolved": "https://registry.npmjs.org/nock/-/nock-11.7.0.tgz", - "integrity": "sha512-7c1jhHew74C33OBeRYyQENT+YXQiejpwIrEjinh6dRurBae+Ei4QjeUaPlkptIF0ZacEiVCnw8dWaxqepkiihg==", - "dev": true, - "dependencies": { - "chai": "^4.1.2", - "debug": "^4.1.0", - "json-stringify-safe": "^5.0.1", - "lodash": "^4.17.13", - "mkdirp": "^0.5.0", - "propagate": "^2.0.0" - }, - "engines": { - "node": ">= 8.0" - } - }, - "node_modules/node-environment-flags": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/node-environment-flags/-/node-environment-flags-1.0.5.tgz", - "integrity": "sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==", - "dev": true, - "dependencies": { - "object.getownpropertydescriptors": "^2.0.3", - "semver": "^5.7.0" - } - }, - "node_modules/node-environment-flags/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/node-fetch": { - "version": "2.6.1", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", - "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", - "dev": true, - "engines": { - "node": "4.x || >=6.0.0" - } - }, - "node_modules/node-html-parser": { - "version": "1.4.9", - "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-1.4.9.tgz", - "integrity": "sha512-UVcirFD1Bn0O+TSmloHeHqZZCxHjvtIeGdVdGMhyZ8/PWlEiZaZ5iJzR189yKZr8p0FXN58BUeC7RHRkf/KYGw==", - "dev": true, - "dependencies": { - "he": "1.2.0" - } - }, - "node_modules/node-libs-browser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/node-libs-browser/-/node-libs-browser-2.2.1.tgz", - "integrity": "sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==", - "dev": true, - "dependencies": { - "assert": "^1.1.1", - "browserify-zlib": "^0.2.0", - "buffer": "^4.3.0", - "console-browserify": "^1.1.0", - "constants-browserify": "^1.0.0", - "crypto-browserify": "^3.11.0", - "domain-browser": "^1.1.1", - "events": "^3.0.0", - "https-browserify": "^1.0.0", - "os-browserify": "^0.3.0", - "path-browserify": "0.0.1", - "process": "^0.11.10", - "punycode": "^1.2.4", - "querystring-es3": "^0.2.0", - "readable-stream": "^2.3.3", - "stream-browserify": "^2.0.1", - "stream-http": "^2.7.2", - "string_decoder": "^1.0.0", - "timers-browserify": "^2.0.4", - "tty-browserify": "0.0.0", - "url": "^0.11.0", - "util": "^0.11.0", - "vm-browserify": "^1.0.1" - } - }, - "node_modules/node-libs-browser/node_modules/assert": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", - "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1", - "util": "0.10.3" - } - }, - "node_modules/node-libs-browser/node_modules/assert/node_modules/inherits": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", - "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", - "dev": true - }, - "node_modules/node-libs-browser/node_modules/assert/node_modules/util": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", - "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", - "dev": true, - "dependencies": { - "inherits": "2.0.1" - } - }, - "node_modules/node-libs-browser/node_modules/domain-browser": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", - "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", - "dev": true, - "engines": { - "node": ">=0.4", - "npm": ">=1.2" - } - }, - "node_modules/node-libs-browser/node_modules/events": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/events/-/events-3.3.0.tgz", - "integrity": "sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==", - "dev": true, - "engines": { - "node": ">=0.8.x" - } - }, - "node_modules/node-libs-browser/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", - "dev": true - }, - "node_modules/node-libs-browser/node_modules/path-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", - "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", - "dev": true - }, - "node_modules/node-libs-browser/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "node_modules/node-libs-browser/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/node-libs-browser/node_modules/stream-browserify": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", - "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", - "dev": true, - "dependencies": { - "inherits": "~2.0.1", - "readable-stream": "^2.0.2" - } - }, - "node_modules/node-libs-browser/node_modules/stream-http": { - "version": "2.8.3", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-2.8.3.tgz", - "integrity": "sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.1", - "readable-stream": "^2.3.6", - "to-arraybuffer": "^1.0.0", - "xtend": "^4.0.0" - } - }, - "node_modules/node-libs-browser/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/node-libs-browser/node_modules/tty-browserify": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.0.tgz", - "integrity": "sha1-oVe6QC2iTpv5V/mqadUk7tQpAaY=", - "dev": true - }, - "node_modules/node-libs-browser/node_modules/url": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", - "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/node-libs-browser/node_modules/util": { - "version": "0.11.1", - "resolved": "https://registry.npmjs.org/util/-/util-0.11.1.tgz", - "integrity": "sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==", - "dev": true, - "dependencies": { - "inherits": "2.0.3" - } - }, - "node_modules/node-releases": { - "version": "1.1.77", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.77.tgz", - "integrity": "sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==", - "dev": true - }, - "node_modules/nodemailer": { - "version": "6.7.3", - "resolved": "https://registry.npmjs.org/nodemailer/-/nodemailer-6.7.3.tgz", - "integrity": "sha512-KUdDsspqx89sD4UUyUKzdlUOper3hRkDVkrKh/89G+d9WKsU5ox51NWS4tB1XR5dPUdR4SP0E3molyEfOvSa3g==", - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/npm-run-path": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-4.0.1.tgz", - "integrity": "sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==", - "dev": true, - "dependencies": { - "path-key": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/number-is-nan": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", - "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-inspect": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.0.tgz", - "integrity": "sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g==", - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-is": { - "version": "1.1.5", - "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", - "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", - "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", - "dev": true, - "dependencies": { - "define-properties": "^1.1.2", - "function-bind": "^1.1.1", - "has-symbols": "^1.0.0", - "object-keys": "^1.0.11" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.getownpropertydescriptors": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/object.getownpropertydescriptors/-/object.getownpropertydescriptors-2.1.3.tgz", - "integrity": "sha512-VdDoCwvJI4QdC6ndjpqFmoL3/+HxffFBbcJzKi5hwLLqqx3mdbedRpfZDdK0SrOSauj8X4GzBvnDZl4vTN7dOw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3", - "es-abstract": "^1.19.1" - }, - "engines": { - "node": ">= 0.8" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/onetime": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", - "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", - "dev": true, - "dependencies": { - "mimic-fn": "^2.1.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/only": { - "version": "0.0.2", - "resolved": "https://registry.npmjs.org/only/-/only-0.0.2.tgz", - "integrity": "sha1-Kv3oTQPlC5qO3EROMGEKcCle37Q=", - "dev": true - }, - "node_modules/openapi3-ts": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/openapi3-ts/-/openapi3-ts-2.0.2.tgz", - "integrity": "sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==", - "dev": true, - "dependencies": { - "yaml": "^1.10.2" - } - }, - "node_modules/os-browserify": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", - "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", - "dev": true - }, - "node_modules/os-locale": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-5.0.0.tgz", - "integrity": "sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA==", - "dev": true, - "dependencies": { - "execa": "^4.0.0", - "lcid": "^3.0.0", - "mem": "^5.0.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-defer": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", - "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-event": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/p-event/-/p-event-4.2.0.tgz", - "integrity": "sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==", - "dev": true, - "dependencies": { - "p-timeout": "^3.1.0" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-finally": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", - "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/p-is-promise": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", - "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "dependencies": { - "yocto-queue": "^0.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-locate": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", - "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", - "dev": true, - "dependencies": { - "p-limit": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/p-locate/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/p-timeout": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/p-timeout/-/p-timeout-3.2.0.tgz", - "integrity": "sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==", - "dev": true, - "dependencies": { - "p-finally": "^1.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/p-try": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", - "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/pako": { - "version": "1.0.11", - "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", - "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", - "dev": true - }, - "node_modules/param-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/param-case/-/param-case-3.0.4.tgz", - "integrity": "sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/parse-asn1": { - "version": "5.1.6", - "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", - "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", - "dev": true, - "dependencies": { - "asn1.js": "^5.2.0", - "browserify-aes": "^1.0.0", - "evp_bytestokey": "^1.0.0", - "pbkdf2": "^3.0.3", - "safe-buffer": "^5.1.1" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/pascal-case": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pascal-case/-/pascal-case-3.1.2.tgz", - "integrity": "sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-browserify": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-1.0.1.tgz", - "integrity": "sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==", - "dev": true - }, - "node_modules/path-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/path-case/-/path-case-3.0.4.tgz", - "integrity": "sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/path-exists": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", - "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-key": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", - "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/path-to-regexp": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.0.tgz", - "integrity": "sha512-f66KywYG6+43afgE/8j/GoiNyygk/bnoCbps++3ErRKsIYkGGupyv07R2Ok5m9i67Iqc+T2g1eAUGUPzWhYTyg==", - "dev": true - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/pbkdf2": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", - "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", - "dev": true, - "dependencies": { - "create-hash": "^1.1.2", - "create-hmac": "^1.1.4", - "ripemd160": "^2.0.1", - "safe-buffer": "^5.0.1", - "sha.js": "^2.4.8" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/picocolors": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", - "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", - "dev": true, - "peer": true - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pino": { - "version": "6.14.0", - "resolved": "https://registry.npmjs.org/pino/-/pino-6.14.0.tgz", - "integrity": "sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg==", - "dev": true, - "dependencies": { - "fast-redact": "^3.0.0", - "fast-safe-stringify": "^2.0.8", - "flatstr": "^1.0.12", - "pino-std-serializers": "^3.1.0", - "process-warning": "^1.0.0", - "quick-format-unescaped": "^4.0.3", - "sonic-boom": "^1.0.2" - }, - "bin": { - "pino": "bin.js" - } - }, - "node_modules/pino-std-serializers": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/pino-std-serializers/-/pino-std-serializers-3.2.0.tgz", - "integrity": "sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==", - "dev": true - }, - "node_modules/pkg-dir": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-4.2.0.tgz", - "integrity": "sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==", - "dev": true, - "dependencies": { - "find-up": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pkg-dir/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pkg-dir/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/platform": { - "version": "1.3.6", - "resolved": "https://registry.npmjs.org/platform/-/platform-1.3.6.tgz", - "integrity": "sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==", - "dev": true - }, - "node_modules/pnp-webpack-plugin": { - "version": "1.6.4", - "resolved": "https://registry.npmjs.org/pnp-webpack-plugin/-/pnp-webpack-plugin-1.6.4.tgz", - "integrity": "sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==", - "dev": true, - "dependencies": { - "ts-pnp": "^1.1.6" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/postcss": { - "version": "8.2.15", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.2.15.tgz", - "integrity": "sha512-2zO3b26eJD/8rb106Qu2o7Qgg52ND5HPjcyQiK2B98O388h43A448LCslC0dI2P97wCAQRJsFvwTRcXxTKds+Q==", - "dev": true, - "dependencies": { - "colorette": "^1.2.2", - "nanoid": "^3.1.23", - "source-map": "^0.6.1" - }, - "engines": { - "node": "^10 || ^12 || >=14" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - } - }, - "node_modules/postcss/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/prettier": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.0.5.tgz", - "integrity": "sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==", - "dev": true, - "bin": { - "prettier": "bin-prettier.js" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/pretty-quick": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/pretty-quick/-/pretty-quick-3.1.3.tgz", - "integrity": "sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA==", - "dev": true, - "dependencies": { - "chalk": "^3.0.0", - "execa": "^4.0.0", - "find-up": "^4.1.0", - "ignore": "^5.1.4", - "mri": "^1.1.5", - "multimatch": "^4.0.0" - }, - "bin": { - "pretty-quick": "bin/pretty-quick.js" - }, - "engines": { - "node": ">=10.13" - }, - "peerDependencies": { - "prettier": ">=2.0.0" - } - }, - "node_modules/pretty-quick/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/pretty-quick/node_modules/chalk": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", - "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/pretty-quick/node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/pretty-quick/node_modules/find-up": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", - "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", - "dev": true, - "dependencies": { - "locate-path": "^5.0.0", - "path-exists": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/locate-path": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", - "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", - "dev": true, - "dependencies": { - "p-locate": "^4.1.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/p-limit": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", - "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", - "dev": true, - "dependencies": { - "p-try": "^2.0.0" - }, - "engines": { - "node": ">=6" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/pretty-quick/node_modules/p-locate": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", - "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", - "dev": true, - "dependencies": { - "p-limit": "^2.2.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/pretty-quick/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/process": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", - "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", - "dev": true, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/process-warning": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-1.0.0.tgz", - "integrity": "sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==", - "dev": true - }, - "node_modules/propagate": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/propagate/-/propagate-2.0.1.tgz", - "integrity": "sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/proxy-addr": { - "version": "2.0.7", - "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", - "integrity": "sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==", - "dev": true, - "dependencies": { - "forwarded": "0.2.0", - "ipaddr.js": "1.9.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/pseudomap": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/pseudomap/-/pseudomap-1.0.2.tgz", - "integrity": "sha1-8FKijacOYYkX7wqKw0wa5aaChrM=" - }, - "node_modules/psl": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.8.0.tgz", - "integrity": "sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==" - }, - "node_modules/public-encrypt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", - "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", - "dev": true, - "dependencies": { - "bn.js": "^4.1.0", - "browserify-rsa": "^4.0.0", - "create-hash": "^1.1.0", - "parse-asn1": "^5.0.0", - "randombytes": "^2.0.1", - "safe-buffer": "^5.1.2" - } - }, - "node_modules/public-encrypt/node_modules/bn.js": { - "version": "4.12.0", - "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.12.0.tgz", - "integrity": "sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==", - "dev": true - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/querystring": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", - "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", - "deprecated": "The querystring API is considered Legacy. new code should use the URLSearchParams API instead.", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystring-es3": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", - "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", - "dev": true, - "engines": { - "node": ">=0.4.x" - } - }, - "node_modules/querystringify": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" - }, - "node_modules/queue": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz", - "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.3" - } - }, - "node_modules/queue-microtask": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", - "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/quick-format-unescaped": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz", - "integrity": "sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==", - "dev": true - }, - "node_modules/randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.1.0" - } - }, - "node_modules/randomfill": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", - "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", - "dev": true, - "dependencies": { - "randombytes": "^2.0.5", - "safe-buffer": "^5.1.0" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/raw-body": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.1.tgz", - "integrity": "sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==", - "dependencies": { - "bytes": "3.1.2", - "http-errors": "2.0.0", - "iconv-lite": "0.4.24", - "unpipe": "1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/bytes": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.1.2.tgz", - "integrity": "sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/raw-body/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==" - }, - "node_modules/raw-body/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/react": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react/-/react-17.0.2.tgz", - "integrity": "sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==", - "dev": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/react-dom": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-17.0.2.tgz", - "integrity": "sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==", - "dev": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1", - "scheduler": "^0.20.2" - }, - "peerDependencies": { - "react": "17.0.2" - } - }, - "node_modules/react-is": { - "version": "17.0.2", - "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", - "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==", - "dev": true - }, - "node_modules/react-refresh": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.8.3.tgz", - "integrity": "sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/readdirp": { - "version": "3.5.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.5.0.tgz", - "integrity": "sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==", - "dev": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/reflect-metadata": { - "version": "0.1.13", - "resolved": "https://registry.npmjs.org/reflect-metadata/-/reflect-metadata-0.1.13.tgz", - "integrity": "sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==", - "dev": true - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "node_modules/require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-from-string": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", - "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/require-main-filename": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", - "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", - "dev": true - }, - "node_modules/requires-port": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=" - }, - "node_modules/ret": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/ret/-/ret-0.2.2.tgz", - "integrity": "sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/reusify": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", - "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", - "dev": true, - "engines": { - "iojs": ">=1.0.0", - "node": ">=0.10.0" - } - }, - "node_modules/rfdc": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.3.0.tgz", - "integrity": "sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==", - "dev": true - }, - "node_modules/ripemd160": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", - "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", - "dev": true, - "dependencies": { - "hash-base": "^3.0.0", - "inherits": "^2.0.1" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==" - }, - "node_modules/safe-regex2": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/safe-regex2/-/safe-regex2-2.0.0.tgz", - "integrity": "sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==", - "dev": true, - "dependencies": { - "ret": "~0.2.0" - } - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" - }, - "node_modules/sax": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.1.tgz", - "integrity": "sha1-e45lYZCyKOgaZq6nSEgNgozS03o=", - "dev": true - }, - "node_modules/scheduler": { - "version": "0.20.2", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.20.2.tgz", - "integrity": "sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==", - "dev": true, - "peer": true, - "dependencies": { - "loose-envify": "^1.1.0", - "object-assign": "^4.1.1" - } - }, - "node_modules/scmp": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/scmp/-/scmp-2.1.0.tgz", - "integrity": "sha512-o/mRQGk9Rcer/jEEw/yw4mwo3EU/NvYvp577/Btqrym9Qy5/MdWGBqipbALgd2lrdWTJ5/gqDusxfnQBxOxT2Q==" - }, - "node_modules/secure-json-parse": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.4.0.tgz", - "integrity": "sha512-Q5Z/97nbON5t/L/sH6mY2EacfjVGwrCcSi5D3btRO2GZ8pf1K1UN7Z9H5J57hjVU2Qzxr1xO+FmBhOvEkzCMmg==", - "dev": true - }, - "node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver-store": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/semver-store/-/semver-store-0.3.0.tgz", - "integrity": "sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg==", - "dev": true - }, - "node_modules/semver/node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/semver/node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/send/node_modules/debug/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/send/node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/send/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/send/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/sentence-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/sentence-case/-/sentence-case-3.0.4.tgz", - "integrity": "sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==", - "dev": true, - "dependencies": { - "no-case": "^3.0.4", - "tslib": "^2.0.3", - "upper-case-first": "^2.0.2" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/set-blocking": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", - "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", - "dev": true - }, - "node_modules/set-cookie-parser": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.4.8.tgz", - "integrity": "sha512-edRH8mBKEWNVIVMKejNnuJxleqYE/ZSdcT8/Nem9/mmosx12pctd80s2Oy00KNZzrogMZS5mauK2/ymL1bvlvg==", - "dev": true - }, - "node_modules/setimmediate": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/setimmediate/-/setimmediate-1.0.5.tgz", - "integrity": "sha1-KQy7Iy4waULX1+qbg3Mqt4VvgoU=", - "dev": true - }, - "node_modules/setprototypeof": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.1.tgz", - "integrity": "sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==", - "dev": true - }, - "node_modules/sha.js": { - "version": "2.4.11", - "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", - "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", - "dev": true, - "dependencies": { - "inherits": "^2.0.1", - "safe-buffer": "^5.0.1" - }, - "bin": { - "sha.js": "bin.js" - } - }, - "node_modules/shallow-clone": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", - "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-command": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", - "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", - "dev": true, - "dependencies": { - "shebang-regex": "^3.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/shebang-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", - "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/shell-quote": { - "version": "1.7.2", - "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", - "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", - "dev": true - }, - "node_modules/shiki": { - "version": "0.10.1", - "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.10.1.tgz", - "integrity": "sha512-VsY7QJVzU51j5o1+DguUd+6vmCmZ5v/6gYu4vyYAhzjuNQU6P/vmSy4uQaOhvje031qQMiW0d2BwgMH52vqMng==", - "dev": true, - "dependencies": { - "jsonc-parser": "^3.0.0", - "vscode-oniguruma": "^1.6.1", - "vscode-textmate": "5.2.0" - } - }, - "node_modules/shortid": { - "version": "2.2.16", - "resolved": "https://registry.npmjs.org/shortid/-/shortid-2.2.16.tgz", - "integrity": "sha512-Ugt+GIZqvGXCIItnsL+lvFJOiN7RYqlGy7QE41O3YC1xbNSeDGIRO7xg2JJXIAj1cAGnOeC1r7/T9pgrtQbv4g==", - "dev": true, - "dependencies": { - "nanoid": "^2.1.0" - } - }, - "node_modules/shortid/node_modules/nanoid": { - "version": "2.1.11", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-2.1.11.tgz", - "integrity": "sha512-s/snB+WGm6uwi0WjsZdaVcuf3KJXlfGl2LcxgwkEwJF0D/BWzVWAZW/XY4bFaiR7s0Jk3FPvlnepg1H1b1UwlA==", - "dev": true - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/sinon": { - "version": "14.0.0", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-14.0.0.tgz", - "integrity": "sha512-ugA6BFmE+WrJdh0owRZHToLd32Uw3Lxq6E6LtNRU+xTVBefx632h03Q7apXWRsRdZAJ41LB8aUfn2+O4jsDNMw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^9.1.2", - "@sinonjs/samsam": "^6.1.1", - "diff": "^5.0.0", - "nise": "^5.1.1", - "supports-color": "^7.2.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/sinon" - } - }, - "node_modules/sinon/node_modules/@sinonjs/fake-timers": { - "version": "9.1.2", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.2.tgz", - "integrity": "sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==", - "dev": true, - "dependencies": { - "@sinonjs/commons": "^1.7.0" - } - }, - "node_modules/sinon/node_modules/diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/sinon/node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/sinon/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/snake-case": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/snake-case/-/snake-case-3.0.4.tgz", - "integrity": "sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==", - "dev": true, - "dependencies": { - "dot-case": "^3.0.4", - "tslib": "^2.0.3" - } - }, - "node_modules/sonic-boom": { - "version": "1.4.1", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-1.4.1.tgz", - "integrity": "sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==", - "dev": true, - "dependencies": { - "atomic-sleep": "^1.0.0", - "flatstr": "^1.0.12" - } - }, - "node_modules/source-map": { - "version": "0.8.0-beta.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.8.0-beta.0.tgz", - "integrity": "sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==", - "dev": true, - "dependencies": { - "whatwg-url": "^7.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/source-map/node_modules/tr46": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-1.0.1.tgz", - "integrity": "sha1-qLE/1r/SSJUZZ0zN5VujaTtwbQk=", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/source-map/node_modules/webidl-conversions": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-4.0.2.tgz", - "integrity": "sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==", - "dev": true - }, - "node_modules/source-map/node_modules/whatwg-url": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-7.1.0.tgz", - "integrity": "sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==", - "dev": true, - "dependencies": { - "lodash.sortby": "^4.7.0", - "tr46": "^1.0.1", - "webidl-conversions": "^4.0.2" - } - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", - "dev": true - }, - "node_modules/stable": { - "version": "0.1.8", - "resolved": "https://registry.npmjs.org/stable/-/stable-0.1.8.tgz", - "integrity": "sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==", - "deprecated": "Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility", - "dev": true - }, - "node_modules/stacktrace-parser": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/stacktrace-parser/-/stacktrace-parser-0.1.10.tgz", - "integrity": "sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==", - "dev": true, - "dependencies": { - "type-fest": "^0.7.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha1-Fhx9rBd2Wf2YEfQ3cfqZOBR4Yow=", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/stoppable": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", - "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", - "dev": true, - "engines": { - "node": ">=4", - "npm": ">=6" - } - }, - "node_modules/stream-browserify": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-3.0.0.tgz", - "integrity": "sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==", - "dev": true, - "dependencies": { - "inherits": "~2.0.4", - "readable-stream": "^3.5.0" - } - }, - "node_modules/stream-http": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", - "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", - "dev": true, - "dependencies": { - "builtin-status-codes": "^3.0.0", - "inherits": "^2.0.4", - "readable-stream": "^3.6.0", - "xtend": "^4.0.2" - } - }, - "node_modules/stream-parser": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/stream-parser/-/stream-parser-0.3.1.tgz", - "integrity": "sha1-FhhUhpRCACGhGC/wrxkRwSl2F3M=", - "dev": true, - "dependencies": { - "debug": "2" - } - }, - "node_modules/stream-parser/node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/stream-parser/node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", - "dev": true - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/string_decoder/node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/string-hash": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/string-hash/-/string-hash-1.1.3.tgz", - "integrity": "sha1-6Kr8CsGFW0Zmkp7X3RJ1311sgRs=", - "dev": true - }, - "node_modules/string-similarity": { - "version": "4.0.4", - "resolved": "https://registry.npmjs.org/string-similarity/-/string-similarity-4.0.4.tgz", - "integrity": "sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==", - "dev": true - }, - "node_modules/string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "dependencies": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.1.tgz", - "integrity": "sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", - "dev": true, - "dependencies": { - "ansi-regex": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/string.prototype.trimend": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", - "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/string.prototype.trimstart": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", - "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.1.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "dependencies": { - "ansi-regex": "^5.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/strip-eof": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", - "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-final-newline": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-final-newline/-/strip-final-newline-2.0.0.tgz", - "integrity": "sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha1-PFMZQukIwml8DsNEhYwobHygpgo=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strong-error-handler": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strong-error-handler/-/strong-error-handler-4.0.0.tgz", - "integrity": "sha512-Ki59WSOfSEod6IkDUB4uf9+DwkCLQRbEdYqen167I/zyPps9x9gS+UzhLZOcer58RA6iFmoGg/+CN/x5d+Cv3Q==", - "dev": true, - "dependencies": { - "@types/express": "^4.16.0", - "accepts": "^1.3.3", - "debug": "^4.1.1", - "ejs": "^3.1.3", - "fast-safe-stringify": "^2.0.6", - "http-status": "^1.1.2", - "js2xmlparser": "^4.0.0", - "strong-globalize": "^6.0.1" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/strong-globalize": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/strong-globalize/-/strong-globalize-6.0.5.tgz", - "integrity": "sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==", - "dev": true, - "dependencies": { - "accept-language": "^3.0.18", - "debug": "^4.2.0", - "globalize": "^1.6.0", - "lodash": "^4.17.20", - "md5": "^2.3.0", - "mkdirp": "^1.0.4", - "os-locale": "^5.0.0", - "yamljs": "^0.3.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/strong-globalize/node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/styled-jsx": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/styled-jsx/-/styled-jsx-4.0.1.tgz", - "integrity": "sha512-Gcb49/dRB1k8B4hdK8vhW27Rlb2zujCk1fISrizCcToIs+55B4vmUM0N9Gi4nnVfFZWe55jRdWpAqH1ldAKWvQ==", - "dev": true, - "dependencies": { - "@babel/plugin-syntax-jsx": "7.14.5", - "@babel/types": "7.15.0", - "convert-source-map": "1.7.0", - "loader-utils": "1.2.3", - "source-map": "0.7.3", - "string-hash": "1.1.3", - "stylis": "3.5.4", - "stylis-rule-sheet": "0.0.10" - }, - "engines": { - "node": ">= 12.0.0" - }, - "peerDependencies": { - "react": ">= 16.8.0 || 17.x.x || 18.x.x" - }, - "peerDependenciesMeta": { - "@babel/core": { - "optional": true - } - } - }, - "node_modules/styled-jsx/node_modules/source-map": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.7.3.tgz", - "integrity": "sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==", - "dev": true, - "engines": { - "node": ">= 8" - } - }, - "node_modules/stylis": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/stylis/-/stylis-3.5.4.tgz", - "integrity": "sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==", - "dev": true - }, - "node_modules/stylis-rule-sheet": { - "version": "0.0.10", - "resolved": "https://registry.npmjs.org/stylis-rule-sheet/-/stylis-rule-sheet-0.0.10.tgz", - "integrity": "sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==", - "dev": true, - "peerDependencies": { - "stylis": "^3.5.0" - } - }, - "node_modules/superagent": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/superagent/-/superagent-3.8.3.tgz", - "integrity": "sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==", - "deprecated": "Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at .", - "dev": true, - "dependencies": { - "component-emitter": "^1.2.0", - "cookiejar": "^2.1.0", - "debug": "^3.1.0", - "extend": "^3.0.0", - "form-data": "^2.3.1", - "formidable": "^1.2.0", - "methods": "^1.1.1", - "mime": "^1.4.1", - "qs": "^6.5.1", - "readable-stream": "^2.3.5" - }, - "engines": { - "node": ">= 4.0" - } - }, - "node_modules/superagent/node_modules/debug": { - "version": "3.2.7", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", - "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", - "dev": true, - "dependencies": { - "ms": "^2.1.1" - } - }, - "node_modules/superagent/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/superagent/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/supertest": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/supertest/-/supertest-4.0.2.tgz", - "integrity": "sha512-1BAbvrOZsGA3YTCWqbmh14L0YEq0EGICX/nBnfkfVJn7SrxQV1I3pMYjSzG9y/7ZU2V9dWqyqk2POwxlb09duQ==", - "dev": true, - "dependencies": { - "methods": "^1.1.2", - "superagent": "^3.8.3" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/supertokens-js-override": { - "version": "0.0.4", - "resolved": "https://registry.npmjs.org/supertokens-js-override/-/supertokens-js-override-0.0.4.tgz", - "integrity": "sha512-r0JFBjkMIdep3Lbk3JA+MpnpuOtw4RSyrlRAbrzMcxwiYco3GFWl/daimQZ5b1forOiUODpOlXbSOljP/oyurg==" - }, - "node_modules/supports-color": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-6.0.0.tgz", - "integrity": "sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/timers-browserify": { - "version": "2.0.12", - "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-2.0.12.tgz", - "integrity": "sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==", - "dev": true, - "dependencies": { - "setimmediate": "^1.0.4" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/tiny-lru": { - "version": "7.0.6", - "resolved": "https://registry.npmjs.org/tiny-lru/-/tiny-lru-7.0.6.tgz", - "integrity": "sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/to-arraybuffer": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz", - "integrity": "sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M=", - "dev": true - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "engines": { - "node": ">=0.6" - } - }, - "node_modules/toposort": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/toposort/-/toposort-2.0.2.tgz", - "integrity": "sha1-riF2gXXRVZ1IvvNUILL0li8JwzA=", - "dev": true - }, - "node_modules/tr46": { - "version": "0.0.3", - "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", - "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", - "dev": true - }, - "node_modules/traverse": { - "version": "0.6.6", - "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.6.6.tgz", - "integrity": "sha1-y99WD9e5r2MlAv7UD5GMFX6pcTc=", - "dev": true - }, - "node_modules/ts-pnp": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/ts-pnp/-/ts-pnp-1.2.0.tgz", - "integrity": "sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==", - "dev": true, - "engines": { - "node": ">=6" - }, - "peerDependenciesMeta": { - "typescript": { - "optional": true - } - } - }, - "node_modules/tslib": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz", - "integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==", - "dev": true - }, - "node_modules/tsscmp": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/tsscmp/-/tsscmp-1.0.6.tgz", - "integrity": "sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==", - "dev": true, - "engines": { - "node": ">=0.6.x" - } - }, - "node_modules/tty-browserify": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", - "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", - "dev": true - }, - "node_modules/twilio": { - "version": "4.7.2", - "resolved": "https://registry.npmjs.org/twilio/-/twilio-4.7.2.tgz", - "integrity": "sha512-sTdEwAhkDzoDoXE3i83F/CdZegZ5O1FPDY0hAnJmGr/TjDqGl+Q6WzjC0+9cTmQnjCaDg6H4L97UZeJLFFEh3A==", - "dependencies": { - "axios": "^0.26.1", - "dayjs": "^1.8.29", - "https-proxy-agent": "^5.0.0", - "jsonwebtoken": "^9.0.0", - "qs": "^6.9.4", - "scmp": "^2.1.0", - "url-parse": "^1.5.9", - "xmlbuilder": "^13.0.2" - }, - "engines": { - "node": ">=14.0" - } - }, - "node_modules/twilio/node_modules/axios": { - "version": "0.26.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz", - "integrity": "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==", - "dependencies": { - "follow-redirects": "^1.14.8" - } - }, - "node_modules/twilio/node_modules/xmlbuilder": { - "version": "13.0.2", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-13.0.2.tgz", - "integrity": "sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==", - "engines": { - "node": ">=6.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/type-fest": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.7.1.tgz", - "integrity": "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/type-is": { - "version": "1.6.18", - "resolved": "https://registry.npmjs.org/type-is/-/type-is-1.6.18.tgz", - "integrity": "sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==", - "dependencies": { - "media-typer": "0.3.0", - "mime-types": "~2.1.24" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/typedoc": { - "version": "0.22.12", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.22.12.tgz", - "integrity": "sha512-FcyC+YuaOpr3rB9QwA1IHOi9KnU2m50sPJW5vcNRPCIdecp+3bFkh7Rq5hBU1Fyn29UR2h4h/H7twZHWDhL0sw==", - "dev": true, - "dependencies": { - "glob": "^7.2.0", - "lunr": "^2.3.9", - "marked": "^4.0.10", - "minimatch": "^3.0.4", - "shiki": "^0.10.0" - }, - "bin": { - "typedoc": "bin/typedoc" - }, - "engines": { - "node": ">= 12.10.0" - }, - "peerDependencies": { - "typescript": "4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x || 4.5.x" - } - }, - "node_modules/typedoc/node_modules/glob": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz", - "integrity": "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/typescript": { - "version": "4.2.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", - "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", - "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" - }, - "engines": { - "node": ">=4.2.0" - } - }, - "node_modules/unbox-primitive": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", - "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has-bigints": "^1.0.1", - "has-symbols": "^1.0.2", - "which-boxed-primitive": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha1-sr9O6FFKrmFltIF4KdIbLvSZBOw=", - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/upper-case": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-2.0.2.tgz", - "integrity": "sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/upper-case-first": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/upper-case-first/-/upper-case-first-2.0.2.tgz", - "integrity": "sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==", - "dev": true, - "dependencies": { - "tslib": "^2.0.3" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/url": { - "version": "0.10.3", - "resolved": "https://registry.npmjs.org/url/-/url-0.10.3.tgz", - "integrity": "sha1-Ah5NnHcF8hu/N9A861h2dAJ3TGQ=", - "dev": true, - "dependencies": { - "punycode": "1.3.2", - "querystring": "0.2.0" - } - }, - "node_modules/url-parse": { - "version": "1.5.10", - "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", - "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dependencies": { - "querystringify": "^2.1.1", - "requires-port": "^1.0.0" - } - }, - "node_modules/url/node_modules/punycode": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", - "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", - "dev": true - }, - "node_modules/use-subscription": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/use-subscription/-/use-subscription-1.5.1.tgz", - "integrity": "sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==", - "dev": true, - "dependencies": { - "object-assign": "^4.1.1" - }, - "peerDependencies": { - "react": "^16.8.0 || ^17.0.0" - } - }, - "node_modules/util": { - "version": "0.12.4", - "resolved": "https://registry.npmjs.org/util/-/util-0.12.4.tgz", - "integrity": "sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "is-arguments": "^1.0.4", - "is-generator-function": "^1.0.7", - "is-typed-array": "^1.1.3", - "safe-buffer": "^5.1.2", - "which-typed-array": "^1.1.2" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha1-n5VxD1CiZ5R7LMwSR0HBAoQn5xM=", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "8.3.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-8.3.2.tgz", - "integrity": "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==", - "dev": true, - "bin": { - "uuid": "dist/bin/uuid" - } - }, - "node_modules/uuid-parse": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/uuid-parse/-/uuid-parse-1.1.0.tgz", - "integrity": "sha512-OdmXxA8rDsQ7YpNVbKSJkNzTw2I+S5WsbMDnCtIWSQaosNAcWtFuI/YK1TjzUI6nbkgiqEyh8gWngfcv8Asd9A==", - "dev": true - }, - "node_modules/validator": { - "version": "13.7.0", - "resolved": "https://registry.npmjs.org/validator/-/validator-13.7.0.tgz", - "integrity": "sha512-nYXQLCBkpJ8X6ltALua9dRrZDHVYxjJ1wgskNt1lH9fzGjs3tgojGSCBjmEPwkWS1y29+DrizMTW19Pr9uB2nw==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/vandium-utils": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/vandium-utils/-/vandium-utils-2.0.0.tgz", - "integrity": "sha512-XWbQ/0H03TpYDXk8sLScBEZpE7TbA0CHDL6/Xjt37IBYKLsHUQuBlL44ttAUs9zoBOLFxsW7HehXcuWCNyqOxQ==", - "dev": true, - "engines": { - "node": ">=10.16" - } - }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha1-IpnwLG3tMNSllhsLn3RSShj2NPw=", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/verify-apple-id-token": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/verify-apple-id-token/-/verify-apple-id-token-3.0.1.tgz", - "integrity": "sha512-q91pG1e52TpEzXldMirWYNWcSQC4WuzgG0y/ZnBhzjfk0pSxi4YlGh5OTVRlodBenayGHfSDn5VseG9QDuqOew==", - "dependencies": { - "jsonwebtoken": "^9.0.0", - "jwks-rsa": "^3.0.0" - } - }, - "node_modules/verify-apple-id-token/node_modules/@types/express": { - "version": "4.17.17", - "resolved": "https://registry.npmjs.org/@types/express/-/express-4.17.17.tgz", - "integrity": "sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==", - "dependencies": { - "@types/body-parser": "*", - "@types/express-serve-static-core": "^4.17.33", - "@types/qs": "*", - "@types/serve-static": "*" - } - }, - "node_modules/verify-apple-id-token/node_modules/jwks-rsa": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/jwks-rsa/-/jwks-rsa-3.0.1.tgz", - "integrity": "sha512-UUOZ0CVReK1QVU3rbi9bC7N5/le8ziUj0A2ef1Q0M7OPD2KvjEYizptqIxGIo6fSLYDkqBrazILS18tYuRc8gw==", - "dependencies": { - "@types/express": "^4.17.14", - "@types/jsonwebtoken": "^9.0.0", - "debug": "^4.3.4", - "jose": "^4.10.4", - "limiter": "^1.1.5", - "lru-memoizer": "^2.1.4" - }, - "engines": { - "node": ">=14" - } - }, - "node_modules/vm-browserify": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", - "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", - "dev": true - }, - "node_modules/vscode-oniguruma": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.6.1.tgz", - "integrity": "sha512-vc4WhSIaVpgJ0jJIejjYxPvURJavX6QG41vu0mGhqywMkQqulezEqEQ3cO3gc8GvcOpX6ycmKGqRoROEMBNXTQ==", - "dev": true - }, - "node_modules/vscode-textmate": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-5.2.0.tgz", - "integrity": "sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==", - "dev": true - }, - "node_modules/watchpack": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/watchpack/-/watchpack-2.1.1.tgz", - "integrity": "sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==", - "dev": true, - "dependencies": { - "glob-to-regexp": "^0.4.1", - "graceful-fs": "^4.1.2" - }, - "engines": { - "node": ">=10.13.0" - } - }, - "node_modules/webidl-conversions": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", - "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", - "dev": true - }, - "node_modules/whatwg-url": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", - "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", - "dev": true, - "dependencies": { - "tr46": "~0.0.3", - "webidl-conversions": "^3.0.0" - } - }, - "node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, - "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/which-module": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", - "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", - "dev": true - }, - "node_modules/which-typed-array": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.7.tgz", - "integrity": "sha512-vjxaB4nfDqwKI0ws7wZpxIlde1XrLX5uB0ZjpfshgmapJMD7jJWhZI+yToJTqaFByF0eNBcYxbjmCzoRP7CfEw==", - "dev": true, - "dependencies": { - "available-typed-arrays": "^1.0.5", - "call-bind": "^1.0.2", - "es-abstract": "^1.18.5", - "foreach": "^2.0.5", - "has-tostringtag": "^1.0.0", - "is-typed-array": "^1.1.7" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", - "dev": true, - "dependencies": { - "string-width": "^1.0.2 || 2" - } - }, - "node_modules/wrap-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", - "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", - "dev": true, - "dependencies": { - "string-width": "^1.0.1", - "strip-ansi": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/is-fullwidth-code-point": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", - "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", - "dev": true, - "dependencies": { - "number-is-nan": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/string-width": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", - "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", - "dev": true, - "dependencies": { - "code-point-at": "^1.0.0", - "is-fullwidth-code-point": "^1.0.0", - "strip-ansi": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrap-ansi/node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true - }, - "node_modules/xml2js": { - "version": "0.4.19", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.19.tgz", - "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~9.0.1" - } - }, - "node_modules/xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/xmlcreate": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/xmlcreate/-/xmlcreate-2.0.4.tgz", - "integrity": "sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==", - "dev": true - }, - "node_modules/xtend": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", - "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", - "dev": true, - "engines": { - "node": ">=0.4" - } - }, - "node_modules/y18n": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", - "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==", - "dev": true - }, - "node_modules/yallist": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-2.1.2.tgz", - "integrity": "sha1-HBH5IY8HYImkfdUS+TxmmaaoHVI=" - }, - "node_modules/yaml": { - "version": "1.10.2", - "resolved": "https://registry.npmjs.org/yaml/-/yaml-1.10.2.tgz", - "integrity": "sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/yamljs": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/yamljs/-/yamljs-0.3.0.tgz", - "integrity": "sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "glob": "^7.0.5" - }, - "bin": { - "json2yaml": "bin/json2yaml", - "yaml2json": "bin/yaml2json" - } - }, - "node_modules/yamljs/node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/yargs": { - "version": "13.2.2", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.2.2.tgz", - "integrity": "sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==", - "dev": true, - "dependencies": { - "cliui": "^4.0.0", - "find-up": "^3.0.0", - "get-caller-file": "^2.0.1", - "os-locale": "^3.1.0", - "require-directory": "^2.1.1", - "require-main-filename": "^2.0.0", - "set-blocking": "^2.0.0", - "string-width": "^3.0.0", - "which-module": "^2.0.0", - "y18n": "^4.0.0", - "yargs-parser": "^13.0.0" - } - }, - "node_modules/yargs-parser": { - "version": "13.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.0.0.tgz", - "integrity": "sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs-unparser": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.5.0.tgz", - "integrity": "sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==", - "dev": true, - "dependencies": { - "flat": "^4.1.0", - "lodash": "^4.17.11", - "yargs": "^12.0.5" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/yargs-unparser/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/get-caller-file": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", - "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", - "dev": true - }, - "node_modules/yargs-unparser/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs-unparser/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs-unparser/node_modules/lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "dependencies": { - "invert-kv": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "dependencies": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs-unparser/node_modules/os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "dependencies": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs-unparser/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs-unparser/node_modules/require-main-filename": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", - "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", - "dev": true - }, - "node_modules/yargs-unparser/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/yargs-unparser/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs-unparser/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs-unparser/node_modules/yargs": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-12.0.5.tgz", - "integrity": "sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==", - "dev": true, - "dependencies": { - "cliui": "^4.0.0", - "decamelize": "^1.2.0", - "find-up": "^3.0.0", - "get-caller-file": "^1.0.1", - "os-locale": "^3.0.0", - "require-directory": "^2.1.1", - "require-main-filename": "^1.0.1", - "set-blocking": "^2.0.0", - "string-width": "^2.0.0", - "which-module": "^2.0.0", - "y18n": "^3.2.1 || ^4.0.0", - "yargs-parser": "^11.1.1" - } - }, - "node_modules/yargs-unparser/node_modules/yargs-parser": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-11.1.1.tgz", - "integrity": "sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==", - "dev": true, - "dependencies": { - "camelcase": "^5.0.0", - "decamelize": "^1.2.0" - } - }, - "node_modules/yargs/node_modules/ansi-regex": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.1.tgz", - "integrity": "sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/cross-spawn": { - "version": "6.0.5", - "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", - "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", - "dev": true, - "dependencies": { - "nice-try": "^1.0.4", - "path-key": "^2.0.1", - "semver": "^5.5.0", - "shebang-command": "^1.2.0", - "which": "^1.2.9" - }, - "engines": { - "node": ">=4.8" - } - }, - "node_modules/yargs/node_modules/execa": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", - "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", - "dev": true, - "dependencies": { - "cross-spawn": "^6.0.0", - "get-stream": "^4.0.0", - "is-stream": "^1.1.0", - "npm-run-path": "^2.0.0", - "p-finally": "^1.0.0", - "signal-exit": "^3.0.0", - "strip-eof": "^1.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/get-stream": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", - "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", - "dev": true, - "dependencies": { - "pump": "^3.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/invert-kv": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", - "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs/node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs/node_modules/lcid": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", - "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", - "dev": true, - "dependencies": { - "invert-kv": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/mem": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", - "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", - "dev": true, - "dependencies": { - "map-age-cleaner": "^0.1.1", - "mimic-fn": "^2.0.0", - "p-is-promise": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/npm-run-path": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", - "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", - "dev": true, - "dependencies": { - "path-key": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs/node_modules/os-locale": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", - "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", - "dev": true, - "dependencies": { - "execa": "^1.0.0", - "lcid": "^2.0.0", - "mem": "^4.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/path-key": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", - "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/yargs/node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/yargs/node_modules/shebang-command": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", - "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", - "dev": true, - "dependencies": { - "shebang-regex": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs/node_modules/shebang-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", - "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/yargs/node_modules/string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", - "dev": true, - "dependencies": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/yargs/node_modules/strip-ansi": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", - "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", - "dev": true, - "dependencies": { - "ansi-regex": "^4.1.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/ylru": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ylru/-/ylru-1.2.1.tgz", - "integrity": "sha512-faQrqNMzcPCHGVC2aaOINk13K+aaBDUPjGWl0teOXywElLjyVAB6Oe2jj62jHYtwsU49jXhScYbvPENK+6zAvQ==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, - "node_modules/yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - } - } -} diff --git a/package.json b/package.json index 64733493f..9d5384dbc 100644 --- a/package.json +++ b/package.json @@ -2,14 +2,205 @@ "name": "supertokens-node", "version": "14.0.2", "description": "NodeJS driver for SuperTokens core", - "main": "index.js", + "exports": { + ".": { + "import": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "require": "./dist/index.js" + }, + "./nextjs": { + "import": "./dist/nextjs.mjs", + "types": "./dist/nextjs.d.ts", + "require": "./dist/nextjs.js" + }, + "./framework/awsLambda": { + "import": "./dist/framework/awsLambda/index.mjs", + "types": "./dist/framework/awsLambda/index.d.ts", + "require": "./dist/framework/awsLambda/index.js" + }, + "./framework/express": { + "import": "./dist/framework/express/index.mjs", + "types": "./dist/framework/express/index.d.ts", + "require": "./dist/framework/express/index.js" + }, + "./framework/fastify": { + "import": "./dist/framework/fastify/index.mjs", + "types": "./dist/framework/fastify/index.d.ts", + "require": "./dist/framework/fastify/index.js" + }, + "./framework/hapi": { + "import": "./dist/framework/hapi/index.mjs", + "types": "./dist/framework/hapi/index.d.ts", + "require": "./dist/framework/hapi/index.js" + }, + "./framework/koa": { + "import": "./dist/framework/koa/index.mjs", + "types": "./dist/framework/koa/index.d.ts", + "require": "./dist/framework/koa/index.js" + }, + "./framework/loopback": { + "import": "./dist/framework/loopback/index.mjs", + "types": "./dist/framework/loopback/index.d.ts", + "require": "./dist/framework/loopback/index.js" + }, + "./recipe/dashboard": { + "import": "./dist/recipe/dashboard/index.mjs", + "types": "./dist/recipe/dashboard/index.d.ts", + "require": "./dist/recipe/dashboard/index.js" + }, + "./recipe/emailpassword": { + "import": "./dist/recipe/emailpassword/index.mjs", + "types": "./dist/recipe/emailpassword/index.d.ts", + "require": "./dist/recipe/emailpassword/index.js" + }, + "./recipe/emailpassword/emaildelivery": { + "import": "./dist/recipe/emailpassword/emaildelivery/services/index.mjs", + "types": "./dist/recipe/emailpassword/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/emailpassword/emaildelivery/services/index.js" + }, + "./recipe/emailverification": { + "import": "./dist/recipe/emailverification/index.mjs", + "types": "./dist/recipe/emailverification/index.d.ts", + "require": "./dist/recipe/emailverification/index.js" + }, + "./recipe/emailverification/emaildelivery": { + "import": "./dist/recipe/emailverification/emaildelivery/services/index.mjs", + "types": "./dist/recipe/emailverification/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/emailverification/emaildelivery/services/index.js" + }, + "./recipe/jwt": { + "import": "./dist/recipe/jwt/index.mjs", + "types": "./dist/recipe/jwt/index.d.ts", + "require": "./dist/recipe/jwt/index.js" + }, + "./recipe/passwordless": { + "import": "./dist/recipe/passwordless/index.mjs", + "types": "./dist/recipe/passwordless/index.d.ts", + "require": "./dist/recipe/passwordless/index.js" + }, + "./recipe/passwordless/emaildelivery": { + "import": "./dist/recipe/passwordless/emaildelivery/services/index.mjs", + "types": "./dist/recipe/passwordless/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/passwordless/emaildelivery/services/index.js" + }, + "./recipe/passwordless/smsdelivery": { + "import": "./dist/recipe/passwordless/smsdelivery/services/index.mjs", + "types": "./dist/recipe/passwordless/smsdelivery/services/index.d.ts", + "require": "./dist/recipe/passwordless/smsdelivery/services/index.js" + }, + "./recipe/session": { + "import": "./dist/recipe/session/index.mjs", + "types": "./dist/recipe/session/index.d.ts", + "require": "./dist/recipe/session/index.js" + }, + "./recipe/session/framework/awsLambda": { + "import": "./dist/recipe/session/framework/awsLambda.mjs", + "types": "./dist/recipe/session/framework/awsLambda.d.ts", + "require": "./dist/recipe/session/framework/awsLambda.js" + }, + "./recipe/session/framework/express": { + "import": "./dist/recipe/session/framework/express.mjs", + "types": "./dist/recipe/session/framework/express.d.ts", + "require": "./dist/recipe/session/framework/express.js" + }, + "./recipe/session/framework/fastify": { + "import": "./dist/recipe/session/framework/fastify.mjs", + "types": "./dist/recipe/session/framework/fastify.d.ts", + "require": "./dist/recipe/session/framework/fastify.js" + }, + "./recipe/session/framework/hapi": { + "import": "./dist/recipe/session/framework/hapi.mjs", + "types": "./dist/recipe/session/framework/hapi.d.ts", + "require": "./dist/recipe/session/framework/hapi.js" + }, + "./recipe/session/framework/koa": { + "import": "./dist/recipe/session/framework/koa.mjs", + "types": "./dist/recipe/session/framework/koa.d.ts", + "require": "./dist/recipe/session/framework/koa.js" + }, + "./recipe/session/framework/loopback": { + "import": "./dist/recipe/session/framework/loopback.mjs", + "types": "./dist/recipe/session/framework/loopback.d.ts", + "require": "./dist/recipe/session/framework/loopback.js" + }, + "./recipe/thirdparty": { + "import": "./dist/recipe/thirdparty/index.mjs", + "types": "./dist/recipe/thirdparty/index.d.ts", + "require": "./dist/recipe/thirdparty/index.js" + }, + "./recipe/thirdparty/emaildelivery": { + "import": "./dist/recipe/thirdparty/emaildelivery/services/index.mjs", + "types": "./dist/recipe/thirdparty/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/thirdparty/emaildelivery/services/index.js" + }, + "./recipe/thirdpartyemailpassword": { + "import": "./dist/recipe/thirdpartyemailpassword/index.mjs", + "types": "./dist/recipe/thirdpartyemailpassword/index.d.ts", + "require": "./dist/recipe/thirdpartyemailpassword/index.js" + }, + "./recipe/thirdpartyemailpassword/emaildelivery": { + "import": "./dist/recipe/thirdpartyemailpassword/emaildelivery/services/index.mjs", + "types": "./dist/recipe/thirdpartyemailpassword/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/thirdpartyemailpassword/emaildelivery/services/index.js" + }, + "./recipe/thirdpartypasswordless": { + "import": "./dist/recipe/thirdpartypasswordless/index.mjs", + "types": "./dist/recipe/thirdpartypasswordless/index.d.ts", + "require": "./dist/recipe/thirdpartypasswordless/index.js" + }, + "./recipe/thirdpartypasswordless/emaildelivery": { + "import": "./dist/recipe/thirdpartypasswordless/emaildelivery/services/index.mjs", + "types": "./dist/recipe/thirdpartypasswordless/emaildelivery/services/index.d.ts", + "require": "./dist/recipe/thirdpartypasswordless/emaildelivery/services/index.js" + }, + "./recipe/thirdpartysmspasswordless/smsdelivery": { + "import": "./dist/recipe/thirdpartysmspasswordless/smsdelivery/services/index.mjs", + "types": "./dist/recipe/thirdpartysmspasswordless/smsdelivery/services/index.d.ts", + "require": "./dist/recipe/thirdpartysmspasswordless/smsdelivery/services/index.js" + }, + "./recipe/usermetadata": { + "import": "./dist/recipe/usermetadata/index.mjs", + "types": "./dist/recipe/usermetadata/index.d.ts", + "require": "./dist/recipe/usermetadata/index.js" + }, + "./recipe/userroles": { + "import": "./dist/recipe/userroles/index.mjs", + "types": "./dist/recipe/userroles/index.d.ts", + "require": "./dist/recipe/userroles/index.js" + }, + "./types": { + "import": "./dist/types.mjs", + "types": "./dist/types.d.ts", + "require": "./dist/types.js" + }, + "./*": "./*" + }, + "module": "./dist/index.js", + "main": "./dist/index.mjs", + "types": "./dist/index.d.ts", + "typesVersions": { + "*": { + "*": [ + "*", + "dist/*", + "dist/*", + "dist/*.d.ts", + "dist/*/index.d.ts" + ] + } + }, + "files": [ + "dist", + "LICENSE", + "README.md" + ], "scripts": { "test": "TEST_MODE=testing npx mocha --timeout 500000", - "build-check": "cd lib && npx tsc -p tsconfig.json --noEmit && cd ../test/with-typescript && npx tsc -p tsconfig.json --noEmit", - "build": "cd lib && rm -rf build && npx tsc -p tsconfig.json && cd ../test/with-typescript && npx tsc -p tsconfig.json --noEmit && cd ../.. && npm run post-build", + "build-check": "npx tsc -p tsconfig.json --noEmit && cd ../test/with-typescript && npx tsc -p tsconfig.json --noEmit", + "build": "tsup", "pretty": "npx pretty-quick .", "post-build": "node add-ts-no-check.js", - "build-pretty": "npm run build && npm run pretty && npm run pretty", + "build-pretty": "pnpm run build && pnpm run pretty && pnpm run pretty", "pretty-check": "npx pretty-quick --check .", "set-up-hooks": "cp hooks/pre-commit.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit", "build-docs": "rm -rf ./docs && npx typedoc --out ./docs --tsconfig ./lib/tsconfig.json ./lib/ts/index.ts ./lib/ts/**/index.ts ./lib/ts/**/*/index.ts" @@ -56,9 +247,12 @@ "@loopback/repository": "3.7.1", "@loopback/rest": "9.3.0", "@types/aws-lambda": "8.10.77", + "@types/body-parser": "^1.19.2", "@types/co-body": "^5.1.1", "@types/cookie": "0.3.3", + "@types/debug": "^4.1.7", "@types/express": "4.16.1", + "@types/hapi__boom": "^9.0.1", "@types/hapi__hapi": "20.0.8", "@types/jsonwebtoken": "9.0.0", "@types/koa": "^2.13.4", @@ -83,10 +277,11 @@ "react": "^17.0.2", "sinon": "^14.0.0", "supertest": "4.0.2", + "tsup": "6.6.0", "typedoc": "^0.22.5", "typescript": "4.2" }, "browser": { "fs": false } -} +} \ No newline at end of file diff --git a/playground/index.ts b/playground/index.ts new file mode 100644 index 000000000..99b5478da --- /dev/null +++ b/playground/index.ts @@ -0,0 +1,68 @@ +// config/backendConfig.ts + +import ThirdPartyEmailPassword from "supertokens-node/recipe/thirdpartyemailpassword"; +import SessionNode from "supertokens-node/recipe/session"; +import { TypeInput, AppInfo } from "supertokens-node/types"; +import jwt from "jsonwebtoken"; + +// take a look at the Creating Supabase Client section to see how to define getSupabase +let getSupabase: any; + +let appInfo: AppInfo = { + appName: "TODO: add your app name", + apiDomain: "TODO: add your website domain", + websiteDomain: "TODO: add your website domain" +} + +let backendConfig = (): TypeInput => { + return { + framework: "express", + supertokens: { + connectionURI: "https://try.supertokens.com", + }, + appInfo, + recipeList: [ + ThirdPartyEmailPassword.init({ + providers: [/*...*/], + override: { + apis: (originalImplementation) => { + return { + ...originalImplementation, + // the emailPasswordSignUpPOST function handles sign up via Email-Password + emailPasswordSignUpPOST: async function (input) { + if (originalImplementation.emailPasswordSignUpPOST === undefined) { + throw Error("Should never come here"); + } + + let response = await originalImplementation.emailPasswordSignUpPOST(input); + + if (response.status === "OK") { + + // retrieve the accessTokenPayload from the user's session + const accessTokenPayload = response.session.getAccessTokenPayload(); + + // create a supabase client with the supabase_token from the accessTokenPayload + const supabase = getSupabase(accessTokenPayload.supabase_token); + + // store the user's email mapped to their userId in Supabase + const { error } = await supabase + .from("users") + .insert({ email: response.user.email, user_id: response.user.id }); + + if (error !== null) { + + throw error; + } + } + + return response; + }, + }; + }, + }, + }), + SessionNode.init({/*...*/ }), + ], + isInServerlessEnv: true, + }; +}; diff --git a/playground/node_modules/supertokens-node b/playground/node_modules/supertokens-node new file mode 120000 index 000000000..c25bddb6d --- /dev/null +++ b/playground/node_modules/supertokens-node @@ -0,0 +1 @@ +../.. \ No newline at end of file diff --git a/playground/package.json b/playground/package.json new file mode 100644 index 000000000..9b992f904 --- /dev/null +++ b/playground/package.json @@ -0,0 +1,15 @@ +{ + "name": "playground", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "keywords": [], + "author": "", + "license": "ISC", + "dependencies": { + "supertokens-node": "workspace:^" + } +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml new file mode 100644 index 000000000..7f863fde8 --- /dev/null +++ b/pnpm-lock.yaml @@ -0,0 +1,6586 @@ +lockfileVersion: '6.0' + +importers: + + .: + dependencies: + axios: + specifier: 0.21.4 + version: 0.21.4(debug@4.3.4) + body-parser: + specifier: 1.20.1 + version: 1.20.1 + co-body: + specifier: 6.1.0 + version: 6.1.0 + cookie: + specifier: 0.4.0 + version: 0.4.0 + debug: + specifier: ^4.3.3 + version: 4.3.4 + jose: + specifier: ^4.13.1 + version: 4.14.4 + jsonwebtoken: + specifier: ^9.0.0 + version: 9.0.0 + jwks-rsa: + specifier: ^2.0.5 + version: 2.0.5 + libphonenumber-js: + specifier: ^1.9.44 + version: 1.10.21 + nodemailer: + specifier: ^6.7.2 + version: 6.9.1 + psl: + specifier: 1.8.0 + version: 1.8.0 + supertokens-js-override: + specifier: ^0.0.4 + version: 0.0.4 + twilio: + specifier: ^4.7.2 + version: 4.8.0(debug@4.3.4) + verify-apple-id-token: + specifier: ^3.0.1 + version: 3.0.1 + devDependencies: + '@hapi/hapi': + specifier: ^20.2.0 + version: 20.2.0 + '@koa/router': + specifier: ^10.1.1 + version: 10.1.1 + '@loopback/core': + specifier: 2.16.2 + version: 2.16.2 + '@loopback/repository': + specifier: 3.7.1 + version: 3.7.1(@loopback/core@2.16.2) + '@loopback/rest': + specifier: 9.3.0 + version: 9.3.0(@loopback/core@2.16.2)(@loopback/repository@3.7.1) + '@types/aws-lambda': + specifier: 8.10.77 + version: 8.10.77 + '@types/body-parser': + specifier: ^1.19.2 + version: 1.19.2 + '@types/co-body': + specifier: ^5.1.1 + version: 5.1.1 + '@types/cookie': + specifier: 0.3.3 + version: 0.3.3 + '@types/debug': + specifier: ^4.1.7 + version: 4.1.7 + '@types/express': + specifier: 4.16.1 + version: 4.16.1 + '@types/hapi__boom': + specifier: ^9.0.1 + version: 9.0.1 + '@types/hapi__hapi': + specifier: 20.0.8 + version: 20.0.8 + '@types/jsonwebtoken': + specifier: 9.0.0 + version: 9.0.0 + '@types/koa': + specifier: ^2.13.4 + version: 2.13.5 + '@types/koa-bodyparser': + specifier: ^4.3.3 + version: 4.3.10 + '@types/nodemailer': + specifier: ^6.4.4 + version: 6.4.7 + '@types/psl': + specifier: 1.1.0 + version: 1.1.0 + '@types/validator': + specifier: 10.11.0 + version: 10.11.0 + aws-sdk-mock: + specifier: ^5.4.0 + version: 5.8.0 + cookie-parser: + specifier: ^1.4.5 + version: 1.4.6 + express: + specifier: ^4.18.2 + version: 4.18.2 + fastify: + specifier: 3.18.1 + version: 3.18.1 + glob: + specifier: 7.1.7 + version: 7.1.7 + koa: + specifier: ^2.13.3 + version: 2.14.1 + lambda-tester: + specifier: ^4.0.1 + version: 4.0.1 + loopback-datasource-juggler: + specifier: ^4.26.0 + version: 4.28.2 + mocha: + specifier: 6.1.4 + version: 6.1.4 + next: + specifier: 11.1.3 + version: 11.1.3(@babel/core@7.21.8)(react-dom@17.0.2)(react@17.0.2)(typescript@4.2.4) + next-test-api-route-handler: + specifier: ^3.1.8 + version: 3.1.8(next@11.1.3) + nock: + specifier: 11.7.0 + version: 11.7.0 + prettier: + specifier: 2.0.5 + version: 2.0.5 + pretty-quick: + specifier: ^3.1.1 + version: 3.1.3(prettier@2.0.5) + react: + specifier: ^17.0.2 + version: 17.0.2 + sinon: + specifier: ^14.0.0 + version: 14.0.2 + supertest: + specifier: 4.0.2 + version: 4.0.2 + tsup: + specifier: 6.6.0 + version: 6.6.0(postcss@8.2.15)(typescript@4.2.4) + typedoc: + specifier: ^0.22.5 + version: 0.22.5(typescript@4.2.4) + typescript: + specifier: '4.2' + version: 4.2.4 + + examples/express/with-thirdpartyemailpassword: + dependencies: + cors: + specifier: ^2.8.5 + version: 2.8.5 + dotenv: + specifier: ^8.6.0 + version: 8.6.0 + express: + specifier: ^4.17.1 + version: 4.18.2 + helmet: + specifier: ^4.4.0 + version: 4.4.0 + morgan: + specifier: ^1.10.0 + version: 1.10.0 + + playground: + dependencies: + supertokens-node: + specifier: workspace:^ + version: link:.. + + test/auth-react-server: + dependencies: + axios: + specifier: ^0.24.0 + version: 0.24.0(debug@4.3.4) + cookie-parser: + specifier: 1.4.4 + version: 1.4.4 + cors: + specifier: ^2.8.5 + version: 2.8.5 + dotenv: + specifier: ^8.2.0 + version: 8.6.0 + express: + specifier: 4.17.1 + version: 4.17.1 + + test/frontendIntegration: + dependencies: + cookie-parser: + specifier: 1.4.4 + version: 1.4.4 + cors: + specifier: ^2.8.5 + version: 2.8.5 + express: + specifier: 4.17.1 + version: 4.17.1 + +packages: + + /@ampproject/remapping@2.2.1: + resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 + dev: true + + /@babel/code-frame@7.12.11: + resolution: {integrity: sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==} + dependencies: + '@babel/highlight': 7.18.6 + dev: true + + /@babel/code-frame@7.21.4: + resolution: {integrity: sha512-LYvhNKfwWSPpocw8GI7gpK2nq3HSDuEPC/uSYaALSJu9xjsalaaYFOq0Pwt5KmVqwEbZlDu81aLXwBOmD/Fv9g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/highlight': 7.18.6 + dev: true + + /@babel/compat-data@7.21.7: + resolution: {integrity: sha512-KYMqFYTaenzMK4yUtf4EW9wc4N9ef80FsbMtkwool5zpwl4YrT1SdWYSTRcT94KO4hannogdS+LxY7L+arP3gA==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/core@7.21.8: + resolution: {integrity: sha512-YeM22Sondbo523Sz0+CirSPnbj9bG3P0CdHcBZdqUuaeOaYEFbOLoGU7lebvGP6P5J/WE9wOn7u7C4J9HvS1xQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@ampproject/remapping': 2.2.1 + '@babel/code-frame': 7.21.4 + '@babel/generator': 7.21.5 + '@babel/helper-compilation-targets': 7.21.5(@babel/core@7.21.8) + '@babel/helper-module-transforms': 7.21.5 + '@babel/helpers': 7.21.5 + '@babel/parser': 7.21.8 + '@babel/template': 7.20.7 + '@babel/traverse': 7.21.5 + '@babel/types': 7.21.5 + convert-source-map: 1.9.0 + debug: 4.3.4 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/generator@7.21.5: + resolution: {integrity: sha512-SrKK/sRv8GesIW1bDagf9cCG38IOMYZusoe1dfg0D8aiUe3Amvoj1QtjTPAWcfrZFvIwlleLb0gxzQidL9w14w==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + '@jridgewell/gen-mapping': 0.3.3 + '@jridgewell/trace-mapping': 0.3.18 + jsesc: 2.5.2 + dev: true + + /@babel/helper-compilation-targets@7.21.5(@babel/core@7.21.8): + resolution: {integrity: sha512-1RkbFGUKex4lvsB9yhIfWltJM5cZKUftB2eNajaDv3dCMEp49iBG0K14uH8NnX9IPux2+mK7JGEOB0jn48/J6w==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + dependencies: + '@babel/compat-data': 7.21.7 + '@babel/core': 7.21.8 + '@babel/helper-validator-option': 7.21.0 + browserslist: 4.21.5 + lru-cache: 5.1.1 + semver: 6.3.0 + dev: true + + /@babel/helper-environment-visitor@7.21.5: + resolution: {integrity: sha512-IYl4gZ3ETsWocUWgsFZLM5i1BYx9SoemminVEXadgLBa9TdeorzgLKm8wWLA6J1N/kT3Kch8XIk1laNzYoHKvQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-function-name@7.21.0: + resolution: {integrity: sha512-HfK1aMRanKHpxemaY2gqBmL04iAPOPRj7DxtNbiDOrJK+gdwkiNRVpCpUJYbUT+aZyemKN8brqTOxzCaG6ExRg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.20.7 + '@babel/types': 7.21.5 + dev: true + + /@babel/helper-hoist-variables@7.18.6: + resolution: {integrity: sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + dev: true + + /@babel/helper-module-imports@7.21.4: + resolution: {integrity: sha512-orajc5T2PsRYUN3ZryCEFeMDYwyw09c/pZeaQEZPH0MpKzSvn3e0uXsDBu3k03VI+9DBiRo+l22BfKTpKwa/Wg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + dev: true + + /@babel/helper-module-transforms@7.21.5: + resolution: {integrity: sha512-bI2Z9zBGY2q5yMHoBvJ2a9iX3ZOAzJPm7Q8Yz6YeoUjU/Cvhmi2G4QyTNyPBqqXSgTjUxRg3L0xV45HvkNWWBw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-module-imports': 7.21.4 + '@babel/helper-simple-access': 7.21.5 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/helper-validator-identifier': 7.19.1 + '@babel/template': 7.20.7 + '@babel/traverse': 7.21.5 + '@babel/types': 7.21.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/helper-plugin-utils@7.21.5: + resolution: {integrity: sha512-0WDaIlXKOX/3KfBK/dwP1oQGiPh6rjMkT7HIRv7i5RR2VUMwrx5ZL0dwBkKx7+SW1zwNdgjHd34IMk5ZjTeHVg==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-simple-access@7.21.5: + resolution: {integrity: sha512-ENPDAMC1wAjR0uaCUwliBdiSl1KBJAVnMTzXqi64c2MG8MPR6ii4qf7bSXDqSFbr4W6W028/rf5ivoHop5/mkg==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + dev: true + + /@babel/helper-split-export-declaration@7.18.6: + resolution: {integrity: sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/types': 7.21.5 + dev: true + + /@babel/helper-string-parser@7.21.5: + resolution: {integrity: sha512-5pTUx3hAJaZIdW99sJ6ZUUgWq/Y+Hja7TowEnLNMm1VivRgZQL3vpBY3qUACVsvw+yQU6+YgfBVmcbLaZtrA1w==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-identifier@7.19.1: + resolution: {integrity: sha512-awrNfaMtnHUr653GgGEs++LlAvW6w+DcPrOliSMXWCKo597CwL5Acf/wWdNkf/tfEQE3mjkeD1YOVZOUV/od1w==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helper-validator-option@7.21.0: + resolution: {integrity: sha512-rmL/B8/f0mKS2baE9ZpyTcTavvEuWhTTW8amjzXNvYG4AwBsqTLikfXsEofsJEfKHf+HQVQbFOHy6o+4cnC/fQ==} + engines: {node: '>=6.9.0'} + dev: true + + /@babel/helpers@7.21.5: + resolution: {integrity: sha512-BSY+JSlHxOmGsPTydUkPf1MdMQ3M81x5xGCOVgWM3G8XH77sJ292Y2oqcp0CbbgxhqBuI46iUz1tT7hqP7EfgA==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/template': 7.20.7 + '@babel/traverse': 7.21.5 + '@babel/types': 7.21.5 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/highlight@7.18.6: + resolution: {integrity: sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + chalk: 2.4.2 + js-tokens: 4.0.0 + dev: true + + /@babel/parser@7.21.8: + resolution: {integrity: sha512-6zavDGdzG3gUqAdWvlLFfk+36RilI+Pwyuuh7HItyeScCWP3k6i8vKclAQ0bM/0y/Kz/xiwvxhMv9MgTJP5gmA==} + engines: {node: '>=6.0.0'} + hasBin: true + dependencies: + '@babel/types': 7.21.5 + dev: true + + /@babel/plugin-syntax-jsx@7.14.5(@babel/core@7.21.8): + resolution: {integrity: sha512-ohuFIsOMXJnbOMRfX7/w7LocdR6R7whhuRD4ax8IipLcLPlZGJKkBxgHp++U4N/vKyU16/YDQr2f5seajD3jIw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + dependencies: + '@babel/core': 7.21.8 + '@babel/helper-plugin-utils': 7.21.5 + dev: true + + /@babel/runtime@7.15.3: + resolution: {integrity: sha512-OvwMLqNXkCXSz1kSm58sEsNuhqOx/fKpnUnKnFB5v8uDda5bLNEHNgKPvhDN6IU0LDcnHQ90LlJ0Q6jnyBSIBA==} + engines: {node: '>=6.9.0'} + dependencies: + regenerator-runtime: 0.13.11 + dev: true + + /@babel/template@7.20.7: + resolution: {integrity: sha512-8SegXApWe6VoNw0r9JHpSteLKTpTiLZ4rMlGIm9JQ18KiCtyQiAMEazujAHrUS5flrcqYZa75ukev3P6QmUwUw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.21.4 + '@babel/parser': 7.21.8 + '@babel/types': 7.21.5 + dev: true + + /@babel/traverse@7.21.5: + resolution: {integrity: sha512-AhQoI3YjWi6u/y/ntv7k48mcrCXmus0t79J9qPNlk/lAsFlCiJ047RmbfMOawySTHtywXhbXgpx/8nXMYd+oFw==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/code-frame': 7.21.4 + '@babel/generator': 7.21.5 + '@babel/helper-environment-visitor': 7.21.5 + '@babel/helper-function-name': 7.21.0 + '@babel/helper-hoist-variables': 7.18.6 + '@babel/helper-split-export-declaration': 7.18.6 + '@babel/parser': 7.21.8 + '@babel/types': 7.21.5 + debug: 4.3.4 + globals: 11.12.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@babel/types@7.15.0: + resolution: {integrity: sha512-OBvfqnllOIdX4ojTHpwZbpvz4j3EWyjkZEdmjH0/cgsd6QOdSgU8rLSk6ard/pcW7rlmjdVSX/AWOaORR1uNOQ==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 + dev: true + + /@babel/types@7.21.5: + resolution: {integrity: sha512-m4AfNvVF2mVC/F7fDEdH2El3HzUg9It/XsCxZiOTTA3m3qYfcSVSbTfM6Q9xG+hYDniZssYhlXKKUMD5m8tF4Q==} + engines: {node: '>=6.9.0'} + dependencies: + '@babel/helper-string-parser': 7.21.5 + '@babel/helper-validator-identifier': 7.19.1 + to-fast-properties: 2.0.0 + dev: true + + /@esbuild/android-arm64@0.17.18: + resolution: {integrity: sha512-/iq0aK0eeHgSC3z55ucMAHO05OIqmQehiGay8eP5l/5l+iEr4EIbh4/MI8xD9qRFjqzgkc0JkX0LculNC9mXBw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-arm@0.17.18: + resolution: {integrity: sha512-EmwL+vUBZJ7mhFCs5lA4ZimpUH3WMAoqvOIYhVQwdIgSpHC8ImHdsRyhHAVxpDYUSm0lWvd63z0XH1IlImS2Qw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/android-x64@0.17.18: + resolution: {integrity: sha512-x+0efYNBF3NPW2Xc5bFOSFW7tTXdAcpfEg2nXmxegm4mJuVeS+i109m/7HMiOQ6M12aVGGFlqJX3RhNdYM2lWg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-arm64@0.17.18: + resolution: {integrity: sha512-6tY+djEAdF48M1ONWnQb1C+6LiXrKjmqjzPNPWXhu/GzOHTHX2nh8Mo2ZAmBFg0kIodHhciEgUBtcYCAIjGbjQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/darwin-x64@0.17.18: + resolution: {integrity: sha512-Qq84ykvLvya3dO49wVC9FFCNUfSrQJLbxhoQk/TE1r6MjHo3sFF2tlJCwMjhkBVq3/ahUisj7+EpRSz0/+8+9A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-arm64@0.17.18: + resolution: {integrity: sha512-fw/ZfxfAzuHfaQeMDhbzxp9mc+mHn1Y94VDHFHjGvt2Uxl10mT4CDavHm+/L9KG441t1QdABqkVYwakMUeyLRA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/freebsd-x64@0.17.18: + resolution: {integrity: sha512-FQFbRtTaEi8ZBi/A6kxOC0V0E9B/97vPdYjY9NdawyLd4Qk5VD5g2pbWN2VR1c0xhzcJm74HWpObPszWC+qTew==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm64@0.17.18: + resolution: {integrity: sha512-R7pZvQZFOY2sxUG8P6A21eq6q+eBv7JPQYIybHVf1XkQYC+lT7nDBdC7wWKTrbvMXKRaGudp/dzZCwL/863mZQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-arm@0.17.18: + resolution: {integrity: sha512-jW+UCM40LzHcouIaqv3e/oRs0JM76JfhHjCavPxMUti7VAPh8CaGSlS7cmyrdpzSk7A+8f0hiedHqr/LMnfijg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ia32@0.17.18: + resolution: {integrity: sha512-ygIMc3I7wxgXIxk6j3V00VlABIjq260i967Cp9BNAk5pOOpIXmd1RFQJQX9Io7KRsthDrQYrtcx7QCof4o3ZoQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-loong64@0.17.18: + resolution: {integrity: sha512-bvPG+MyFs5ZlwYclCG1D744oHk1Pv7j8psF5TfYx7otCVmcJsEXgFEhQkbhNW8otDHL1a2KDINW20cfCgnzgMQ==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-mips64el@0.17.18: + resolution: {integrity: sha512-oVqckATOAGuiUOa6wr8TXaVPSa+6IwVJrGidmNZS1cZVx0HqkTMkqFGD2HIx9H1RvOwFeWYdaYbdY6B89KUMxA==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-ppc64@0.17.18: + resolution: {integrity: sha512-3dLlQO+b/LnQNxgH4l9rqa2/IwRJVN9u/bK63FhOPB4xqiRqlQAU0qDU3JJuf0BmaH0yytTBdoSBHrb2jqc5qQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-riscv64@0.17.18: + resolution: {integrity: sha512-/x7leOyDPjZV3TcsdfrSI107zItVnsX1q2nho7hbbQoKnmoeUWjs+08rKKt4AUXju7+3aRZSsKrJtaRmsdL1xA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-s390x@0.17.18: + resolution: {integrity: sha512-cX0I8Q9xQkL/6F5zWdYmVf5JSQt+ZfZD2bJudZrWD+4mnUvoZ3TDDXtDX2mUaq6upMFv9FlfIh4Gfun0tbGzuw==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/linux-x64@0.17.18: + resolution: {integrity: sha512-66RmRsPlYy4jFl0vG80GcNRdirx4nVWAzJmXkevgphP1qf4dsLQCpSKGM3DUQCojwU1hnepI63gNZdrr02wHUA==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@esbuild/netbsd-x64@0.17.18: + resolution: {integrity: sha512-95IRY7mI2yrkLlTLb1gpDxdC5WLC5mZDi+kA9dmM5XAGxCME0F8i4bYH4jZreaJ6lIZ0B8hTrweqG1fUyW7jbg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/openbsd-x64@0.17.18: + resolution: {integrity: sha512-WevVOgcng+8hSZ4Q3BKL3n1xTv5H6Nb53cBrtzzEjDbbnOmucEVcZeGCsCOi9bAOcDYEeBZbD2SJNBxlfP3qiA==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + requiresBuild: true + dev: true + optional: true + + /@esbuild/sunos-x64@0.17.18: + resolution: {integrity: sha512-Rzf4QfQagnwhQXVBS3BYUlxmEbcV7MY+BH5vfDZekU5eYpcffHSyjU8T0xucKVuOcdCsMo+Ur5wmgQJH2GfNrg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-arm64@0.17.18: + resolution: {integrity: sha512-Kb3Ko/KKaWhjeAm2YoT/cNZaHaD1Yk/pa3FTsmqo9uFh1D1Rfco7BBLIPdDOozrObj2sahslFuAQGvWbgWldAg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-ia32@0.17.18: + resolution: {integrity: sha512-0/xUMIdkVHwkvxfbd5+lfG7mHOf2FRrxNbPiKWg9C4fFrB8H0guClmaM3BFiRUYrznVoyxTIyC/Ou2B7QQSwmw==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@esbuild/win32-x64@0.17.18: + resolution: {integrity: sha512-qU25Ma1I3NqTSHJUOKi9sAH1/Mzuvlke0ioMJRthLXKm7JiSKVwFghlGbDLOO2sARECGhja4xYfRAZNPAkooYg==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@extra-number/significant-digits@1.3.9: + resolution: {integrity: sha512-E5PY/bCwrNqEHh4QS6AQBinLZ+sxM1lT8tsSVYk8VwhWIPp6fCU/BMRVq0V8iJ8LwS3FHmaA4vUzb78s4BIIyA==} + dev: true + + /@fastify/ajv-compiler@1.1.0: + resolution: {integrity: sha512-gvCOUNpXsWrIQ3A4aXCLIdblL0tDq42BG/2Xw7oxbil9h11uow10ztS2GuFazNBfjbrsZ5nl+nPl5jDSjj5TSg==} + dependencies: + ajv: 6.12.6 + dev: true + + /@hapi/accept@5.0.2: + resolution: {integrity: sha512-CmzBx/bXUR8451fnZRuZAJRlzgm0Jgu5dltTX/bszmR2lheb9BpyN47Q1RbaGTsvFzn0PXAEs+lXDKfshccYZw==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/ammo@5.0.1: + resolution: {integrity: sha512-FbCNwcTbnQP4VYYhLNGZmA76xb2aHg9AMPiy18NZyWMG310P5KdFGyA9v2rm5ujrIny77dEEIkMOwl0Xv+fSSA==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/b64@5.0.0: + resolution: {integrity: sha512-ngu0tSEmrezoiIaNGG6rRvKOUkUuDdf4XTPnONHGYfSGRmDqPZX5oJL6HAdKTo1UQHECbdB4OzhWrfgVppjHUw==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/boom@9.1.4: + resolution: {integrity: sha512-Ls1oH8jaN1vNsqcaHVYJrKmgMcKsC1wcp8bujvXrHaAqD2iDYq3HoOwsxwo09Cuda5R5nC0o0IxlrlTuvPuzSw==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/bounce@2.0.0: + resolution: {integrity: sha512-JesW92uyzOOyuzJKjoLHM1ThiOvHPOLDHw01YV8yh5nCso7sDwJho1h0Ad2N+E62bZyz46TG3xhAi/78Gsct6A==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/bourne@2.1.0: + resolution: {integrity: sha512-i1BpaNDVLJdRBEKeJWkVO6tYX6DMFBuwMhSuWqLsY4ufeTKGVuV5rBsUhxPayXqnnWHgXUAmWK16H/ykO5Wj4Q==} + dev: true + + /@hapi/call@8.0.1: + resolution: {integrity: sha512-bOff6GTdOnoe5b8oXRV3lwkQSb/LAWylvDMae6RgEWWntd0SHtkYbQukDHKlfaYtVnSAgIavJ0kqszF/AIBb6g==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/catbox-memory@5.0.1: + resolution: {integrity: sha512-QWw9nOYJq5PlvChLWV8i6hQHJYfvdqiXdvTupJFh0eqLZ64Xir7mKNi96d5/ZMUAqXPursfNDIDxjFgoEDUqeQ==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/catbox@11.1.1: + resolution: {integrity: sha512-u/8HvB7dD/6X8hsZIpskSDo4yMKpHxFd7NluoylhGrL6cUfYxdQPnvUp9YU2C6F9hsyBVLGulBd9vBN1ebfXOQ==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + '@hapi/podium': 4.1.3 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/content@5.0.2: + resolution: {integrity: sha512-mre4dl1ygd4ZyOH3tiYBrOUBzV7Pu/EOs8VLGf58vtOEECWed8Uuw6B4iR9AN/8uQt42tB04qpVaMyoMQh0oMw==} + dependencies: + '@hapi/boom': 9.1.4 + dev: true + + /@hapi/cryptiles@5.1.0: + resolution: {integrity: sha512-fo9+d1Ba5/FIoMySfMqPBR/7Pa29J2RsiPrl7bkwo5W5o+AN1dAYQRi4SPrPwwVxVGKjgLOEWrsvt1BonJSfLA==} + engines: {node: '>=12.0.0'} + dependencies: + '@hapi/boom': 9.1.4 + dev: true + + /@hapi/file@2.0.0: + resolution: {integrity: sha512-WSrlgpvEqgPWkI18kkGELEZfXr0bYLtr16iIN4Krh9sRnzBZN6nnWxHFxtsnP684wueEySBbXPDg/WfA9xJdBQ==} + dev: true + + /@hapi/hapi@20.2.0: + resolution: {integrity: sha512-yPH/z8KvlSLV8lI4EuId9z595fKKk5n6YA7H9UddWYWsBXMcnCyoFmHtYq0PCV4sNgKLD6QW9e27R9V9Z9aqqw==} + engines: {node: '>=12.0.0'} + dependencies: + '@hapi/accept': 5.0.2 + '@hapi/ammo': 5.0.1 + '@hapi/boom': 9.1.4 + '@hapi/bounce': 2.0.0 + '@hapi/call': 8.0.1 + '@hapi/catbox': 11.1.1 + '@hapi/catbox-memory': 5.0.1 + '@hapi/heavy': 7.0.1 + '@hapi/hoek': 9.3.0 + '@hapi/mimos': 6.0.0 + '@hapi/podium': 4.1.3 + '@hapi/shot': 5.0.5 + '@hapi/somever': 3.0.1 + '@hapi/statehood': 7.0.4 + '@hapi/subtext': 7.1.0 + '@hapi/teamwork': 5.1.1 + '@hapi/topo': 5.1.0 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/heavy@7.0.1: + resolution: {integrity: sha512-vJ/vzRQ13MtRzz6Qd4zRHWS3FaUc/5uivV2TIuExGTM9Qk+7Zzqj0e2G7EpE6KztO9SalTbiIkTh7qFKj/33cA==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/hoek': 9.3.0 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/hoek@9.3.0: + resolution: {integrity: sha512-/c6rf4UJlmHlC9b5BaNvzAcFv7HZ2QHaV0D4/HNlBdvFnvQq8RI4kYdhyPCl7Xj+oWvTWQ8ujhqS53LIgAe6KQ==} + dev: true + + /@hapi/iron@6.0.0: + resolution: {integrity: sha512-zvGvWDufiTGpTJPG1Y/McN8UqWBu0k/xs/7l++HVU535NLHXsHhy54cfEMdW7EjwKfbBfM9Xy25FmTiobb7Hvw==} + dependencies: + '@hapi/b64': 5.0.0 + '@hapi/boom': 9.1.4 + '@hapi/bourne': 2.1.0 + '@hapi/cryptiles': 5.1.0 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/mimos@6.0.0: + resolution: {integrity: sha512-Op/67tr1I+JafN3R3XN5DucVSxKRT/Tc+tUszDwENoNpolxeXkhrJ2Czt6B6AAqrespHoivhgZBWYSuANN9QXg==} + dependencies: + '@hapi/hoek': 9.3.0 + mime-db: 1.52.0 + dev: true + + /@hapi/nigel@4.0.2: + resolution: {integrity: sha512-ht2KoEsDW22BxQOEkLEJaqfpoKPXxi7tvabXy7B/77eFtOyG5ZEstfZwxHQcqAiZhp58Ae5vkhEqI03kawkYNw==} + engines: {node: '>=12.0.0'} + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/vise': 4.0.0 + dev: true + + /@hapi/pez@5.1.0: + resolution: {integrity: sha512-YfB0btnkLB3lb6Ry/1KifnMPBm5ZPfaAHWFskzOMAgDgXgcBgA+zjpIynyEiBfWEz22DBT8o1e2tAaBdlt8zbw==} + dependencies: + '@hapi/b64': 5.0.0 + '@hapi/boom': 9.1.4 + '@hapi/content': 5.0.2 + '@hapi/hoek': 9.3.0 + '@hapi/nigel': 4.0.2 + dev: true + + /@hapi/podium@4.1.3: + resolution: {integrity: sha512-ljsKGQzLkFqnQxE7qeanvgGj4dejnciErYd30dbrYzUOF/FyS/DOF97qcrT3bhoVwCYmxa6PEMhxfCPlnUcD2g==} + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/teamwork': 5.1.1 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/shot@5.0.5: + resolution: {integrity: sha512-x5AMSZ5+j+Paa8KdfCoKh+klB78otxF+vcJR/IoN91Vo2e5ulXIW6HUsFTCU+4W6P/Etaip9nmdAx2zWDimB2A==} + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/somever@3.0.1: + resolution: {integrity: sha512-4ZTSN3YAHtgpY/M4GOtHUXgi6uZtG9nEZfNI6QrArhK0XN/RDVgijlb9kOmXwCR5VclDSkBul9FBvhSuKXx9+w==} + dependencies: + '@hapi/bounce': 2.0.0 + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/statehood@7.0.4: + resolution: {integrity: sha512-Fia6atroOVmc5+2bNOxF6Zv9vpbNAjEXNcUbWXavDqhnJDlchwUUwKS5LCi5mGtCTxRhUKKHwuxuBZJkmLZ7fw==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/bounce': 2.0.0 + '@hapi/bourne': 2.1.0 + '@hapi/cryptiles': 5.1.0 + '@hapi/hoek': 9.3.0 + '@hapi/iron': 6.0.0 + '@hapi/validate': 1.1.3 + dev: true + + /@hapi/subtext@7.1.0: + resolution: {integrity: sha512-n94cU6hlvsNRIpXaROzBNEJGwxC+HA69q769pChzej84On8vsU14guHDub7Pphr/pqn5b93zV3IkMPDU5AUiXA==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/bourne': 2.1.0 + '@hapi/content': 5.0.2 + '@hapi/file': 2.0.0 + '@hapi/hoek': 9.3.0 + '@hapi/pez': 5.1.0 + '@hapi/wreck': 17.2.0 + dev: true + + /@hapi/teamwork@5.1.1: + resolution: {integrity: sha512-1oPx9AE5TIv+V6Ih54RP9lTZBso3rP8j4Xhb6iSVwPXtAM+sDopl5TFMv5Paw73UnpZJ9gjcrTE1BXrWt9eQrg==} + engines: {node: '>=12.0.0'} + dev: true + + /@hapi/topo@5.1.0: + resolution: {integrity: sha512-foQZKJig7Ob0BMAYBfcJk8d77QtOe7Wo4ox7ff1lQYoNNAb6jwcY1ncdoy2e9wQZzvNy7ODZCYJkK8kzmcAnAg==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/validate@1.1.3: + resolution: {integrity: sha512-/XMR0N0wjw0Twzq2pQOzPBZlDzkekGcoCtzO314BpIEsbXdYGthQUbxgkGDf4nhk1+IPDAsXqWjMohRQYO06UA==} + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/topo': 5.1.0 + dev: true + + /@hapi/vise@4.0.0: + resolution: {integrity: sha512-eYyLkuUiFZTer59h+SGy7hUm+qE9p+UemePTHLlIWppEd+wExn3Df5jO04bFQTm7nleF5V8CtuYQYb+VFpZ6Sg==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@hapi/wreck@17.2.0: + resolution: {integrity: sha512-pJ5kjYoRPYDv+eIuiLQqhGon341fr2bNIYZjuotuPJG/3Ilzr/XtI+JAp0A86E2bYfsS3zBPABuS2ICkaXFT8g==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/bourne': 2.1.0 + '@hapi/hoek': 9.3.0 + dev: true + + /@jridgewell/gen-mapping@0.3.3: + resolution: {integrity: sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==} + engines: {node: '>=6.0.0'} + dependencies: + '@jridgewell/set-array': 1.1.2 + '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/trace-mapping': 0.3.18 + dev: true + + /@jridgewell/resolve-uri@3.1.0: + resolution: {integrity: sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/set-array@1.1.2: + resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} + engines: {node: '>=6.0.0'} + dev: true + + /@jridgewell/sourcemap-codec@1.4.14: + resolution: {integrity: sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==} + dev: true + + /@jridgewell/sourcemap-codec@1.4.15: + resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + dev: true + + /@jridgewell/trace-mapping@0.3.18: + resolution: {integrity: sha512-w+niJYzMHdd7USdiH2U6869nqhD2nbfZXND5Yp93qIbEmnDNk7PD48o+YchRVpzMU7M6jVCbenTR7PA1FLQ9pA==} + dependencies: + '@jridgewell/resolve-uri': 3.1.0 + '@jridgewell/sourcemap-codec': 1.4.14 + dev: true + + /@koa/router@10.1.1: + resolution: {integrity: sha512-ORNjq5z4EmQPriKbR0ER3k4Gh7YGNhWDL7JBW+8wXDrHLbWYKYSJaOJ9aN06npF5tbTxe2JBOsurpJDAvjiXKw==} + engines: {node: '>= 8.0.0'} + dependencies: + debug: 4.3.4 + http-errors: 1.8.1 + koa-compose: 4.1.0 + methods: 1.1.2 + path-to-regexp: 6.2.1 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/context@3.18.0: + resolution: {integrity: sha512-PKx0rTguqBj6mUHBbEHLF031MnP6KiSkMLE4E8Hpy2KPJxG97HUT2ZUACHCP6qm8yS9spWQQ6g72VYAWxDrN+g==} + engines: {node: ^10.16 || 12 || 14 || 16} + dependencies: + '@loopback/metadata': 3.3.4 + '@types/debug': 4.1.7 + debug: 4.3.4 + hyperid: 2.3.1 + p-event: 4.2.0 + tslib: 2.5.0 + uuid: 8.3.2 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/core@2.16.2: + resolution: {integrity: sha512-KtkNv6HIh8TFBOxTkfPp/BQbVqjDsGef/DtbNHH1ZHs3gSbofhkZs3IqQdYQzpkUq71mQjz5RJ/yUYY5Sqva9w==} + engines: {node: ^10.16 || 12 || 14 || 16} + dependencies: + '@loopback/context': 3.18.0 + debug: 4.3.4 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/express@3.3.4(@loopback/core@2.16.2): + resolution: {integrity: sha512-y+7fu/aXGp7+5QhEnKhwmI/vKLAQtsyvEXTiT8stbj4VHWvNbUbYVwfud5IOeH7d+lhxlNQ5aEJ7IDwoM8xD6Q==} + engines: {node: ^10.16 || 12 || 14 || 16} + peerDependencies: + '@loopback/core': ^2.18.0 + dependencies: + '@loopback/core': 2.16.2 + '@loopback/http-server': 2.5.4 + '@types/body-parser': 1.19.2 + '@types/express': 4.17.17 + '@types/express-serve-static-core': 4.17.33 + '@types/http-errors': 1.8.2 + body-parser: 1.20.1 + debug: 4.3.4 + express: 4.18.2 + http-errors: 1.8.1 + on-finished: 2.4.1 + toposort: 2.0.2 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/filter@1.5.4: + resolution: {integrity: sha512-kfdCgSy0YoAFNYXJOpag5uJnlErYcROIeJqeAglkwOa3hSw2BYIudurU8hoqsiOBIGhI5BF4A3S8u4q089xWlg==} + engines: {node: ^10.16 || 12 || 14 || 16} + dependencies: + tslib: 2.5.0 + dev: true + + /@loopback/http-server@2.5.4: + resolution: {integrity: sha512-M7w+4AEhwDn7q00soCe8yYQDUS+n87ppuXQ1rJ9a1b9TdnEh+7nPFVrVpwiEKBGyVGIJWDq5BMSZYo1zMIPFUA==} + engines: {node: ^10.16 || 12 || 14 || 16} + dependencies: + debug: 4.3.4 + stoppable: 1.1.0 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/metadata@3.3.4: + resolution: {integrity: sha512-FISs8OVYKB+wmL0VZdsDZzMOc/KC6anOf3ORpFRO2Mgl9dKCOD8IELKc8r/nr2kyD4r7/pjr5GfLy4nirS1vnQ==} + engines: {node: ^10.16 || 12 || 14 || 16} + dependencies: + debug: 4.3.4 + lodash: 4.17.21 + reflect-metadata: 0.1.13 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/openapi-v3@5.3.1(@loopback/core@2.16.2)(@loopback/repository@3.7.1): + resolution: {integrity: sha512-MBVamgxDDbgQQlQjIxSOnaVXLx6plxzn3e8CW8YbNc3TNiS1P8EFa5vNBp8wIzSDTeEd3ic6qzUxCUZIICiFNA==} + engines: {node: ^10.16 || 12 || 14 || 16} + peerDependencies: + '@loopback/core': ^2.16.1 + dependencies: + '@loopback/core': 2.16.2 + '@loopback/repository-json-schema': 3.4.1(@loopback/core@2.16.2)(@loopback/repository@3.7.1) + debug: 4.3.4 + http-status: 1.6.2 + json-merge-patch: 1.0.2 + lodash: 4.17.21 + openapi3-ts: 2.0.2 + tslib: 2.5.0 + transitivePeerDependencies: + - '@loopback/repository' + - supports-color + dev: true + + /@loopback/repository-json-schema@3.4.1(@loopback/core@2.16.2)(@loopback/repository@3.7.1): + resolution: {integrity: sha512-E9UKegav+8Bp0MLPQu33c7tWUmWbnKARy0Uu2m7nvP3e3t3WOwB8U9hMjX/wBOhJ4UFJCXAXlq1MulQ/R3dyTw==} + engines: {node: ^10.16 || 12 || 14 || 16} + peerDependencies: + '@loopback/core': ^2.16.1 + '@loopback/repository': ^3.7.0 + dependencies: + '@loopback/core': 2.16.2 + '@loopback/repository': 3.7.1(@loopback/core@2.16.2) + '@types/json-schema': 7.0.11 + debug: 4.3.4 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/repository@3.7.1(@loopback/core@2.16.2): + resolution: {integrity: sha512-q9vpgQ5MSZqI/ww2TTuDy0Y34NZaapS0+4ZKcwVgwH0XJFxgGwznc5W0l1Esu1lplijejpza4ItKwnlGmvYcJg==} + engines: {node: ^10.16 || 12 || 14 || 16} + peerDependencies: + '@loopback/core': ^2.16.2 + dependencies: + '@loopback/core': 2.16.2 + '@loopback/filter': 1.5.4 + '@types/debug': 4.1.7 + debug: 4.3.4 + lodash: 4.17.21 + loopback-datasource-juggler: 4.28.2 + tslib: 2.5.0 + transitivePeerDependencies: + - supports-color + dev: true + + /@loopback/rest@9.3.0(@loopback/core@2.16.2)(@loopback/repository@3.7.1): + resolution: {integrity: sha512-Qwn5WXctQ2AV6Duze/x7ks9Tb/Oy6FSs0Hhyuhzz7aassKbu1m/GiJLB7bvpJVUN+qVZ2+vQZZ6Y3F+znzH4og==} + engines: {node: ^10.16 || 12 || 14 || 16} + peerDependencies: + '@loopback/core': ^2.16.0 + dependencies: + '@loopback/core': 2.16.2 + '@loopback/express': 3.3.4(@loopback/core@2.16.2) + '@loopback/http-server': 2.5.4 + '@loopback/openapi-v3': 5.3.1(@loopback/core@2.16.2)(@loopback/repository@3.7.1) + '@openapi-contrib/openapi-schema-to-json-schema': 3.2.0 + '@types/body-parser': 1.19.2 + '@types/cors': 2.8.13 + '@types/express': 4.17.17 + '@types/express-serve-static-core': 4.17.33 + '@types/http-errors': 1.8.2 + '@types/on-finished': 2.3.1 + '@types/serve-static': 1.13.9 + '@types/type-is': 1.6.3 + ajv: 6.12.6 + ajv-errors: 1.0.1(ajv@6.12.6) + ajv-keywords: 3.5.2(ajv@6.12.6) + body-parser: 1.20.1 + cors: 2.8.5 + debug: 4.3.4 + express: 4.18.2 + http-errors: 1.8.1 + js-yaml: 4.1.0 + json-schema-compare: 0.2.2 + lodash: 4.17.21 + on-finished: 2.4.1 + path-to-regexp: 6.2.1 + qs: 6.11.0 + strong-error-handler: 4.0.1 + tslib: 2.5.0 + type-is: 1.6.18 + validator: 13.9.0 + transitivePeerDependencies: + - '@loopback/repository' + - supports-color + dev: true + + /@napi-rs/triples@1.1.0: + resolution: {integrity: sha512-XQr74QaLeMiqhStEhLn1im9EOMnkypp7MZOwQhGzqp2Weu5eQJbpPxWxixxlYRKWPOmJjsk6qYfYH9kq43yc2w==} + dev: true + + /@next/env@11.1.3: + resolution: {integrity: sha512-5+vaeooJuWmICSlmVaAC8KG3O8hwKasACVfkHj58xQuCB5SW0TKW3hWxgxkBuefMBn1nM0yEVPKokXCsYjBtng==} + dev: true + + /@next/polyfill-module@11.1.3: + resolution: {integrity: sha512-7yr9cr4a0SrBoVE8psxXWK1wTFc8UzsY8Wc2cWGL7qA0hgtqACHaXC47M1ByJB410hFZenGrpE+KFaT1unQMyw==} + dev: true + + /@next/react-dev-overlay@11.1.3(react-dom@17.0.2)(react@17.0.2): + resolution: {integrity: sha512-zIwtMliSUR+IKl917ToFNB+0fD7bI5kYMdjHU/UEKpfIXAZPnXRHHISCvPDsczlr+bRsbjlUFW1CsNiuFedeuQ==} + peerDependencies: + react: ^17.0.2 + react-dom: ^17.0.2 + dependencies: + '@babel/code-frame': 7.12.11 + anser: 1.4.9 + chalk: 4.0.0 + classnames: 2.2.6 + css.escape: 1.5.1 + data-uri-to-buffer: 3.0.1 + platform: 1.3.6 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + shell-quote: 1.7.2 + source-map: 0.8.0-beta.0 + stacktrace-parser: 0.1.10 + strip-ansi: 6.0.0 + dev: true + + /@next/react-refresh-utils@11.1.3(react-refresh@0.8.3): + resolution: {integrity: sha512-144kD8q2nChw67V3AJJlPQ6NUJVFczyn10bhTynn9o2rY5DEnkzuBipcyMuQl2DqfxMkV7sn+yOCOYbrLCk9zg==} + peerDependencies: + react-refresh: 0.8.3 + webpack: ^4 || ^5 + peerDependenciesMeta: + webpack: + optional: true + dependencies: + react-refresh: 0.8.3 + dev: true + + /@next/swc-darwin-arm64@11.1.3: + resolution: {integrity: sha512-TwP4krjhs+uU9pesDYCShEXZrLSbJr78p12e7XnLBBaNf20SgWLlVmQUT9gX9KbWan5V0sUbJfmcS8MRNHgYuA==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@next/swc-darwin-x64@11.1.3: + resolution: {integrity: sha512-ZSWmkg/PxccHFNUSeBdrfaH8KwSkoeUtewXKvuYYt7Ph0yRsbqSyNIvhUezDua96lApiXXq6EL2d1THfeWomvw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /@next/swc-linux-x64-gnu@11.1.3: + resolution: {integrity: sha512-PrTBN0iZudAuj4jSbtXcdBdmfpaDCPIneG4Oms4zcs93KwMgLhivYW082Mvlgx9QVEiRm7+RkFpIVtG/i7JitA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@next/swc-win32-x64-msvc@11.1.3: + resolution: {integrity: sha512-mRwbscVjRoHk+tDY7XbkT5d9FCwujFIQJpGp0XNb1i5OHCSDO8WW/C9cLEWS4LxKRbIZlTLYg1MTXqLQkvva8w==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + requiresBuild: true + dev: true + optional: true + + /@node-rs/helper@1.2.1: + resolution: {integrity: sha512-R5wEmm8nbuQU0YGGmYVjEc0OHtYsuXdpRG+Ut/3wZ9XAvQWyThN08bTh2cBJgoZxHQUPtvRfeQuxcAgLuiBISg==} + dependencies: + '@napi-rs/triples': 1.1.0 + dev: true + + /@nodelib/fs.scandir@2.1.5: + resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + dev: true + + /@nodelib/fs.stat@2.0.5: + resolution: {integrity: sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==} + engines: {node: '>= 8'} + dev: true + + /@nodelib/fs.walk@1.2.8: + resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} + engines: {node: '>= 8'} + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.15.0 + dev: true + + /@openapi-contrib/openapi-schema-to-json-schema@3.2.0: + resolution: {integrity: sha512-Gj6C0JwCr8arj0sYuslWXUBSP/KnUlEGnPW4qxlXvAl543oaNQgMgIgkQUA6vs5BCCvwTEiL8m/wdWzfl4UvSw==} + dependencies: + fast-deep-equal: 3.1.3 + dev: true + + /@panva/asn1.js@1.0.0: + resolution: {integrity: sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw==} + engines: {node: '>=10.13.0'} + dev: false + + /@sideway/address@4.1.4: + resolution: {integrity: sha512-7vwq+rOHVWjyXxVlR76Agnvhy8I9rpzjosTESvmhNeXOXdZZB15Fl+TI9x1SiHZH5Jv2wTGduSxFDIaq0m3DUw==} + dependencies: + '@hapi/hoek': 9.3.0 + dev: true + + /@sideway/formula@3.0.1: + resolution: {integrity: sha512-/poHZJJVjx3L+zVD6g9KgHfYnb443oi7wLu/XKojDviHy6HOEOA6z1Trk5aR1dGcmPenJEgb2sK2I80LeS3MIg==} + dev: true + + /@sideway/pinpoint@2.0.0: + resolution: {integrity: sha512-RNiOoTPkptFtSVzQevY/yWtZwf/RxyVnPy/OcA9HBM3MlGDnBEYL5B41H0MTn0Uec8Hi+2qUtTfG2WWZBmMejQ==} + dev: true + + /@sinonjs/commons@1.8.6: + resolution: {integrity: sha512-Ky+XkAkqPZSm3NLBeUng77EBQl3cmeJhITaGHdYH8kjVB+aun3S4XBRti2zt17mtt0mIUDiNxYeoJm6drVvBJQ==} + dependencies: + type-detect: 4.0.8 + dev: true + + /@sinonjs/commons@2.0.0: + resolution: {integrity: sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg==} + dependencies: + type-detect: 4.0.8 + dev: true + + /@sinonjs/fake-timers@10.0.2: + resolution: {integrity: sha512-SwUDyjWnah1AaNl7kxsa7cfLhlTYoiyhDAIgyh+El30YvXs/o7OLXpYH88Zdhyx9JExKrmHDJ+10bwIcY80Jmw==} + dependencies: + '@sinonjs/commons': 2.0.0 + dev: true + + /@sinonjs/fake-timers@9.1.2: + resolution: {integrity: sha512-BPS4ynJW/o92PUR4wgriz2Ud5gpST5vz6GQfMixEDK0Z8ZCUv2M7SkBLykH56T++Xs+8ln9zTGbOvNGIe02/jw==} + dependencies: + '@sinonjs/commons': 1.8.6 + dev: true + + /@sinonjs/samsam@7.0.1: + resolution: {integrity: sha512-zsAk2Jkiq89mhZovB2LLOdTCxJF4hqqTToGP0ASWlhp4I1hqOjcfmZGafXntCN7MDC6yySH0mFHrYtHceOeLmw==} + dependencies: + '@sinonjs/commons': 2.0.0 + lodash.get: 4.4.2 + type-detect: 4.0.8 + dev: true + + /@sinonjs/text-encoding@0.7.2: + resolution: {integrity: sha512-sXXKG+uL9IrKqViTtao2Ws6dy0znu9sOaP1di/jKGW1M6VssO8vlpXCQcpZ+jisQ1tTFAC5Jo/EOzFbggBagFQ==} + dev: true + + /@types/accepts@1.3.5: + resolution: {integrity: sha512-jOdnI/3qTpHABjM5cx1Hc0sKsPoYCp+DP/GJRGtDlPd7fiV9oXGGIcjW/ZOxLIvjGz8MA+uMZI9metHlgqbgwQ==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/aws-lambda@8.10.77: + resolution: {integrity: sha512-n0EMFJU/7u3KvHrR83l/zrKOVURXl5pUJPNED/Bzjah89QKCHwCiKCBoVUXRwTGRfCYGIDdinJaAlKDHZdp/Ng==} + dev: true + + /@types/body-parser@1.19.2: + resolution: {integrity: sha512-ALYone6pm6QmwZoAgeyNksccT9Q4AWZQ6PvfwR37GT6r6FWUPguq6sUmNGSMV2Wr761oQoBxwGGa6DR5o1DC9g==} + dependencies: + '@types/connect': 3.4.35 + '@types/node': 18.15.9 + + /@types/co-body@5.1.1: + resolution: {integrity: sha512-0/6AjTfQc5OJUchOS4OHiXNPZVuk+5XvEC2vdcizw/bwx0yb0xY7TKSf8JYvQYZ/OJDiAEjWzxnMjGPnSVlPmA==} + dependencies: + '@types/node': 18.15.9 + '@types/qs': 6.9.7 + dev: true + + /@types/connect@3.4.35: + resolution: {integrity: sha512-cdeYyv4KWoEgpBISTxWvqYsVy444DOqehiF3fM3ne10AmJ62RSyNkUnxMJXHQWRQQX2eR94m5y1IZyDwBjV9FQ==} + dependencies: + '@types/node': 18.15.9 + + /@types/content-disposition@0.5.5: + resolution: {integrity: sha512-v6LCdKfK6BwcqMo+wYW05rLS12S0ZO0Fl4w1h4aaZMD7bqT3gVUns6FvLJKGZHQmYn3SX55JWGpziwJRwVgutA==} + dev: true + + /@types/cookie@0.3.3: + resolution: {integrity: sha512-LKVP3cgXBT9RYj+t+9FDKwS5tdI+rPBXaNSkma7hvqy35lc7mAokC2zsqWJH0LaqIt3B962nuYI77hsJoT1gow==} + dev: true + + /@types/cookies@0.7.7: + resolution: {integrity: sha512-h7BcvPUogWbKCzBR2lY4oqaZbO3jXZksexYJVFvkrFeLgbZjQkU4x8pRq6eg2MHXQhY0McQdqmmsxRWlVAHooA==} + dependencies: + '@types/connect': 3.4.35 + '@types/express': 4.16.1 + '@types/keygrip': 1.0.2 + '@types/node': 18.15.9 + dev: true + + /@types/cors@2.8.13: + resolution: {integrity: sha512-RG8AStHlUiV5ysZQKq97copd2UmVYw3/pRMLefISZ3S1hK104Cwm7iLQ3fTKx+lsUH2CE8FlLaYeEA2LSeqYUA==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/debug@4.1.7: + resolution: {integrity: sha512-9AonUzyTjXXhEOa0DnqpzZi6VHlqKMswga9EXjpXnnqxwLtdvPPtlO8evrI5D9S6asFRCQ6v+wpiUKbw+vKqyg==} + dependencies: + '@types/ms': 0.7.31 + dev: true + + /@types/express-jwt@0.0.42: + resolution: {integrity: sha512-WszgUddvM1t5dPpJ3LhWNH8kfNN8GPIBrAGxgIYXVCEGx6Bx4A036aAuf/r5WH9DIEdlmp7gHOYvSM6U87B0ag==} + dependencies: + '@types/express': 4.16.1 + '@types/express-unless': 2.0.1 + dev: false + + /@types/express-serve-static-core@4.17.33: + resolution: {integrity: sha512-TPBqmR/HRYI3eC2E5hmiivIzv+bidAfXofM+sbonAGvyDhySGw9/PQZFt2BLOrjUUR++4eJVpx6KnLQK1Fk9tA==} + dependencies: + '@types/node': 18.15.9 + '@types/qs': 6.9.7 + '@types/range-parser': 1.2.4 + + /@types/express-unless@2.0.1: + resolution: {integrity: sha512-PJLiNw03EjkWDkQbhNjIXXDLObC3eMQhFASDV+WakFbT8eL7YdjlbV6MXd3Av5Lejq499d6pFuV1jyK+EHyG3Q==} + deprecated: This is a stub types definition. express-unless provides its own type definitions, so you do not need this installed. + dependencies: + express-unless: 2.1.3 + dev: false + + /@types/express@4.16.1: + resolution: {integrity: sha512-V0clmJow23WeyblmACoxbHBu2JKlE5TiIme6Lem14FnPW9gsttyHtk6wq7njcdIWH1njAaFgR8gW09lgY98gQg==} + dependencies: + '@types/body-parser': 1.19.2 + '@types/express-serve-static-core': 4.17.33 + '@types/serve-static': 1.15.1 + + /@types/express@4.17.17: + resolution: {integrity: sha512-Q4FmmuLGBG58btUnfS1c1r/NQdlp3DMfGDGig8WhfpA2YRUtEkxAjkZb0yvplJGYdF1fsQ81iMDcH24sSCNC/Q==} + dependencies: + '@types/body-parser': 1.19.2 + '@types/express-serve-static-core': 4.17.33 + '@types/qs': 6.9.7 + '@types/serve-static': 1.15.1 + + /@types/hapi__boom@9.0.1: + resolution: {integrity: sha512-TSqwgnTmNNp3/9uOpV16S8IVJv+QDmZLEImSuQrzGLCzmuK5P3bx3wdaXGXxfWLlN09Qqnd27POLrEAKhVCM5g==} + deprecated: Deprecated + dependencies: + '@hapi/boom': 9.1.4 + dev: true + + /@types/hapi__catbox@10.2.4: + resolution: {integrity: sha512-A6ivRrXD5glmnJna1UAGw87QNZRp/vdFO9U4GS+WhOMWzHnw+oTGkMvg0g6y1930CbeheGOCm7A1qHsqH7AXqg==} + dev: true + + /@types/hapi__hapi@20.0.8: + resolution: {integrity: sha512-NNslrYq2XQwm4uOqNcSWKpYtaeMr4DkQdrFzSB7p9rKB9ppJLh3mgP2wak9vBZl7/Cnhhb+JVBcUZCOUcW0JPA==} + dependencies: + '@hapi/boom': 9.1.4 + '@hapi/iron': 6.0.0 + '@hapi/podium': 4.1.3 + '@types/hapi__catbox': 10.2.4 + '@types/hapi__mimos': 4.1.4 + '@types/hapi__shot': 4.1.2 + '@types/node': 18.15.9 + joi: 17.9.2 + dev: true + + /@types/hapi__mimos@4.1.4: + resolution: {integrity: sha512-i9hvJpFYTT/qzB5xKWvDYaSXrIiNqi4ephi+5Lo6+DoQdwqPXQgmVVOZR+s3MBiHoFqsCZCX9TmVWG3HczmTEQ==} + dependencies: + '@types/mime-db': 1.43.1 + dev: true + + /@types/hapi__shot@4.1.2: + resolution: {integrity: sha512-8wWgLVP1TeGqgzZtCdt+F+k15DWQvLG1Yv6ZzPfb3D5WIo5/S+GGKtJBVo2uNEcqabP5Ifc71QnJTDnTmw1axA==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/http-assert@1.5.3: + resolution: {integrity: sha512-FyAOrDuQmBi8/or3ns4rwPno7/9tJTijVW6aQQjK02+kOQ8zmoNg2XJtAuQhvQcy1ASJq38wirX5//9J1EqoUA==} + dev: true + + /@types/http-errors@1.8.2: + resolution: {integrity: sha512-EqX+YQxINb+MeXaIqYDASb6U6FCHbWjkj4a1CKDBks3d/QiB2+PqBLyO72vLDgAO1wUI4O+9gweRcQK11bTL/w==} + dev: true + + /@types/http-errors@2.0.1: + resolution: {integrity: sha512-/K3ds8TRAfBvi5vfjuz8y6+GiAYBZ0x4tXv1Av6CWBWn0IlADc+ZX9pMq7oU0fNQPnBwIZl3rmeLp6SBApbxSQ==} + dev: true + + /@types/json-schema@7.0.11: + resolution: {integrity: sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==} + dev: true + + /@types/jsonwebtoken@9.0.0: + resolution: {integrity: sha512-mM4TkDpA9oixqg1Fv2vVpOFyIVLJjm5x4k0V+K/rEsizfjD7Tk7LKk3GTtbB7KCfP0FEHQtsZqFxYA0+sijNVg==} + dependencies: + '@types/node': 18.15.9 + + /@types/keygrip@1.0.2: + resolution: {integrity: sha512-GJhpTepz2udxGexqos8wgaBx4I/zWIDPh/KOGEwAqtuGDkOUJu5eFvwmdBX4AmB8Odsr+9pHCQqiAqDL/yKMKw==} + dev: true + + /@types/koa-bodyparser@4.3.10: + resolution: {integrity: sha512-6ae05pjhmrmGhUR8GYD5qr5p9LTEMEGfGXCsK8VaSL+totwigm8+H/7MHW7K4854CMeuwRAubT8qcc/EagaeIA==} + dependencies: + '@types/koa': 2.13.5 + dev: true + + /@types/koa-compose@3.2.5: + resolution: {integrity: sha512-B8nG/OoE1ORZqCkBVsup/AKcvjdgoHnfi4pZMn5UwAPCbhk/96xyv284eBYW8JlQbQ7zDmnpFr68I/40mFoIBQ==} + dependencies: + '@types/koa': 2.13.5 + dev: true + + /@types/koa@2.13.5: + resolution: {integrity: sha512-HSUOdzKz3by4fnqagwthW/1w/yJspTgppyyalPVbgZf8jQWvdIXcVW5h2DGtw4zYntOaeRGx49r1hxoPWrD4aA==} + dependencies: + '@types/accepts': 1.3.5 + '@types/content-disposition': 0.5.5 + '@types/cookies': 0.7.7 + '@types/http-assert': 1.5.3 + '@types/http-errors': 2.0.1 + '@types/keygrip': 1.0.2 + '@types/koa-compose': 3.2.5 + '@types/node': 18.15.9 + dev: true + + /@types/mime-db@1.43.1: + resolution: {integrity: sha512-kGZJY+R+WnR5Rk+RPHUMERtb2qBRViIHCBdtUrY+NmwuGb8pQdfTqQiCKPrxpdoycl8KWm2DLdkpoSdt479XoQ==} + dev: true + + /@types/mime@1.3.2: + resolution: {integrity: sha512-YATxVxgRqNH6nHEIsvg6k2Boc1JHI9ZbH5iWFFv/MTkchz3b1ieGDa5T0a9RznNdI0KhVbdbWSN+KWWrQZRxTw==} + dev: true + + /@types/mime@3.0.1: + resolution: {integrity: sha512-Y4XFY5VJAuw0FgAqPNd6NNoV44jbq9Bz2L7Rh/J6jLTiHBSBJa9fxqQIvkIld4GsoDOcCbvzOUAbLPsSKKg+uA==} + + /@types/minimatch@3.0.5: + resolution: {integrity: sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ==} + dev: true + + /@types/ms@0.7.31: + resolution: {integrity: sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==} + dev: true + + /@types/node@18.15.9: + resolution: {integrity: sha512-dUxhiNzBLr6IqlZXz6e/rN2YQXlFgOei/Dxy+e3cyXTJ4txSUbGT2/fmnD6zd/75jDMeW5bDee+YXxlFKHoV0A==} + + /@types/nodemailer@6.4.7: + resolution: {integrity: sha512-f5qCBGAn/f0qtRcd4SEn88c8Fp3Swct1731X4ryPKqS61/A3LmmzN8zaEz7hneJvpjFbUUgY7lru/B/7ODTazg==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/on-finished@2.3.1: + resolution: {integrity: sha512-mzVYaYcFs5Jd2n/O6uYIRUsFRR1cHyZLRvkLCU0E7+G5WhY0qBDAR5fUCeZbvecYOSh9ikhlesyi2UfI8B9ckQ==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/psl@1.1.0: + resolution: {integrity: sha512-HhZnoLAvI2koev3czVPzBNRYvdrzJGLjQbWZhqFmS9Q6a0yumc5qtfSahBGb5g+6qWvA8iiQktqGkwoIXa/BNQ==} + dev: true + + /@types/qs@6.9.7: + resolution: {integrity: sha512-FGa1F62FT09qcrueBA6qYTrJPVDzah9a+493+o2PCXsesWHIn27G98TsSMs3WPNbZIEj4+VJf6saSFpvD+3Zsw==} + + /@types/range-parser@1.2.4: + resolution: {integrity: sha512-EEhsLsD6UsDM1yFhAvy0Cjr6VwmpMWqFBCb9w07wVugF7w9nfajxLuVmngTIpgS6svCnm6Vaw+MZhoDCKnOfsw==} + + /@types/serve-static@1.13.9: + resolution: {integrity: sha512-ZFqF6qa48XsPdjXV5Gsz0Zqmux2PerNd3a/ktL45mHpa19cuMi/cL8tcxdAx497yRh+QtYPuofjT9oWw9P7nkA==} + dependencies: + '@types/mime': 1.3.2 + '@types/node': 18.15.9 + dev: true + + /@types/serve-static@1.15.1: + resolution: {integrity: sha512-NUo5XNiAdULrJENtJXZZ3fHtfMolzZwczzBbnAeBbqBwG+LaG6YaJtuwzwGSQZ2wsCrxjEhNNjAkKigy3n8teQ==} + dependencies: + '@types/mime': 3.0.1 + '@types/node': 18.15.9 + + /@types/type-is@1.6.3: + resolution: {integrity: sha512-PNs5wHaNcBgCQG5nAeeZ7OvosrEsI9O4W2jAOO9BCCg4ux9ZZvH2+0iSCOIDBiKuQsiNS8CBlmfX9f5YBQ22cA==} + dependencies: + '@types/node': 18.15.9 + dev: true + + /@types/validator@10.11.0: + resolution: {integrity: sha512-i1aY7RKb6HmQIEnK0cBmUZUp1URx0riIHw/GYNoZ46Su0GWfLiDmMI8zMRmaauMnOTg2bQag0qfwcyUFC9Tn+A==} + dev: true + + /abstract-logging@2.0.1: + resolution: {integrity: sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA==} + dev: true + + /accept-language@3.0.18: + resolution: {integrity: sha512-sUofgqBPzgfcF20sPoBYGQ1IhQLt2LSkxTnlQSuLF3n5gPEqd5AimbvOvHEi0T1kLMiGVqPWzI5a9OteBRth3A==} + dependencies: + bcp47: 1.1.2 + stable: 0.1.8 + dev: true + + /accepts@1.3.8: + resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} + engines: {node: '>= 0.6'} + dependencies: + mime-types: 2.1.35 + negotiator: 0.6.3 + + /agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + dependencies: + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /ajv-errors@1.0.1(ajv@6.12.6): + resolution: {integrity: sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==} + peerDependencies: + ajv: '>=5.0.0' + dependencies: + ajv: 6.12.6 + dev: true + + /ajv-keywords@3.5.2(ajv@6.12.6): + resolution: {integrity: sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==} + peerDependencies: + ajv: ^6.9.1 + dependencies: + ajv: 6.12.6 + dev: true + + /ajv@6.12.6: + resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + dependencies: + fast-deep-equal: 3.1.3 + fast-json-stable-stringify: 2.1.0 + json-schema-traverse: 0.4.1 + uri-js: 4.4.1 + dev: true + + /ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + dependencies: + fast-deep-equal: 3.1.3 + json-schema-traverse: 1.0.0 + require-from-string: 2.0.2 + uri-js: 4.4.1 + dev: true + + /anser@1.4.9: + resolution: {integrity: sha512-AI+BjTeGt2+WFk4eWcqbQ7snZpDBt8SaLlj0RT2h5xfdWaiy51OjYvqwMrNzJLGy8iOAL6nKDITWO+rd4MkYEA==} + dev: true + + /ansi-colors@3.2.3: + resolution: {integrity: sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==} + engines: {node: '>=6'} + dev: true + + /ansi-regex@2.1.1: + resolution: {integrity: sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==} + engines: {node: '>=0.10.0'} + dev: true + + /ansi-regex@3.0.1: + resolution: {integrity: sha512-+O9Jct8wf++lXxxFc4hc8LsjaSq0HFzzL7cVsw8pRDIPdjKD2mT4ytDZlLuSBZ4cLKZFXIrMGO7DbQCtMJJMKw==} + engines: {node: '>=4'} + dev: true + + /ansi-regex@4.1.1: + resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} + engines: {node: '>=6'} + dev: true + + /ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + dev: true + + /ansi-styles@3.2.1: + resolution: {integrity: sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==} + engines: {node: '>=4'} + dependencies: + color-convert: 1.9.3 + dev: true + + /ansi-styles@4.3.0: + resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} + engines: {node: '>=8'} + dependencies: + color-convert: 2.0.1 + dev: true + + /any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + dev: true + + /anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.1 + dev: true + + /app-root-path@3.1.0: + resolution: {integrity: sha512-biN3PwB2gUtjaYy/isrU3aNWI5w+fAfvHkSvCKeQGxhmYpwKFUxudR3Yya+KqVRHBmEDYh+/lTozYCFbmzX4nA==} + engines: {node: '>= 6.0.0'} + dev: true + + /archy@1.0.0: + resolution: {integrity: sha512-Xg+9RwCg/0p32teKdGMPTPnVXKD0w3DfHnFTficozsAgsvq2XenPJq/MYpzzQ/v8zrOyJn6Ds39VA4JIDwFfqw==} + dev: true + + /argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + dependencies: + sprintf-js: 1.0.3 + dev: true + + /argparse@2.0.1: + resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} + dev: true + + /array-buffer-byte-length@1.0.0: + resolution: {integrity: sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==} + dependencies: + call-bind: 1.0.2 + is-array-buffer: 3.0.2 + dev: true + + /array-differ@3.0.0: + resolution: {integrity: sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg==} + engines: {node: '>=8'} + dev: true + + /array-flatten@1.1.1: + resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} + + /array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + dev: true + + /array.prototype.reduce@1.0.5: + resolution: {integrity: sha512-kDdugMl7id9COE8R7MHF5jWk7Dqt/fs4Pv+JXoICnYwqpjjjbUurz6w5fT5IG6brLdJhv6/VoHB0H7oyIBXd+Q==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + es-array-method-boxes-properly: 1.0.0 + is-string: 1.0.7 + dev: true + + /arrify@2.0.1: + resolution: {integrity: sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug==} + engines: {node: '>=8'} + dev: true + + /asn1.js@5.4.1: + resolution: {integrity: sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==} + dependencies: + bn.js: 4.12.0 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + safer-buffer: 2.1.2 + dev: true + + /assert@1.5.0: + resolution: {integrity: sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==} + dependencies: + object-assign: 4.1.1 + util: 0.10.3 + dev: true + + /assert@2.0.0: + resolution: {integrity: sha512-se5Cd+js9dXJnu6Ag2JFc00t+HmHOen+8Q+L7O9zI0PqQXr20uk2J0XQqMxZEeo5U50o8Nvmmx7dZrl+Ufr35A==} + dependencies: + es6-object-assign: 1.1.0 + is-nan: 1.3.2 + object-is: 1.1.5 + util: 0.12.5 + dev: true + + /assertion-error@1.1.0: + resolution: {integrity: sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==} + dev: true + + /ast-types@0.13.2: + resolution: {integrity: sha512-uWMHxJxtfj/1oZClOxDEV1sQ1HCDkA4MG8Gr69KKeBjEVH0R84WlejZ0y2DcwyBlpAEMltmVYkVgqfLFb2oyiA==} + engines: {node: '>=4'} + dev: true + + /async@3.2.4: + resolution: {integrity: sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==} + dev: true + + /asynckit@0.4.0: + resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} + dev: true + + /atomic-sleep@1.0.0: + resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} + engines: {node: '>=8.0.0'} + dev: true + + /available-typed-arrays@1.0.5: + resolution: {integrity: sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==} + engines: {node: '>= 0.4'} + dev: true + + /avvio@7.2.5: + resolution: {integrity: sha512-AOhBxyLVdpOad3TujtC9kL/9r3HnTkxwQ5ggOsYrvvZP1cCFvzHWJd5XxZDFuTn+IN8vkKSG5SEJrd27vCSbeA==} + dependencies: + archy: 1.0.0 + debug: 4.3.4 + fastq: 1.15.0 + queue-microtask: 1.2.3 + transitivePeerDependencies: + - supports-color + dev: true + + /aws-sdk-mock@5.8.0: + resolution: {integrity: sha512-s0Vy4DObFmVJ6h1uTw1LGInOop77oF0JXH2N39Lv+1Wss274EowVk9odhM4Sji4mynXcM5oSu68uYqkJRviDRA==} + dependencies: + aws-sdk: 2.1327.0 + sinon: 14.0.2 + traverse: 0.6.7 + dev: true + + /aws-sdk@2.1327.0: + resolution: {integrity: sha512-adyoVv5MGGyq6Gm2k/W2h1dqmtMw+td5IW86vomKtMTT0S0eI2iYNABCk9G2EBqZOq8nx6RYuEyhascN7eaaig==} + engines: {node: '>= 10.0.0'} + dependencies: + buffer: 4.9.2 + events: 1.1.1 + ieee754: 1.1.13 + jmespath: 0.16.0 + querystring: 0.2.0 + sax: 1.2.1 + url: 0.10.3 + util: 0.12.5 + uuid: 8.0.0 + xml2js: 0.4.19 + dev: true + + /axios@0.21.4(debug@4.3.4): + resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} + dependencies: + follow-redirects: 1.15.2(debug@4.3.4) + transitivePeerDependencies: + - debug + dev: false + + /axios@0.24.0(debug@4.3.4): + resolution: {integrity: sha512-Q6cWsys88HoPgAaFAVUb0WpPk0O8iTeisR9IMqy9G8AbO4NlpVknrnQS03zzF9PGAWgO3cgletO3VjV/P7VztA==} + dependencies: + follow-redirects: 1.15.2(debug@4.3.4) + transitivePeerDependencies: + - debug + dev: false + + /axios@0.26.1(debug@4.3.4): + resolution: {integrity: sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==} + dependencies: + follow-redirects: 1.15.2(debug@4.3.4) + transitivePeerDependencies: + - debug + dev: false + + /balanced-match@1.0.2: + resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + dev: true + + /base64-js@1.5.1: + resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} + dev: true + + /basic-auth@2.0.1: + resolution: {integrity: sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==} + engines: {node: '>= 0.8'} + dependencies: + safe-buffer: 5.1.2 + dev: false + + /bcp47@1.1.2: + resolution: {integrity: sha512-JnkkL4GUpOvvanH9AZPX38CxhiLsXMBicBY2IAtqiVN8YulGDQybUydWA4W6yAMtw6iShtw+8HEF6cfrTHU+UQ==} + engines: {node: '>=0.10'} + dev: true + + /big.js@5.2.2: + resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} + dev: true + + /binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + engines: {node: '>=8'} + dev: true + + /bl@2.2.1: + resolution: {integrity: sha512-6Pesp1w0DEX1N550i/uGV/TqucVL4AM/pgThFSN/Qq9si1/DF9aIHs1BxD8V/QU0HoeHO6cQRTAuYnLPKq1e4g==} + dependencies: + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + dev: true + + /bluebird@3.7.2: + resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + dev: true + + /bn.js@4.12.0: + resolution: {integrity: sha512-c98Bf3tPniI+scsdk237ku1Dc3ujXQTSgyiPUDEOe7tRkhrqridvh8klBv0HCEso1OLOYcHuCv/cS6DNxKH+ZA==} + dev: true + + /bn.js@5.2.1: + resolution: {integrity: sha512-eXRvHzWyYPBuB4NBy0cmYQjGitUrtqwbvlzP3G6VFnNRbsZQIxQ10PbKKHt8gZ/HW/D/747aDl+QkDqg3KQLMQ==} + dev: true + + /body-parser@1.19.0: + resolution: {integrity: sha512-dhEPs72UPbDnAQJ9ZKMNTP6ptJaionhP5cBb541nXPlW60Jepo9RV/a4fX4XWW9CuFNK22krhrj1+rgzifNCsw==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.0 + content-type: 1.0.5 + debug: 2.6.9 + depd: 1.1.2 + http-errors: 1.7.2 + iconv-lite: 0.4.24 + on-finished: 2.3.0 + qs: 6.7.0 + raw-body: 2.4.0 + type-is: 1.6.18 + transitivePeerDependencies: + - supports-color + dev: false + + /body-parser@1.20.1: + resolution: {integrity: sha512-jWi7abTbYwajOytWCQc37VulmWiRae5RyTpaCyDcS5/lMdtwSz5lOpDE67srw/HYe35f1z3fDQw+3txg7gNtWw==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + dependencies: + bytes: 3.1.2 + content-type: 1.0.5 + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + on-finished: 2.4.1 + qs: 6.11.0 + raw-body: 2.5.1 + type-is: 1.6.18 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + /brace-expansion@1.1.11: + resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} + dependencies: + balanced-match: 1.0.2 + concat-map: 0.0.1 + dev: true + + /brace-expansion@2.0.1: + resolution: {integrity: sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==} + dependencies: + balanced-match: 1.0.2 + dev: true + + /braces@3.0.2: + resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} + engines: {node: '>=8'} + dependencies: + fill-range: 7.0.1 + dev: true + + /brorand@1.1.0: + resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} + dev: true + + /browser-stdout@1.3.1: + resolution: {integrity: sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==} + dev: true + + /browserify-aes@1.2.0: + resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} + dependencies: + buffer-xor: 1.0.3 + cipher-base: 1.0.4 + create-hash: 1.2.0 + evp_bytestokey: 1.0.3 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /browserify-cipher@1.0.1: + resolution: {integrity: sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==} + dependencies: + browserify-aes: 1.2.0 + browserify-des: 1.0.2 + evp_bytestokey: 1.0.3 + dev: true + + /browserify-des@1.0.2: + resolution: {integrity: sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==} + dependencies: + cipher-base: 1.0.4 + des.js: 1.0.1 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /browserify-rsa@4.1.0: + resolution: {integrity: sha512-AdEER0Hkspgno2aR97SAf6vi0y0k8NuOpGnVH3O99rcA5Q6sh8QxcngtHuJ6uXwnfAXNM4Gn1Gb7/MV1+Ymbog==} + dependencies: + bn.js: 5.2.1 + randombytes: 2.1.0 + dev: true + + /browserify-sign@4.2.1: + resolution: {integrity: sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==} + dependencies: + bn.js: 5.2.1 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + create-hmac: 1.1.7 + elliptic: 6.5.4 + inherits: 2.0.4 + parse-asn1: 5.1.6 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + dev: true + + /browserify-zlib@0.2.0: + resolution: {integrity: sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==} + dependencies: + pako: 1.0.11 + dev: true + + /browserslist@4.16.6: + resolution: {integrity: sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001460 + colorette: 1.4.0 + electron-to-chromium: 1.4.388 + escalade: 3.1.1 + node-releases: 1.1.77 + dev: true + + /browserslist@4.21.5: + resolution: {integrity: sha512-tUkiguQGW7S3IhB7N+c2MV/HZPSCPAAiYBZXLsBhFB/PCy6ZKKsZrmBayHV9fdGV/ARIfJ14NkxKzRDjvp7L6w==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + dependencies: + caniuse-lite: 1.0.30001460 + electron-to-chromium: 1.4.388 + node-releases: 2.0.10 + update-browserslist-db: 1.0.11(browserslist@4.21.5) + dev: true + + /buffer-equal-constant-time@1.0.1: + resolution: {integrity: sha512-zRpUiDwd/xk6ADqPMATG8vc9VPrkck7T07OIx0gnjmJAnHnTVXNQG3vfvWNuiZIkwu9KrKdA1iJKfsfTVxE6NA==} + dev: false + + /buffer-xor@1.0.3: + resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} + dev: true + + /buffer@4.9.2: + resolution: {integrity: sha512-xq+q3SRMOxGivLhBNaUdC64hDTQwejJ+H0T/NB1XMtTVEwNTrfFF3gAxiyW0Bu/xWEGhjVKgUcMhCrUy2+uCWg==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + isarray: 1.0.0 + dev: true + + /buffer@5.6.0: + resolution: {integrity: sha512-/gDYp/UtU0eA1ys8bOs9J6a+E/KWIY+DZ+Q2WESNUA0jFRsJOc0SNUO6xJ5SGA1xueg3NL65W6s+NY5l9cunuw==} + dependencies: + base64-js: 1.5.1 + ieee754: 1.2.1 + dev: true + + /builtin-status-codes@3.0.0: + resolution: {integrity: sha512-HpGFw18DgFWlncDfjTa2rcQ4W88O1mC8e8yZ2AvQY5KDaktSTwo+KRf6nHK6FRI5FyRyb/5T6+TSxfP7QyGsmQ==} + dev: true + + /bundle-require@4.0.1(esbuild@0.17.18): + resolution: {integrity: sha512-9NQkRHlNdNpDBGmLpngF3EFDcwodhMUuLz9PaWYciVcQF9SE4LFjM2DB/xV1Li5JiuDMv7ZUWuC3rGbqR0MAXQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + peerDependencies: + esbuild: '>=0.17' + dependencies: + esbuild: 0.17.18 + load-tsconfig: 0.2.5 + dev: true + + /bytes@3.1.0: + resolution: {integrity: sha512-zauLjrfCG+xvoyaqLoV8bLVXXNGC4JqlxFCutSDWA6fJrTo2ZuvLYTqZ7aHBLZSMOopbzwv8f+wZcVzfVTI2Dg==} + engines: {node: '>= 0.8'} + + /bytes@3.1.2: + resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} + engines: {node: '>= 0.8'} + + /cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + dev: true + + /cache-content-type@1.0.1: + resolution: {integrity: sha512-IKufZ1o4Ut42YUrZSo8+qnMTrFuKkvyoLXUywKz9GJ5BrhOFGhLdkx9sG4KAnVvbY6kEcSFjLQul+DVmBm2bgA==} + engines: {node: '>= 6.0.0'} + dependencies: + mime-types: 2.1.35 + ylru: 1.3.2 + dev: true + + /call-bind@1.0.2: + resolution: {integrity: sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==} + dependencies: + function-bind: 1.1.1 + get-intrinsic: 1.2.0 + + /camel-case@4.1.2: + resolution: {integrity: sha512-gxGWBrTT1JuMx6R+o5PTXMmUnhnVzLQ9SNutD4YqKtI6ap897t3tKECYla6gCWEkplXnlNybEkZg9GEGxKFCgw==} + dependencies: + pascal-case: 3.1.2 + tslib: 2.5.0 + dev: true + + /camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + dev: true + + /caniuse-lite@1.0.30001460: + resolution: {integrity: sha512-Bud7abqjvEjipUkpLs4D7gR0l8hBYBHoa+tGtKJHvT2AYzLp1z7EmVkUT4ERpVUfca8S2HGIVs883D8pUH1ZzQ==} + dev: true + + /capital-case@1.0.4: + resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} + dependencies: + no-case: 3.0.4 + tslib: 2.5.0 + upper-case-first: 2.0.2 + dev: true + + /chai@4.3.7: + resolution: {integrity: sha512-HLnAzZ2iupm25PlN0xFreAlBA5zaBSv3og0DdeGA4Ar6h6rJ3A0rolRUKJhSF2V10GZKDgWF/VmAEsNWjCRB+A==} + engines: {node: '>=4'} + dependencies: + assertion-error: 1.1.0 + check-error: 1.0.2 + deep-eql: 4.1.3 + get-func-name: 2.0.0 + loupe: 2.3.6 + pathval: 1.1.1 + type-detect: 4.0.8 + dev: true + + /chalk@2.4.2: + resolution: {integrity: sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==} + engines: {node: '>=4'} + dependencies: + ansi-styles: 3.2.1 + escape-string-regexp: 1.0.5 + supports-color: 5.5.0 + dev: true + + /chalk@3.0.0: + resolution: {integrity: sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==} + engines: {node: '>=8'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chalk@4.0.0: + resolution: {integrity: sha512-N9oWFcegS0sFr9oh1oz2d7Npos6vNoWW9HvtCg5N1KRFpUhaAhvTv5Y58g880fZaEYSNm3qDz8SU1UrGvp+n7A==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /chalk@4.1.2: + resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} + engines: {node: '>=10'} + dependencies: + ansi-styles: 4.3.0 + supports-color: 7.2.0 + dev: true + + /change-case@4.1.2: + resolution: {integrity: sha512-bSxY2ws9OtviILG1EiY5K7NNxkqg/JnRnFxLtKQ96JaviiIxi7djMrSd0ECT9AC+lttClmYwKw53BWpOMblo7A==} + dependencies: + camel-case: 4.1.2 + capital-case: 1.0.4 + constant-case: 3.0.4 + dot-case: 3.0.4 + header-case: 2.0.4 + no-case: 3.0.4 + param-case: 3.0.4 + pascal-case: 3.1.2 + path-case: 3.0.4 + sentence-case: 3.0.4 + snake-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /charenc@0.0.2: + resolution: {integrity: sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==} + dev: true + + /check-error@1.0.2: + resolution: {integrity: sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==} + dev: true + + /chokidar@3.5.1: + resolution: {integrity: sha512-9+s+Od+W0VJJzawDma/gvBNQqkTiqYTWLuZoyAsivsI4AaWTCzHG06/TMjsf1cYe9Cb97UCEhjz7HvnPk2p/tw==} + engines: {node: '>= 8.10.0'} + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.5.0 + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /cipher-base@1.0.4: + resolution: {integrity: sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==} + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /classnames@2.2.6: + resolution: {integrity: sha512-JR/iSQOSt+LQIWwrwEzJ9uk0xfN3mTVYMwt1Ir5mUcSN6pU+V4zQFFaJsclJbPuAUQH+yfWef6tm7l1quW3C8Q==} + dev: true + + /cldrjs@0.5.5: + resolution: {integrity: sha512-KDwzwbmLIPfCgd8JERVDpQKrUUM1U4KpFJJg2IROv89rF172lLufoJnqJ/Wea6fXL5bO6WjuLMzY8V52UWPvkA==} + dev: true + + /cliui@4.1.0: + resolution: {integrity: sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==} + dependencies: + string-width: 2.1.1 + strip-ansi: 4.0.0 + wrap-ansi: 2.1.0 + dev: true + + /clone-deep@4.0.1: + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} + dependencies: + is-plain-object: 2.0.4 + kind-of: 6.0.3 + shallow-clone: 3.0.1 + dev: true + + /co-body@6.1.0: + resolution: {integrity: sha512-m7pOT6CdLN7FuXUcpuz/8lfQ/L77x8SchHCF4G0RBTJO20Wzmhn5Sp4/5WsKy8OSpifBSUrmg83qEqaDHdyFuQ==} + dependencies: + inflation: 2.0.0 + qs: 6.11.0 + raw-body: 2.5.2 + type-is: 1.6.18 + dev: false + + /co@4.6.0: + resolution: {integrity: sha512-QVb0dM5HvG+uaxitm8wONl7jltx8dqhfU33DcqtOZcLSVIKSDDLDi7+0LbAKiyI8hD9u42m2YxXSkMGWThaecQ==} + engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} + dev: true + + /code-point-at@1.1.0: + resolution: {integrity: sha512-RpAVKQA5T63xEj6/giIbUEtZwJ4UFIc3ZtvEkiaUERylqe8xb5IvqcgOurZLahv93CLKfxcw5YI+DZcUBRyLXA==} + engines: {node: '>=0.10.0'} + dev: true + + /color-convert@1.9.3: + resolution: {integrity: sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==} + dependencies: + color-name: 1.1.3 + dev: true + + /color-convert@2.0.1: + resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} + engines: {node: '>=7.0.0'} + dependencies: + color-name: 1.1.4 + dev: true + + /color-name@1.1.3: + resolution: {integrity: sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==} + dev: true + + /color-name@1.1.4: + resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} + dev: true + + /colorette@1.4.0: + resolution: {integrity: sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==} + dev: true + + /combined-stream@1.0.8: + resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} + engines: {node: '>= 0.8'} + dependencies: + delayed-stream: 1.0.0 + dev: true + + /commander@4.1.1: + resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} + engines: {node: '>= 6'} + dev: true + + /commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} + dev: true + + /component-emitter@1.3.0: + resolution: {integrity: sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==} + dev: true + + /concat-map@0.0.1: + resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + dev: true + + /console-browserify@1.2.0: + resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} + dev: true + + /constant-case@3.0.4: + resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} + dependencies: + no-case: 3.0.4 + tslib: 2.5.0 + upper-case: 2.0.2 + dev: true + + /constants-browserify@1.0.0: + resolution: {integrity: sha512-xFxOwqIzR/e1k1gLiWEophSCMqXcwVHIH7akf7b/vxcUeGunlj3hvZaaqxwHsTgn+IndtkQJgSztIDWeumWJDQ==} + dev: true + + /content-disposition@0.5.3: + resolution: {integrity: sha512-ExO0774ikEObIAEV9kDo50o+79VCUdEB6n6lzKgGwupcVeRlhrj3qGAfwq8G6uBJjkqLrhT0qEYFcWng8z1z0g==} + engines: {node: '>= 0.6'} + dependencies: + safe-buffer: 5.1.2 + dev: false + + /content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + dependencies: + safe-buffer: 5.2.1 + + /content-type@1.0.5: + resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} + engines: {node: '>= 0.6'} + + /convert-source-map@1.7.0: + resolution: {integrity: sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==} + dependencies: + safe-buffer: 5.1.2 + dev: true + + /convert-source-map@1.9.0: + resolution: {integrity: sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A==} + dev: true + + /cookie-parser@1.4.4: + resolution: {integrity: sha512-lo13tqF3JEtFO7FyA49CqbhaFkskRJ0u/UAiINgrIXeRCY41c88/zxtrECl8AKH3B0hj9q10+h3Kt8I7KlW4tw==} + engines: {node: '>= 0.8.0'} + dependencies: + cookie: 0.3.1 + cookie-signature: 1.0.6 + dev: false + + /cookie-parser@1.4.6: + resolution: {integrity: sha512-z3IzaNjdwUC2olLIB5/ITd0/setiaFMLYiZJle7xg5Fe9KWAceil7xszYfHHBtDFYLSgJduS2Ty0P1uJdPDJeA==} + engines: {node: '>= 0.8.0'} + dependencies: + cookie: 0.4.1 + cookie-signature: 1.0.6 + dev: true + + /cookie-signature@1.0.6: + resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + + /cookie@0.3.1: + resolution: {integrity: sha512-+IJOX0OqlHCszo2mBUq+SrEbCj6w7Kpffqx60zYbPTFaO4+yYgRjHwcZNpWvaTylDHaV7PPmBHzSecZiMhtPgw==} + engines: {node: '>= 0.6'} + dev: false + + /cookie@0.4.0: + resolution: {integrity: sha512-+Hp8fLp57wnUSt0tY0tHEXh4voZRDnoIrZPqlo3DPiI4y9lwg/jqx+1Om94/W6ZaPDOUbnjOt/99w66zk+l1Xg==} + engines: {node: '>= 0.6'} + dev: false + + /cookie@0.4.1: + resolution: {integrity: sha512-ZwrFkGJxUR3EIoXtO+yVE69Eb7KlixbaeAWfBQB9vVsNn/o+Yw69gBWSSDK825hQNdN+wF8zELf3dFNl/kxkUA==} + engines: {node: '>= 0.6'} + dev: true + + /cookie@0.5.0: + resolution: {integrity: sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==} + engines: {node: '>= 0.6'} + + /cookiejar@2.1.4: + resolution: {integrity: sha512-LDx6oHrK+PhzLKJU9j5S7/Y3jM/mUHvD/DeI1WQmJn652iPC5Y4TBzC9l+5OMOXlyTTA+SmVUPm0HQUwpD5Jqw==} + dev: true + + /cookies@0.8.0: + resolution: {integrity: sha512-8aPsApQfebXnuI+537McwYsDtjVxGm8gTIzQI3FDW6t5t/DAhERxtnbEPN/8RX+uZthoz4eCOgloXaE5cYyNow==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + keygrip: 1.1.0 + dev: true + + /core-util-is@1.0.3: + resolution: {integrity: sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==} + dev: true + + /cors@2.8.5: + resolution: {integrity: sha512-KIHbLJqu73RGr/hnbrO9uBeixNGuvSQjul/jdFvS/KFSIH1hWVd1ng7zOHx+YrEfInLG7q4n6GHQ9cDtxv/P6g==} + engines: {node: '>= 0.10'} + dependencies: + object-assign: 4.1.1 + vary: 1.1.2 + + /create-ecdh@4.0.4: + resolution: {integrity: sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==} + dependencies: + bn.js: 4.12.0 + elliptic: 6.5.4 + dev: true + + /create-hash@1.2.0: + resolution: {integrity: sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==} + dependencies: + cipher-base: 1.0.4 + inherits: 2.0.4 + md5.js: 1.3.5 + ripemd160: 2.0.2 + sha.js: 2.4.11 + dev: true + + /create-hmac@1.1.7: + resolution: {integrity: sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==} + dependencies: + cipher-base: 1.0.4 + create-hash: 1.2.0 + inherits: 2.0.4 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + + /cross-spawn@6.0.5: + resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} + engines: {node: '>=4.8'} + dependencies: + nice-try: 1.0.5 + path-key: 2.0.1 + semver: 5.7.1 + shebang-command: 1.2.0 + which: 1.3.1 + dev: true + + /cross-spawn@7.0.3: + resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} + engines: {node: '>= 8'} + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + dev: true + + /crypt@0.0.2: + resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} + dev: true + + /crypto-browserify@3.12.0: + resolution: {integrity: sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==} + dependencies: + browserify-cipher: 1.0.1 + browserify-sign: 4.2.1 + create-ecdh: 4.0.4 + create-hash: 1.2.0 + create-hmac: 1.1.7 + diffie-hellman: 5.0.3 + inherits: 2.0.4 + pbkdf2: 3.1.2 + public-encrypt: 4.0.3 + randombytes: 2.1.0 + randomfill: 1.0.4 + dev: true + + /css.escape@1.5.1: + resolution: {integrity: sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==} + dev: true + + /cssnano-preset-simple@3.0.2(postcss@8.2.15): + resolution: {integrity: sha512-7c6EOw3oZshKOZc20Jh+cs2dIKxp0viV043jdal/t1iGVQkoyAQio3rrFWhPgAlkXMu+PRXsslqLhosFTmLhmQ==} + peerDependencies: + postcss: ^8.2.15 + dependencies: + caniuse-lite: 1.0.30001460 + postcss: 8.2.15 + dev: true + + /cssnano-simple@3.0.0(postcss@8.2.15): + resolution: {integrity: sha512-oU3ueli5Dtwgh0DyeohcIEE00QVfbPR3HzyXdAl89SfnQG3y0/qcpfLVW+jPIh3/rgMZGwuW96rejZGaYE9eUg==} + peerDependencies: + postcss: ^8.2.15 + peerDependenciesMeta: + postcss: + optional: true + dependencies: + cssnano-preset-simple: 3.0.2(postcss@8.2.15) + postcss: 8.2.15 + dev: true + + /data-uri-to-buffer@3.0.1: + resolution: {integrity: sha512-WboRycPNsVw3B3TL559F7kuBUM4d8CgMEvk6xEJlOp7OBPjt6G7z8WMWlD2rOFZLk6OYfFIUGsCOWzcQH9K2og==} + engines: {node: '>= 6'} + dev: true + + /dayjs@1.11.7: + resolution: {integrity: sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ==} + dev: false + + /debug@2.6.9: + resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.0.0 + + /debug@3.2.6(supports-color@6.0.0): + resolution: {integrity: sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==} + deprecated: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (https://github.com/visionmedia/debug/issues/797) + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + supports-color: 6.0.0 + dev: true + + /debug@3.2.7: + resolution: {integrity: sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.3 + dev: true + + /debug@4.3.4: + resolution: {integrity: sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + dependencies: + ms: 2.1.2 + + /decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} + dev: true + + /deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + engines: {node: '>=6'} + dependencies: + type-detect: 4.0.8 + dev: true + + /deep-equal@1.0.1: + resolution: {integrity: sha512-bHtC0iYvWhyaTzvV3CZgPeZQqCOBGyGsVV7v4eevpdkLHfiSrXUdBG+qAuSz4RI70sszvjQ1QSZ98An1yNwpSw==} + dev: true + + /deepmerge@4.3.1: + resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} + engines: {node: '>=0.10.0'} + dev: true + + /define-properties@1.2.0: + resolution: {integrity: sha512-xvqAVKGfT1+UAvPwKTVw/njhdQ8ZhXK4lI0bCIuCMrp2up9nPnaDftrLtmpTazqd1o+UY4zgzU+avtMbDP+ldA==} + engines: {node: '>= 0.4'} + dependencies: + has-property-descriptors: 1.0.0 + object-keys: 1.1.1 + dev: true + + /delayed-stream@1.0.0: + resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} + engines: {node: '>=0.4.0'} + dev: true + + /delegates@1.0.0: + resolution: {integrity: sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==} + dev: true + + /depd@1.1.2: + resolution: {integrity: sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==} + engines: {node: '>= 0.6'} + + /depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + + /des.js@1.0.1: + resolution: {integrity: sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + + /destroy@1.0.4: + resolution: {integrity: sha512-3NdhDuEXnfun/z7x9GOElY49LoqVHoGScmOKwmxhsS8N5Y+Z8KyPPDnaSzqWgYt/ji4mqwfTS34Htrk0zPIXVg==} + dev: false + + /destroy@1.2.0: + resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} + engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + + /diff@3.5.0: + resolution: {integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==} + engines: {node: '>=0.3.1'} + dev: true + + /diff@5.1.0: + resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + engines: {node: '>=0.3.1'} + dev: true + + /diffie-hellman@5.0.3: + resolution: {integrity: sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==} + dependencies: + bn.js: 4.12.0 + miller-rabin: 4.0.1 + randombytes: 2.1.0 + dev: true + + /dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + dependencies: + path-type: 4.0.0 + dev: true + + /domain-browser@1.2.0: + resolution: {integrity: sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==} + engines: {node: '>=0.4', npm: '>=1.2'} + dev: true + + /domain-browser@4.19.0: + resolution: {integrity: sha512-fRA+BaAWOR/yr/t7T9E9GJztHPeFjj8U35ajyAjCDtAAnTn1Rc1f6W6VGPJrO1tkQv9zWu+JRof7z6oQtiYVFQ==} + engines: {node: '>=10'} + dev: true + + /dot-case@3.0.4: + resolution: {integrity: sha512-Kv5nKlh6yRrdrGvxeJ2e5y2eRUpkUosIW4A2AS38zwSz27zu7ufDwQPi5Jhs3XAlGNetl3bmnGhQsMtkKJnj3w==} + dependencies: + no-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /dotenv-json@1.0.0: + resolution: {integrity: sha512-jAssr+6r4nKhKRudQ0HOzMskOFFi9+ubXWwmrSGJFgTvpjyPXCXsCsYbjif6mXp7uxA7xY3/LGaiTQukZzSbOQ==} + dev: true + + /dotenv@8.6.0: + resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} + engines: {node: '>=10'} + + /ecdsa-sig-formatter@1.0.11: + resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==} + dependencies: + safe-buffer: 5.2.1 + dev: false + + /ee-first@1.1.1: + resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + + /ejs@3.1.8: + resolution: {integrity: sha512-/sXZeMlhS0ArkfX2Aw780gJzXSMPnKjtspYZv+f3NiKLlubezAHDU5+9xz6gd3/NhG3txQCo6xlglmTS+oTGEQ==} + engines: {node: '>=0.10.0'} + hasBin: true + dependencies: + jake: 10.8.5 + dev: true + + /electron-to-chromium@1.4.388: + resolution: {integrity: sha512-xZ0y4zjWZgp65okzwwt00f2rYibkFPHUv9qBz+Vzn8cB9UXIo9Zc6Dw81LJYhhNt0G/vR1OJEfStZ49NKl0YxQ==} + dev: true + + /elliptic@6.5.4: + resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + + /emoji-regex@7.0.3: + resolution: {integrity: sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==} + dev: true + + /emojis-list@2.1.0: + resolution: {integrity: sha512-knHEZMgs8BB+MInokmNTg/OyPlAddghe1YBgNwJBc5zsJi/uyIcXoSDsL/W9ymOsBoBGdPIHXYJ9+qKFwRwDng==} + engines: {node: '>= 0.10'} + dev: true + + /encodeurl@1.0.2: + resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} + engines: {node: '>= 0.8'} + + /encoding@0.1.13: + resolution: {integrity: sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==} + dependencies: + iconv-lite: 0.6.3 + dev: true + + /end-of-stream@1.4.4: + resolution: {integrity: sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==} + dependencies: + once: 1.4.0 + dev: true + + /es-abstract@1.21.2: + resolution: {integrity: sha512-y/B5POM2iBnIxCiernH1G7rC9qQoM77lLIMQLuob0zhp8C56Po81+2Nj0WFKnd0pNReDTnkYryc+zhOzpEIROg==} + engines: {node: '>= 0.4'} + dependencies: + array-buffer-byte-length: 1.0.0 + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + es-set-tostringtag: 2.0.1 + es-to-primitive: 1.2.1 + function.prototype.name: 1.1.5 + get-intrinsic: 1.2.0 + get-symbol-description: 1.0.0 + globalthis: 1.0.3 + gopd: 1.0.1 + has: 1.0.3 + has-property-descriptors: 1.0.0 + has-proto: 1.0.1 + has-symbols: 1.0.3 + internal-slot: 1.0.5 + is-array-buffer: 3.0.2 + is-callable: 1.2.7 + is-negative-zero: 2.0.2 + is-regex: 1.1.4 + is-shared-array-buffer: 1.0.2 + is-string: 1.0.7 + is-typed-array: 1.1.10 + is-weakref: 1.0.2 + object-inspect: 1.12.3 + object-keys: 1.1.1 + object.assign: 4.1.4 + regexp.prototype.flags: 1.4.3 + safe-regex-test: 1.0.0 + string.prototype.trim: 1.2.7 + string.prototype.trimend: 1.0.6 + string.prototype.trimstart: 1.0.6 + typed-array-length: 1.0.4 + unbox-primitive: 1.0.2 + which-typed-array: 1.1.9 + dev: true + + /es-array-method-boxes-properly@1.0.0: + resolution: {integrity: sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==} + dev: true + + /es-set-tostringtag@2.0.1: + resolution: {integrity: sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.0 + has: 1.0.3 + has-tostringtag: 1.0.0 + dev: true + + /es-to-primitive@1.2.1: + resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} + engines: {node: '>= 0.4'} + dependencies: + is-callable: 1.2.7 + is-date-object: 1.0.5 + is-symbol: 1.0.4 + dev: true + + /es6-object-assign@1.1.0: + resolution: {integrity: sha512-MEl9uirslVwqQU369iHNWZXsI8yaZYGg/D65aOgZkeyFJwHYSxilf7rQzXKI7DdDuBPrBXbfk3sl9hJhmd5AUw==} + dev: true + + /esbuild@0.17.18: + resolution: {integrity: sha512-z1lix43jBs6UKjcZVKOw2xx69ffE2aG0PygLL5qJ9OS/gy0Ewd1gW/PUQIOIQGXBHWNywSc0floSKoMFF8aK2w==} + engines: {node: '>=12'} + hasBin: true + requiresBuild: true + optionalDependencies: + '@esbuild/android-arm': 0.17.18 + '@esbuild/android-arm64': 0.17.18 + '@esbuild/android-x64': 0.17.18 + '@esbuild/darwin-arm64': 0.17.18 + '@esbuild/darwin-x64': 0.17.18 + '@esbuild/freebsd-arm64': 0.17.18 + '@esbuild/freebsd-x64': 0.17.18 + '@esbuild/linux-arm': 0.17.18 + '@esbuild/linux-arm64': 0.17.18 + '@esbuild/linux-ia32': 0.17.18 + '@esbuild/linux-loong64': 0.17.18 + '@esbuild/linux-mips64el': 0.17.18 + '@esbuild/linux-ppc64': 0.17.18 + '@esbuild/linux-riscv64': 0.17.18 + '@esbuild/linux-s390x': 0.17.18 + '@esbuild/linux-x64': 0.17.18 + '@esbuild/netbsd-x64': 0.17.18 + '@esbuild/openbsd-x64': 0.17.18 + '@esbuild/sunos-x64': 0.17.18 + '@esbuild/win32-arm64': 0.17.18 + '@esbuild/win32-ia32': 0.17.18 + '@esbuild/win32-x64': 0.17.18 + dev: true + + /escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + engines: {node: '>=6'} + dev: true + + /escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + + /escape-string-regexp@1.0.5: + resolution: {integrity: sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==} + engines: {node: '>=0.8.0'} + dev: true + + /esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /etag@1.8.1: + resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} + engines: {node: '>= 0.6'} + + /events@1.1.1: + resolution: {integrity: sha512-kEcvvCBByWXGnZy6JUlgAp2gBIUjfCAV6P6TgT1/aaQKcmuAEC4OZTV1I4EWQLz2gxZw76atuVyvHhTxvi0Flw==} + engines: {node: '>=0.4.x'} + dev: true + + /events@3.3.0: + resolution: {integrity: sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q==} + engines: {node: '>=0.8.x'} + dev: true + + /evp_bytestokey@1.0.3: + resolution: {integrity: sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==} + dependencies: + md5.js: 1.3.5 + safe-buffer: 5.2.1 + dev: true + + /execa@1.0.0: + resolution: {integrity: sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==} + engines: {node: '>=6'} + dependencies: + cross-spawn: 6.0.5 + get-stream: 4.1.0 + is-stream: 1.1.0 + npm-run-path: 2.0.2 + p-finally: 1.0.0 + signal-exit: 3.0.7 + strip-eof: 1.0.0 + dev: true + + /execa@4.1.0: + resolution: {integrity: sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA==} + engines: {node: '>=10'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 5.2.0 + human-signals: 1.1.1 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + dev: true + + /execa@5.1.1: + resolution: {integrity: sha512-8uSpZZocAZRBAPIEINJj3Lo9HyGitllczc27Eh5YYojjMFMn8yHMDMaUHE2Jqfq05D/wucwI4JGURyXt1vchyg==} + engines: {node: '>=10'} + dependencies: + cross-spawn: 7.0.3 + get-stream: 6.0.1 + human-signals: 2.1.0 + is-stream: 2.0.1 + merge-stream: 2.0.0 + npm-run-path: 4.0.1 + onetime: 5.1.2 + signal-exit: 3.0.7 + strip-final-newline: 2.0.0 + dev: true + + /express-unless@2.1.3: + resolution: {integrity: sha512-wj4tLMyCVYuIIKHGt0FhCtIViBcwzWejX0EjNxveAa6dG+0XBCQhMbx+PnkLkFCxLC69qoFrxds4pIyL88inaQ==} + dev: false + + /express@4.17.1: + resolution: {integrity: sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g==} + engines: {node: '>= 0.10.0'} + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.19.0 + content-disposition: 0.5.3 + content-type: 1.0.5 + cookie: 0.4.0 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 1.1.2 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.1.2 + fresh: 0.5.2 + merge-descriptors: 1.0.1 + methods: 1.1.2 + on-finished: 2.3.0 + parseurl: 1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: 2.0.7 + qs: 6.7.0 + range-parser: 1.2.1 + safe-buffer: 5.1.2 + send: 0.17.1 + serve-static: 1.14.1 + setprototypeof: 1.1.1 + statuses: 1.5.0 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + dev: false + + /express@4.18.2: + resolution: {integrity: sha512-5/PsL6iGPdfQ/lKM1UuielYgv3BUoJfz1aUwU9vHZ+J7gyvwdQXFEBIEIaxeGf0GIcreATNyBExtalisDbuMqQ==} + engines: {node: '>= 0.10.0'} + dependencies: + accepts: 1.3.8 + array-flatten: 1.1.1 + body-parser: 1.20.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookie: 0.5.0 + cookie-signature: 1.0.6 + debug: 2.6.9 + depd: 2.0.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + finalhandler: 1.2.0 + fresh: 0.5.2 + http-errors: 2.0.0 + merge-descriptors: 1.0.1 + methods: 1.1.2 + on-finished: 2.4.1 + parseurl: 1.3.3 + path-to-regexp: 0.1.7 + proxy-addr: 2.0.7 + qs: 6.11.0 + range-parser: 1.2.1 + safe-buffer: 5.2.1 + send: 0.18.0 + serve-static: 1.15.0 + setprototypeof: 1.2.0 + statuses: 2.0.1 + type-is: 1.6.18 + utils-merge: 1.0.1 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + + /extend@3.0.2: + resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==} + dev: true + + /fast-decode-uri-component@1.0.1: + resolution: {integrity: sha512-WKgKWg5eUxvRZGwW8FvfbaH7AXSh2cL+3j5fMGzUMCxWBJ3dV3a7Wz8y2f/uQ0e3B6WmodD3oS54jTQ9HVTIIg==} + dev: true + + /fast-deep-equal@3.1.3: + resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} + dev: true + + /fast-glob@3.2.12: + resolution: {integrity: sha512-DVj4CQIYYow0BlaelwK1pHl5n5cRSJfM60UA0zK891sVInoPri2Ekj7+e1CT3/3qxXenpI+nBBmQAcJPJgaj4w==} + engines: {node: '>=8.6.0'} + dependencies: + '@nodelib/fs.stat': 2.0.5 + '@nodelib/fs.walk': 1.2.8 + glob-parent: 5.1.2 + merge2: 1.4.1 + micromatch: 4.0.5 + dev: true + + /fast-json-stable-stringify@2.1.0: + resolution: {integrity: sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==} + dev: true + + /fast-json-stringify@2.7.13: + resolution: {integrity: sha512-ar+hQ4+OIurUGjSJD1anvYSDcUflywhKjfxnsW4TBTD7+u0tJufv6DKRWoQk3vI6YBOWMoz0TQtfbe7dxbQmvA==} + engines: {node: '>= 10.0.0'} + dependencies: + ajv: 6.12.6 + deepmerge: 4.3.1 + rfdc: 1.3.0 + string-similarity: 4.0.4 + dev: true + + /fast-redact@3.1.2: + resolution: {integrity: sha512-+0em+Iya9fKGfEQGcd62Yv6onjBmmhV1uh86XVfOU8VwAe6kaFdQCWI9s0/Nnugx5Vd9tdbZ7e6gE2tR9dzXdw==} + engines: {node: '>=6'} + dev: true + + /fast-safe-stringify@2.1.1: + resolution: {integrity: sha512-W+KJc2dmILlPplD/H4K9l9LcAHAfPtP6BY84uVLXQ6Evcz9Lcg33Y2z1IVblT6xdY54PXYVHEv+0Wpq8Io6zkA==} + dev: true + + /fastify-error@0.3.1: + resolution: {integrity: sha512-oCfpcsDndgnDVgiI7bwFKAun2dO+4h84vBlkWsWnz/OUK9Reff5UFoFl241xTiLeHWX/vU9zkDVXqYUxjOwHcQ==} + dev: true + + /fastify-warning@0.2.0: + resolution: {integrity: sha512-s1EQguBw/9qtc1p/WTY4eq9WMRIACkj+HTcOIK1in4MV5aFaQC9ZCIt0dJ7pr5bIf4lPpHvAtP2ywpTNgs7hqw==} + deprecated: This module renamed to process-warning + dev: true + + /fastify@3.18.1: + resolution: {integrity: sha512-OA0imy/bQCMzf7LUCb/1JI3ZSoA0Jo0MLpYULxV7gpppOpJ8NBxDp2PQoQ0FDqJevZPb7tlZf5JacIQft8x9yw==} + dependencies: + '@fastify/ajv-compiler': 1.1.0 + abstract-logging: 2.0.1 + avvio: 7.2.5 + fast-json-stringify: 2.7.13 + fastify-error: 0.3.1 + fastify-warning: 0.2.0 + find-my-way: 4.5.1 + flatstr: 1.0.12 + light-my-request: 4.12.0 + pino: 6.14.0 + proxy-addr: 2.0.7 + readable-stream: 3.6.2 + rfdc: 1.3.0 + secure-json-parse: 2.7.0 + semver: 7.3.8 + tiny-lru: 7.0.6 + transitivePeerDependencies: + - supports-color + dev: true + + /fastq@1.15.0: + resolution: {integrity: sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==} + dependencies: + reusify: 1.0.4 + dev: true + + /filelist@1.0.4: + resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} + dependencies: + minimatch: 5.1.6 + dev: true + + /fill-range@7.0.1: + resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} + engines: {node: '>=8'} + dependencies: + to-regex-range: 5.0.1 + dev: true + + /finalhandler@1.1.2: + resolution: {integrity: sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==} + engines: {node: '>= 0.8'} + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.3.0 + parseurl: 1.3.3 + statuses: 1.5.0 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + dev: false + + /finalhandler@1.2.0: + resolution: {integrity: sha512-5uXcUVftlQMFnWC9qu/svkWv3GTd2PfUhK/3PLkYNAe7FbqJMt3515HaxE6eRL74GdsriiwujiawdaB1BpEISg==} + engines: {node: '>= 0.8'} + dependencies: + debug: 2.6.9 + encodeurl: 1.0.2 + escape-html: 1.0.3 + on-finished: 2.4.1 + parseurl: 1.3.3 + statuses: 2.0.1 + unpipe: 1.0.0 + transitivePeerDependencies: + - supports-color + + /find-cache-dir@3.3.1: + resolution: {integrity: sha512-t2GDMt3oGC/v+BMwzmllWDuJF/xcDtE5j/fCGbqDD7OLuJkj0cfh1YSA5VKPvwMeLFLNDBkwOKZ2X85jGLVftQ==} + engines: {node: '>=8'} + dependencies: + commondir: 1.0.1 + make-dir: 3.1.0 + pkg-dir: 4.2.0 + dev: true + + /find-my-way@4.5.1: + resolution: {integrity: sha512-kE0u7sGoUFbMXcOG/xpkmz4sRLCklERnBcg7Ftuu1iAxsfEt2S46RLJ3Sq7vshsEy2wJT2hZxE58XZK27qa8kg==} + engines: {node: '>=10'} + dependencies: + fast-decode-uri-component: 1.0.1 + fast-deep-equal: 3.1.3 + safe-regex2: 2.0.0 + semver-store: 0.3.0 + dev: true + + /find-up@3.0.0: + resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} + engines: {node: '>=6'} + dependencies: + locate-path: 3.0.0 + dev: true + + /find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + dev: true + + /flat@4.1.1: + resolution: {integrity: sha512-FmTtBsHskrU6FJ2VxCnsDb84wu9zhmO3cUX2kGFb5tuwhfXxGciiT0oRY+cck35QmG+NmGh5eLz6lLCpWTqwpA==} + hasBin: true + dependencies: + is-buffer: 2.0.5 + dev: true + + /flatstr@1.0.12: + resolution: {integrity: sha512-4zPxDyhCyiN2wIAtSLI6gc82/EjqZc1onI4Mz/l0pWrAlsSfYH/2ZIcU+e3oA2wDwbzIWNKwa23F8rh6+DRWkw==} + dev: true + + /follow-redirects@1.15.2(debug@4.3.4): + resolution: {integrity: sha512-VQLG33o04KaQ8uYi2tVNbdrWp1QWxNNea+nmIB4EVM28v0hmP17z7aG1+wAkNzVq4KeXTq3221ye5qTJP91JwA==} + engines: {node: '>=4.0'} + peerDependencies: + debug: '*' + peerDependenciesMeta: + debug: + optional: true + dependencies: + debug: 4.3.4 + dev: false + + /for-each@0.3.3: + resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} + dependencies: + is-callable: 1.2.7 + dev: true + + /form-data@2.5.1: + resolution: {integrity: sha512-m21N3WOmEEURgk6B9GLOE4RuWOFf28Lhh9qGYeNlGq4VDXUlJy2th2slBNU8Gp8EzloYZOibZJ7t5ecIrFSjVA==} + engines: {node: '>= 0.12'} + dependencies: + asynckit: 0.4.0 + combined-stream: 1.0.8 + mime-types: 2.1.35 + dev: true + + /formidable@1.2.6: + resolution: {integrity: sha512-KcpbcpuLNOwrEjnbpMC0gS+X8ciDoZE1kkqzat4a8vrprf+s9pKNQ/QIwWfbfs4ltgmFl3MD177SNTkve3BwGQ==} + deprecated: 'Please upgrade to latest, formidable@v2 or formidable@v3! Check these notes: https://bit.ly/2ZEqIau' + dev: true + + /forwarded@0.2.0: + resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} + engines: {node: '>= 0.6'} + + /fresh@0.5.2: + resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} + engines: {node: '>= 0.6'} + + /fs.realpath@1.0.0: + resolution: {integrity: sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==} + dev: true + + /fsevents@2.3.2: + resolution: {integrity: sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==} + engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} + os: [darwin] + requiresBuild: true + dev: true + optional: true + + /function-bind@1.1.1: + resolution: {integrity: sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==} + + /function.prototype.name@1.1.5: + resolution: {integrity: sha512-uN7m/BzVKQnCUF/iW8jYea67v++2u7m5UgENbHRtdDVclOUP+FMPlCNdmk0h/ysGyo2tavMJEDqJAkJdRa1vMA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + functions-have-names: 1.2.3 + dev: true + + /functions-have-names@1.2.3: + resolution: {integrity: sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==} + dev: true + + /gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + dev: true + + /get-caller-file@1.0.3: + resolution: {integrity: sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==} + dev: true + + /get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + dev: true + + /get-func-name@2.0.0: + resolution: {integrity: sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==} + dev: true + + /get-intrinsic@1.2.0: + resolution: {integrity: sha512-L049y6nFOuom5wGyRc3/gdTLO94dySVKRACj1RmJZBQXlbTMhtNIgkWkUHq+jYmZvKf14EW1EoJnnjbmoHij0Q==} + dependencies: + function-bind: 1.1.1 + has: 1.0.3 + has-symbols: 1.0.3 + + /get-orientation@1.1.2: + resolution: {integrity: sha512-/pViTfifW+gBbh/RnlFYHINvELT9Znt+SYyDKAUL6uV6By019AK/s+i9XP4jSwq7lwP38Fd8HVeTxym3+hkwmQ==} + dependencies: + stream-parser: 0.3.1 + transitivePeerDependencies: + - supports-color + dev: true + + /get-stream@4.1.0: + resolution: {integrity: sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==} + engines: {node: '>=6'} + dependencies: + pump: 3.0.0 + dev: true + + /get-stream@5.2.0: + resolution: {integrity: sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==} + engines: {node: '>=8'} + dependencies: + pump: 3.0.0 + dev: true + + /get-stream@6.0.1: + resolution: {integrity: sha512-ts6Wi+2j3jQjqi70w5AlN8DFnkSwC+MqmxEzdEALB2qXZYV3X/b1CTfgPLGJNMeAWxdPfU8FO1ms3NUfaHCPYg==} + engines: {node: '>=10'} + dev: true + + /get-symbol-description@1.0.0: + resolution: {integrity: sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.0 + dev: true + + /glob-parent@5.1.2: + resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} + engines: {node: '>= 6'} + dependencies: + is-glob: 4.0.3 + dev: true + + /glob-to-regexp@0.4.1: + resolution: {integrity: sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw==} + dev: true + + /glob@7.1.3: + resolution: {integrity: sha512-vcfuiIxogLV4DlGBHIUOwI0IbrJ8HWPc4MU7HzviGeNho/UJDfi6B5p3sHeWIQ0KGIU0Jpxi5ZHxemQfLkkAwQ==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@7.1.6: + resolution: {integrity: sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@7.1.7: + resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /glob@7.2.0: + resolution: {integrity: sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==} + dependencies: + fs.realpath: 1.0.0 + inflight: 1.0.6 + inherits: 2.0.4 + minimatch: 3.1.2 + once: 1.4.0 + path-is-absolute: 1.0.1 + dev: true + + /globalize@1.7.0: + resolution: {integrity: sha512-faR46vTIbFCeAemyuc9E6/d7Wrx9k2ae2L60UhakztFg6VuE42gENVJNuPFtt7Sdjrk9m2w8+py7Jj+JTNy59w==} + dependencies: + cldrjs: 0.5.5 + dev: true + + /globals@11.12.0: + resolution: {integrity: sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==} + engines: {node: '>=4'} + dev: true + + /globalthis@1.0.3: + resolution: {integrity: sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.0 + dev: true + + /globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.2.12 + ignore: 5.2.4 + merge2: 1.4.1 + slash: 3.0.0 + dev: true + + /gopd@1.0.1: + resolution: {integrity: sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==} + dependencies: + get-intrinsic: 1.2.0 + dev: true + + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + + /growl@1.10.5: + resolution: {integrity: sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==} + engines: {node: '>=4.x'} + dev: true + + /has-bigints@1.0.2: + resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} + dev: true + + /has-flag@3.0.0: + resolution: {integrity: sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==} + engines: {node: '>=4'} + dev: true + + /has-flag@4.0.0: + resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} + engines: {node: '>=8'} + dev: true + + /has-property-descriptors@1.0.0: + resolution: {integrity: sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==} + dependencies: + get-intrinsic: 1.2.0 + dev: true + + /has-proto@1.0.1: + resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} + engines: {node: '>= 0.4'} + dev: true + + /has-symbols@1.0.3: + resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} + engines: {node: '>= 0.4'} + + /has-tostringtag@1.0.0: + resolution: {integrity: sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /has@1.0.3: + resolution: {integrity: sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==} + engines: {node: '>= 0.4.0'} + dependencies: + function-bind: 1.1.1 + + /hash-base@3.1.0: + resolution: {integrity: sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==} + engines: {node: '>=4'} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + safe-buffer: 5.2.1 + dev: true + + /hash.js@1.1.7: + resolution: {integrity: sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==} + dependencies: + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + dev: true + + /he@1.2.0: + resolution: {integrity: sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==} + hasBin: true + dev: true + + /header-case@2.0.4: + resolution: {integrity: sha512-H/vuk5TEEVZwrR0lp2zed9OCo1uAILMlx0JEMgC26rzyJJ3N1v6XkwHHXJQdR2doSjcGPM6OKPYoJgf0plJ11Q==} + dependencies: + capital-case: 1.0.4 + tslib: 2.5.0 + dev: true + + /helmet@4.4.0: + resolution: {integrity: sha512-TDBjY2QVTHGyHeyAC42ldgXC5Z0rZQT25/MhB4oKOkzXpseXVPpRv4nJLJOod6D4A/jvM/6IEO3f9Km9j0Yjug==} + engines: {node: '>=10.0.0'} + dev: false + + /hmac-drbg@1.0.1: + resolution: {integrity: sha512-Tti3gMqLdZfhOQY1Mzf/AanLiqh1WTiJgEj26ZuYQ9fbkLomzGchCws4FyrSd4VkpBfiNhaE1On+lOz894jvXg==} + dependencies: + hash.js: 1.1.7 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + dev: true + + /http-assert@1.5.0: + resolution: {integrity: sha512-uPpH7OKX4H25hBmU6G1jWNaqJGpTXxey+YOUizJUAgu0AjLUeC8D73hTrhvDS5D+GJN1DN1+hhc/eF/wpxtp0w==} + engines: {node: '>= 0.8'} + dependencies: + deep-equal: 1.0.1 + http-errors: 1.8.1 + dev: true + + /http-errors@1.7.2: + resolution: {integrity: sha512-uUQBt3H/cSIVfch6i1EuPNy/YsRSOUBXTVfZ+yR7Zjez3qjBz6i9+i4zjNaoqcoFVI4lQJ5plg63TvGfRSDCRg==} + engines: {node: '>= 0.6'} + dependencies: + depd: 1.1.2 + inherits: 2.0.3 + setprototypeof: 1.1.1 + statuses: 1.5.0 + toidentifier: 1.0.0 + dev: false + + /http-errors@1.7.3: + resolution: {integrity: sha512-ZTTX0MWrsQ2ZAhA1cejAwDLycFsd7I7nVtnkT3Ol0aqodaKW+0CTZDQ1uBv5whptCnc8e8HeRRJxRs0kmm/Qfw==} + engines: {node: '>= 0.6'} + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.1.1 + statuses: 1.5.0 + toidentifier: 1.0.0 + + /http-errors@1.8.1: + resolution: {integrity: sha512-Kpk9Sm7NmI+RHhnj6OIWDI1d6fIoFAtFt9RLaTMRlg/8w49juAStsrBgp0Dp4OdxdVbRIeKhtCUvoi/RuAhO4g==} + engines: {node: '>= 0.6'} + dependencies: + depd: 1.1.2 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 1.5.0 + toidentifier: 1.0.1 + dev: true + + /http-errors@2.0.0: + resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + engines: {node: '>= 0.8'} + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.1 + toidentifier: 1.0.1 + + /http-status@1.6.2: + resolution: {integrity: sha512-oUExvfNckrpTpDazph7kNG8sQi5au3BeTo0idaZFXEhTaJKu7GNJCLHI0rYY2wljm548MSTM+Ljj/c6anqu2zQ==} + engines: {node: '>= 0.4.0'} + dev: true + + /https-browserify@1.0.0: + resolution: {integrity: sha512-J+FkSdyD+0mA0N+81tMotaRMfSL9SGi+xpD3T6YApKsc3bGSXJlfXri3VyFOeYkfLRQisDk1W+jIFFKBeUBbBg==} + dev: true + + /https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + dependencies: + agent-base: 6.0.2 + debug: 4.3.4 + transitivePeerDependencies: + - supports-color + dev: false + + /human-signals@1.1.1: + resolution: {integrity: sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw==} + engines: {node: '>=8.12.0'} + dev: true + + /human-signals@2.1.0: + resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} + engines: {node: '>=10.17.0'} + dev: true + + /hyperid@2.3.1: + resolution: {integrity: sha512-mIbI7Ymn6MCdODaW1/6wdf5lvvXzmPsARN4zTLakMmcziBOuP4PxCBJvHF6kbAIHX6H4vAELx/pDmt0j6Th5RQ==} + dependencies: + uuid: 8.3.2 + uuid-parse: 1.1.0 + dev: true + + /iconv-lite@0.4.24: + resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + + /iconv-lite@0.6.3: + resolution: {integrity: sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==} + engines: {node: '>=0.10.0'} + dependencies: + safer-buffer: 2.1.2 + dev: true + + /ieee754@1.1.13: + resolution: {integrity: sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==} + dev: true + + /ieee754@1.2.1: + resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} + dev: true + + /ignore@5.2.4: + resolution: {integrity: sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==} + engines: {node: '>= 4'} + dev: true + + /image-size@1.0.0: + resolution: {integrity: sha512-JLJ6OwBfO1KcA+TvJT+v8gbE6iWbj24LyDNFgFEN0lzegn6cC6a/p3NIDaepMsJjQjlUWqIC7wJv8lBFxPNjcw==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + queue: 6.0.2 + dev: true + + /inflation@2.0.0: + resolution: {integrity: sha512-m3xv4hJYR2oXw4o4Y5l6P5P16WYmazYof+el6Al3f+YlggGj6qT9kImBAnzDelRALnP5d3h4jGBPKzYCizjZZw==} + engines: {node: '>= 0.8.0'} + dev: false + + /inflection@1.13.4: + resolution: {integrity: sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw==} + engines: {'0': node >= 0.4.0} + dev: true + + /inflight@1.0.6: + resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==} + dependencies: + once: 1.4.0 + wrappy: 1.0.2 + dev: true + + /inherits@2.0.1: + resolution: {integrity: sha512-8nWq2nLTAwd02jTqJExUYFSD/fKq6VH9Y/oG2accc/kdI0V98Bag8d5a4gi3XHz73rDWa2PvTtvcWYquKqSENA==} + dev: true + + /inherits@2.0.3: + resolution: {integrity: sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==} + + /inherits@2.0.4: + resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} + + /internal-slot@1.0.5: + resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==} + engines: {node: '>= 0.4'} + dependencies: + get-intrinsic: 1.2.0 + has: 1.0.3 + side-channel: 1.0.4 + dev: true + + /invert-kv@2.0.0: + resolution: {integrity: sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==} + engines: {node: '>=4'} + dev: true + + /invert-kv@3.0.1: + resolution: {integrity: sha512-CYdFeFexxhv/Bcny+Q0BfOV+ltRlJcd4BBZBYFX/O0u4npJrgZtIcjokegtiSMAvlMTJ+Koq0GBCc//3bueQxw==} + engines: {node: '>=8'} + dev: true + + /ipaddr.js@1.9.1: + resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} + engines: {node: '>= 0.10'} + + /is-arguments@1.1.1: + resolution: {integrity: sha512-8Q7EARjzEnKpt/PCD7e1cgUS0a6X8u5tdSiMqXhojOdoV9TsMsiO+9VLC5vAmO8N7/GmXn7yjR8qnA6bVAEzfA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-array-buffer@3.0.2: + resolution: {integrity: sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.0 + is-typed-array: 1.1.10 + dev: true + + /is-bigint@1.0.4: + resolution: {integrity: sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==} + dependencies: + has-bigints: 1.0.2 + dev: true + + /is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} + dependencies: + binary-extensions: 2.2.0 + dev: true + + /is-boolean-object@1.1.2: + resolution: {integrity: sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-buffer@1.1.6: + resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} + dev: true + + /is-buffer@2.0.5: + resolution: {integrity: sha512-i2R6zNFDwgEHJyQUtJEk0XFi1i0dPFn/oqjK3/vPCcDeJvW5NQ83V8QbicfF1SupOaB0h8ntgBC2YiE7dfyctQ==} + engines: {node: '>=4'} + dev: true + + /is-callable@1.2.7: + resolution: {integrity: sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==} + engines: {node: '>= 0.4'} + dev: true + + /is-date-object@1.0.5: + resolution: {integrity: sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-extglob@2.1.1: + resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-fullwidth-code-point@1.0.0: + resolution: {integrity: sha512-1pqUqRjkhPJ9miNq9SwMfdvi6lBJcd6eFxvfaivQhaH3SgisfiuudvFntdKOmxuee/77l+FPjKrQjWvmPjWrRw==} + engines: {node: '>=0.10.0'} + dependencies: + number-is-nan: 1.0.1 + dev: true + + /is-fullwidth-code-point@2.0.0: + resolution: {integrity: sha512-VHskAKYM8RfSFXwee5t5cbN5PZeq1Wrh6qd5bkyiXIf6UQcN6w/A0eXM9r6t8d+GYOh+o6ZhiEnb88LN/Y8m2w==} + engines: {node: '>=4'} + dev: true + + /is-generator-function@1.0.10: + resolution: {integrity: sha512-jsEjy9l3yiXEQ+PsXdmBwEPcOxaXWLspKdplFUVI9vq1iZgIekeC0L167qeu86czQaxed3q/Uzuw0swL0irL8A==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-glob@4.0.3: + resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} + engines: {node: '>=0.10.0'} + dependencies: + is-extglob: 2.1.1 + dev: true + + /is-nan@1.3.2: + resolution: {integrity: sha512-E+zBKpQ2t6MEo1VsonYmluk9NxGrbzpeeLC2xIViuO2EjU2xsXsBPwTr3Ykv9l08UYEVEdWeRZNouaZqF6RN0w==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + dev: true + + /is-negative-zero@2.0.2: + resolution: {integrity: sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==} + engines: {node: '>= 0.4'} + dev: true + + /is-number-object@1.0.7: + resolution: {integrity: sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-number@7.0.0: + resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} + engines: {node: '>=0.12.0'} + dev: true + + /is-plain-object@2.0.4: + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} + dependencies: + isobject: 3.0.1 + dev: true + + /is-regex@1.1.4: + resolution: {integrity: sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + has-tostringtag: 1.0.0 + dev: true + + /is-shared-array-buffer@1.0.2: + resolution: {integrity: sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==} + dependencies: + call-bind: 1.0.2 + dev: true + + /is-stream@1.1.0: + resolution: {integrity: sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==} + engines: {node: '>=0.10.0'} + dev: true + + /is-stream@2.0.1: + resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} + engines: {node: '>=8'} + dev: true + + /is-string@1.0.7: + resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} + engines: {node: '>= 0.4'} + dependencies: + has-tostringtag: 1.0.0 + dev: true + + /is-symbol@1.0.4: + resolution: {integrity: sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==} + engines: {node: '>= 0.4'} + dependencies: + has-symbols: 1.0.3 + dev: true + + /is-typed-array@1.1.10: + resolution: {integrity: sha512-PJqgEHiWZvMpaFZ3uTc8kHPM4+4ADTlDniuQL7cU/UDA0Ql7F70yGfHph3cLNe+c9toaigv+DFzTJKhc2CtO6A==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + dev: true + + /is-weakref@1.0.2: + resolution: {integrity: sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==} + dependencies: + call-bind: 1.0.2 + dev: true + + /isarray@0.0.1: + resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} + dev: true + + /isarray@1.0.0: + resolution: {integrity: sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==} + dev: true + + /isarray@2.0.5: + resolution: {integrity: sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==} + dev: true + + /isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + dev: true + + /isobject@3.0.1: + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} + dev: true + + /jake@10.8.5: + resolution: {integrity: sha512-sVpxYeuAhWt0OTWITwT98oyV0GsXyMlXCF+3L1SuafBVUIr/uILGRB+NqwkzhgXKvoJpDIpQvqkUALgdmQsQxw==} + engines: {node: '>=10'} + hasBin: true + dependencies: + async: 3.2.4 + chalk: 4.1.2 + filelist: 1.0.4 + minimatch: 3.1.2 + dev: true + + /jest-worker@27.0.0-next.5: + resolution: {integrity: sha512-mk0umAQ5lT+CaOJ+Qp01N6kz48sJG2kr2n1rX0koqKf6FIygQV0qLOdN9SCYID4IVeSigDOcPeGLozdMLYfb5g==} + engines: {node: ^10.13.0 || ^12.13.0 || ^14.15.0 || >=15.0.0} + dependencies: + '@types/node': 18.15.9 + merge-stream: 2.0.0 + supports-color: 8.1.1 + dev: true + + /jmespath@0.16.0: + resolution: {integrity: sha512-9FzQjJ7MATs1tSpnco1K6ayiYE3figslrXA72G2HQ/n76RzvYlofyi5QM+iX4YRs/pu3yzxlVQSST23+dMDknw==} + engines: {node: '>= 0.6.0'} + dev: true + + /joi@17.9.2: + resolution: {integrity: sha512-Itk/r+V4Dx0V3c7RLFdRh12IOjySm2/WGPMubBT92cQvRfYZhPM2W0hZlctjj72iES8jsRCwp7S/cRmWBnJ4nw==} + dependencies: + '@hapi/hoek': 9.3.0 + '@hapi/topo': 5.1.0 + '@sideway/address': 4.1.4 + '@sideway/formula': 3.0.1 + '@sideway/pinpoint': 2.0.0 + dev: true + + /jose@2.0.6: + resolution: {integrity: sha512-FVoPY7SflDodE4lknJmbAHSUjLCzE2H1F6MS0RYKMQ8SR+lNccpMf8R4eqkNYyyUjR5qZReOzZo5C5YiHOCjjg==} + engines: {node: '>=10.13.0 < 13 || >=13.7.0'} + dependencies: + '@panva/asn1.js': 1.0.0 + dev: false + + /jose@4.14.4: + resolution: {integrity: sha512-j8GhLiKmUAh+dsFXlX1aJCbt5KMibuKb+d7j1JaOJG6s2UjX1PQlW+OKB/sD4a/5ZYF4RcmYmLSndOoU3Lt/3g==} + dev: false + + /joycon@3.1.1: + resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} + engines: {node: '>=10'} + dev: true + + /js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + dev: true + + /js-yaml@3.13.1: + resolution: {integrity: sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw==} + hasBin: true + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 + dev: true + + /js-yaml@4.1.0: + resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} + hasBin: true + dependencies: + argparse: 2.0.1 + dev: true + + /js2xmlparser@4.0.2: + resolution: {integrity: sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==} + dependencies: + xmlcreate: 2.0.4 + dev: true + + /jsesc@2.5.2: + resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} + engines: {node: '>=4'} + hasBin: true + dev: true + + /json-merge-patch@1.0.2: + resolution: {integrity: sha512-M6Vp2GN9L7cfuMXiWOmHj9bEFbeC250iVtcKQbqVgEsDVYnIsrNsbU+h/Y/PkbBQCtEa4Bez+Ebv0zfbC8ObLg==} + dependencies: + fast-deep-equal: 3.1.3 + dev: true + + /json-schema-compare@0.2.2: + resolution: {integrity: sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==} + dependencies: + lodash: 4.17.21 + dev: true + + /json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + dev: true + + /json-schema-traverse@1.0.0: + resolution: {integrity: sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==} + dev: true + + /json-stringify-safe@5.0.1: + resolution: {integrity: sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==} + dev: true + + /json5@1.0.2: + resolution: {integrity: sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==} + hasBin: true + dependencies: + minimist: 1.2.8 + dev: true + + /json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + dev: true + + /jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + dev: true + + /jsonwebtoken@9.0.0: + resolution: {integrity: sha512-tuGfYXxkQGDPnLJ7SibiQgVgeDgfbPq2k2ICcbgqW8WxWLBAxKQM/ZCu/IT8SOSwmaYl4dpTFCW5xZv7YbbWUw==} + engines: {node: '>=12', npm: '>=6'} + dependencies: + jws: 3.2.2 + lodash: 4.17.21 + ms: 2.1.3 + semver: 7.3.8 + dev: false + + /just-extend@4.2.1: + resolution: {integrity: sha512-g3UB796vUFIY90VIv/WX3L2c8CS2MdWUww3CNrYmqza1Fg0DURc2K/O4YrnklBdQarSJ/y8JnJYDGc+1iumQjg==} + dev: true + + /jwa@1.4.1: + resolution: {integrity: sha512-qiLX/xhEEFKUAJ6FiBMbes3w9ATzyk5W7Hvzpa/SLYdxNtng+gcurvrI7TbACjIXlsJyr05/S1oUhZrc63evQA==} + dependencies: + buffer-equal-constant-time: 1.0.1 + ecdsa-sig-formatter: 1.0.11 + safe-buffer: 5.2.1 + dev: false + + /jwks-rsa@2.0.5: + resolution: {integrity: sha512-fliHfsiBRzEU0nXzSvwnh0hynzGB0WihF+CinKbSRlaqRxbqqKf2xbBPgwc8mzf18/WgwlG8e5eTpfSTBcU4DQ==} + engines: {node: '>=10 < 13 || >=14'} + dependencies: + '@types/express-jwt': 0.0.42 + debug: 4.3.4 + jose: 2.0.6 + limiter: 1.1.5 + lru-memoizer: 2.2.0 + transitivePeerDependencies: + - supports-color + dev: false + + /jwks-rsa@3.0.1: + resolution: {integrity: sha512-UUOZ0CVReK1QVU3rbi9bC7N5/le8ziUj0A2ef1Q0M7OPD2KvjEYizptqIxGIo6fSLYDkqBrazILS18tYuRc8gw==} + engines: {node: '>=14'} + dependencies: + '@types/express': 4.17.17 + '@types/jsonwebtoken': 9.0.0 + debug: 4.3.4 + jose: 4.14.4 + limiter: 1.1.5 + lru-memoizer: 2.2.0 + transitivePeerDependencies: + - supports-color + dev: false + + /jws@3.2.2: + resolution: {integrity: sha512-YHlZCB6lMTllWDtSPHz/ZXTsi8S00usEV6v1tjq8tOUZzw7DpSDWVXjXDre6ed1w/pd495ODpHZYSdkRTsa0HA==} + dependencies: + jwa: 1.4.1 + safe-buffer: 5.2.1 + dev: false + + /keygrip@1.1.0: + resolution: {integrity: sha512-iYSchDJ+liQ8iwbSI2QqsQOvqv58eJCEanyJPJi+Khyu8smkcKSFUCbPwzFcL7YVtZ6eONjqRX/38caJ7QjRAQ==} + engines: {node: '>= 0.6'} + dependencies: + tsscmp: 1.0.6 + dev: true + + /kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + dev: true + + /koa-compose@4.1.0: + resolution: {integrity: sha512-8ODW8TrDuMYvXRwra/Kh7/rJo9BtOfPc6qO8eAfC80CnCvSjSl0bkRM24X6/XBBEyj0v1nRUQ1LyOy3dbqOWXw==} + dev: true + + /koa-convert@2.0.0: + resolution: {integrity: sha512-asOvN6bFlSnxewce2e/DK3p4tltyfC4VM7ZwuTuepI7dEQVcvpyFuBcEARu1+Hxg8DIwytce2n7jrZtRlPrARA==} + engines: {node: '>= 10'} + dependencies: + co: 4.6.0 + koa-compose: 4.1.0 + dev: true + + /koa@2.14.1: + resolution: {integrity: sha512-USJFyZgi2l0wDgqkfD27gL4YGno7TfUkcmOe6UOLFOVuN+J7FwnNu4Dydl4CUQzraM1lBAiGed0M9OVJoT0Kqw==} + engines: {node: ^4.8.4 || ^6.10.1 || ^7.10.1 || >= 8.1.4} + dependencies: + accepts: 1.3.8 + cache-content-type: 1.0.1 + content-disposition: 0.5.4 + content-type: 1.0.5 + cookies: 0.8.0 + debug: 4.3.4 + delegates: 1.0.0 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + fresh: 0.5.2 + http-assert: 1.5.0 + http-errors: 1.8.1 + is-generator-function: 1.0.10 + koa-compose: 4.1.0 + koa-convert: 2.0.0 + on-finished: 2.4.1 + only: 0.0.2 + parseurl: 1.3.3 + statuses: 1.5.0 + type-is: 1.6.18 + vary: 1.1.2 + transitivePeerDependencies: + - supports-color + dev: true + + /lambda-event-mock@1.5.0: + resolution: {integrity: sha512-vx1d+vZqi7FF6B3+mAfHnY/6Tlp6BheL2ta0MJS0cIRB3Rc4I5cviHTkiJxHdE156gXx3ZjlQRJrS4puXvtrhA==} + engines: {node: '>=12.13'} + dependencies: + '@extra-number/significant-digits': 1.3.9 + clone-deep: 4.0.1 + uuid: 3.4.0 + vandium-utils: 1.2.0 + dev: true + + /lambda-leak@2.0.0: + resolution: {integrity: sha512-2c9jwUN3ZLa2GEiOhObbx2BMGQplEUCDHSIkhDtYwUjsTfiV/3jCF6ThIuEXfsvqbUK+0QpZcugIKB8YMbSevQ==} + engines: {node: '>=6.10.0'} + dev: true + + /lambda-tester@4.0.1: + resolution: {integrity: sha512-ft6XHk84B6/dYEzyI3anKoGWz08xQ5allEHiFYDUzaYTymgVK7tiBkCEbuWx+MFvH7OpFNsJXVtjXm0X8iH3Iw==} + engines: {node: '>=10.0'} + dependencies: + app-root-path: 3.1.0 + dotenv: 8.6.0 + dotenv-json: 1.0.0 + lambda-event-mock: 1.5.0 + lambda-leak: 2.0.0 + semver: 6.3.0 + uuid: 3.4.0 + vandium-utils: 2.0.0 + dev: true + + /lcid@2.0.0: + resolution: {integrity: sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==} + engines: {node: '>=6'} + dependencies: + invert-kv: 2.0.0 + dev: true + + /lcid@3.1.1: + resolution: {integrity: sha512-M6T051+5QCGLBQb8id3hdvIW8+zeFV2FyBGFS9IEK5H9Wt4MueD4bW1eWikpHgZp+5xR3l5c8pZUkQsIA0BFZg==} + engines: {node: '>=8'} + dependencies: + invert-kv: 3.0.1 + dev: true + + /libphonenumber-js@1.10.21: + resolution: {integrity: sha512-/udZhx49av2r2gZR/+xXSrwcR8smX/sDNrVpOFrvW+CA26TfYTVZfwb3MIDvmwAYMLs7pXuJjZX0VxxGpqPhsA==} + dev: false + + /light-my-request@4.12.0: + resolution: {integrity: sha512-0y+9VIfJEsPVzK5ArSIJ8Dkxp8QMP7/aCuxCUtG/tr9a2NoOf/snATE/OUc05XUplJCEnRh6gTkH7xh9POt1DQ==} + dependencies: + ajv: 8.12.0 + cookie: 0.5.0 + process-warning: 1.0.0 + set-cookie-parser: 2.5.1 + dev: true + + /lilconfig@2.1.0: + resolution: {integrity: sha512-utWOt/GHzuUxnLKxB6dk81RoOeoNeHgbrXiuGk4yyF5qlRz+iIVWu56E2fqGHFrXz0QNUhLB/8nKqvRH66JKGQ==} + engines: {node: '>=10'} + dev: true + + /limiter@1.1.5: + resolution: {integrity: sha512-FWWMIEOxz3GwUI4Ts/IvgVy6LPvoMPgjMdQ185nN6psJyBJ4yOpzqm695/h5umdLJg2vW3GR5iG11MAkR2AzJA==} + dev: false + + /lines-and-columns@1.2.4: + resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} + dev: true + + /load-tsconfig@0.2.5: + resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + dev: true + + /loader-utils@1.2.3: + resolution: {integrity: sha512-fkpz8ejdnEMG3s37wGL07iSBDg99O9D5yflE9RGNH3hRdx9SOwYfnGYdZOUIZitN8E+E2vkq3MUMYMvPYl5ZZA==} + engines: {node: '>=4.0.0'} + dependencies: + big.js: 5.2.2 + emojis-list: 2.1.0 + json5: 1.0.2 + dev: true + + /locate-path@3.0.0: + resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} + engines: {node: '>=6'} + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + dev: true + + /locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} + dependencies: + p-locate: 4.1.0 + dev: true + + /lodash.clonedeep@4.5.0: + resolution: {integrity: sha512-H5ZhCF25riFd9uB5UCkVKo61m3S/xZk1x4wA6yp/L3RFP6Z/eHH1ymQcGLo7J3GMPfm0V/7m1tryHuGVxpqEBQ==} + dev: false + + /lodash.get@4.4.2: + resolution: {integrity: sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==} + dev: true + + /lodash.sortby@4.7.0: + resolution: {integrity: sha512-HDWXG8isMntAyRF5vZ7xKuEvOhT4AhlRt/3czTSjvGUxjYCBVRQY48ViDHyfYz9VIoBkW4TMGQNapx+l3RUwdA==} + dev: true + + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + + /log-symbols@2.2.0: + resolution: {integrity: sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==} + engines: {node: '>=4'} + dependencies: + chalk: 2.4.2 + dev: true + + /loopback-connector@5.2.1: + resolution: {integrity: sha512-jWCjljtMSe+pZV5X5pYQOg2Gt3DjiC4O9dha2lXdXigS9rrhZbrBrHL8leA+qnYrexcoEPwL5Pcxc0AqVwT2bw==} + engines: {node: '>=10'} + dependencies: + async: 3.2.4 + bluebird: 3.7.2 + debug: 4.3.4 + msgpack5: 4.5.1 + strong-globalize: 6.0.5 + uuid: 8.3.2 + transitivePeerDependencies: + - supports-color + dev: true + + /loopback-datasource-juggler@4.28.2: + resolution: {integrity: sha512-3+NtxehBDPWmRNFMm34JceoOSmdkGcDrToZVHqhjCtxJJ+M/3KSV0ObwD6pD+eA27liKg09Rfp4oezjw6I/ZOg==} + engines: {node: '>=10'} + dependencies: + async: 3.2.4 + change-case: 4.1.2 + debug: 4.3.4 + depd: 2.0.0 + inflection: 1.13.4 + lodash: 4.17.21 + loopback-connector: 5.2.1 + minimatch: 5.1.6 + nanoid: 3.3.6 + qs: 6.11.0 + strong-globalize: 6.0.5 + traverse: 0.6.7 + uuid: 8.3.2 + transitivePeerDependencies: + - supports-color + dev: true + + /loose-envify@1.4.0: + resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} + hasBin: true + dependencies: + js-tokens: 4.0.0 + dev: true + + /loupe@2.3.6: + resolution: {integrity: sha512-RaPMZKiMy8/JruncMU5Bt6na1eftNoo++R4Y+N2FrxkDVTrGvcyzFTsaGif4QTeKESheMGegbhw6iUAq+5A8zA==} + dependencies: + get-func-name: 2.0.0 + dev: true + + /lower-case@2.0.2: + resolution: {integrity: sha512-7fm3l3NAF9WfN6W3JOmf5drwpVqX78JtoGJ3A6W0a6ZnldM41w2fV5D490psKFTpMds8TJse/eHLFFsNHHjHgg==} + dependencies: + tslib: 2.5.0 + dev: true + + /lru-cache@4.0.2: + resolution: {integrity: sha512-uQw9OqphAGiZhkuPlpFGmdTU2tEuhxTourM/19qGJrxBPHAr/f8BT1a0i/lOclESnGatdJG/UCkP9kZB/Lh1iw==} + dependencies: + pseudomap: 1.0.2 + yallist: 2.1.2 + dev: false + + /lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + dependencies: + yallist: 3.1.1 + dev: true + + /lru-cache@6.0.0: + resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} + engines: {node: '>=10'} + dependencies: + yallist: 4.0.0 + + /lru-memoizer@2.2.0: + resolution: {integrity: sha512-QfOZ6jNkxCcM/BkIPnFsqDhtrazLRsghi9mBwFAzol5GCvj4EkFT899Za3+QwikCg5sRX8JstioBDwOxEyzaNw==} + dependencies: + lodash.clonedeep: 4.5.0 + lru-cache: 4.0.2 + dev: false + + /lunr@2.3.9: + resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} + dev: true + + /make-dir@3.1.0: + resolution: {integrity: sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==} + engines: {node: '>=8'} + dependencies: + semver: 6.3.0 + dev: true + + /map-age-cleaner@0.1.3: + resolution: {integrity: sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==} + engines: {node: '>=6'} + dependencies: + p-defer: 1.0.0 + dev: true + + /marked@3.0.8: + resolution: {integrity: sha512-0gVrAjo5m0VZSJb4rpL59K1unJAMb/hm8HRXqasD8VeC8m91ytDPMritgFSlKonfdt+rRYYpP/JfLxgIX8yoSw==} + engines: {node: '>= 12'} + hasBin: true + dev: true + + /md5.js@1.3.5: + resolution: {integrity: sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /md5@2.3.0: + resolution: {integrity: sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==} + dependencies: + charenc: 0.0.2 + crypt: 0.0.2 + is-buffer: 1.1.6 + dev: true + + /media-typer@0.3.0: + resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} + engines: {node: '>= 0.6'} + + /mem@4.3.0: + resolution: {integrity: sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==} + engines: {node: '>=6'} + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 2.1.0 + p-is-promise: 2.1.0 + dev: true + + /mem@5.1.1: + resolution: {integrity: sha512-qvwipnozMohxLXG1pOqoLiZKNkC4r4qqRucSoDwXowsNGDSULiqFTRUF05vcZWnwJSG22qTsynQhxbaMtnX9gw==} + engines: {node: '>=8'} + dependencies: + map-age-cleaner: 0.1.3 + mimic-fn: 2.1.0 + p-is-promise: 2.1.0 + dev: true + + /merge-descriptors@1.0.1: + resolution: {integrity: sha512-cCi6g3/Zr1iqQi6ySbseM1Xvooa98N0w31jzUYrXPX2xqObmFGHJ0tQ5u74H3mVh7wLouTseZyYIq39g8cNp1w==} + + /merge-stream@2.0.0: + resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} + dev: true + + /merge2@1.4.1: + resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} + engines: {node: '>= 8'} + dev: true + + /methods@1.1.2: + resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} + engines: {node: '>= 0.6'} + + /micromatch@4.0.5: + resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} + engines: {node: '>=8.6'} + dependencies: + braces: 3.0.2 + picomatch: 2.3.1 + dev: true + + /miller-rabin@4.0.1: + resolution: {integrity: sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==} + hasBin: true + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + dev: true + + /mime-db@1.52.0: + resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} + engines: {node: '>= 0.6'} + + /mime-types@2.1.35: + resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} + engines: {node: '>= 0.6'} + dependencies: + mime-db: 1.52.0 + + /mime@1.6.0: + resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} + engines: {node: '>=4'} + hasBin: true + + /mimic-fn@2.1.0: + resolution: {integrity: sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==} + engines: {node: '>=6'} + dev: true + + /minimalistic-assert@1.0.1: + resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} + dev: true + + /minimalistic-crypto-utils@1.0.1: + resolution: {integrity: sha512-JIYlbt6g8i5jKfJ3xz7rF0LXmv2TkDxBLUkiBeZ7bAx4GnnNMr8xFpGnOxn6GhTEHx3SjRrZEoU+j04prX1ktg==} + dev: true + + /minimatch@3.0.4: + resolution: {integrity: sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@3.1.2: + resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + dependencies: + brace-expansion: 1.1.11 + dev: true + + /minimatch@5.1.6: + resolution: {integrity: sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==} + engines: {node: '>=10'} + dependencies: + brace-expansion: 2.0.1 + dev: true + + /minimist@0.0.8: + resolution: {integrity: sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==} + dev: true + + /minimist@1.2.8: + resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} + dev: true + + /mkdirp@0.5.1: + resolution: {integrity: sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==} + deprecated: Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.) + hasBin: true + dependencies: + minimist: 0.0.8 + dev: true + + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + + /mocha@6.1.4: + resolution: {integrity: sha512-PN8CIy4RXsIoxoFJzS4QNnCH4psUCPWc4/rPrst/ecSJJbLBkubMiyGCP2Kj/9YnWbotFqAoeXyXMucj7gwCFg==} + engines: {node: '>= 6.0.0'} + hasBin: true + dependencies: + ansi-colors: 3.2.3 + browser-stdout: 1.3.1 + debug: 3.2.6(supports-color@6.0.0) + diff: 3.5.0 + escape-string-regexp: 1.0.5 + find-up: 3.0.0 + glob: 7.1.3 + growl: 1.10.5 + he: 1.2.0 + js-yaml: 3.13.1 + log-symbols: 2.2.0 + minimatch: 3.0.4 + mkdirp: 0.5.1 + ms: 2.1.1 + node-environment-flags: 1.0.5 + object.assign: 4.1.0 + strip-json-comments: 2.0.1 + supports-color: 6.0.0 + which: 1.3.1 + wide-align: 1.1.3 + yargs: 13.2.2 + yargs-parser: 13.0.0 + yargs-unparser: 1.5.0 + dev: true + + /morgan@1.10.0: + resolution: {integrity: sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==} + engines: {node: '>= 0.8.0'} + dependencies: + basic-auth: 2.0.1 + debug: 2.6.9 + depd: 2.0.0 + on-finished: 2.3.0 + on-headers: 1.0.2 + transitivePeerDependencies: + - supports-color + dev: false + + /mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} + dev: true + + /ms@2.0.0: + resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} + + /ms@2.1.1: + resolution: {integrity: sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==} + + /ms@2.1.2: + resolution: {integrity: sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==} + + /ms@2.1.3: + resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} + + /msgpack5@4.5.1: + resolution: {integrity: sha512-zC1vkcliryc4JGlL6OfpHumSYUHWFGimSI+OgfRCjTFLmKA2/foR9rMTOhWiqfOrfxJOctrpWPvrppf8XynJxw==} + dependencies: + bl: 2.2.1 + inherits: 2.0.4 + readable-stream: 2.3.8 + safe-buffer: 5.2.1 + dev: true + + /multimatch@4.0.0: + resolution: {integrity: sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ==} + engines: {node: '>=8'} + dependencies: + '@types/minimatch': 3.0.5 + array-differ: 3.0.0 + array-union: 2.1.0 + arrify: 2.0.1 + minimatch: 3.1.2 + dev: true + + /mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + dev: true + + /nanoid@3.3.6: + resolution: {integrity: sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==} + engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} + hasBin: true + dev: true + + /native-url@0.3.4: + resolution: {integrity: sha512-6iM8R99ze45ivyH8vybJ7X0yekIcPf5GgLV5K0ENCbmRcaRIDoj37BC8iLEmaaBfqqb8enuZ5p0uhY+lVAbAcA==} + dependencies: + querystring: 0.2.0 + dev: true + + /negotiator@0.6.3: + resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} + engines: {node: '>= 0.6'} + + /next-test-api-route-handler@3.1.8(next@11.1.3): + resolution: {integrity: sha512-8o+TjtlQdvLv7YmR5NOl+AQCM/tEZqB1mvqBeGFQscuGtL+42fOrOsDFv2QsFUWieUMKv7j7NqOmYMpJRPu3/w==} + engines: {node: '>=12'} + peerDependencies: + next: '>=9' + dependencies: + cookie: 0.5.0 + next: 11.1.3(@babel/core@7.21.8)(react-dom@17.0.2)(react@17.0.2)(typescript@4.2.4) + node-fetch: 2.6.9 + transitivePeerDependencies: + - encoding + dev: true + + /next@11.1.3(@babel/core@7.21.8)(react-dom@17.0.2)(react@17.0.2)(typescript@4.2.4): + resolution: {integrity: sha512-ud/gKmnKQ8wtHC+pd1ZiqPRa7DdgulPkAk94MbpsspfNliwZkYs9SIYWhlLSyg+c661LzdUI2nZshvrtggSYWA==} + engines: {node: '>=12.0.0'} + hasBin: true + peerDependencies: + fibers: '>= 3.1.0' + node-sass: ^4.0.0 || ^5.0.0 + react: ^17.0.2 + react-dom: ^17.0.2 + sass: ^1.3.0 + peerDependenciesMeta: + fibers: + optional: true + node-sass: + optional: true + sass: + optional: true + dependencies: + '@babel/runtime': 7.15.3 + '@hapi/accept': 5.0.2 + '@next/env': 11.1.3 + '@next/polyfill-module': 11.1.3 + '@next/react-dev-overlay': 11.1.3(react-dom@17.0.2)(react@17.0.2) + '@next/react-refresh-utils': 11.1.3(react-refresh@0.8.3) + '@node-rs/helper': 1.2.1 + assert: 2.0.0 + ast-types: 0.13.2 + browserify-zlib: 0.2.0 + browserslist: 4.16.6 + buffer: 5.6.0 + caniuse-lite: 1.0.30001460 + chalk: 2.4.2 + chokidar: 3.5.1 + constants-browserify: 1.0.0 + crypto-browserify: 3.12.0 + cssnano-simple: 3.0.0(postcss@8.2.15) + domain-browser: 4.19.0 + encoding: 0.1.13 + etag: 1.8.1 + find-cache-dir: 3.3.1 + get-orientation: 1.1.2 + https-browserify: 1.0.0 + image-size: 1.0.0 + jest-worker: 27.0.0-next.5 + native-url: 0.3.4 + node-fetch: 2.6.1 + node-html-parser: 1.4.9 + node-libs-browser: 2.2.1 + os-browserify: 0.3.0 + p-limit: 3.1.0 + path-browserify: 1.0.1 + pnp-webpack-plugin: 1.6.4(typescript@4.2.4) + postcss: 8.2.15 + process: 0.11.10 + querystring-es3: 0.2.1 + raw-body: 2.4.1 + react: 17.0.2 + react-dom: 17.0.2(react@17.0.2) + react-is: 17.0.2 + react-refresh: 0.8.3 + stream-browserify: 3.0.0 + stream-http: 3.1.1 + string_decoder: 1.3.0 + styled-jsx: 4.0.1(@babel/core@7.21.8)(react@17.0.2) + timers-browserify: 2.0.12 + tty-browserify: 0.0.1 + use-subscription: 1.5.1(react@17.0.2) + util: 0.12.4 + vm-browserify: 1.1.2 + watchpack: 2.1.1 + optionalDependencies: + '@next/swc-darwin-arm64': 11.1.3 + '@next/swc-darwin-x64': 11.1.3 + '@next/swc-linux-x64-gnu': 11.1.3 + '@next/swc-win32-x64-msvc': 11.1.3 + transitivePeerDependencies: + - '@babel/core' + - supports-color + - typescript + - webpack + dev: true + + /nice-try@1.0.5: + resolution: {integrity: sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==} + dev: true + + /nise@5.1.4: + resolution: {integrity: sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg==} + dependencies: + '@sinonjs/commons': 2.0.0 + '@sinonjs/fake-timers': 10.0.2 + '@sinonjs/text-encoding': 0.7.2 + just-extend: 4.2.1 + path-to-regexp: 1.8.0 + dev: true + + /no-case@3.0.4: + resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} + dependencies: + lower-case: 2.0.2 + tslib: 2.5.0 + dev: true + + /nock@11.7.0: + resolution: {integrity: sha512-7c1jhHew74C33OBeRYyQENT+YXQiejpwIrEjinh6dRurBae+Ei4QjeUaPlkptIF0ZacEiVCnw8dWaxqepkiihg==} + engines: {node: '>= 8.0'} + dependencies: + chai: 4.3.7 + debug: 4.3.4 + json-stringify-safe: 5.0.1 + lodash: 4.17.21 + mkdirp: 0.5.1 + propagate: 2.0.1 + transitivePeerDependencies: + - supports-color + dev: true + + /node-environment-flags@1.0.5: + resolution: {integrity: sha512-VNYPRfGfmZLx0Ye20jWzHUjyTW/c+6Wq+iLhDzUI4XmhrDd9l/FozXV3F2xOaXjvp0co0+v1YSR3CMP6g+VvLQ==} + dependencies: + object.getownpropertydescriptors: 2.1.6 + semver: 5.7.1 + dev: true + + /node-fetch@2.6.1: + resolution: {integrity: sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==} + engines: {node: 4.x || >=6.0.0} + dev: true + + /node-fetch@2.6.9: + resolution: {integrity: sha512-DJm/CJkZkRjKKj4Zi4BsKVZh3ValV5IR5s7LVZnW+6YMh0W1BfNA8XSs6DLMGYlId5F3KnA70uu2qepcR08Qqg==} + engines: {node: 4.x || >=6.0.0} + peerDependencies: + encoding: ^0.1.0 + peerDependenciesMeta: + encoding: + optional: true + dependencies: + whatwg-url: 5.0.0 + dev: true + + /node-html-parser@1.4.9: + resolution: {integrity: sha512-UVcirFD1Bn0O+TSmloHeHqZZCxHjvtIeGdVdGMhyZ8/PWlEiZaZ5iJzR189yKZr8p0FXN58BUeC7RHRkf/KYGw==} + dependencies: + he: 1.2.0 + dev: true + + /node-libs-browser@2.2.1: + resolution: {integrity: sha512-h/zcD8H9kaDZ9ALUWwlBUDo6TKF8a7qBSCSEGfjTVIYeqsioSKaAX+BN7NgiMGp6iSIXZ3PxgCu8KS3b71YK5Q==} + dependencies: + assert: 1.5.0 + browserify-zlib: 0.2.0 + buffer: 4.9.2 + console-browserify: 1.2.0 + constants-browserify: 1.0.0 + crypto-browserify: 3.12.0 + domain-browser: 1.2.0 + events: 3.3.0 + https-browserify: 1.0.0 + os-browserify: 0.3.0 + path-browserify: 0.0.1 + process: 0.11.10 + punycode: 1.3.2 + querystring-es3: 0.2.1 + readable-stream: 2.3.8 + stream-browserify: 2.0.2 + stream-http: 2.8.3 + string_decoder: 1.3.0 + timers-browserify: 2.0.12 + tty-browserify: 0.0.0 + url: 0.11.0 + util: 0.11.1 + vm-browserify: 1.1.2 + dev: true + + /node-releases@1.1.77: + resolution: {integrity: sha512-rB1DUFUNAN4Gn9keO2K1efO35IDK7yKHCdCaIMvFO7yUYmmZYeDjnGKle26G4rwj+LKRQpjyUUvMkPglwGCYNQ==} + dev: true + + /node-releases@2.0.10: + resolution: {integrity: sha512-5GFldHPXVG/YZmFzJvKK2zDSzPKhEp0+ZR5SVaoSag9fsL5YgHbUHDfnG5494ISANDcK4KwPXAx2xqVEydmd7w==} + dev: true + + /nodemailer@6.9.1: + resolution: {integrity: sha512-qHw7dOiU5UKNnQpXktdgQ1d3OFgRAekuvbJLcdG5dnEo/GtcTHRYM7+UfJARdOFU9WUQO8OiIamgWPmiSFHYAA==} + engines: {node: '>=6.0.0'} + dev: false + + /normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + dev: true + + /npm-run-path@2.0.2: + resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==} + engines: {node: '>=4'} + dependencies: + path-key: 2.0.1 + dev: true + + /npm-run-path@4.0.1: + resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} + engines: {node: '>=8'} + dependencies: + path-key: 3.1.1 + dev: true + + /number-is-nan@1.0.1: + resolution: {integrity: sha512-4jbtZXNAsfZbAHiiqjLPBiCl16dES1zI4Hpzzxw61Tk+loF+sBDBKx1ICKKKwIqQ7M0mFn1TmkN7euSncWgHiQ==} + engines: {node: '>=0.10.0'} + dev: true + + /object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + + /object-inspect@1.12.3: + resolution: {integrity: sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g==} + + /object-is@1.1.5: + resolution: {integrity: sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + dev: true + + /object-keys@1.1.1: + resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} + engines: {node: '>= 0.4'} + dev: true + + /object.assign@4.1.0: + resolution: {integrity: sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==} + engines: {node: '>= 0.4'} + dependencies: + define-properties: 1.2.0 + function-bind: 1.1.1 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /object.assign@4.1.4: + resolution: {integrity: sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + has-symbols: 1.0.3 + object-keys: 1.1.1 + dev: true + + /object.getownpropertydescriptors@2.1.6: + resolution: {integrity: sha512-lq+61g26E/BgHv0ZTFgRvi7NMEPuAxLkFU7rukXjc/AlwH4Am5xXVnIXy3un1bg/JPbXHrixRkK1itUzzPiIjQ==} + engines: {node: '>= 0.8'} + dependencies: + array.prototype.reduce: 1.0.5 + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + safe-array-concat: 1.0.0 + dev: true + + /on-finished@2.3.0: + resolution: {integrity: sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==} + engines: {node: '>= 0.8'} + dependencies: + ee-first: 1.1.1 + dev: false + + /on-finished@2.4.1: + resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} + engines: {node: '>= 0.8'} + dependencies: + ee-first: 1.1.1 + + /on-headers@1.0.2: + resolution: {integrity: sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==} + engines: {node: '>= 0.8'} + dev: false + + /once@1.4.0: + resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + dependencies: + wrappy: 1.0.2 + dev: true + + /onetime@5.1.2: + resolution: {integrity: sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==} + engines: {node: '>=6'} + dependencies: + mimic-fn: 2.1.0 + dev: true + + /only@0.0.2: + resolution: {integrity: sha512-Fvw+Jemq5fjjyWz6CpKx6w9s7xxqo3+JCyM0WXWeCSOboZ8ABkyvP8ID4CZuChA/wxSx+XSJmdOm8rGVyJ1hdQ==} + dev: true + + /openapi3-ts@2.0.2: + resolution: {integrity: sha512-TxhYBMoqx9frXyOgnRHufjQfPXomTIHYKhSKJ6jHfj13kS8OEIhvmE8CTuQyKtjjWttAjX5DPxM1vmalEpo8Qw==} + dependencies: + yaml: 1.10.2 + dev: true + + /os-browserify@0.3.0: + resolution: {integrity: sha512-gjcpUc3clBf9+210TRaDWbf+rZZZEshZ+DlXMRCeAjp0xhTrnQsKHypIy1J3d5hKdUzj69t708EHtU8P6bUn0A==} + dev: true + + /os-locale@3.1.0: + resolution: {integrity: sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==} + engines: {node: '>=6'} + dependencies: + execa: 1.0.0 + lcid: 2.0.0 + mem: 4.3.0 + dev: true + + /os-locale@5.0.0: + resolution: {integrity: sha512-tqZcNEDAIZKBEPnHPlVDvKrp7NzgLi7jRmhKiUoa2NUmhl13FtkAGLUVR+ZsYvApBQdBfYm43A4tXXQ4IrYLBA==} + engines: {node: '>=10'} + dependencies: + execa: 4.1.0 + lcid: 3.1.1 + mem: 5.1.1 + dev: true + + /p-defer@1.0.0: + resolution: {integrity: sha512-wB3wfAxZpk2AzOfUMJNL+d36xothRSyj8EXOa4f6GMqYDN9BJaaSISbsk+wS9abmnebVw95C2Kb5t85UmpCxuw==} + engines: {node: '>=4'} + dev: true + + /p-event@4.2.0: + resolution: {integrity: sha512-KXatOjCRXXkSePPb1Nbi0p0m+gQAwdlbhi4wQKJPI1HsMQS9g+Sqp2o+QHziPr7eYJyOZet836KoHEVM1mwOrQ==} + engines: {node: '>=8'} + dependencies: + p-timeout: 3.2.0 + dev: true + + /p-finally@1.0.0: + resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} + engines: {node: '>=4'} + dev: true + + /p-is-promise@2.1.0: + resolution: {integrity: sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==} + engines: {node: '>=6'} + dev: true + + /p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + dependencies: + p-try: 2.2.0 + dev: true + + /p-limit@3.1.0: + resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} + engines: {node: '>=10'} + dependencies: + yocto-queue: 0.1.0 + dev: true + + /p-locate@3.0.0: + resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} + engines: {node: '>=6'} + dependencies: + p-limit: 2.3.0 + dev: true + + /p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + dependencies: + p-limit: 2.3.0 + dev: true + + /p-timeout@3.2.0: + resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} + engines: {node: '>=8'} + dependencies: + p-finally: 1.0.0 + dev: true + + /p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} + engines: {node: '>=6'} + dev: true + + /pako@1.0.11: + resolution: {integrity: sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==} + dev: true + + /param-case@3.0.4: + resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} + dependencies: + dot-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /parse-asn1@5.1.6: + resolution: {integrity: sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==} + dependencies: + asn1.js: 5.4.1 + browserify-aes: 1.2.0 + evp_bytestokey: 1.0.3 + pbkdf2: 3.1.2 + safe-buffer: 5.2.1 + dev: true + + /parseurl@1.3.3: + resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} + engines: {node: '>= 0.8'} + + /pascal-case@3.1.2: + resolution: {integrity: sha512-uWlGT3YSnK9x3BQJaOdcZwrnV6hPpd8jFH1/ucpiLRPh/2zCVJKS19E4GvYHvaCcACn3foXZ0cLB9Wrx1KGe5g==} + dependencies: + no-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /path-browserify@0.0.1: + resolution: {integrity: sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==} + dev: true + + /path-browserify@1.0.1: + resolution: {integrity: sha512-b7uo2UCUOYZcnF/3ID0lulOJi/bafxa1xPe7ZPsammBSpjSWQkjNxlt635YGS2MiR9GjvuXCtz2emr3jbsz98g==} + dev: true + + /path-case@3.0.4: + resolution: {integrity: sha512-qO4qCFjXqVTrcbPt/hQfhTQ+VhFsqNKOPtytgNKkKxSoEp3XPUQ8ObFuePylOIok5gjn69ry8XiULxCwot3Wfg==} + dependencies: + dot-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} + dev: true + + /path-exists@4.0.0: + resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} + engines: {node: '>=8'} + dev: true + + /path-is-absolute@1.0.1: + resolution: {integrity: sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==} + engines: {node: '>=0.10.0'} + dev: true + + /path-key@2.0.1: + resolution: {integrity: sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==} + engines: {node: '>=4'} + dev: true + + /path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + dev: true + + /path-to-regexp@0.1.7: + resolution: {integrity: sha512-5DFkuoqlv1uYQKxy8omFBeJPQcdoE07Kv2sferDCrAq1ohOU+MSDswDIbnx3YAM60qIOnYa53wBhXW0EbMonrQ==} + + /path-to-regexp@1.8.0: + resolution: {integrity: sha512-n43JRhlUKUAlibEJhPeir1ncUID16QnEjNpwzNdO3Lm4ywrBpBZ5oLD0I6br9evr1Y9JTqwRtAh7JLoOzAQdVA==} + dependencies: + isarray: 0.0.1 + dev: true + + /path-to-regexp@6.2.1: + resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==} + dev: true + + /path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} + dev: true + + /pathval@1.1.1: + resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} + dev: true + + /pbkdf2@3.1.2: + resolution: {integrity: sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==} + engines: {node: '>=0.12'} + dependencies: + create-hash: 1.2.0 + create-hmac: 1.1.7 + ripemd160: 2.0.2 + safe-buffer: 5.2.1 + sha.js: 2.4.11 + dev: true + + /picocolors@1.0.0: + resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + dev: true + + /picomatch@2.3.1: + resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + engines: {node: '>=8.6'} + dev: true + + /pino-std-serializers@3.2.0: + resolution: {integrity: sha512-EqX4pwDPrt3MuOAAUBMU0Tk5kR/YcCM5fNPEzgCO2zJ5HfX0vbiH9HbJglnyeQsN96Kznae6MWD47pZB5avTrg==} + dev: true + + /pino@6.14.0: + resolution: {integrity: sha512-iuhEDel3Z3hF9Jfe44DPXR8l07bhjuFY3GMHIXbjnY9XcafbyDDwl2sN2vw2GjMPf5Nkoe+OFao7ffn9SXaKDg==} + hasBin: true + dependencies: + fast-redact: 3.1.2 + fast-safe-stringify: 2.1.1 + flatstr: 1.0.12 + pino-std-serializers: 3.2.0 + process-warning: 1.0.0 + quick-format-unescaped: 4.0.4 + sonic-boom: 1.4.1 + dev: true + + /pirates@4.0.5: + resolution: {integrity: sha512-8V9+HQPupnaXMA23c5hvl69zXvTwTzyAYasnkb0Tts4XvO4CliqONMOnvlq26rkhLC3nWDFBJf73LU1e1VZLaQ==} + engines: {node: '>= 6'} + dev: true + + /pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + dependencies: + find-up: 4.1.0 + dev: true + + /platform@1.3.6: + resolution: {integrity: sha512-fnWVljUchTro6RiCFvCXBbNhJc2NijN7oIQxbwsyL0buWJPG85v81ehlHI9fXrJsMNgTofEoWIQeClKpgxFLrg==} + dev: true + + /pnp-webpack-plugin@1.6.4(typescript@4.2.4): + resolution: {integrity: sha512-7Wjy+9E3WwLOEL30D+m8TSTF7qJJUJLONBnwQp0518siuMxUQUbgZwssaFX+QKlZkjHZcw/IpZCt/H0srrntSg==} + engines: {node: '>=6'} + dependencies: + ts-pnp: 1.2.0(typescript@4.2.4) + transitivePeerDependencies: + - typescript + dev: true + + /postcss-load-config@3.1.4(postcss@8.2.15): + resolution: {integrity: sha512-6DiM4E7v4coTE4uzA8U//WhtPwyhiim3eyjEMFCnUpzbrkK9wJHgKDT2mR+HbtSrd/NubVaYTOpSpjUl8NQeRg==} + engines: {node: '>= 10'} + peerDependencies: + postcss: '>=8.0.9' + ts-node: '>=9.0.0' + peerDependenciesMeta: + postcss: + optional: true + ts-node: + optional: true + dependencies: + lilconfig: 2.1.0 + postcss: 8.2.15 + yaml: 1.10.2 + dev: true + + /postcss@8.2.15: + resolution: {integrity: sha512-2zO3b26eJD/8rb106Qu2o7Qgg52ND5HPjcyQiK2B98O388h43A448LCslC0dI2P97wCAQRJsFvwTRcXxTKds+Q==} + engines: {node: ^10 || ^12 || >=14} + dependencies: + colorette: 1.4.0 + nanoid: 3.3.6 + source-map: 0.6.1 + dev: true + + /prettier@2.0.5: + resolution: {integrity: sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==} + engines: {node: '>=10.13.0'} + hasBin: true + dev: true + + /pretty-quick@3.1.3(prettier@2.0.5): + resolution: {integrity: sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA==} + engines: {node: '>=10.13'} + hasBin: true + peerDependencies: + prettier: '>=2.0.0' + dependencies: + chalk: 3.0.0 + execa: 4.1.0 + find-up: 4.1.0 + ignore: 5.2.4 + mri: 1.2.0 + multimatch: 4.0.0 + prettier: 2.0.5 + dev: true + + /process-nextick-args@2.0.1: + resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} + dev: true + + /process-warning@1.0.0: + resolution: {integrity: sha512-du4wfLyj4yCZq1VupnVSZmRsPJsNuxoDQFdCFHLaYiEbFBD7QE0a+I4D7hOxrVnh78QE/YipFAj9lXHiXocV+Q==} + dev: true + + /process@0.11.10: + resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} + engines: {node: '>= 0.6.0'} + dev: true + + /propagate@2.0.1: + resolution: {integrity: sha512-vGrhOavPSTz4QVNuBNdcNXePNdNMaO1xj9yBeH1ScQPjk/rhg9sSlCXPhMkFuaNNW/syTvYqsnbIJxMBfRbbag==} + engines: {node: '>= 8'} + dev: true + + /proxy-addr@2.0.7: + resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} + engines: {node: '>= 0.10'} + dependencies: + forwarded: 0.2.0 + ipaddr.js: 1.9.1 + + /pseudomap@1.0.2: + resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} + dev: false + + /psl@1.8.0: + resolution: {integrity: sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ==} + dev: false + + /public-encrypt@4.0.3: + resolution: {integrity: sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==} + dependencies: + bn.js: 4.12.0 + browserify-rsa: 4.1.0 + create-hash: 1.2.0 + parse-asn1: 5.1.6 + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + + /pump@3.0.0: + resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} + dependencies: + end-of-stream: 1.4.4 + once: 1.4.0 + dev: true + + /punycode@1.3.2: + resolution: {integrity: sha512-RofWgt/7fL5wP1Y7fxE7/EmTLzQVnB0ycyibJ0OOHIlJqTNzglYFxVwETOcIoJqJmpDXJ9xImDv+Fq34F/d4Dw==} + dev: true + + /punycode@2.3.0: + resolution: {integrity: sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA==} + engines: {node: '>=6'} + dev: true + + /qs@6.11.0: + resolution: {integrity: sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==} + engines: {node: '>=0.6'} + dependencies: + side-channel: 1.0.4 + + /qs@6.7.0: + resolution: {integrity: sha512-VCdBRNFTX1fyE7Nb6FYoURo/SPe62QCaAyzJvUjwRaIsc+NePBEniHlvxFmmX56+HZphIGtV0XeCirBtpDrTyQ==} + engines: {node: '>=0.6'} + dev: false + + /querystring-es3@0.2.1: + resolution: {integrity: sha512-773xhDQnZBMFobEiztv8LIl70ch5MSF/jUQVlhwFyBILqq96anmoctVIYz+ZRp0qbCKATTn6ev02M3r7Ga5vqA==} + engines: {node: '>=0.4.x'} + dev: true + + /querystring@0.2.0: + resolution: {integrity: sha512-X/xY82scca2tau62i9mDyU9K+I+djTMUsvwf7xnUX5GLvVzgJybOJf4Y6o9Zx3oJK/LSXg5tTZBjwzqVPaPO2g==} + engines: {node: '>=0.4.x'} + deprecated: The querystring API is considered Legacy. new code should use the URLSearchParams API instead. + dev: true + + /querystringify@2.2.0: + resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} + dev: false + + /queue-microtask@1.2.3: + resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} + dev: true + + /queue@6.0.2: + resolution: {integrity: sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==} + dependencies: + inherits: 2.0.4 + dev: true + + /quick-format-unescaped@4.0.4: + resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + dev: true + + /randombytes@2.1.0: + resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} + dependencies: + safe-buffer: 5.2.1 + dev: true + + /randomfill@1.0.4: + resolution: {integrity: sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==} + dependencies: + randombytes: 2.1.0 + safe-buffer: 5.2.1 + dev: true + + /range-parser@1.2.1: + resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} + engines: {node: '>= 0.6'} + + /raw-body@2.4.0: + resolution: {integrity: sha512-4Oz8DUIwdvoa5qMJelxipzi/iJIi40O5cGV1wNYp5hvZP8ZN0T+jiNkL0QepXs+EsQ9XJ8ipEDoiH70ySUJP3Q==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.0 + http-errors: 1.7.2 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + + /raw-body@2.4.1: + resolution: {integrity: sha512-9WmIKF6mkvA0SLmA2Knm9+qj89e+j1zqgyn8aXGd7+nAduPoqgI9lO57SAZNn/Byzo5P7JhXTyg9PzaJbH73bA==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.0 + http-errors: 1.7.3 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: true + + /raw-body@2.5.1: + resolution: {integrity: sha512-qqJBtEyVgS0ZmPGdCFPWJ3FreoqvG4MVQln/kCgF7Olq95IbOp0/BWyMwbdtn4VTvkM8Y7khCQ2Xgk/tcrCXig==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + + /raw-body@2.5.2: + resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + engines: {node: '>= 0.8'} + dependencies: + bytes: 3.1.2 + http-errors: 2.0.0 + iconv-lite: 0.4.24 + unpipe: 1.0.0 + dev: false + + /react-dom@17.0.2(react@17.0.2): + resolution: {integrity: sha512-s4h96KtLDUQlsENhMn1ar8t2bEa+q/YAtj8pPPdIjPDGBDIVNsrD9aXNWqspUe6AzKCIG0C1HZZLqLV7qpOBGA==} + peerDependencies: + react: 17.0.2 + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + react: 17.0.2 + scheduler: 0.20.2 + dev: true + + /react-is@17.0.2: + resolution: {integrity: sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==} + dev: true + + /react-refresh@0.8.3: + resolution: {integrity: sha512-X8jZHc7nCMjaCqoU+V2I0cOhNW+QMBwSUkeXnTi8IPe6zaRWfn60ZzvFDZqWPfmSJfjub7dDW1SP0jaHWLu/hg==} + engines: {node: '>=0.10.0'} + dev: true + + /react@17.0.2: + resolution: {integrity: sha512-gnhPt75i/dq/z3/6q/0asP78D0u592D5L1pd7M8P+dck6Fu/jJeL6iVVK23fptSUZj8Vjf++7wXA8UNclGQcbA==} + engines: {node: '>=0.10.0'} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: true + + /readable-stream@2.3.8: + resolution: {integrity: sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==} + dependencies: + core-util-is: 1.0.3 + inherits: 2.0.4 + isarray: 1.0.0 + process-nextick-args: 2.0.1 + safe-buffer: 5.1.2 + string_decoder: 1.1.1 + util-deprecate: 1.0.2 + dev: true + + /readable-stream@3.6.2: + resolution: {integrity: sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==} + engines: {node: '>= 6'} + dependencies: + inherits: 2.0.4 + string_decoder: 1.3.0 + util-deprecate: 1.0.2 + dev: true + + /readdirp@3.5.0: + resolution: {integrity: sha512-cMhu7c/8rdhkHXWsY+osBhfSy0JikwpHK/5+imo+LpeasTF8ouErHrlYkwT0++njiyuDvc7OFY5T3ukvZ8qmFQ==} + engines: {node: '>=8.10.0'} + dependencies: + picomatch: 2.3.1 + dev: true + + /reflect-metadata@0.1.13: + resolution: {integrity: sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==} + dev: true + + /regenerator-runtime@0.13.11: + resolution: {integrity: sha512-kY1AZVr2Ra+t+piVaJ4gxaFaReZVH40AKNo7UCX6W+dEwBo/2oZJzqfuN1qLq1oL45o56cPaTXELwrTh8Fpggg==} + dev: true + + /regexp.prototype.flags@1.4.3: + resolution: {integrity: sha512-fjggEOO3slI6Wvgjwflkc4NFRCTZAu5CnNfBd5qOMYhWdn67nJBBu34/TkD++eeFmd8C9r9jfXJ27+nSiRkSUA==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + functions-have-names: 1.2.3 + dev: true + + /require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + dev: true + + /require-from-string@2.0.2: + resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} + engines: {node: '>=0.10.0'} + dev: true + + /require-main-filename@1.0.1: + resolution: {integrity: sha512-IqSUtOVP4ksd1C/ej5zeEh/BIP2ajqpn8c5x+q99gvcIG/Qf0cud5raVnE/Dwd0ua9TXYDoDc0RE5hBSdz22Ug==} + dev: true + + /require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + dev: true + + /requires-port@1.0.0: + resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} + dev: false + + /resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + dev: true + + /ret@0.2.2: + resolution: {integrity: sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==} + engines: {node: '>=4'} + dev: true + + /reusify@1.0.4: + resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} + engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + dev: true + + /rfdc@1.3.0: + resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} + dev: true + + /ripemd160@2.0.2: + resolution: {integrity: sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==} + dependencies: + hash-base: 3.1.0 + inherits: 2.0.4 + dev: true + + /rollup@3.21.6: + resolution: {integrity: sha512-SXIICxvxQxR3D4dp/3LDHZIJPC8a4anKMHd4E3Jiz2/JnY+2bEjqrOokAauc5ShGVNFHlEFjBXAXlaxkJqIqSg==} + engines: {node: '>=14.18.0', npm: '>=8.0.0'} + hasBin: true + optionalDependencies: + fsevents: 2.3.2 + dev: true + + /run-parallel@1.2.0: + resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} + dependencies: + queue-microtask: 1.2.3 + dev: true + + /safe-array-concat@1.0.0: + resolution: {integrity: sha512-9dVEFruWIsnie89yym+xWTAYASdpw3CJV7Li/6zBewGf9z2i1j31rP6jnY0pHEO4QZh6N0K11bFjWmdR8UGdPQ==} + engines: {node: '>=0.4'} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.0 + has-symbols: 1.0.3 + isarray: 2.0.5 + dev: true + + /safe-buffer@5.1.2: + resolution: {integrity: sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==} + + /safe-buffer@5.2.1: + resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} + + /safe-regex-test@1.0.0: + resolution: {integrity: sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.0 + is-regex: 1.1.4 + dev: true + + /safe-regex2@2.0.0: + resolution: {integrity: sha512-PaUSFsUaNNuKwkBijoAPHAK6/eM6VirvyPWlZ7BAQy4D+hCvh4B6lIG+nPdhbFfIbP+gTGBcrdsOaUs0F+ZBOQ==} + dependencies: + ret: 0.2.2 + dev: true + + /safer-buffer@2.1.2: + resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + + /sax@1.2.1: + resolution: {integrity: sha512-8I2a3LovHTOpm7NV5yOyO8IHqgVsfK4+UuySrXU8YXkSRX7k6hCV9b3HrkKCr3nMpgj+0bmocaJJWpvp1oc7ZA==} + dev: true + + /scheduler@0.20.2: + resolution: {integrity: sha512-2eWfGgAqqWFGqtdMmcL5zCMK1U8KlXv8SQFGglL3CEtd0aDVDWgeF/YoCmvln55m5zSk3J/20hTaSBeSObsQDQ==} + dependencies: + loose-envify: 1.4.0 + object-assign: 4.1.1 + dev: true + + /scmp@2.1.0: + resolution: {integrity: sha512-o/mRQGk9Rcer/jEEw/yw4mwo3EU/NvYvp577/Btqrym9Qy5/MdWGBqipbALgd2lrdWTJ5/gqDusxfnQBxOxT2Q==} + dev: false + + /secure-json-parse@2.7.0: + resolution: {integrity: sha512-6aU+Rwsezw7VR8/nyvKTx8QpWH9FrcYiXXlqC4z5d5XQBDRqtbfsRjnwGyqbi3gddNtWHuEk9OANUotL26qKUw==} + dev: true + + /semver-store@0.3.0: + resolution: {integrity: sha512-TcZvGMMy9vodEFSse30lWinkj+JgOBvPn8wRItpQRSayhc+4ssDs335uklkfvQQJgL/WvmHLVj4Ycv2s7QCQMg==} + dev: true + + /semver@5.7.1: + resolution: {integrity: sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==} + hasBin: true + dev: true + + /semver@6.3.0: + resolution: {integrity: sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==} + hasBin: true + dev: true + + /semver@7.3.8: + resolution: {integrity: sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==} + engines: {node: '>=10'} + hasBin: true + dependencies: + lru-cache: 6.0.0 + + /send@0.17.1: + resolution: {integrity: sha512-BsVKsiGcQMFwT8UxypobUKyv7irCNRHk1T0G680vk88yf6LBByGcZJOTJCrTP2xVN6yI+XjPJcNuE3V4fT9sAg==} + engines: {node: '>= 0.8.0'} + dependencies: + debug: 2.6.9 + depd: 1.1.2 + destroy: 1.0.4 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 1.7.3 + mime: 1.6.0 + ms: 2.1.1 + on-finished: 2.3.0 + range-parser: 1.2.1 + statuses: 1.5.0 + transitivePeerDependencies: + - supports-color + dev: false + + /send@0.18.0: + resolution: {integrity: sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==} + engines: {node: '>= 0.8.0'} + dependencies: + debug: 2.6.9 + depd: 2.0.0 + destroy: 1.2.0 + encodeurl: 1.0.2 + escape-html: 1.0.3 + etag: 1.8.1 + fresh: 0.5.2 + http-errors: 2.0.0 + mime: 1.6.0 + ms: 2.1.3 + on-finished: 2.4.1 + range-parser: 1.2.1 + statuses: 2.0.1 + transitivePeerDependencies: + - supports-color + + /sentence-case@3.0.4: + resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} + dependencies: + no-case: 3.0.4 + tslib: 2.5.0 + upper-case-first: 2.0.2 + dev: true + + /serve-static@1.14.1: + resolution: {integrity: sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==} + engines: {node: '>= 0.8.0'} + dependencies: + encodeurl: 1.0.2 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.17.1 + transitivePeerDependencies: + - supports-color + dev: false + + /serve-static@1.15.0: + resolution: {integrity: sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==} + engines: {node: '>= 0.8.0'} + dependencies: + encodeurl: 1.0.2 + escape-html: 1.0.3 + parseurl: 1.3.3 + send: 0.18.0 + transitivePeerDependencies: + - supports-color + + /set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + dev: true + + /set-cookie-parser@2.5.1: + resolution: {integrity: sha512-1jeBGaKNGdEq4FgIrORu/N570dwoPYio8lSoYLWmX7sQ//0JY08Xh9o5pBcgmHQ/MbsYp/aZnOe1s1lIsbLprQ==} + dev: true + + /setimmediate@1.0.5: + resolution: {integrity: sha512-MATJdZp8sLqDl/68LfQmbP8zKPLQNV6BIZoIgrscFDQ+RsvK/BxeDQOgyxKKoh0y/8h3BqVFnCqQ/gd+reiIXA==} + dev: true + + /setprototypeof@1.1.1: + resolution: {integrity: sha512-JvdAWfbXeIGaZ9cILp38HntZSFSo3mWg6xGcJJsd+d4aRMOqauag1C63dJfDw7OaMYwEbHMOxEZ1lqVRYP2OAw==} + + /setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + /sha.js@2.4.11: + resolution: {integrity: sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==} + hasBin: true + dependencies: + inherits: 2.0.4 + safe-buffer: 5.2.1 + dev: true + + /shallow-clone@3.0.1: + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} + dependencies: + kind-of: 6.0.3 + dev: true + + /shebang-command@1.2.0: + resolution: {integrity: sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==} + engines: {node: '>=0.10.0'} + dependencies: + shebang-regex: 1.0.0 + dev: true + + /shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + dependencies: + shebang-regex: 3.0.0 + dev: true + + /shebang-regex@1.0.0: + resolution: {integrity: sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==} + engines: {node: '>=0.10.0'} + dev: true + + /shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + dev: true + + /shell-quote@1.7.2: + resolution: {integrity: sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==} + dev: true + + /shiki@0.9.15: + resolution: {integrity: sha512-/Y0z9IzhJ8nD9nbceORCqu6NgT9X6I8Fk8c3SICHI5NbZRLdZYFaB233gwct9sU0vvSypyaL/qaKvzyQGJBZSw==} + dependencies: + jsonc-parser: 3.2.0 + vscode-oniguruma: 1.7.0 + vscode-textmate: 5.2.0 + dev: true + + /side-channel@1.0.4: + resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + dependencies: + call-bind: 1.0.2 + get-intrinsic: 1.2.0 + object-inspect: 1.12.3 + + /signal-exit@3.0.7: + resolution: {integrity: sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==} + dev: true + + /sinon@14.0.2: + resolution: {integrity: sha512-PDpV0ZI3ZCS3pEqx0vpNp6kzPhHrLx72wA0G+ZLaaJjLIYeE0n8INlgaohKuGy7hP0as5tbUd23QWu5U233t+w==} + dependencies: + '@sinonjs/commons': 2.0.0 + '@sinonjs/fake-timers': 9.1.2 + '@sinonjs/samsam': 7.0.1 + diff: 5.1.0 + nise: 5.1.4 + supports-color: 7.2.0 + dev: true + + /slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + dev: true + + /snake-case@3.0.4: + resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} + dependencies: + dot-case: 3.0.4 + tslib: 2.5.0 + dev: true + + /sonic-boom@1.4.1: + resolution: {integrity: sha512-LRHh/A8tpW7ru89lrlkU4AszXt1dbwSjVWguGrmlxE7tawVmDBlI1PILMkXAxJTwqhgsEeTHzj36D5CmHgQmNg==} + dependencies: + atomic-sleep: 1.0.0 + flatstr: 1.0.12 + dev: true + + /source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + dev: true + + /source-map@0.7.3: + resolution: {integrity: sha512-CkCj6giN3S+n9qrYiBTX5gystlENnRW5jZeNLHpe6aue+SrHcG5VYwujhW9s4dY31mEGsxBDrHR6oI69fTXsaQ==} + engines: {node: '>= 8'} + dev: true + + /source-map@0.8.0-beta.0: + resolution: {integrity: sha512-2ymg6oRBpebeZi9UUNsgQ89bhx01TcTkmNTGnNO88imTmbSgy4nfujrgVEFKWpMTEGA11EDkTt7mqObTPdigIA==} + engines: {node: '>= 8'} + dependencies: + whatwg-url: 7.1.0 + dev: true + + /sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + dev: true + + /stable@0.1.8: + resolution: {integrity: sha512-ji9qxRnOVfcuLDySj9qzhGSEFVobyt1kIOSkj1qZzYLzq7Tos/oUUWvotUPQLlrsidqsK6tBH89Bc9kL5zHA6w==} + deprecated: 'Modern JS already guarantees Array#sort() is a stable sort, so this library is deprecated. See the compatibility table on MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort#browser_compatibility' + dev: true + + /stacktrace-parser@0.1.10: + resolution: {integrity: sha512-KJP1OCML99+8fhOHxwwzyWrlUuVX5GQ0ZpJTd1DFXhdkrvg1szxfHhawXUZ3g9TkXORQd4/WG68jMlQZ2p8wlg==} + engines: {node: '>=6'} + dependencies: + type-fest: 0.7.1 + dev: true + + /statuses@1.5.0: + resolution: {integrity: sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==} + engines: {node: '>= 0.6'} + + /statuses@2.0.1: + resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + engines: {node: '>= 0.8'} + + /stoppable@1.1.0: + resolution: {integrity: sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==} + engines: {node: '>=4', npm: '>=6'} + dev: true + + /stream-browserify@2.0.2: + resolution: {integrity: sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==} + dependencies: + inherits: 2.0.4 + readable-stream: 2.3.8 + dev: true + + /stream-browserify@3.0.0: + resolution: {integrity: sha512-H73RAHsVBapbim0tU2JwwOiXUj+fikfiaoYAKHF3VJfA0pe2BCzkhAHBlLG6REzE+2WNZcxOXjK7lkso+9euLA==} + dependencies: + inherits: 2.0.4 + readable-stream: 3.6.2 + dev: true + + /stream-http@2.8.3: + resolution: {integrity: sha512-+TSkfINHDo4J+ZobQLWiMouQYB+UVYFttRA94FpEzzJ7ZdqcL4uUUQ7WkdkI4DSozGmgBUE/a47L+38PenXhUw==} + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 2.3.8 + to-arraybuffer: 1.0.1 + xtend: 4.0.2 + dev: true + + /stream-http@3.1.1: + resolution: {integrity: sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==} + dependencies: + builtin-status-codes: 3.0.0 + inherits: 2.0.4 + readable-stream: 3.6.2 + xtend: 4.0.2 + dev: true + + /stream-parser@0.3.1: + resolution: {integrity: sha512-bJ/HgKq41nlKvlhccD5kaCr/P+Hu0wPNKPJOH7en+YrJu/9EgqUF+88w5Jb6KNcjOFMhfX4B2asfeAtIGuHObQ==} + dependencies: + debug: 2.6.9 + transitivePeerDependencies: + - supports-color + dev: true + + /string-hash@1.1.3: + resolution: {integrity: sha512-kJUvRUFK49aub+a7T1nNE66EJbZBMnBgoC1UbCZ5n6bsZKBRga4KgBRTMn/pFkeCZSYtNeSyMxPDM0AXWELk2A==} + dev: true + + /string-similarity@4.0.4: + resolution: {integrity: sha512-/q/8Q4Bl4ZKAPjj8WerIBJWALKkaPRfrvhfF8k/B23i4nzrlRj2/go1m90In7nG/3XDSbOo0+pu6RvCTM9RGMQ==} + deprecated: Package no longer supported. Contact Support at https://www.npmjs.com/support for more info. + dev: true + + /string-width@1.0.2: + resolution: {integrity: sha512-0XsVpQLnVCXHJfyEs8tC0zpTVIr5PKKsQtkT29IwupnPTjtPmQ3xT/4yCREF9hYkV/3M3kzcUTSAZT6a6h81tw==} + engines: {node: '>=0.10.0'} + dependencies: + code-point-at: 1.1.0 + is-fullwidth-code-point: 1.0.0 + strip-ansi: 3.0.1 + dev: true + + /string-width@2.1.1: + resolution: {integrity: sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==} + engines: {node: '>=4'} + dependencies: + is-fullwidth-code-point: 2.0.0 + strip-ansi: 4.0.0 + dev: true + + /string-width@3.1.0: + resolution: {integrity: sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==} + engines: {node: '>=6'} + dependencies: + emoji-regex: 7.0.3 + is-fullwidth-code-point: 2.0.0 + strip-ansi: 5.2.0 + dev: true + + /string.prototype.trim@1.2.7: + resolution: {integrity: sha512-p6TmeT1T3411M8Cgg9wBTMRtY2q9+PNy9EV1i2lIXUN/btt763oIfxwN3RR8VU6wHX8j/1CFy0L+YuThm6bgOg==} + engines: {node: '>= 0.4'} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + dev: true + + /string.prototype.trimend@1.0.6: + resolution: {integrity: sha512-JySq+4mrPf9EsDBEDYMOb/lM7XQLulwg5R/m1r0PXEFqrV0qHvl58sdTilSXtKOflCsK2E8jxf+GKC0T07RWwQ==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + dev: true + + /string.prototype.trimstart@1.0.6: + resolution: {integrity: sha512-omqjMDaY92pbn5HOX7f9IccLA+U1tA9GvtU4JrodiXFfYB7jPzzHpRzpglLAjtUV6bB557zwClJezTqnAiYnQA==} + dependencies: + call-bind: 1.0.2 + define-properties: 1.2.0 + es-abstract: 1.21.2 + dev: true + + /string_decoder@1.1.1: + resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} + dependencies: + safe-buffer: 5.1.2 + dev: true + + /string_decoder@1.3.0: + resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} + dependencies: + safe-buffer: 5.2.1 + dev: true + + /strip-ansi@3.0.1: + resolution: {integrity: sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==} + engines: {node: '>=0.10.0'} + dependencies: + ansi-regex: 2.1.1 + dev: true + + /strip-ansi@4.0.0: + resolution: {integrity: sha512-4XaJ2zQdCzROZDivEVIDPkcQn8LMFSa8kj8Gxb/Lnwzv9A8VctNZ+lfivC/sV3ivW8ElJTERXZoPBRrZKkNKow==} + engines: {node: '>=4'} + dependencies: + ansi-regex: 3.0.1 + dev: true + + /strip-ansi@5.2.0: + resolution: {integrity: sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==} + engines: {node: '>=6'} + dependencies: + ansi-regex: 4.1.1 + dev: true + + /strip-ansi@6.0.0: + resolution: {integrity: sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==} + engines: {node: '>=8'} + dependencies: + ansi-regex: 5.0.1 + dev: true + + /strip-eof@1.0.0: + resolution: {integrity: sha512-7FCwGGmx8mD5xQd3RPUvnSpUXHM3BWuzjtpD4TXsfcZ9EL4azvVVUscFYwD9nx8Kh+uCBC00XBtAykoMHwTh8Q==} + engines: {node: '>=0.10.0'} + dev: true + + /strip-final-newline@2.0.0: + resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} + engines: {node: '>=6'} + dev: true + + /strip-json-comments@2.0.1: + resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} + engines: {node: '>=0.10.0'} + dev: true + + /strong-error-handler@4.0.1: + resolution: {integrity: sha512-wGqTVKwyngu9fjKBCqRuBOooCsHqs4q4AEz9Kk+yMNf+fEjEKf4E6dWw+IT3Y0LxPIdrnu0IE4S5Et97veMXMw==} + engines: {node: '>=10'} + dependencies: + accepts: 1.3.8 + debug: 4.3.4 + ejs: 3.1.8 + fast-safe-stringify: 2.1.1 + http-status: 1.6.2 + js2xmlparser: 4.0.2 + strong-globalize: 6.0.5 + transitivePeerDependencies: + - supports-color + dev: true + + /strong-globalize@6.0.5: + resolution: {integrity: sha512-7nfUli41TieV9/TSc0N62ve5Q4nfrpy/T0nNNy6TyD3vst79QWmeylCyd3q1gDxh8dqGEtabLNCdPQP1Iuvecw==} + engines: {node: '>=10'} + dependencies: + accept-language: 3.0.18 + debug: 4.3.4 + globalize: 1.7.0 + lodash: 4.17.21 + md5: 2.3.0 + mkdirp: 1.0.4 + os-locale: 5.0.0 + yamljs: 0.3.0 + transitivePeerDependencies: + - supports-color + dev: true + + /styled-jsx@4.0.1(@babel/core@7.21.8)(react@17.0.2): + resolution: {integrity: sha512-Gcb49/dRB1k8B4hdK8vhW27Rlb2zujCk1fISrizCcToIs+55B4vmUM0N9Gi4nnVfFZWe55jRdWpAqH1ldAKWvQ==} + engines: {node: '>= 12.0.0'} + peerDependencies: + '@babel/core': '*' + react: '>= 16.8.0 || 17.x.x || 18.x.x' + peerDependenciesMeta: + '@babel/core': + optional: true + dependencies: + '@babel/core': 7.21.8 + '@babel/plugin-syntax-jsx': 7.14.5(@babel/core@7.21.8) + '@babel/types': 7.15.0 + convert-source-map: 1.7.0 + loader-utils: 1.2.3 + react: 17.0.2 + source-map: 0.7.3 + string-hash: 1.1.3 + stylis: 3.5.4 + stylis-rule-sheet: 0.0.10(stylis@3.5.4) + dev: true + + /stylis-rule-sheet@0.0.10(stylis@3.5.4): + resolution: {integrity: sha512-nTbZoaqoBnmK+ptANthb10ZRZOGC+EmTLLUxeYIuHNkEKcmKgXX1XWKkUBT2Ac4es3NybooPe0SmvKdhKJZAuw==} + peerDependencies: + stylis: ^3.5.0 + dependencies: + stylis: 3.5.4 + dev: true + + /stylis@3.5.4: + resolution: {integrity: sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==} + dev: true + + /sucrase@3.32.0: + resolution: {integrity: sha512-ydQOU34rpSyj2TGyz4D2p8rbktIOZ8QY9s+DGLvFU1i5pWJE8vkpruCjGCMHsdXwnD7JDcS+noSwM/a7zyNFDQ==} + engines: {node: '>=8'} + hasBin: true + dependencies: + '@jridgewell/gen-mapping': 0.3.3 + commander: 4.1.1 + glob: 7.1.6 + lines-and-columns: 1.2.4 + mz: 2.7.0 + pirates: 4.0.5 + ts-interface-checker: 0.1.13 + dev: true + + /superagent@3.8.3: + resolution: {integrity: sha512-GLQtLMCoEIK4eDv6OGtkOoSMt3D+oq0y3dsxMuYuDvaNUvuT8eFBuLmfR0iYYzHC1e8hpzC6ZsxbuP6DIalMFA==} + engines: {node: '>= 4.0'} + deprecated: Please upgrade to v7.0.2+ of superagent. We have fixed numerous issues with streams, form-data, attach(), filesystem errors not bubbling up (ENOENT on attach()), and all tests are now passing. See the releases tab for more information at . + dependencies: + component-emitter: 1.3.0 + cookiejar: 2.1.4 + debug: 3.2.7 + extend: 3.0.2 + form-data: 2.5.1 + formidable: 1.2.6 + methods: 1.1.2 + mime: 1.6.0 + qs: 6.11.0 + readable-stream: 2.3.8 + transitivePeerDependencies: + - supports-color + dev: true + + /supertest@4.0.2: + resolution: {integrity: sha512-1BAbvrOZsGA3YTCWqbmh14L0YEq0EGICX/nBnfkfVJn7SrxQV1I3pMYjSzG9y/7ZU2V9dWqyqk2POwxlb09duQ==} + engines: {node: '>=6.0.0'} + dependencies: + methods: 1.1.2 + superagent: 3.8.3 + transitivePeerDependencies: + - supports-color + dev: true + + /supertokens-js-override@0.0.4: + resolution: {integrity: sha512-r0JFBjkMIdep3Lbk3JA+MpnpuOtw4RSyrlRAbrzMcxwiYco3GFWl/daimQZ5b1forOiUODpOlXbSOljP/oyurg==} + dev: false + + /supports-color@5.5.0: + resolution: {integrity: sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==} + engines: {node: '>=4'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color@6.0.0: + resolution: {integrity: sha512-on9Kwidc1IUQo+bQdhi8+Tijpo0e1SS6RoGo2guUwn5vdaxw8RXOF9Vb2ws+ihWOmh4JnCJOvaziZWP1VABaLg==} + engines: {node: '>=6'} + dependencies: + has-flag: 3.0.0 + dev: true + + /supports-color@7.2.0: + resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} + engines: {node: '>=8'} + dependencies: + has-flag: 4.0.0 + dev: true + + /supports-color@8.1.1: + resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==} + engines: {node: '>=10'} + dependencies: + has-flag: 4.0.0 + dev: true + + /thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + dependencies: + thenify: 3.3.1 + dev: true + + /thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + dependencies: + any-promise: 1.3.0 + dev: true + + /timers-browserify@2.0.12: + resolution: {integrity: sha512-9phl76Cqm6FhSX9Xe1ZUAMLtm1BLkKj2Qd5ApyWkXzsMRaA7dgr81kf4wJmQf/hAvg8EEyJxDo3du/0KlhPiKQ==} + engines: {node: '>=0.6.0'} + dependencies: + setimmediate: 1.0.5 + dev: true + + /tiny-lru@7.0.6: + resolution: {integrity: sha512-zNYO0Kvgn5rXzWpL0y3RS09sMK67eGaQj9805jlK9G6pSadfriTczzLHFXa/xcW4mIRfmlB9HyQ/+SgL0V1uow==} + engines: {node: '>=6'} + dev: true + + /to-arraybuffer@1.0.1: + resolution: {integrity: sha512-okFlQcoGTi4LQBG/PgSYblw9VOyptsz2KJZqc6qtgGdes8VktzUQkj4BI2blit072iS8VODNcMA+tvnS9dnuMA==} + dev: true + + /to-fast-properties@2.0.0: + resolution: {integrity: sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==} + engines: {node: '>=4'} + dev: true + + /to-regex-range@5.0.1: + resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} + engines: {node: '>=8.0'} + dependencies: + is-number: 7.0.0 + dev: true + + /toidentifier@1.0.0: + resolution: {integrity: sha512-yaOH/Pk/VEhBWWTlhI+qXxDFXlejDGcQipMlyxda9nthulaxLZUNcUqFxokp0vcYnvteJln5FNQDRrxj3YcbVw==} + engines: {node: '>=0.6'} + + /toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + + /toposort@2.0.2: + resolution: {integrity: sha512-0a5EOkAUp8D4moMi2W8ZF8jcga7BgZd91O/yabJCFY8az+XSzeGyTKs0Aoo897iV1Nj6guFq8orWDS96z91oGg==} + dev: true + + /tr46@0.0.3: + resolution: {integrity: sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==} + dev: true + + /tr46@1.0.1: + resolution: {integrity: sha512-dTpowEjclQ7Kgx5SdBkqRzVhERQXov8/l9Ft9dVM9fmg0W0KQSVaXX9T4i6twCPNtYiZM53lpSSUAwJbFPOHxA==} + dependencies: + punycode: 2.3.0 + dev: true + + /traverse@0.6.7: + resolution: {integrity: sha512-/y956gpUo9ZNCb99YjxG7OaslxZWHfCHAUUfshwqOXmxUIvqLjVO581BT+gM59+QV9tFe6/CGG53tsA1Y7RSdg==} + dev: true + + /tree-kill@1.2.2: + resolution: {integrity: sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==} + hasBin: true + dev: true + + /ts-interface-checker@0.1.13: + resolution: {integrity: sha512-Y/arvbn+rrz3JCKl9C4kVNfTfSm2/mEp5FSz5EsZSANGPSlQrpRI5M4PKF+mJnE52jOO90PnPSc3Ur3bTQw0gA==} + dev: true + + /ts-pnp@1.2.0(typescript@4.2.4): + resolution: {integrity: sha512-csd+vJOb/gkzvcCHgTGSChYpy5f1/XKNsmvBGO4JXS+z1v2HobugDz4s1IeFXM3wZB44uczs+eazB5Q/ccdhQw==} + engines: {node: '>=6'} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + dependencies: + typescript: 4.2.4 + dev: true + + /tslib@2.5.0: + resolution: {integrity: sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg==} + dev: true + + /tsscmp@1.0.6: + resolution: {integrity: sha512-LxhtAkPDTkVCMQjt2h6eBVY28KCjikZqZfMcC15YBeNjkgUpdCfBu5HoiOTDu86v6smE8yOjyEktJ8hlbANHQA==} + engines: {node: '>=0.6.x'} + dev: true + + /tsup@6.6.0(postcss@8.2.15)(typescript@4.2.4): + resolution: {integrity: sha512-HxZE7Hj5yNxLFftCXdcJ+Jsax8dI4oKb0bt8fIvd1g/W0FZ46sU1pFBVo15WpOERFcEMH7Hykey/Q+hKO4s9RQ==} + engines: {node: '>=14'} + hasBin: true + peerDependencies: + '@swc/core': ^1 + postcss: ^8.4.12 + typescript: ^4.1.0 + peerDependenciesMeta: + '@swc/core': + optional: true + postcss: + optional: true + typescript: + optional: true + dependencies: + bundle-require: 4.0.1(esbuild@0.17.18) + cac: 6.7.14 + chokidar: 3.5.1 + debug: 4.3.4 + esbuild: 0.17.18 + execa: 5.1.1 + globby: 11.1.0 + joycon: 3.1.1 + postcss: 8.2.15 + postcss-load-config: 3.1.4(postcss@8.2.15) + resolve-from: 5.0.0 + rollup: 3.21.6 + source-map: 0.8.0-beta.0 + sucrase: 3.32.0 + tree-kill: 1.2.2 + typescript: 4.2.4 + transitivePeerDependencies: + - supports-color + - ts-node + dev: true + + /tty-browserify@0.0.0: + resolution: {integrity: sha512-JVa5ijo+j/sOoHGjw0sxw734b1LhBkQ3bvUGNdxnVXDCX81Yx7TFgnZygxrIIWn23hbfTaMYLwRmAxFyDuFmIw==} + dev: true + + /tty-browserify@0.0.1: + resolution: {integrity: sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==} + dev: true + + /twilio@4.8.0(debug@4.3.4): + resolution: {integrity: sha512-jJaEyFGIiIAIfAWyq94g3uo2odTyo2opRN8hzpDHpbA4SYDfhxmm4E+Z0c7AP41HEdxzDyCwMkLNXh6fBpWRiw==} + engines: {node: '>=14.0'} + dependencies: + axios: 0.26.1(debug@4.3.4) + dayjs: 1.11.7 + https-proxy-agent: 5.0.1 + jsonwebtoken: 9.0.0 + qs: 6.11.0 + scmp: 2.1.0 + url-parse: 1.5.10 + xmlbuilder: 13.0.2 + transitivePeerDependencies: + - debug + - supports-color + dev: false + + /type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + engines: {node: '>=4'} + dev: true + + /type-fest@0.7.1: + resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} + engines: {node: '>=8'} + dev: true + + /type-is@1.6.18: + resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} + engines: {node: '>= 0.6'} + dependencies: + media-typer: 0.3.0 + mime-types: 2.1.35 + + /typed-array-length@1.0.4: + resolution: {integrity: sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==} + dependencies: + call-bind: 1.0.2 + for-each: 0.3.3 + is-typed-array: 1.1.10 + dev: true + + /typedoc@0.22.5(typescript@4.2.4): + resolution: {integrity: sha512-KFrWGU1iKiTGw0RcyjLNYDmhd7uICU14HgBNPmFKY/sT4Pm/fraaLyWyisst9vGTUAKxqibqoDITR7+ZcAkhHg==} + engines: {node: '>= 12.10.0'} + hasBin: true + peerDependencies: + typescript: 4.0.x || 4.1.x || 4.2.x || 4.3.x || 4.4.x + dependencies: + glob: 7.2.0 + lunr: 2.3.9 + marked: 3.0.8 + minimatch: 3.1.2 + shiki: 0.9.15 + typescript: 4.2.4 + dev: true + + /typescript@4.2.4: + resolution: {integrity: sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==} + engines: {node: '>=4.2.0'} + hasBin: true + dev: true + + /unbox-primitive@1.0.2: + resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} + dependencies: + call-bind: 1.0.2 + has-bigints: 1.0.2 + has-symbols: 1.0.3 + which-boxed-primitive: 1.0.2 + dev: true + + /unpipe@1.0.0: + resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} + engines: {node: '>= 0.8'} + + /update-browserslist-db@1.0.11(browserslist@4.21.5): + resolution: {integrity: sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' + dependencies: + browserslist: 4.21.5 + escalade: 3.1.1 + picocolors: 1.0.0 + dev: true + + /upper-case-first@2.0.2: + resolution: {integrity: sha512-514ppYHBaKwfJRK/pNC6c/OxfGa0obSnAl106u97Ed0I625Nin96KAjttZF6ZL3e1XLtphxnqrOi9iWgm+u+bg==} + dependencies: + tslib: 2.5.0 + dev: true + + /upper-case@2.0.2: + resolution: {integrity: sha512-KgdgDGJt2TpuwBUIjgG6lzw2GWFRCW9Qkfkiv0DxqHHLYJHmtmdUIKcZd8rHgFSjopVTlw6ggzCm1b8MFQwikg==} + dependencies: + tslib: 2.5.0 + dev: true + + /uri-js@4.4.1: + resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} + dependencies: + punycode: 2.3.0 + dev: true + + /url-parse@1.5.10: + resolution: {integrity: sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==} + dependencies: + querystringify: 2.2.0 + requires-port: 1.0.0 + dev: false + + /url@0.10.3: + resolution: {integrity: sha512-hzSUW2q06EqL1gKM/a+obYHLIO6ct2hwPuviqTTOcfFVc61UbfJ2Q32+uGL/HCPxKqrdGB5QUwIe7UqlDgwsOQ==} + dependencies: + punycode: 1.3.2 + querystring: 0.2.0 + dev: true + + /url@0.11.0: + resolution: {integrity: sha512-kbailJa29QrtXnxgq+DdCEGlbTeYM2eJUxsz6vjZavrCYPMIFHMKQmSKYAIuUK2i7hgPm28a8piX5NTUtM/LKQ==} + dependencies: + punycode: 1.3.2 + querystring: 0.2.0 + dev: true + + /use-subscription@1.5.1(react@17.0.2): + resolution: {integrity: sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==} + peerDependencies: + react: ^16.8.0 || ^17.0.0 + dependencies: + object-assign: 4.1.1 + react: 17.0.2 + dev: true + + /util-deprecate@1.0.2: + resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + dev: true + + /util@0.10.3: + resolution: {integrity: sha512-5KiHfsmkqacuKjkRkdV7SsfDJ2EGiPsK92s2MhNSY0craxjTdKTtqKsJaCWp4LW33ZZ0OPUv1WO/TFvNQRiQxQ==} + dependencies: + inherits: 2.0.1 + dev: true + + /util@0.11.1: + resolution: {integrity: sha512-HShAsny+zS2TZfaXxD9tYj4HQGlBezXZMZuM/S5PKLLoZkShZiGk9o5CzukI1LVHZvjdvZ2Sj1aW/Ndn2NB/HQ==} + dependencies: + inherits: 2.0.3 + dev: true + + /util@0.12.4: + resolution: {integrity: sha512-bxZ9qtSlGUWSOy9Qa9Xgk11kSslpuZwaxCg4sNIDj6FLucDab2JxnHwyNTCpHMtK1MjoQiWQ6DiUMZYbSrO+Sw==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.10 + safe-buffer: 5.2.1 + which-typed-array: 1.1.9 + dev: true + + /util@0.12.5: + resolution: {integrity: sha512-kZf/K6hEIrWHI6XqOFUiiMa+79wE/D8Q+NCNAWclkyg3b4d2k7s0QGepNjiABc+aR3N1PAyHL7p6UcLY6LmrnA==} + dependencies: + inherits: 2.0.4 + is-arguments: 1.1.1 + is-generator-function: 1.0.10 + is-typed-array: 1.1.10 + which-typed-array: 1.1.9 + dev: true + + /utils-merge@1.0.1: + resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} + engines: {node: '>= 0.4.0'} + + /uuid-parse@1.1.0: + resolution: {integrity: sha512-OdmXxA8rDsQ7YpNVbKSJkNzTw2I+S5WsbMDnCtIWSQaosNAcWtFuI/YK1TjzUI6nbkgiqEyh8gWngfcv8Asd9A==} + dev: true + + /uuid@3.4.0: + resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} + deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. + hasBin: true + dev: true + + /uuid@8.0.0: + resolution: {integrity: sha512-jOXGuXZAWdsTH7eZLtyXMqUb9EcWMGZNbL9YcGBJl4MH4nrxHmZJhEHvyLFrkxo+28uLb/NYRcStH48fnD0Vzw==} + hasBin: true + dev: true + + /uuid@8.3.2: + resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} + hasBin: true + dev: true + + /validator@13.9.0: + resolution: {integrity: sha512-B+dGG8U3fdtM0/aNK4/X8CXq/EcxU2WPrPEkJGslb47qyHsxmbggTWK0yEA4qnYVNF+nxNlN88o14hIcPmSIEA==} + engines: {node: '>= 0.10'} + dev: true + + /vandium-utils@1.2.0: + resolution: {integrity: sha512-yxYUDZz4BNo0CW/z5w4mvclitt5zolY7zjW97i6tTE+sU63cxYs1A6Bl9+jtIQa3+0hkeqY87k+7ptRvmeHe3g==} + dev: true + + /vandium-utils@2.0.0: + resolution: {integrity: sha512-XWbQ/0H03TpYDXk8sLScBEZpE7TbA0CHDL6/Xjt37IBYKLsHUQuBlL44ttAUs9zoBOLFxsW7HehXcuWCNyqOxQ==} + engines: {node: '>=10.16'} + dev: true + + /vary@1.1.2: + resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} + engines: {node: '>= 0.8'} + + /verify-apple-id-token@3.0.1: + resolution: {integrity: sha512-q91pG1e52TpEzXldMirWYNWcSQC4WuzgG0y/ZnBhzjfk0pSxi4YlGh5OTVRlodBenayGHfSDn5VseG9QDuqOew==} + dependencies: + jsonwebtoken: 9.0.0 + jwks-rsa: 3.0.1 + transitivePeerDependencies: + - supports-color + dev: false + + /vm-browserify@1.1.2: + resolution: {integrity: sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==} + dev: true + + /vscode-oniguruma@1.7.0: + resolution: {integrity: sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==} + dev: true + + /vscode-textmate@5.2.0: + resolution: {integrity: sha512-Uw5ooOQxRASHgu6C7GVvUxisKXfSgW4oFlO+aa+PAkgmH89O3CXxEEzNRNtHSqtXFTl0nAC1uYj0GMSH27uwtQ==} + dev: true + + /watchpack@2.1.1: + resolution: {integrity: sha512-Oo7LXCmc1eE1AjyuSBmtC3+Wy4HcV8PxWh2kP6fOl8yTlNS7r0K9l1ao2lrrUza7V39Y3D/BbJgY8VeSlc5JKw==} + engines: {node: '>=10.13.0'} + dependencies: + glob-to-regexp: 0.4.1 + graceful-fs: 4.2.11 + dev: true + + /webidl-conversions@3.0.1: + resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} + dev: true + + /webidl-conversions@4.0.2: + resolution: {integrity: sha512-YQ+BmxuTgd6UXZW3+ICGfyqRyHXVlD5GtQr5+qjiNW7bF0cqrzX500HVXPBOvgXb5YnzDd+h0zqyv61KUD7+Sg==} + dev: true + + /whatwg-url@5.0.0: + resolution: {integrity: sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==} + dependencies: + tr46: 0.0.3 + webidl-conversions: 3.0.1 + dev: true + + /whatwg-url@7.1.0: + resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} + dependencies: + lodash.sortby: 4.7.0 + tr46: 1.0.1 + webidl-conversions: 4.0.2 + dev: true + + /which-boxed-primitive@1.0.2: + resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} + dependencies: + is-bigint: 1.0.4 + is-boolean-object: 1.1.2 + is-number-object: 1.0.7 + is-string: 1.0.7 + is-symbol: 1.0.4 + dev: true + + /which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + dev: true + + /which-typed-array@1.1.9: + resolution: {integrity: sha512-w9c4xkx6mPidwp7180ckYWfMmvxpjlZuIudNtDf4N/tTAUB8VJbX25qZoAsrtGuYNnGw3pa0AXgbGKRB8/EceA==} + engines: {node: '>= 0.4'} + dependencies: + available-typed-arrays: 1.0.5 + call-bind: 1.0.2 + for-each: 0.3.3 + gopd: 1.0.1 + has-tostringtag: 1.0.0 + is-typed-array: 1.1.10 + dev: true + + /which@1.3.1: + resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + dependencies: + isexe: 2.0.0 + dev: true + + /wide-align@1.1.3: + resolution: {integrity: sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==} + dependencies: + string-width: 2.1.1 + dev: true + + /wrap-ansi@2.1.0: + resolution: {integrity: sha512-vAaEaDM946gbNpH5pLVNR+vX2ht6n0Bt3GXwVB1AuAqZosOvHNF3P7wDnh8KLkSqgUh0uh77le7Owgoz+Z9XBw==} + engines: {node: '>=0.10.0'} + dependencies: + string-width: 1.0.2 + strip-ansi: 3.0.1 + dev: true + + /wrappy@1.0.2: + resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} + dev: true + + /xml2js@0.4.19: + resolution: {integrity: sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==} + dependencies: + sax: 1.2.1 + xmlbuilder: 9.0.7 + dev: true + + /xmlbuilder@13.0.2: + resolution: {integrity: sha512-Eux0i2QdDYKbdbA6AM6xE4m6ZTZr4G4xF9kahI2ukSEMCzwce2eX9WlTI5J3s+NU7hpasFsr8hWIONae7LluAQ==} + engines: {node: '>=6.0'} + dev: false + + /xmlbuilder@9.0.7: + resolution: {integrity: sha512-7YXTQc3P2l9+0rjaUbLwMKRhtmwg1M1eDf6nag7urC7pIPYLD9W/jmzQ4ptRSUbodw5S0jfoGTflLemQibSpeQ==} + engines: {node: '>=4.0'} + dev: true + + /xmlcreate@2.0.4: + resolution: {integrity: sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==} + dev: true + + /xtend@4.0.2: + resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} + engines: {node: '>=0.4'} + dev: true + + /y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + dev: true + + /yallist@2.1.2: + resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} + dev: false + + /yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + dev: true + + /yallist@4.0.0: + resolution: {integrity: sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==} + + /yaml@1.10.2: + resolution: {integrity: sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg==} + engines: {node: '>= 6'} + dev: true + + /yamljs@0.3.0: + resolution: {integrity: sha512-C/FsVVhht4iPQYXOInoxUM/1ELSf9EsgKH34FofQOp6hwCPrW4vG4w5++TED3xRUo8gD7l0P1J1dLlDYzODsTQ==} + hasBin: true + dependencies: + argparse: 1.0.10 + glob: 7.1.7 + dev: true + + /yargs-parser@11.1.1: + resolution: {integrity: sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ==} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + + /yargs-parser@13.0.0: + resolution: {integrity: sha512-w2LXjoL8oRdRQN+hOyppuXs+V/fVAYtpcrRxZuF7Kt/Oc+Jr2uAcVntaUTNT6w5ihoWfFDpNY8CPx1QskxZ/pw==} + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 + dev: true + + /yargs-unparser@1.5.0: + resolution: {integrity: sha512-HK25qidFTCVuj/D1VfNiEndpLIeJN78aqgR23nL3y4N0U/91cOAzqfHlF8n2BvoNDcZmJKin3ddNSvOxSr8flw==} + engines: {node: '>=6'} + dependencies: + flat: 4.1.1 + lodash: 4.17.21 + yargs: 12.0.5 + dev: true + + /yargs@12.0.5: + resolution: {integrity: sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw==} + dependencies: + cliui: 4.1.0 + decamelize: 1.2.0 + find-up: 3.0.0 + get-caller-file: 1.0.3 + os-locale: 3.1.0 + require-directory: 2.1.1 + require-main-filename: 1.0.1 + set-blocking: 2.0.0 + string-width: 2.1.1 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 11.1.1 + dev: true + + /yargs@13.2.2: + resolution: {integrity: sha512-WyEoxgyTD3w5XRpAQNYUB9ycVH/PQrToaTXdYXRdOXvEy1l19br+VJsc0vcO8PTGg5ro/l/GY7F/JMEBmI0BxA==} + dependencies: + cliui: 4.1.0 + find-up: 3.0.0 + get-caller-file: 2.0.5 + os-locale: 3.1.0 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 3.1.0 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 13.0.0 + dev: true + + /ylru@1.3.2: + resolution: {integrity: sha512-RXRJzMiK6U2ye0BlGGZnmpwJDPgakn6aNQ0A7gHRbD4I0uvK4TW6UqkK1V0pp9jskjJBAXd3dRrbzWkqJ+6cxA==} + engines: {node: '>= 4.0.0'} + dev: true + + /yocto-queue@0.1.0: + resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} + engines: {node: '>=10'} + dev: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml new file mode 100644 index 000000000..bf87097a0 --- /dev/null +++ b/pnpm-workspace.yaml @@ -0,0 +1,2 @@ +ppackages: + - 'playground/*' \ No newline at end of file diff --git a/recipe/dashboard/index.d.ts b/recipe/dashboard/index.d.ts deleted file mode 100644 index 6d1776ce3..000000000 --- a/recipe/dashboard/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/dashboard"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/dashboard"; -export default _default; diff --git a/recipe/dashboard/index.js b/recipe/dashboard/index.js deleted file mode 100644 index fc697e4c9..000000000 --- a/recipe/dashboard/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/dashboard")); diff --git a/recipe/dashboard/types/index.d.ts b/recipe/dashboard/types/index.d.ts deleted file mode 100644 index 23332774e..000000000 --- a/recipe/dashboard/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/dashboard/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/dashboard/types"; -export default _default; diff --git a/recipe/dashboard/types/index.js b/recipe/dashboard/types/index.js deleted file mode 100644 index c797bdb53..000000000 --- a/recipe/dashboard/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/dashboard/types")); diff --git a/recipe/emailpassword/emaildelivery/index.d.ts b/recipe/emailpassword/emaildelivery/index.d.ts deleted file mode 100644 index dd7c2a8ea..000000000 --- a/recipe/emailpassword/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/emailpassword/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/emailpassword/emaildelivery/services"; -export default _default; diff --git a/recipe/emailpassword/emaildelivery/index.js b/recipe/emailpassword/emaildelivery/index.js deleted file mode 100644 index 894662752..000000000 --- a/recipe/emailpassword/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/emailpassword/emaildelivery/services")); diff --git a/recipe/emailpassword/index.d.ts b/recipe/emailpassword/index.d.ts deleted file mode 100644 index 84304e441..000000000 --- a/recipe/emailpassword/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/emailpassword"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/emailpassword"; -export default _default; diff --git a/recipe/emailpassword/index.js b/recipe/emailpassword/index.js deleted file mode 100644 index a84b0c3fc..000000000 --- a/recipe/emailpassword/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/emailpassword")); diff --git a/recipe/emailpassword/types/index.d.ts b/recipe/emailpassword/types/index.d.ts deleted file mode 100644 index 7ff35cd6e..000000000 --- a/recipe/emailpassword/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/emailpassword/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/emailpassword/types"; -export default _default; diff --git a/recipe/emailpassword/types/index.js b/recipe/emailpassword/types/index.js deleted file mode 100644 index 1d1844085..000000000 --- a/recipe/emailpassword/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/emailpassword/types")); diff --git a/recipe/emailverification/emaildelivery/index.d.ts b/recipe/emailverification/emaildelivery/index.d.ts deleted file mode 100644 index e342f96ab..000000000 --- a/recipe/emailverification/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/emailverification/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/emailverification/emaildelivery/services"; -export default _default; diff --git a/recipe/emailverification/emaildelivery/index.js b/recipe/emailverification/emaildelivery/index.js deleted file mode 100644 index f7f1bd525..000000000 --- a/recipe/emailverification/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/emailverification/emaildelivery/services")); diff --git a/recipe/emailverification/index.d.ts b/recipe/emailverification/index.d.ts deleted file mode 100644 index 525d2c2c5..000000000 --- a/recipe/emailverification/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/emailverification"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/emailverification"; -export default _default; diff --git a/recipe/emailverification/index.js b/recipe/emailverification/index.js deleted file mode 100644 index 6c69e3702..000000000 --- a/recipe/emailverification/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/emailverification")); diff --git a/recipe/emailverification/types/index.d.ts b/recipe/emailverification/types/index.d.ts deleted file mode 100644 index 60dd4a01d..000000000 --- a/recipe/emailverification/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/emailverification/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/emailverification/types"; -export default _default; diff --git a/recipe/emailverification/types/index.js b/recipe/emailverification/types/index.js deleted file mode 100644 index d028dad88..000000000 --- a/recipe/emailverification/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/emailverification/types")); diff --git a/recipe/jwt/index.d.ts b/recipe/jwt/index.d.ts deleted file mode 100644 index 5ddb6bfc1..000000000 --- a/recipe/jwt/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/jwt"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/jwt"; -export default _default; diff --git a/recipe/jwt/index.js b/recipe/jwt/index.js deleted file mode 100644 index 31f0b5258..000000000 --- a/recipe/jwt/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/jwt")); diff --git a/recipe/jwt/types/index.d.ts b/recipe/jwt/types/index.d.ts deleted file mode 100644 index e917e36d3..000000000 --- a/recipe/jwt/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/jwt/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/jwt/types"; -export default _default; diff --git a/recipe/jwt/types/index.js b/recipe/jwt/types/index.js deleted file mode 100644 index ba35c27c4..000000000 --- a/recipe/jwt/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/jwt/types")); diff --git a/recipe/passwordless/emaildelivery/index.d.ts b/recipe/passwordless/emaildelivery/index.d.ts deleted file mode 100644 index cad39adda..000000000 --- a/recipe/passwordless/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/passwordless/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/passwordless/emaildelivery/services"; -export default _default; diff --git a/recipe/passwordless/emaildelivery/index.js b/recipe/passwordless/emaildelivery/index.js deleted file mode 100644 index f43219743..000000000 --- a/recipe/passwordless/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/passwordless/emaildelivery/services")); diff --git a/recipe/passwordless/index.d.ts b/recipe/passwordless/index.d.ts deleted file mode 100644 index dea3a5689..000000000 --- a/recipe/passwordless/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/passwordless"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/passwordless"; -export default _default; diff --git a/recipe/passwordless/index.js b/recipe/passwordless/index.js deleted file mode 100644 index 83bdd4ca7..000000000 --- a/recipe/passwordless/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/passwordless")); diff --git a/recipe/passwordless/smsdelivery/index.d.ts b/recipe/passwordless/smsdelivery/index.d.ts deleted file mode 100644 index 858854cb6..000000000 --- a/recipe/passwordless/smsdelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/passwordless/smsdelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/passwordless/smsdelivery/services"; -export default _default; diff --git a/recipe/passwordless/smsdelivery/index.js b/recipe/passwordless/smsdelivery/index.js deleted file mode 100644 index 1fbd9a3e0..000000000 --- a/recipe/passwordless/smsdelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/passwordless/smsdelivery/services")); diff --git a/recipe/passwordless/types/index.d.ts b/recipe/passwordless/types/index.d.ts deleted file mode 100644 index a7b9e5020..000000000 --- a/recipe/passwordless/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/passwordless/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/passwordless/types"; -export default _default; diff --git a/recipe/passwordless/types/index.js b/recipe/passwordless/types/index.js deleted file mode 100644 index f7eaf1795..000000000 --- a/recipe/passwordless/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/passwordless/types")); diff --git a/recipe/session/claims.d.ts b/recipe/session/claims.d.ts deleted file mode 100644 index 2a0641c72..000000000 --- a/recipe/session/claims.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/session/claims"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/session/claims"; -export default _default; diff --git a/recipe/session/claims.js b/recipe/session/claims.js deleted file mode 100644 index 31014014a..000000000 --- a/recipe/session/claims.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/session/claims")); diff --git a/recipe/session/framework/awsLambda/index.d.ts b/recipe/session/framework/awsLambda/index.d.ts deleted file mode 100644 index 9fffcbee6..000000000 --- a/recipe/session/framework/awsLambda/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/awsLambda"; -import * as _default from "../../../../lib/build/recipe/session/framework/awsLambda"; -export default _default; diff --git a/recipe/session/framework/awsLambda/index.js b/recipe/session/framework/awsLambda/index.js deleted file mode 100644 index 47a35f11a..000000000 --- a/recipe/session/framework/awsLambda/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/awsLambda")); diff --git a/recipe/session/framework/express/index.d.ts b/recipe/session/framework/express/index.d.ts deleted file mode 100644 index 1326741fc..000000000 --- a/recipe/session/framework/express/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/express"; -import * as _default from "../../../../lib/build/recipe/session/framework/express"; -export default _default; diff --git a/recipe/session/framework/express/index.js b/recipe/session/framework/express/index.js deleted file mode 100644 index da2b16185..000000000 --- a/recipe/session/framework/express/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/express")); diff --git a/recipe/session/framework/fastify/index.d.ts b/recipe/session/framework/fastify/index.d.ts deleted file mode 100644 index 20535b62c..000000000 --- a/recipe/session/framework/fastify/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/fastify"; -import * as _default from "../../../../lib/build/recipe/session/framework/fastify"; -export default _default; diff --git a/recipe/session/framework/fastify/index.js b/recipe/session/framework/fastify/index.js deleted file mode 100644 index 4f0373f8c..000000000 --- a/recipe/session/framework/fastify/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/fastify")); diff --git a/recipe/session/framework/hapi/index.d.ts b/recipe/session/framework/hapi/index.d.ts deleted file mode 100644 index 2365a29c2..000000000 --- a/recipe/session/framework/hapi/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/hapi"; -import * as _default from "../../../../lib/build/recipe/session/framework/hapi"; -export default _default; diff --git a/recipe/session/framework/hapi/index.js b/recipe/session/framework/hapi/index.js deleted file mode 100644 index 21babe7b9..000000000 --- a/recipe/session/framework/hapi/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/hapi")); diff --git a/recipe/session/framework/koa/index.d.ts b/recipe/session/framework/koa/index.d.ts deleted file mode 100644 index fe57a8be2..000000000 --- a/recipe/session/framework/koa/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/koa"; -import * as _default from "../../../../lib/build/recipe/session/framework/koa"; -export default _default; diff --git a/recipe/session/framework/koa/index.js b/recipe/session/framework/koa/index.js deleted file mode 100644 index e94cef8f0..000000000 --- a/recipe/session/framework/koa/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/koa")); diff --git a/recipe/session/framework/loopback/index.d.ts b/recipe/session/framework/loopback/index.d.ts deleted file mode 100644 index 01587b8fd..000000000 --- a/recipe/session/framework/loopback/index.d.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from "../../../../lib/build/recipe/session/framework/loopback"; -import * as _default from "../../../../lib/build/recipe/session/framework/loopback"; -export default _default; diff --git a/recipe/session/framework/loopback/index.js b/recipe/session/framework/loopback/index.js deleted file mode 100644 index 67c8a2913..000000000 --- a/recipe/session/framework/loopback/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../../lib/build/recipe/session/framework/loopback")); diff --git a/recipe/session/index.d.ts b/recipe/session/index.d.ts deleted file mode 100644 index 6e092fdfc..000000000 --- a/recipe/session/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/session"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/session"; -export default _default; diff --git a/recipe/session/index.js b/recipe/session/index.js deleted file mode 100644 index 39159f318..000000000 --- a/recipe/session/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/session")); diff --git a/recipe/session/types/index.d.ts b/recipe/session/types/index.d.ts deleted file mode 100644 index 227152642..000000000 --- a/recipe/session/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/session/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/session/types"; -export default _default; diff --git a/recipe/session/types/index.js b/recipe/session/types/index.js deleted file mode 100644 index 0368ce9cb..000000000 --- a/recipe/session/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/session/types")); diff --git a/recipe/thirdparty/emaildelivery/index.d.ts b/recipe/thirdparty/emaildelivery/index.d.ts deleted file mode 100644 index 30bed2519..000000000 --- a/recipe/thirdparty/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdparty/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdparty/emaildelivery/services"; -export default _default; diff --git a/recipe/thirdparty/emaildelivery/index.js b/recipe/thirdparty/emaildelivery/index.js deleted file mode 100644 index e0c46c07f..000000000 --- a/recipe/thirdparty/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdparty/emaildelivery/services")); diff --git a/recipe/thirdparty/index.d.ts b/recipe/thirdparty/index.d.ts deleted file mode 100644 index bac464cc1..000000000 --- a/recipe/thirdparty/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/thirdparty"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/thirdparty"; -export default _default; diff --git a/recipe/thirdparty/index.js b/recipe/thirdparty/index.js deleted file mode 100644 index 6c3ee939d..000000000 --- a/recipe/thirdparty/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/thirdparty")); diff --git a/recipe/thirdparty/types/index.d.ts b/recipe/thirdparty/types/index.d.ts deleted file mode 100644 index 90cd6d381..000000000 --- a/recipe/thirdparty/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdparty/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdparty/types"; -export default _default; diff --git a/recipe/thirdparty/types/index.js b/recipe/thirdparty/types/index.js deleted file mode 100644 index e31ef1957..000000000 --- a/recipe/thirdparty/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdparty/types")); diff --git a/recipe/thirdpartyemailpassword/emaildelivery/index.d.ts b/recipe/thirdpartyemailpassword/emaildelivery/index.d.ts deleted file mode 100644 index cf01c2f41..000000000 --- a/recipe/thirdpartyemailpassword/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdpartyemailpassword/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdpartyemailpassword/emaildelivery/services"; -export default _default; diff --git a/recipe/thirdpartyemailpassword/emaildelivery/index.js b/recipe/thirdpartyemailpassword/emaildelivery/index.js deleted file mode 100644 index e82810ec0..000000000 --- a/recipe/thirdpartyemailpassword/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdpartyemailpassword/emaildelivery/services")); diff --git a/recipe/thirdpartyemailpassword/index.d.ts b/recipe/thirdpartyemailpassword/index.d.ts deleted file mode 100644 index 4d9831457..000000000 --- a/recipe/thirdpartyemailpassword/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/thirdpartyemailpassword"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/thirdpartyemailpassword"; -export default _default; diff --git a/recipe/thirdpartyemailpassword/index.js b/recipe/thirdpartyemailpassword/index.js deleted file mode 100644 index 69ed58033..000000000 --- a/recipe/thirdpartyemailpassword/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/thirdpartyemailpassword")); diff --git a/recipe/thirdpartyemailpassword/types/index.d.ts b/recipe/thirdpartyemailpassword/types/index.d.ts deleted file mode 100644 index 2b42327ca..000000000 --- a/recipe/thirdpartyemailpassword/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdpartyemailpassword/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdpartyemailpassword/types"; -export default _default; diff --git a/recipe/thirdpartyemailpassword/types/index.js b/recipe/thirdpartyemailpassword/types/index.js deleted file mode 100644 index 27529f7b6..000000000 --- a/recipe/thirdpartyemailpassword/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdpartyemailpassword/types")); diff --git a/recipe/thirdpartypasswordless/emaildelivery/index.d.ts b/recipe/thirdpartypasswordless/emaildelivery/index.d.ts deleted file mode 100644 index 870756309..000000000 --- a/recipe/thirdpartypasswordless/emaildelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdpartypasswordless/emaildelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdpartypasswordless/emaildelivery/services"; -export default _default; diff --git a/recipe/thirdpartypasswordless/emaildelivery/index.js b/recipe/thirdpartypasswordless/emaildelivery/index.js deleted file mode 100644 index 1084a585d..000000000 --- a/recipe/thirdpartypasswordless/emaildelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdpartypasswordless/emaildelivery/services")); diff --git a/recipe/thirdpartypasswordless/index.d.ts b/recipe/thirdpartypasswordless/index.d.ts deleted file mode 100644 index 39bc7056d..000000000 --- a/recipe/thirdpartypasswordless/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/thirdpartypasswordless"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/thirdpartypasswordless"; -export default _default; diff --git a/recipe/thirdpartypasswordless/index.js b/recipe/thirdpartypasswordless/index.js deleted file mode 100644 index d3a7c9df7..000000000 --- a/recipe/thirdpartypasswordless/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/thirdpartypasswordless")); diff --git a/recipe/thirdpartypasswordless/smsdelivery/index.d.ts b/recipe/thirdpartypasswordless/smsdelivery/index.d.ts deleted file mode 100644 index 8998e9d76..000000000 --- a/recipe/thirdpartypasswordless/smsdelivery/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdpartypasswordless/smsdelivery/services"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdpartypasswordless/smsdelivery/services"; -export default _default; diff --git a/recipe/thirdpartypasswordless/smsdelivery/index.js b/recipe/thirdpartypasswordless/smsdelivery/index.js deleted file mode 100644 index 19f6ba8c1..000000000 --- a/recipe/thirdpartypasswordless/smsdelivery/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdpartypasswordless/smsdelivery/services")); diff --git a/recipe/thirdpartypasswordless/types/index.d.ts b/recipe/thirdpartypasswordless/types/index.d.ts deleted file mode 100644 index ba9c55e93..000000000 --- a/recipe/thirdpartypasswordless/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/thirdpartypasswordless/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/thirdpartypasswordless/types"; -export default _default; diff --git a/recipe/thirdpartypasswordless/types/index.js b/recipe/thirdpartypasswordless/types/index.js deleted file mode 100644 index 5d90dc78c..000000000 --- a/recipe/thirdpartypasswordless/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/thirdpartypasswordless/types")); diff --git a/recipe/usermetadata/index.d.ts b/recipe/usermetadata/index.d.ts deleted file mode 100644 index e541f61b4..000000000 --- a/recipe/usermetadata/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/usermetadata"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/usermetadata"; -export default _default; diff --git a/recipe/usermetadata/index.js b/recipe/usermetadata/index.js deleted file mode 100644 index a987bf05f..000000000 --- a/recipe/usermetadata/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/usermetadata")); diff --git a/recipe/usermetadata/types/index.d.ts b/recipe/usermetadata/types/index.d.ts deleted file mode 100644 index cd5315b15..000000000 --- a/recipe/usermetadata/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/usermetadata/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/usermetadata/types"; -export default _default; diff --git a/recipe/usermetadata/types/index.js b/recipe/usermetadata/types/index.js deleted file mode 100644 index cbd50db7d..000000000 --- a/recipe/usermetadata/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/usermetadata/types")); diff --git a/recipe/userroles/index.d.ts b/recipe/userroles/index.d.ts deleted file mode 100644 index 890df5725..000000000 --- a/recipe/userroles/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../lib/build/recipe/userroles"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../lib/build/recipe/userroles"; -export default _default; diff --git a/recipe/userroles/index.js b/recipe/userroles/index.js deleted file mode 100644 index 5f41d3af9..000000000 --- a/recipe/userroles/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../lib/build/recipe/userroles")); diff --git a/recipe/userroles/types/index.d.ts b/recipe/userroles/types/index.d.ts deleted file mode 100644 index 424c2c2db..000000000 --- a/recipe/userroles/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../../../lib/build/recipe/userroles/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../../../lib/build/recipe/userroles/types"; -export default _default; diff --git a/recipe/userroles/types/index.js b/recipe/userroles/types/index.js deleted file mode 100644 index 9b42a3278..000000000 --- a/recipe/userroles/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../../../lib/build/recipe/userroles/types")); diff --git a/test/auth-modes.test.js b/test/auth-modes.test.js index 1011ab08e..87fe12476 100644 --- a/test/auth-modes.test.js +++ b/test/auth-modes.test.js @@ -23,11 +23,11 @@ const { delay, } = require("./utils"); const assert = require("assert"); -const { ProcessState } = require("../lib/build/processState"); +const { ProcessState } = require("../dist/processState"); const SuperTokens = require("../"); -const Session = require("../recipe/session"); -const { verifySession } = require("../recipe/session/framework/express"); -const { middleware, errorHandler } = require("../framework/express"); +const Session = require("../dist/recipe/session"); +const { verifySession } = require("../dist/recipe/session/framework/express"); +const { middleware, errorHandler } = require("../dist/framework/express"); const express = require("express"); const request = require("supertest"); const sinon = require("sinon"); diff --git a/test/auth-react-server/index.js b/test/auth-react-server/index.js index 5f5b0672c..5348d0a91 100644 --- a/test/auth-react-server/index.js +++ b/test/auth-react-server/index.js @@ -14,32 +14,32 @@ */ require("dotenv").config(); let SuperTokens = require("../../"); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); -let ThirdParty = require("../../recipe/thirdparty"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); -let { verifySession } = require("../../recipe/session/framework/express"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let ThirdParty = require("../../dist/recipe/thirdparty"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); +let { verifySession } = require("../../dist/recipe/session/framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); let cookieParser = require("cookie-parser"); let bodyParser = require("body-parser"); let http = require("http"); let cors = require("cors"); -let EmailVerificationRaw = require("../../lib/build/recipe/emailverification/recipe").default; -let EmailVerification = require("../../recipe/emailverification"); -let UserRolesRaw = require("../../lib/build/recipe/userroles/recipe").default; -let UserRoles = require("../../recipe/userroles"); -let PasswordlessRaw = require("../../lib/build/recipe/passwordless/recipe").default; -let Passwordless = require("../../recipe/passwordless"); -let ThirdPartyPasswordless = require("../../recipe/thirdpartypasswordless"); -let { default: SuperTokensRaw } = require("../../lib/build/supertokens"); -const { default: EmailPasswordRaw } = require("../../lib/build/recipe/emailpassword/recipe"); -const { default: ThirdPartyRaw } = require("../../lib/build/recipe/thirdparty/recipe"); -const { default: ThirdPartyEmailPasswordRaw } = require("../../lib/build/recipe/thirdpartyemailpassword/recipe"); -const { default: DashboardRaw } = require("../../lib/build/recipe/dashboard/recipe"); - -const { default: ThirdPartyPasswordlessRaw } = require("../../lib/build/recipe/thirdpartypasswordless/recipe"); -const { default: SessionRaw } = require("../../lib/build/recipe/session/recipe"); +let EmailVerificationRaw = require("../../dist/recipe/emailverification/recipe").default; +let EmailVerification = require("../../dist/recipe/emailverification"); +let UserRolesRaw = require("../../dist/recipe/userroles/recipe").default; +let UserRoles = require("../../dist/recipe/userroles"); +let PasswordlessRaw = require("../../dist/recipe/passwordless/recipe").default; +let Passwordless = require("../../dist/recipe/passwordless"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +let { default: SuperTokensRaw } = require("../../dist/supertokens"); +const { default: EmailPasswordRaw } = require("../../dist/recipe/emailpassword/recipe"); +const { default: ThirdPartyRaw } = require("../../dist/recipe/thirdparty/recipe"); +const { default: ThirdPartyEmailPasswordRaw } = require("../../dist/recipe/thirdpartyemailpassword/recipe"); +const { default: DashboardRaw } = require("../../dist/recipe/dashboard/recipe"); + +const { default: ThirdPartyPasswordlessRaw } = require("../../dist/recipe/thirdpartypasswordless/recipe"); +const { default: SessionRaw } = require("../../dist/recipe/session/recipe"); let { startST, killAllST, setupST, cleanST, customAuth0Provider } = require("./utils"); let urlencodedParser = bodyParser.urlencoded({ limit: "20mb", extended: true, parameterLimit: 20000 }); diff --git a/test/config.test.js b/test/config.test.js index 5b8e71f76..09e1f2299 100644 --- a/test/config.test.js +++ b/test/config.test.js @@ -27,20 +27,20 @@ const { const request = require("supertest"); const express = require("express"); let STExpress = require("../"); -let Session = require("../recipe/session"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; +let Session = require("../dist/recipe/session"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); -let NormalisedURLPath = require("../lib/build/normalisedURLPath").default; -let NormalisedURLDomain = require("../lib/build/normalisedURLDomain").default; -let { normaliseSessionScopeOrThrowError } = require("../lib/build/recipe/session/utils"); -const { Querier } = require("../lib/build/querier"); -let SuperTokens = require("../lib/build/supertokens").default; +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); +let NormalisedURLPath = require("../dist/normalisedURLPath").default; +let NormalisedURLDomain = require("../dist/normalisedURLDomain").default; +let { normaliseSessionScopeOrThrowError } = require("../dist/recipe/session/utils"); +const { Querier } = require("../dist/querier"); +let SuperTokens = require("../dist/supertokens").default; let ST = require("../"); -let EmailPassword = require("../lib/build/recipe/emailpassword"); -let EmailPasswordRecipe = require("../lib/build/recipe/emailpassword/recipe").default; -const { getTopLevelDomainForSameSiteResolution } = require("../lib/build/utils"); -const { middleware } = require("../framework/express"); +let EmailPassword = require("../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../dist/recipe/emailpassword/recipe").default; +const { getTopLevelDomainForSameSiteResolution } = require("../dist/utils"); +const { middleware } = require("../dist/framework/express"); describe(`configTest: ${printPath("[test/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/dashboard.test.js b/test/dashboard.test.js index a5b1148e7..7bff7520d 100644 --- a/test/dashboard.test.js +++ b/test/dashboard.test.js @@ -1,9 +1,9 @@ const { printPath, setupST, startST, killAllST, cleanST, resetAll } = require("./utils"); let STExpress = require("../"); -let Dashboard = require("../recipe/dashboard"); -let DashboardRecipe = require("../lib/build/recipe/dashboard/recipe").default; +let Dashboard = require("../dist/recipe/dashboard"); +let DashboardRecipe = require("../dist/recipe/dashboard/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../lib/build/processState"); +let { ProcessState } = require("../dist/processState"); describe(`dashboard: ${printPath("[test/dashboard.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/config.test.js b/test/emailpassword/config.test.js index 82dffd798..13997884b 100644 --- a/test/emailpassword/config.test.js +++ b/test/emailpassword/config.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`configTest: ${printPath("[test/emailpassword/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/deleteUser.test.js b/test/emailpassword/deleteUser.test.js index d1c3feeb7..eaeca3e3a 100644 --- a/test/emailpassword/deleteUser.test.js +++ b/test/emailpassword/deleteUser.test.js @@ -24,22 +24,22 @@ const { extractInfoFromResponse, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const express = require("express"); const request = require("supertest"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -let { middleware, errorHandler } = require("../../framework/express"); -let { maxVersion } = require("../../lib/build/utils"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +let { middleware, errorHandler } = require("../../dist/framework/express"); +let { maxVersion } = require("../../dist/utils"); describe(`deleteUser: ${printPath("[test/emailpassword/deleteUser.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/emailDelivery.test.js b/test/emailpassword/emailDelivery.test.js index 0205da7cb..5e1e6ca9c 100644 --- a/test/emailpassword/emailDelivery.test.js +++ b/test/emailpassword/emailDelivery.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse, delay } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let EmailPassword = require("../../recipe/emailpassword"); -const EmailVerification = require("../../recipe/emailverification"); -let { SMTPService } = require("../../recipe/emailpassword/emaildelivery"); +let { ProcessState } = require("../../dist/processState"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let { SMTPService } = require("../../dist/recipe/emailpassword/emaildelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); -describe(`emailDelivery: ${printPath("[test/emailpassword/emailDelivery.test.js]")}`, function () { +describe(`emailDelivery: ${printPath("[test/emailpassword/emaildelivery/services.test.js]")}`, function () { beforeEach(async function () { await killAllST(); await setupST(); diff --git a/test/emailpassword/emailExists.test.js b/test/emailpassword/emailExists.test.js index 642fa3f31..26118c7c9 100644 --- a/test/emailpassword/emailExists.test.js +++ b/test/emailpassword/emailExists.test.js @@ -14,21 +14,21 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const request = require("supertest"); const express = require("express"); let bodyParser = require("body-parser"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); /* TODO: diff --git a/test/emailpassword/emailverify.test.js b/test/emailpassword/emailverify.test.js index c9c4a58f9..6569ea005 100644 --- a/test/emailpassword/emailverify.test.js +++ b/test/emailpassword/emailverify.test.js @@ -27,16 +27,16 @@ const { emailVerifyTokenRequest, } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); -const EmailVerification = require("../../recipe/emailverification"); +let Session = require("../../dist/recipe/session"); +const EmailVerification = require("../../dist/recipe/emailverification"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); +let { ProcessState } = require("../../dist/processState"); +let { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); const express = require("express"); const request = require("supertest"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); /** * TODO: (later) in emailVerificationFunctions.ts: diff --git a/test/emailpassword/formFieldValidator.test.js b/test/emailpassword/formFieldValidator.test.js index 26c4618c9..94522d303 100644 --- a/test/emailpassword/formFieldValidator.test.js +++ b/test/emailpassword/formFieldValidator.test.js @@ -13,10 +13,10 @@ * under the License. */ -let { defaultPasswordValidator, defaultEmailValidator } = require("../../lib/build/recipe/emailpassword/utils"); +let { defaultPasswordValidator, defaultEmailValidator } = require("../../dist/recipe/emailpassword/utils"); let assert = require("assert"); const { printPath } = require("../utils"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`formFieldValidator: ${printPath("[test/emailpassword/formFieldValidator.test.js]")}`, function () { it("checking email validator", async function () { diff --git a/test/emailpassword/override.test.js b/test/emailpassword/override.test.js index 191d314e7..37b6bef9b 100644 --- a/test/emailpassword/override.test.js +++ b/test/emailpassword/override.test.js @@ -14,20 +14,20 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const express = require("express"); const request = require("supertest"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/emailpassword/override.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/passwordreset.test.js b/test/emailpassword/passwordreset.test.js index f993d2d3e..c77b4177e 100644 --- a/test/emailpassword/passwordreset.test.js +++ b/test/emailpassword/passwordreset.test.js @@ -15,22 +15,22 @@ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let generatePasswordResetToken = require("../../lib/build/recipe/emailpassword/api/generatePasswordResetToken").default; -let passwordReset = require("../../lib/build/recipe/emailpassword/api/passwordReset").default; +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let generatePasswordResetToken = require("../../dist/recipe/emailpassword/api/generatePasswordResetToken").default; +let passwordReset = require("../../dist/recipe/emailpassword/api/passwordReset").default; const express = require("express"); const request = require("supertest"); -let { middleware, errorHandler } = require("../../framework/express"); -let { maxVersion } = require("../../lib/build/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); +let { maxVersion } = require("../../dist/utils"); /** * TODO: (later) in passwordResetFunctions.ts: diff --git a/test/emailpassword/signinFeature.test.js b/test/emailpassword/signinFeature.test.js index 637d808ef..e79bce169 100644 --- a/test/emailpassword/signinFeature.test.js +++ b/test/emailpassword/signinFeature.test.js @@ -25,21 +25,21 @@ const { extractInfoFromResponse, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const express = require("express"); const request = require("supertest"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -let { middleware, errorHandler } = require("../../framework/express"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signinFeature: ${printPath("[test/emailpassword/signinFeature.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/signoutFeature.test.js b/test/emailpassword/signoutFeature.test.js index b7ab1f39e..a76bac23d 100644 --- a/test/emailpassword/signoutFeature.test.js +++ b/test/emailpassword/signoutFeature.test.js @@ -26,21 +26,21 @@ const { setKeyValueInConfig, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const express = require("express"); const request = require("supertest"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -let { middleware, errorHandler } = require("../../framework/express"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signoutFeature: ${printPath("[test/emailpassword/signoutFeature.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/signupFeature.test.js b/test/emailpassword/signupFeature.test.js index 37fdf3071..e638e79a9 100644 --- a/test/emailpassword/signupFeature.test.js +++ b/test/emailpassword/signupFeature.test.js @@ -24,21 +24,21 @@ const { extractInfoFromResponse, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let { normaliseURLPathOrThrowError } = require("../../lib/build/normalisedURLPath"); -let { normaliseURLDomainOrThrowError } = require("../../lib/build/normalisedURLDomain"); -let { normaliseSessionScopeOrThrowError } = require("../../lib/build/recipe/session/utils"); -const { Querier } = require("../../lib/build/querier"); -let EmailPassword = require("../../recipe/emailpassword"); -let EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword/recipe").default; -let utils = require("../../lib/build/recipe/emailpassword/utils"); +let { ProcessState } = require("../../dist/processState"); +let { normaliseURLPathOrThrowError } = require("../../dist/normalisedURLPath"); +let { normaliseURLDomainOrThrowError } = require("../../dist/normalisedURLDomain"); +let { normaliseSessionScopeOrThrowError } = require("../../dist/recipe/session/utils"); +const { Querier } = require("../../dist/querier"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../../dist/recipe/emailpassword/recipe").default; +let utils = require("../../dist/recipe/emailpassword/utils"); const express = require("express"); const request = require("supertest"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -let { middleware, errorHandler } = require("../../framework/express"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signupFeature: ${printPath("[test/emailpassword/signupFeature.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/emailpassword/updateEmailPass.test.js b/test/emailpassword/updateEmailPass.test.js index 4c5fd4612..e3ca40005 100644 --- a/test/emailpassword/updateEmailPass.test.js +++ b/test/emailpassword/updateEmailPass.test.js @@ -13,15 +13,15 @@ * under the License. */ const { printPath, setupST, startST, stopST, killAllST, cleanST, signUPRequest } = require("../utils"); -const { updateEmailOrPassword, signIn } = require("../../lib/build/recipe/emailpassword"); +const { updateEmailOrPassword, signIn } = require("../../dist/recipe/emailpassword"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); -let { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let { middleware, errorHandler } = require("../../dist/framework/express"); const express = require("express"); describe(`updateEmailPassTest: ${printPath("[test/emailpassword/updateEmailPass.test.js]")}`, function () { diff --git a/test/emailpassword/users.test.js b/test/emailpassword/users.test.js index f2d3a1ab7..c193ccfe2 100644 --- a/test/emailpassword/users.test.js +++ b/test/emailpassword/users.test.js @@ -13,15 +13,15 @@ * under the License. */ const { printPath, setupST, startST, stopST, killAllST, cleanST, signUPRequest } = require("../utils"); -const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../lib/build"); +const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../dist"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); -let { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let { middleware, errorHandler } = require("../../dist/framework/express"); const express = require("express"); describe(`usersTest: ${printPath("[test/emailpassword/users.test.js]")}`, function () { diff --git a/test/error.test.js b/test/error.test.js index bafb339c1..b7e140548 100644 --- a/test/error.test.js +++ b/test/error.test.js @@ -1,5 +1,5 @@ const assert = require("assert"); -const { default: SuperTokensError } = require("../lib/build/error"); +const { default: SuperTokensError } = require("../dist/error"); describe("SuperTokensError", () => { it("should serialize with the proper message", () => { diff --git a/test/framework/awsLambda.test.js b/test/framework/awsLambda.test.js index a6fb35686..01bea9f5c 100644 --- a/test/framework/awsLambda.test.js +++ b/test/framework/awsLambda.test.js @@ -23,19 +23,19 @@ const { mockLambdaProxyEventV2, } = require("../utils"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../../dist/processState"); let SuperTokens = require("../../"); -let { middleware } = require("../../framework/awsLambda"); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); -let Passwordless = require("../../recipe/passwordless"); -let ThirdParty = require("../../recipe/thirdparty"); -let { Apple, Google, Github } = require("../../recipe/thirdparty"); -let { verifySession } = require("../../recipe/session/framework/awsLambda"); -let Dashboard = require("../../recipe/dashboard"); +let { middleware } = require("../../dist/framework/awsLambda"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let Passwordless = require("../../dist/recipe/passwordless"); +let ThirdParty = require("../../dist/recipe/thirdparty"); +let { Apple, Google, Github } = require("../../dist/recipe/thirdparty"); +let { verifySession } = require("../../dist/recipe/session/framework/awsLambda"); +let Dashboard = require("../../dist/recipe/dashboard"); let { createUsers } = require("../utils"); -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`AWS Lambda: ${printPath("[test/framework/awsLambda.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/framework/crossFramework.testgen.js b/test/framework/crossFramework.testgen.js index d7e98307b..051ee3c02 100644 --- a/test/framework/crossFramework.testgen.js +++ b/test/framework/crossFramework.testgen.js @@ -1,24 +1,24 @@ const SuperTokens = require("../../"); -const { ProcessState } = require("../../lib/build/processState"); +const { ProcessState } = require("../../dist/processState"); const { setupST, startST, killAllST, cleanST } = require("../utils"); const express = require("express"); const request = require("supertest"); -const { verifySession: expressVerifySession } = require("../../recipe/session/framework/express"); -const ExpressFramework = require("../../framework/express"); +const { verifySession: expressVerifySession } = require("../../dist/recipe/session/framework/express"); +const ExpressFramework = require("../../dist/framework/express"); const Fastify = require("fastify"); -const FastifyFramework = require("../../framework/fastify"); -const { verifySession: fastifyVerifySession } = require("../../recipe/session/framework/fastify"); +const FastifyFramework = require("../../dist/framework/fastify"); +const { verifySession: fastifyVerifySession } = require("../../dist/recipe/session/framework/fastify"); -const HapiFramework = require("../../framework/hapi"); +const HapiFramework = require("../../dist/framework/hapi"); const Hapi = require("@hapi/hapi"); -const { verifySession: hapiVerifySession } = require("../../recipe/session/framework/hapi"); +const { verifySession: hapiVerifySession } = require("../../dist/recipe/session/framework/hapi"); const Koa = require("koa"); -const KoaFramework = require("../../framework/koa"); +const KoaFramework = require("../../dist/framework/koa"); const Router = require("@koa/router"); -const { verifySession: koaVerifySession } = require("../../recipe/session/framework/koa"); +const { verifySession: koaVerifySession } = require("../../dist/recipe/session/framework/koa"); const loopbackRoutes = [ { diff --git a/test/framework/crossframework/unauthorised.test.js b/test/framework/crossframework/unauthorised.test.js index 7f1c53112..fd3ff0e69 100644 --- a/test/framework/crossframework/unauthorised.test.js +++ b/test/framework/crossframework/unauthorised.test.js @@ -1,5 +1,5 @@ const { addCrossFrameworkTests } = require("../crossFramework.testgen"); -let Session = require("../../../recipe/session"); +let Session = require("../../../dist/recipe/session"); const { extractInfoFromResponse } = require("../../utils"); let assert = require("assert"); diff --git a/test/framework/fastify.test.js b/test/framework/fastify.test.js index 0f329b26d..27fd41871 100644 --- a/test/framework/fastify.test.js +++ b/test/framework/fastify.test.js @@ -22,21 +22,21 @@ const { extractCookieCountInfo, } = require("../utils"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../../dist/processState"); let SuperTokens = require("../../"); -let FastifyFramework = require("../../framework/fastify"); +let FastifyFramework = require("../../dist/framework/fastify"); const Fastify = require("fastify"); -let EmailPassword = require("../../recipe/emailpassword"); -const EmailVerification = require("../../recipe/emailverification"); -let Session = require("../../recipe/session"); -let { verifySession } = require("../../recipe/session/framework/fastify"); -let Dashboard = require("../../recipe/dashboard"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let Session = require("../../dist/recipe/session"); +let { verifySession } = require("../../dist/recipe/session/framework/fastify"); +let Dashboard = require("../../dist/recipe/dashboard"); let { createUsers } = require("../utils"); -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const Passwordless = require("../../recipe/passwordless"); -const ThirdParty = require("../../recipe/thirdparty"); -const { Apple, Google, Github } = require("../../recipe/thirdparty"); +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const Passwordless = require("../../dist/recipe/passwordless"); +const ThirdParty = require("../../dist/recipe/thirdparty"); +const { Apple, Google, Github } = require("../../dist/recipe/thirdparty"); describe(`Fastify: ${printPath("[test/framework/fastify.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/framework/hapi.test.js b/test/framework/hapi.test.js index 854461d46..074c90b46 100644 --- a/test/framework/hapi.test.js +++ b/test/framework/hapi.test.js @@ -14,21 +14,21 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../utils"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../../dist/processState"); let SuperTokens = require("../../"); -let HapiFramework = require("../../framework/hapi"); +let HapiFramework = require("../../dist/framework/hapi"); const Hapi = require("@hapi/hapi"); -let Session = require("../../recipe/session"); -let ThirdpartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); -let { verifySession } = require("../../recipe/session/framework/hapi"); -let Dashboard = require("../../recipe/dashboard"); -let EmailPassword = require("../../recipe/emailpassword"); +let Session = require("../../dist/recipe/session"); +let ThirdpartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); +let { verifySession } = require("../../dist/recipe/session/framework/hapi"); +let Dashboard = require("../../dist/recipe/dashboard"); +let EmailPassword = require("../../dist/recipe/emailpassword"); const { createUsers } = require("../utils.js"); -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const Passwordless = require("../../recipe/passwordless"); -const ThirdParty = require("../../recipe/thirdparty"); -const { Apple, Google, Github } = require("../../recipe/thirdparty"); +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const Passwordless = require("../../dist/recipe/passwordless"); +const ThirdParty = require("../../dist/recipe/thirdparty"); +const { Apple, Google, Github } = require("../../dist/recipe/thirdparty"); describe(`Hapi: ${printPath("[test/framework/hapi.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/framework/koa.test.js b/test/framework/koa.test.js index c1e2f975c..804968f64 100644 --- a/test/framework/koa.test.js +++ b/test/framework/koa.test.js @@ -14,22 +14,22 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../utils"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../../dist/processState"); let SuperTokens = require("../../"); -let KoaFramework = require("../../framework/koa"); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); +let KoaFramework = require("../../dist/framework/koa"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); let Koa = require("koa"); const Router = require("@koa/router"); -let { verifySession } = require("../../recipe/session/framework/koa"); +let { verifySession } = require("../../dist/recipe/session/framework/koa"); const request = require("supertest"); -let Dashboard = require("../../recipe/dashboard"); +let Dashboard = require("../../dist/recipe/dashboard"); const { createUsers } = require("../utils.js"); -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const Passwordless = require("../../recipe/passwordless"); -const ThirdParty = require("../../recipe/thirdparty"); -const { Google, Github, Apple } = require("../../recipe/thirdparty"); +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const Passwordless = require("../../dist/recipe/passwordless"); +const ThirdParty = require("../../dist/recipe/thirdparty"); +const { Google, Github, Apple } = require("../../dist/recipe/thirdparty"); describe(`Koa: ${printPath("[test/framework/koa.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/framework/loopback-server/index.js b/test/framework/loopback-server/index.js index 15256a6c9..a1e595851 100644 --- a/test/framework/loopback-server/index.js +++ b/test/framework/loopback-server/index.js @@ -27,9 +27,9 @@ var __importDefault = Object.defineProperty(exports, "__esModule", { value: true }); const core_1 = require("@loopback/core"); const rest_1 = require("@loopback/rest"); -const loopback_1 = require("../../../framework/loopback"); -const loopback_2 = require("../../../recipe/session/framework/loopback"); -const session_1 = __importDefault(require("../../../recipe/session")); +const loopback_1 = require("../../../dist/framework/loopback"); +const loopback_2 = require("../../../dist/recipe/session/framework/loopback"); +const session_1 = __importDefault(require("../../../dist/recipe/session")); let Create = class Create { constructor(ctx) { this.ctx = ctx; diff --git a/test/framework/loopback-server/index.ts b/test/framework/loopback-server/index.ts index 6bbc40a87..edc56d269 100644 --- a/test/framework/loopback-server/index.ts +++ b/test/framework/loopback-server/index.ts @@ -1,8 +1,8 @@ import { intercept, inject } from "@loopback/core"; import { post, response, RestApplication, RestBindings, MiddlewareContext } from "@loopback/rest"; -import { middleware } from "../../../framework/loopback"; -import { verifySession } from "../../../recipe/session/framework/loopback"; -import Session from "../../../recipe/session"; +import { middleware } from "../../../dist/framework/loopback"; +import { verifySession } from "../../../dist/recipe/session/framework/loopback"; +import Session from "../../../dist/recipe/session"; class Create { constructor(@inject(RestBindings.Http.CONTEXT) private ctx: MiddlewareContext) {} diff --git a/test/framework/loopback.test.js b/test/framework/loopback.test.js index 33e819ef9..a4b732a83 100644 --- a/test/framework/loopback.test.js +++ b/test/framework/loopback.test.js @@ -14,21 +14,21 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../utils"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../../dist/processState"); let SuperTokens = require("../.."); -let { middleware } = require("../../framework/awsLambda"); -let Session = require("../../recipe/session"); -let EmailPassword = require("../../recipe/emailpassword"); -let { verifySession } = require("../../recipe/session/framework/awsLambda"); +let { middleware } = require("../../dist/framework/awsLambda"); +let Session = require("../../dist/recipe/session"); +let EmailPassword = require("../../dist/recipe/emailpassword"); +let { verifySession } = require("../../dist/recipe/session/framework/awsLambda"); const request = require("supertest"); const axios = require("axios").default; -let Dashboard = require("../../recipe/dashboard"); +let Dashboard = require("../../dist/recipe/dashboard"); const { createUsers } = require("../utils.js"); -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const Passwordless = require("../../recipe/passwordless"); -const ThirdParty = require("../../recipe/thirdparty"); -const { Apple, Google, Github } = require("../../recipe/thirdparty"); +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const Passwordless = require("../../dist/recipe/passwordless"); +const ThirdParty = require("../../dist/recipe/thirdparty"); +const { Apple, Google, Github } = require("../../dist/recipe/thirdparty"); describe(`Loopback: ${printPath("[test/framework/loopback.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/frontendIntegration/index.js b/test/frontendIntegration/index.js index d4ff0f4dd..c034765d4 100644 --- a/test/frontendIntegration/index.js +++ b/test/frontendIntegration/index.js @@ -13,10 +13,10 @@ * under the License. */ let SuperTokens = require("../../"); -let Session = require("../../recipe/session"); -let SuperTokensRaw = require("../../lib/build/supertokens").default; -let SessionRecipeRaw = require("../../lib/build/recipe/session/recipe").default; -let DashboardRecipeRaw = require("../../lib/build/recipe/dashboard/recipe").default; +let Session = require("../../dist/recipe/session"); +let SuperTokensRaw = require("../../dist/supertokens").default; +let SessionRecipeRaw = require("../../dist/recipe/session/recipe").default; +let DashboardRecipeRaw = require("../../dist/recipe/dashboard/recipe").default; let express = require("express"); let cookieParser = require("cookie-parser"); let bodyParser = require("body-parser"); @@ -24,11 +24,11 @@ let cors = require("cors"); let noOfTimesRefreshCalledDuringTest = 0; let noOfTimesGetSessionCalledDuringTest = 0; let noOfTimesRefreshAttemptedDuringTest = 0; -let { verifySession } = require("../../recipe/session/framework/express"); -let { middleware, errorHandler } = require("../../framework/express"); -const { Querier } = require("../../lib/build/querier"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -let supertokens_node_version = require("../../lib/build/version").version; +let { verifySession } = require("../../dist/recipe/session/framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); +const { Querier } = require("../../dist/querier"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +let supertokens_node_version = require("../../dist/version").version; let urlencodedParser = bodyParser.urlencoded({ limit: "20mb", extended: true, parameterLimit: 20000 }); let jsonParser = bodyParser.json({ limit: "20mb" }); diff --git a/test/humanise.test.js b/test/humanise.test.js index 72e1cb80b..9a8b66d8a 100644 --- a/test/humanise.test.js +++ b/test/humanise.test.js @@ -13,7 +13,7 @@ * under the License. */ const { printPath } = require("./utils"); -const { humaniseMilliseconds } = require("../lib/build/utils"); +const { humaniseMilliseconds } = require("../dist/utils"); const assert = require("assert"); describe(`Humanise: ${printPath("[test/humanise.test.js]")}`, function () { diff --git a/test/import.test.js b/test/import.test.js index cc1997f92..efb8db17b 100644 --- a/test/import.test.js +++ b/test/import.test.js @@ -28,7 +28,7 @@ describe(`importTests: ${printPath("[test/import.test.js]")}`, function () { * (Refer to: https://github.com/supertokens/supertokens-node/issues/513) */ it("Test that importing all build files independently does not cause errors", function () { - const fileNames = getAllFilesInDirectory(resolve(process.cwd(), "./lib/build")).filter( + const fileNames = getAllFilesInDirectory(resolve(process.cwd(), "./dist")).filter( (i) => !i.endsWith(".d.ts") ); diff --git a/test/jwt/config.test.js b/test/jwt/config.test.js index c07ffdbdc..bfea08704 100644 --- a/test/jwt/config.test.js +++ b/test/jwt/config.test.js @@ -1,11 +1,11 @@ let assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -const JWTRecipe = require("../../lib/build/recipe/jwt/recipe").default; -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const JWTRecipe = require("../../dist/recipe/jwt/recipe").default; +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`configTest: ${printPath("[test/jwt/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/jwt/createJWTFeature.test.js b/test/jwt/createJWTFeature.test.js index 318013626..a133befe3 100644 --- a/test/jwt/createJWTFeature.test.js +++ b/test/jwt/createJWTFeature.test.js @@ -3,10 +3,10 @@ const e = require("cors"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); -let JWTRecipe = require("../../lib/build/recipe/jwt"); -let { ProcessState } = require("../../lib/build/processState"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +let JWTRecipe = require("../../dist/recipe/jwt"); +let { ProcessState } = require("../../dist/processState"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`createJWTFeature: ${printPath("[test/jwt/createJWTFeature.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/jwt/getJWKS.test.js b/test/jwt/getJWKS.test.js index 6d7ee8660..aa88544d1 100644 --- a/test/jwt/getJWKS.test.js +++ b/test/jwt/getJWKS.test.js @@ -4,11 +4,11 @@ const request = require("supertest"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); -let { ProcessState } = require("../../lib/build/processState"); -let JWTRecipe = require("../../lib/build/recipe/jwt"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let JWTRecipe = require("../../dist/recipe/jwt"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`getJWKS: ${printPath("[test/jwt/getJWKS.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/jwt/override.test.js b/test/jwt/override.test.js index 1c00f3c31..50753ee7e 100644 --- a/test/jwt/override.test.js +++ b/test/jwt/override.test.js @@ -4,11 +4,11 @@ const request = require("supertest"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); -let { ProcessState } = require("../../lib/build/processState"); -let JWTRecipe = require("../../lib/build/recipe/jwt"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let JWTRecipe = require("../../dist/recipe/jwt"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/jwt/override.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/middleware.test.js b/test/middleware.test.js index 0a1479b0e..e92dfb647 100644 --- a/test/middleware.test.js +++ b/test/middleware.test.js @@ -25,13 +25,13 @@ const { let assert = require("assert"); const express = require("express"); const request = require("supertest"); -let { Querier } = require("../lib/build/querier"); -let { ProcessState } = require("../lib/build/processState"); +let { Querier } = require("../dist/querier"); +let { ProcessState } = require("../dist/processState"); let SuperTokens = require("../"); -let Session = require("../recipe/session"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -let { middleware, errorHandler } = require("../framework/express"); -let { verifySession } = require("../recipe/session/framework/express"); +let Session = require("../dist/recipe/session"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; +let { middleware, errorHandler } = require("../dist/framework/express"); +let { verifySession } = require("../dist/recipe/session/framework/express"); /** * TODO: (Later) check that disabling default API actually disables it (for emailpassword) diff --git a/test/middleware2.test.js b/test/middleware2.test.js index ef704c795..84e9cf000 100644 --- a/test/middleware2.test.js +++ b/test/middleware2.test.js @@ -24,14 +24,14 @@ const { let assert = require("assert"); const express = require("express"); const request = require("supertest"); -let { Querier } = require("../lib/build/querier"); -let { ProcessState } = require("../lib/build/processState"); +let { Querier } = require("../dist/querier"); +let { ProcessState } = require("../dist/processState"); let SuperTokens = require("../"); -let Session = require("../recipe/session"); -let EmailPassword = require("../recipe/emailpassword"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -let { middleware, errorHandler } = require("../framework/express"); -let { verifySession } = require("../recipe/session/framework/express"); +let Session = require("../dist/recipe/session"); +let EmailPassword = require("../dist/recipe/emailpassword"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; +let { middleware, errorHandler } = require("../dist/framework/express"); +let { verifySession } = require("../dist/recipe/session/framework/express"); describe(`middleware2: ${printPath("[test/middleware2.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/nextjs.test.js b/test/nextjs.test.js index e5188c1e8..0eaa21751 100644 --- a/test/nextjs.test.js +++ b/test/nextjs.test.js @@ -15,14 +15,14 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("./utils"); let assert = require("assert"); -let { ProcessState } = require("../lib/build/processState"); -let SuperTokens = require("../lib/build/").default; -let { middleware } = require("../framework/express"); -const Session = require("../lib/build/recipe/session"); -const EmailPassword = require("../lib/build/recipe/emailpassword"); -const ThirdPartyEmailPassword = require("../lib/build/recipe/thirdpartyemailpassword"); -const superTokensNextWrapper = require("../lib/build/nextjs").superTokensNextWrapper; -const { verifySession } = require("../recipe/session/framework/express"); +let { ProcessState } = require("../dist/processState"); +let SuperTokens = require("../dist/").default; +let { middleware } = require("../dist/framework/express"); +const Session = require("../dist/recipe/session"); +const EmailPassword = require("../dist/recipe/emailpassword"); +const ThirdPartyEmailPassword = require("../dist/recipe/thirdpartyemailpassword"); +const superTokensNextWrapper = require("../dist/nextjs").superTokensNextWrapper; +const { verifySession } = require("../dist/recipe/session/framework/express"); const { testApiHandler } = require("next-test-api-route-handler"); let wrapperErr; diff --git a/test/openid/api.test.js b/test/openid/api.test.js index 62715c4c0..34ccb4467 100644 --- a/test/openid/api.test.js +++ b/test/openid/api.test.js @@ -3,13 +3,13 @@ const express = require("express"); const request = require("supertest"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -const OpenIdRecipe = require("../../lib/build/recipe/openid/recipe").default; -const OpenId = require("../../lib/build/recipe/openid"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +const OpenIdRecipe = require("../../dist/recipe/openid/recipe").default; +const OpenId = require("../../dist/recipe/openid"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`apiTest: ${printPath("[test/openid/api.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/openid/config.test.js b/test/openid/config.test.js index 0cf936ae1..3730bdda7 100644 --- a/test/openid/config.test.js +++ b/test/openid/config.test.js @@ -1,11 +1,11 @@ let assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -const OpenIdRecipe = require("../../lib/build/recipe/openid/recipe").default; -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const OpenIdRecipe = require("../../dist/recipe/openid/recipe").default; +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`configTest: ${printPath("[test/openid/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/openid/openid.test.js b/test/openid/openid.test.js index e171f398b..d9747924b 100644 --- a/test/openid/openid.test.js +++ b/test/openid/openid.test.js @@ -1,12 +1,12 @@ let assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -const OpenIdRecipe = require("../../lib/build/recipe/openid/recipe").default; -const OpenId = require("../../lib/build/recipe/openid"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const OpenIdRecipe = require("../../dist/recipe/openid/recipe").default; +const OpenId = require("../../dist/recipe/openid"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`openIdTest: ${printPath("[test/openid/openid.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/openid/override.test.js b/test/openid/override.test.js index 977ada3b7..37d785ebc 100644 --- a/test/openid/override.test.js +++ b/test/openid/override.test.js @@ -3,13 +3,13 @@ const express = require("express"); const request = require("supertest"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -const OpenIdRecipe = require("../../lib/build/recipe/openid/recipe").default; -const OpenId = require("../../lib/build/recipe/openid"); -let { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +const OpenIdRecipe = require("../../dist/recipe/openid/recipe").default; +const OpenId = require("../../dist/recipe/openid"); +let { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/openid/override.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/passwordless/apis.test.js b/test/passwordless/apis.test.js index 43e2ddf5f..0bd9a38f7 100644 --- a/test/passwordless/apis.test.js +++ b/test/passwordless/apis.test.js @@ -14,14 +14,14 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig, stopST } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let Passwordless = require("../../recipe/passwordless"); +let Session = require("../../dist/recipe/session"); +let Passwordless = require("../../dist/recipe/passwordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let SuperTokens = require("../../lib/build/supertokens").default; +let { ProcessState } = require("../../dist/processState"); +let SuperTokens = require("../../dist/supertokens").default; const request = require("supertest"); const express = require("express"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let { isCDIVersionCompatible } = require("../utils"); describe(`apisFunctions: ${printPath("[test/passwordless/apis.test.js]")}`, function () { diff --git a/test/passwordless/config.test.js b/test/passwordless/config.test.js index 16085d55e..280f3d0d5 100644 --- a/test/passwordless/config.test.js +++ b/test/passwordless/config.test.js @@ -14,16 +14,16 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig, stopST } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let Passwordless = require("../../recipe/passwordless"); +let Session = require("../../dist/recipe/session"); +let Passwordless = require("../../dist/recipe/passwordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let SuperTokens = require("../../lib/build/supertokens").default; +let { ProcessState } = require("../../dist/processState"); +let SuperTokens = require("../../dist/supertokens").default; const request = require("supertest"); const express = require("express"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let { isCDIVersionCompatible, generateRandomCode } = require("../utils"); -let PasswordlessRecipe = require("../../lib/build/recipe/passwordless/recipe").default; +let PasswordlessRecipe = require("../../dist/recipe/passwordless/recipe").default; describe(`config tests: ${printPath("[test/passwordless/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/passwordless/emailDelivery.test.js b/test/passwordless/emailDelivery.test.js index 17b957ad4..3a63173f9 100644 --- a/test/passwordless/emailDelivery.test.js +++ b/test/passwordless/emailDelivery.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, delay } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let Passwordless = require("../../recipe/passwordless"); -let { SMTPService } = require("../../recipe/passwordless/emaildelivery"); +let { ProcessState } = require("../../dist/processState"); +let Passwordless = require("../../dist/recipe/passwordless"); +let { SMTPService } = require("../../dist/recipe/passwordless/emaildelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); let { isCDIVersionCompatible } = require("../utils"); -describe(`emailDelivery: ${printPath("[test/passwordless/emailDelivery.test.js]")}`, function () { +describe(`emailDelivery: ${printPath("[test/passwordless/emaildelivery/services.test.js]")}`, function () { beforeEach(async function () { await killAllST(); await setupST(); diff --git a/test/passwordless/recipeFunctions.test.js b/test/passwordless/recipeFunctions.test.js index dbd0393b6..c382cb4ff 100644 --- a/test/passwordless/recipeFunctions.test.js +++ b/test/passwordless/recipeFunctions.test.js @@ -14,11 +14,11 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let Passwordless = require("../../recipe/passwordless"); +let Session = require("../../dist/recipe/session"); +let Passwordless = require("../../dist/recipe/passwordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let SuperTokens = require("../../lib/build/supertokens").default; +let { ProcessState } = require("../../dist/processState"); +let SuperTokens = require("../../dist/supertokens").default; let { isCDIVersionCompatible } = require("../utils"); describe(`recipeFunctions: ${printPath("[test/passwordless/recipeFunctions.test.js]")}`, function () { diff --git a/test/passwordless/smsDelivery.test.js b/test/passwordless/smsDelivery.test.js index 5a5afe333..d9407016a 100644 --- a/test/passwordless/smsDelivery.test.js +++ b/test/passwordless/smsDelivery.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, delay } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let Passwordless = require("../../recipe/passwordless"); -let { TwilioService, SupertokensService } = require("../../recipe/passwordless/smsdelivery"); +let { ProcessState } = require("../../dist/processState"); +let Passwordless = require("../../dist/recipe/passwordless"); +let { TwilioService, SupertokensService } = require("../../dist/recipe/passwordless/smsdelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); let { isCDIVersionCompatible } = require("../utils"); -describe(`smsDelivery: ${printPath("[test/passwordless/smsDelivery.test.js]")}`, function () { +describe(`smsDelivery: ${printPath("[test/passwordless/smsdelivery/services.test.js]")}`, function () { beforeEach(async function () { process.env.TEST_MODE = "testing"; await killAllST(); diff --git a/test/querier.test.js b/test/querier.test.js index fb7852033..232d82b79 100644 --- a/test/querier.test.js +++ b/test/querier.test.js @@ -14,15 +14,15 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig } = require("./utils"); let ST = require("../"); -let { Querier } = require("../lib/build/querier"); +let { Querier } = require("../dist/querier"); let assert = require("assert"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); -let Session = require("../recipe/session"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); +let Session = require("../dist/recipe/session"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; let nock = require("nock"); -const { default: NormalisedURLPath } = require("../lib/build/normalisedURLPath"); -let EmailPassword = require("../recipe/emailpassword"); -let EmailPasswordRecipe = require("../lib/build/recipe/emailpassword/recipe").default; +const { default: NormalisedURLPath } = require("../dist/normalisedURLPath"); +let EmailPassword = require("../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../dist/recipe/emailpassword/recipe").default; const { default: axios } = require("axios"); const { fail } = require("assert"); diff --git a/test/recipeModuleManager.test.js b/test/recipeModuleManager.test.js index 0f055c9c6..494178848 100644 --- a/test/recipeModuleManager.test.js +++ b/test/recipeModuleManager.test.js @@ -13,20 +13,20 @@ * under the License. */ const { printPath, setupST, startST, killAllST, cleanST, resetAll } = require("./utils"); -let { ProcessState } = require("../lib/build/processState"); +let { ProcessState } = require("../dist/processState"); let ST = require("../"); -let Session = require("../recipe/session"); -let { Querier } = require("../lib/build/querier"); -let RecipeModule = require("../lib/build/recipeModule").default; -let NormalisedURLPath = require("../lib/build/normalisedURLPath").default; -let STError = require("../lib/build/error").default; -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -let EmailPassword = require("../recipe/emailpassword"); -let EmailPasswordRecipe = require("../lib/build/recipe/emailpassword/recipe").default; +let Session = require("../dist/recipe/session"); +let { Querier } = require("../dist/querier"); +let RecipeModule = require("../dist/recipeModule").default; +let NormalisedURLPath = require("../dist/normalisedURLPath").default; +let STError = require("../dist/error").default; +let SessionRecipe = require("../dist/recipe/session/recipe").default; +let EmailPassword = require("../dist/recipe/emailpassword"); +let EmailPasswordRecipe = require("../dist/recipe/emailpassword/recipe").default; const express = require("express"); const assert = require("assert"); const request = require("supertest"); -let { middleware, errorHandler } = require("../framework/express"); +let { middleware, errorHandler } = require("../dist/framework/express"); /** * diff --git a/test/session.test.js b/test/session.test.js index 6d79ebfa3..2898be6fc 100644 --- a/test/session.test.js +++ b/test/session.test.js @@ -25,19 +25,19 @@ const { mockRequest, } = require("./utils"); let assert = require("assert"); -let { Querier } = require("../lib/build/querier"); +let { Querier } = require("../dist/querier"); const nock = require("nock"); const express = require("express"); const request = require("supertest"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); let SuperTokens = require("../"); -let Session = require("../recipe/session"); -let SessionFunctions = require("../lib/build/recipe/session/sessionFunctions"); -let { parseJWTWithoutSignatureVerification } = require("../lib/build/recipe/session/jwt"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -const { maxVersion } = require("../lib/build/utils"); +let Session = require("../dist/recipe/session"); +let SessionFunctions = require("../dist/recipe/session/sessionFunctions"); +let { parseJWTWithoutSignatureVerification } = require("../dist/recipe/session/jwt"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; +const { maxVersion } = require("../dist/utils"); const { fail } = require("assert"); -let { middleware, errorHandler } = require("../framework/express"); +let { middleware, errorHandler } = require("../dist/framework/express"); /* TODO: - the opposite of the above (check that if signing key changes, things are still fine) condition diff --git a/test/session/accessTokenVersions.test.js b/test/session/accessTokenVersions.test.js index d2cdb737c..8843c09cd 100644 --- a/test/session/accessTokenVersions.test.js +++ b/test/session/accessTokenVersions.test.js @@ -14,17 +14,17 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse, resetAll } = require("../utils"); const assert = require("assert"); -const { Querier } = require("../../lib/build/querier"); +const { Querier } = require("../../dist/querier"); const express = require("express"); const request = require("supertest"); -const { ProcessState, PROCESS_STATE } = require("../../lib/build/processState"); +const { ProcessState, PROCESS_STATE } = require("../../dist/processState"); const SuperTokens = require("../../"); -const Session = require("../../recipe/session"); -const EmailPassword = require("../../recipe/emailpassword"); -const { parseJWTWithoutSignatureVerification } = require("../../lib/build/recipe/session/jwt"); -const { middleware, errorHandler } = require("../../framework/express"); -const { default: NormalisedURLPath } = require("../../lib/build/normalisedURLPath"); -const { verifySession } = require("../../recipe/session/framework/express"); +const Session = require("../../dist/recipe/session"); +const EmailPassword = require("../../dist/recipe/emailpassword"); +const { parseJWTWithoutSignatureVerification } = require("../../dist/recipe/session/jwt"); +const { middleware, errorHandler } = require("../../dist/framework/express"); +const { default: NormalisedURLPath } = require("../../dist/normalisedURLPath"); +const { verifySession } = require("../../dist/recipe/session/framework/express"); const { json } = require("body-parser"); describe(`AccessToken versions: ${printPath("[test/session/accessTokenVersions.test.js]")}`, function () { diff --git a/test/session/claims/assertClaims.test.js b/test/session/claims/assertClaims.test.js index 903080051..d08d81c5f 100644 --- a/test/session/claims/assertClaims.test.js +++ b/test/session/claims/assertClaims.test.js @@ -14,10 +14,10 @@ */ const { printPath } = require("../../utils"); const assert = require("assert"); -const { default: SessionClass } = require("../../../lib/build/recipe/session/sessionClass"); +const { default: SessionClass } = require("../../../dist/recipe/session/sessionClass"); const sinon = require("sinon"); const { StubClaim } = require("./testClaims"); -const { default: getRecipeInterface } = require("../../../lib/build/recipe/session/recipeImplementation"); +const { default: getRecipeInterface } = require("../../../dist/recipe/session/recipeImplementation"); const helpers = { getRecipeImpl: () => getRecipeInterface({ getAllCoreUrlsForPath: () => [] }, {}) }; diff --git a/test/session/claims/createNewSession.test.js b/test/session/claims/createNewSession.test.js index 79877e738..59b87a2fd 100644 --- a/test/session/claims/createNewSession.test.js +++ b/test/session/claims/createNewSession.test.js @@ -14,9 +14,9 @@ */ const { printPath, setupST, startST, killAllST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); +const Session = require("../../../dist/recipe/session"); const { TrueClaim, UndefinedClaim } = require("./testClaims"); describe(`sessionClaims/createNewSession: ${printPath("[test/session/claims/createNewSession.test.js]")}`, function () { diff --git a/test/session/claims/fetchAndSetClaim.test.js b/test/session/claims/fetchAndSetClaim.test.js index 4a0476537..cd78c4e2a 100644 --- a/test/session/claims/fetchAndSetClaim.test.js +++ b/test/session/claims/fetchAndSetClaim.test.js @@ -14,12 +14,12 @@ */ const { printPath, startST, killAllST, setupST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); -const { default: SessionClass } = require("../../../lib/build/recipe/session/sessionClass"); +const { default: SessionClass } = require("../../../dist/recipe/session/sessionClass"); const sinon = require("sinon"); const { TrueClaim, UndefinedClaim } = require("./testClaims"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); -const { ProcessState } = require("../../../lib/build/processState"); +const Session = require("../../../dist/recipe/session"); +const { ProcessState } = require("../../../dist/processState"); describe(`sessionClaims/fetchAndSetClaim: ${printPath("[test/session/claims/fetchAndSetClaim.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/session/claims/getClaimValue.test.js b/test/session/claims/getClaimValue.test.js index e88cfa419..a0019b6c4 100644 --- a/test/session/claims/getClaimValue.test.js +++ b/test/session/claims/getClaimValue.test.js @@ -15,10 +15,10 @@ const { printPath, startST, killAllST, setupST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); +const Session = require("../../../dist/recipe/session"); const sinon = require("sinon"); const { TrueClaim } = require("./testClaims"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); describe(`sessionClaims/getClaimValue: ${printPath("[test/session/claims/getClaimValue.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/session/claims/primitiveArrayClaim.test.js b/test/session/claims/primitiveArrayClaim.test.js index fa8613c10..e91033020 100644 --- a/test/session/claims/primitiveArrayClaim.test.js +++ b/test/session/claims/primitiveArrayClaim.test.js @@ -15,7 +15,7 @@ const { printPath } = require("../../utils"); const assert = require("assert"); const sinon = require("sinon"); -const { PrimitiveArrayClaim } = require("../../../lib/build/recipe/session/claimBaseClasses/primitiveArrayClaim"); +const { PrimitiveArrayClaim } = require("../../../dist/recipe/session/claimBaseClasses/primitiveArrayClaim"); describe(`sessionClaims/primitiveArrayClaim: ${printPath( "[test/session/claims/primitiveArrayClaim.test.js]" diff --git a/test/session/claims/primitiveClaim.test.js b/test/session/claims/primitiveClaim.test.js index 3ffd2571d..391ed84e4 100644 --- a/test/session/claims/primitiveClaim.test.js +++ b/test/session/claims/primitiveClaim.test.js @@ -15,7 +15,7 @@ const { printPath } = require("../../utils"); const assert = require("assert"); const sinon = require("sinon"); -const { PrimitiveClaim } = require("../../../recipe/session/claims"); +const { PrimitiveClaim } = require("../../../dist/recipe/session/claims"); describe(`sessionClaims/primitiveClaim: ${printPath("[test/session/claims/primitiveClaim.test.js]")}`, function () { describe("PrimitiveClaim", () => { diff --git a/test/session/claims/removeClaim.test.js b/test/session/claims/removeClaim.test.js index 000cbdac7..d2e1bd0d6 100644 --- a/test/session/claims/removeClaim.test.js +++ b/test/session/claims/removeClaim.test.js @@ -15,11 +15,11 @@ const { printPath, startST, killAllST, setupST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); -const { default: SessionClass } = require("../../../lib/build/recipe/session/sessionClass"); +const Session = require("../../../dist/recipe/session"); +const { default: SessionClass } = require("../../../dist/recipe/session/sessionClass"); const sinon = require("sinon"); const { TrueClaim } = require("./testClaims"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); describe(`sessionClaims/removeClaim: ${printPath("[test/session/claims/removeClaim.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/session/claims/setClaimValue.test.js b/test/session/claims/setClaimValue.test.js index 5634c100f..5a0ea632a 100644 --- a/test/session/claims/setClaimValue.test.js +++ b/test/session/claims/setClaimValue.test.js @@ -15,11 +15,11 @@ const { printPath, startST, killAllST, setupST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); -const { default: SessionClass } = require("../../../lib/build/recipe/session/sessionClass"); +const Session = require("../../../dist/recipe/session"); +const { default: SessionClass } = require("../../../dist/recipe/session/sessionClass"); const sinon = require("sinon"); const { TrueClaim } = require("./testClaims"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); describe(`sessionClaims/setClaimValue: ${printPath("[test/session/claims/setClaimValue.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/session/claims/testClaims.js b/test/session/claims/testClaims.js index 3c8b44971..e90b345f4 100644 --- a/test/session/claims/testClaims.js +++ b/test/session/claims/testClaims.js @@ -1,6 +1,6 @@ const Sinon = require("sinon"); -const { BooleanClaim } = require("../../../lib/build/recipe/session/claimBaseClasses/booleanClaim"); -const { PrimitiveClaim } = require("../../../lib/build/recipe/session/claimBaseClasses/primitiveClaim"); +const { BooleanClaim } = require("../../../dist/recipe/session/claimBaseClasses/booleanClaim"); +const { PrimitiveClaim } = require("../../../dist/recipe/session/claimBaseClasses/primitiveClaim"); module.exports.TrueClaim = new BooleanClaim({ key: "st-true", diff --git a/test/session/claims/validateClaimsForSessionHandle.test.js b/test/session/claims/validateClaimsForSessionHandle.test.js index bb736c7e7..21902ea7a 100644 --- a/test/session/claims/validateClaimsForSessionHandle.test.js +++ b/test/session/claims/validateClaimsForSessionHandle.test.js @@ -15,10 +15,10 @@ const { printPath, startST, killAllST, setupST, cleanST, mockResponse, mockRequest } = require("../../utils"); const assert = require("assert"); const SuperTokens = require("../../.."); -const Session = require("../../../recipe/session"); +const Session = require("../../../dist/recipe/session"); const sinon = require("sinon"); const { TrueClaim, UndefinedClaim } = require("./testClaims"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); describe(`sessionClaims/validateClaimsForSessionHandle: ${printPath( "[test/session/claims/validateClaimsForSessionHandle.test.js]" diff --git a/test/session/claims/verifySession.test.js b/test/session/claims/verifySession.test.js index cb7966c15..69a8017a7 100644 --- a/test/session/claims/verifySession.test.js +++ b/test/session/claims/verifySession.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../../utils"); const assert = require("assert"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const SuperTokens = require("../../../"); -const Session = require("../../../recipe/session"); -const { default: SessionClass } = require("../../../lib/build/recipe/session/sessionClass"); -const { verifySession } = require("../../../recipe/session/framework/express"); -const { middleware, errorHandler } = require("../../../framework/express"); -const { PrimitiveClaim } = require("../../../lib/build/recipe/session/claimBaseClasses/primitiveClaim"); +const Session = require("../../../dist/recipe/session"); +const { default: SessionClass } = require("../../../dist/recipe/session/sessionClass"); +const { verifySession } = require("../../../dist/recipe/session/framework/express"); +const { middleware, errorHandler } = require("../../../dist/framework/express"); +const { PrimitiveClaim } = require("../../../dist/recipe/session/claimBaseClasses/primitiveClaim"); const express = require("express"); const request = require("supertest"); const { TrueClaim, UndefinedClaim } = require("./testClaims"); const sinon = require("sinon"); -const { default: SessionError } = require("../../../lib/build/recipe/session/error"); +const { default: SessionError } = require("../../../dist/recipe/session/error"); describe(`sessionClaims/verifySession: ${printPath("[test/session/claims/verifySession.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/session/exposeAccessTokenToFrontendInCookieBasedAuth.test.js b/test/session/exposeAccessTokenToFrontendInCookieBasedAuth.test.js index b16595825..26ec3c37c 100644 --- a/test/session/exposeAccessTokenToFrontendInCookieBasedAuth.test.js +++ b/test/session/exposeAccessTokenToFrontendInCookieBasedAuth.test.js @@ -16,13 +16,13 @@ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse const assert = require("assert"); const express = require("express"); const request = require("supertest"); -const { ProcessState } = require("../../lib/build/processState"); +const { ProcessState } = require("../../dist/processState"); const SuperTokens = require("../.."); -const Session = require("../../recipe/session"); -const { middleware, errorHandler } = require("../../framework/express"); -const { verifySession } = require("../../recipe/session/framework/express"); +const Session = require("../../dist/recipe/session"); +const { middleware, errorHandler } = require("../../dist/framework/express"); +const { verifySession } = require("../../dist/recipe/session/framework/express"); const { json } = require("body-parser"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`exposeAccessTokenToFrontendInCookieBasedAuth: ${printPath( "[test/session/exposeAccessTokenToFrontendInCookieBasedAuth.test.js]" diff --git a/test/session/sessionHandlingFuncsWithoutReq.test.js b/test/session/sessionHandlingFuncsWithoutReq.test.js index 972ac0305..c55efa126 100644 --- a/test/session/sessionHandlingFuncsWithoutReq.test.js +++ b/test/session/sessionHandlingFuncsWithoutReq.test.js @@ -15,7 +15,7 @@ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../utils"); const assert = require("assert"); const SuperTokens = require("../.."); -const Session = require("../../recipe/session"); +const Session = require("../../dist/recipe/session"); describe(`Session handling functions without modifying response: ${printPath( "[test/session/sessionHandlingFuncsWithoutReq.test.js]" @@ -118,7 +118,7 @@ describe(`Session handling functions without modifying response: ${printPath( const tokens = createRes.getAllSessionTokensDangerously(); const session = await Session.getSessionWithoutRequestResponse(tokens.accessToken, tokens.antiCsrfToken); assert.ok(session); - /** @type {import("../../recipe/session").SessionContainer} */ + /** @type {import("../../dist/recipe/session").SessionContainer} */ const getSessionTokenInfo = session.getAllSessionTokensDangerously(); assert.deepStrictEqual(getSessionTokenInfo, { accessToken: tokens.accessToken, diff --git a/test/sessionAccessTokenSigningKeyUpdate.test.js b/test/sessionAccessTokenSigningKeyUpdate.test.js index 7f5cbefb1..9ad772aa9 100644 --- a/test/sessionAccessTokenSigningKeyUpdate.test.js +++ b/test/sessionAccessTokenSigningKeyUpdate.test.js @@ -14,14 +14,14 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig, killAllSTCoresOnly } = require("./utils"); let assert = require("assert"); -let { Querier } = require("../lib/build/querier"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); +let { Querier } = require("../dist/querier"); +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); let SuperTokens = require("../"); -let Session = require("../recipe/session"); -let SessionFunctions = require("../lib/build/recipe/session/sessionFunctions"); -let { parseJWTWithoutSignatureVerification } = require("../lib/build/recipe/session/jwt"); -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -const { maxVersion } = require("../lib/build/utils"); +let Session = require("../dist/recipe/session"); +let SessionFunctions = require("../dist/recipe/session/sessionFunctions"); +let { parseJWTWithoutSignatureVerification } = require("../dist/recipe/session/jwt"); +let SessionRecipe = require("../dist/recipe/session/recipe").default; +const { maxVersion } = require("../dist/utils"); const { fail } = require("assert"); const sinon = require("sinon"); const request = require("http"); diff --git a/test/sessionExpress.test.js b/test/sessionExpress.test.js index 709015f95..8beda7da2 100644 --- a/test/sessionExpress.test.js +++ b/test/sessionExpress.test.js @@ -25,14 +25,14 @@ const { let assert = require("assert"); const express = require("express"); const request = require("supertest"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); let SuperTokens = require("../"); -let Session = require("../recipe/session"); -let { Querier } = require("../lib/build/querier"); -const { default: NormalisedURLPath } = require("../lib/build/normalisedURLPath"); -const { verifySession } = require("../recipe/session/framework/express"); +let Session = require("../dist/recipe/session"); +let { Querier } = require("../dist/querier"); +const { default: NormalisedURLPath } = require("../dist/normalisedURLPath"); +const { verifySession } = require("../dist/recipe/session/framework/express"); const { default: next } = require("next"); -let { middleware, errorHandler } = require("../framework/express"); +let { middleware, errorHandler } = require("../dist/framework/express"); describe(`sessionExpress: ${printPath("[test/sessionExpress.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/thirdparty/authorisationUrlFeature.test.js b/test/thirdparty/authorisationUrlFeature.test.js index d7d521282..91f8974bc 100644 --- a/test/thirdparty/authorisationUrlFeature.test.js +++ b/test/thirdparty/authorisationUrlFeature.test.js @@ -15,14 +15,14 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -let ThirParty = require("../../lib/build/recipe/thirdparty"); +let { ProcessState } = require("../../dist/processState"); +let ThirPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +let ThirParty = require("../../dist/recipe/thirdparty"); let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`authorisationTest: ${printPath("[test/thirdparty/authorisationFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdparty/config.test.js b/test/thirdparty/config.test.js index 0a2845f11..2e8ed8a4e 100644 --- a/test/thirdparty/config.test.js +++ b/test/thirdparty/config.test.js @@ -15,10 +15,10 @@ const { printPath, setupST, startST, killAllST, cleanST, resetAll } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -let ThirParty = require("../../lib/build/recipe/thirdparty"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let ThirPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +let ThirParty = require("../../dist/recipe/thirdparty"); +let { middleware, errorHandler } = require("../../dist/framework/express"); /** * TODO diff --git a/test/thirdparty/getUsersByEmailFeature.test.js b/test/thirdparty/getUsersByEmailFeature.test.js index 3fffa0e94..369b7e329 100644 --- a/test/thirdparty/getUsersByEmailFeature.test.js +++ b/test/thirdparty/getUsersByEmailFeature.test.js @@ -1,13 +1,13 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -const { signInUp } = require("../../lib/build/recipe/thirdparty"); -const { getUsersByEmail } = require("../../lib/build/recipe/thirdparty"); -const { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +const { signInUp } = require("../../dist/recipe/thirdparty"); +const { getUsersByEmail } = require("../../dist/recipe/thirdparty"); +const { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`getUsersByEmail: ${printPath("[test/thirdparty/getUsersByEmailFeature.test.js]")}`, function () { const MockThirdPartyProvider = { diff --git a/test/thirdparty/override.test.js b/test/thirdparty/override.test.js index 3272da69c..0a43a62fe 100644 --- a/test/thirdparty/override.test.js +++ b/test/thirdparty/override.test.js @@ -14,16 +14,16 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const { Querier } = require("../../lib/build/querier"); -let ThirdParty = require("../../recipe/thirdparty"); +let { ProcessState } = require("../../dist/processState"); +const { Querier } = require("../../dist/querier"); +let ThirdParty = require("../../dist/recipe/thirdparty"); const express = require("express"); const request = require("supertest"); let nock = require("nock"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/thirdparty/override.test.js]")}`, function () { before(function () { diff --git a/test/thirdparty/provider.test.js b/test/thirdparty/provider.test.js index 9f664d744..a86e76895 100644 --- a/test/thirdparty/provider.test.js +++ b/test/thirdparty/provider.test.js @@ -15,10 +15,10 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -let ThirParty = require("../../lib/build/recipe/thirdparty"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let ThirPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +let ThirParty = require("../../dist/recipe/thirdparty"); +let { middleware, errorHandler } = require("../../dist/framework/express"); const privateKey = `-----BEGIN EC PRIVATE KEY-----\nMHQCAQEEIP92u8DjfW31UDDudzWtcsiH/gJ5RpdgL6EV4FTuADZWoAcGBSuBBAAK\noUQDQgAEBorYK2YgYN1BDxVNtBgq8ZdoIR5m02kfJKFI/Vq1+uagvjjZVLpeUEgQ\n79ENddF5P8V8gRri+XzD2zNYpYXGNQ==\n-----END EC PRIVATE KEY-----`; diff --git a/test/thirdparty/signinupFeature.test.js b/test/thirdparty/signinupFeature.test.js index 895bc6fc9..3bf6e8735 100644 --- a/test/thirdparty/signinupFeature.test.js +++ b/test/thirdparty/signinupFeature.test.js @@ -15,15 +15,15 @@ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -let ThirdParty = require("../../lib/build/recipe/thirdparty"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +let ThirdParty = require("../../dist/recipe/thirdparty"); let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -const EmailVerification = require("../../recipe/emailverification"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signinupTest: ${printPath("[test/thirdparty/signinupFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdparty/signoutFeature.test.js b/test/thirdparty/signoutFeature.test.js index 1c235af41..2e6f25113 100644 --- a/test/thirdparty/signoutFeature.test.js +++ b/test/thirdparty/signoutFeature.test.js @@ -23,13 +23,13 @@ const { } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; +let { ProcessState } = require("../../dist/processState"); +let ThirPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signoutTest: ${printPath("[test/thirdparty/signoutFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdparty/users.test.js b/test/thirdparty/users.test.js index c715bdbca..8013d72cd 100644 --- a/test/thirdparty/users.test.js +++ b/test/thirdparty/users.test.js @@ -13,13 +13,13 @@ * under the License. */ const { printPath, setupST, startST, killAllST, cleanST, signInUPCustomRequest } = require("../utils"); -const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../lib/build/"); +const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../dist/"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let ThirPartyRecipe = require("../../lib/build/recipe/thirdparty/recipe").default; -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let ThirPartyRecipe = require("../../dist/recipe/thirdparty/recipe").default; +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`usersTest: ${printPath("[test/thirdparty/users.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartyemailpassword/authorisationUrlFeature.test.js b/test/thirdpartyemailpassword/authorisationUrlFeature.test.js index 3e5c8ad17..acee0d02a 100644 --- a/test/thirdpartyemailpassword/authorisationUrlFeature.test.js +++ b/test/thirdpartyemailpassword/authorisationUrlFeature.test.js @@ -15,13 +15,13 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPasswordRecipe = require("../../lib/build/recipe/thirdpartyemailpassword/recipe").default; +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPasswordRecipe = require("../../dist/recipe/thirdpartyemailpassword/recipe").default; let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`authorisationTest: ${printPath("[test/thirdpartyemailpassword/authorisationFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartyemailpassword/config.test.js b/test/thirdpartyemailpassword/config.test.js index c336b237b..1f3cbb71f 100644 --- a/test/thirdpartyemailpassword/config.test.js +++ b/test/thirdpartyemailpassword/config.test.js @@ -16,9 +16,9 @@ const { printPath, setupST, startST, stopST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); -let ThirdPartyEmailPasswordRecipe = require("../../lib/build/recipe/thirdpartyemailpassword/recipe").default; +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); +let ThirdPartyEmailPasswordRecipe = require("../../dist/recipe/thirdpartyemailpassword/recipe").default; describe(`configTest: ${printPath("[test/thirdpartyemailpassword/config.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartyemailpassword/emailDelivery.test.js b/test/thirdpartyemailpassword/emailDelivery.test.js index 4c7e31815..e3685f084 100644 --- a/test/thirdpartyemailpassword/emailDelivery.test.js +++ b/test/thirdpartyemailpassword/emailDelivery.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse, delay } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const EmailVerification = require("../../recipe/emailverification"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); -let { SMTPService } = require("../../recipe/thirdpartyemailpassword/emaildelivery"); +let { ProcessState } = require("../../dist/processState"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); +let { SMTPService } = require("../../dist/recipe/thirdpartyemailpassword/emaildelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); -describe(`emailDelivery: ${printPath("[test/thirdpartyemailpassword/emailDelivery.test.js]")}`, function () { +describe(`emailDelivery: ${printPath("[test/thirdpartyemailpassword/emaildelivery/services.test.js]")}`, function () { beforeEach(async function () { await killAllST(); await setupST(); diff --git a/test/thirdpartyemailpassword/emailExists.test.js b/test/thirdpartyemailpassword/emailExists.test.js index 780cb25bc..5fdb59a06 100644 --- a/test/thirdpartyemailpassword/emailExists.test.js +++ b/test/thirdpartyemailpassword/emailExists.test.js @@ -14,15 +14,15 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const { Querier } = require("../../lib/build/querier"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); +let { ProcessState } = require("../../dist/processState"); +const { Querier } = require("../../dist/querier"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); const request = require("supertest"); const express = require("express"); let bodyParser = require("body-parser"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`emailExists: ${printPath("[test/thirdpartyemailpassword/emailExists.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/thirdpartyemailpassword/emailverify.test.js b/test/thirdpartyemailpassword/emailverify.test.js index 3da225599..07ebf5c3f 100644 --- a/test/thirdpartyemailpassword/emailverify.test.js +++ b/test/thirdpartyemailpassword/emailverify.test.js @@ -25,14 +25,14 @@ const { emailVerifyTokenRequest, } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); -const EmailVerification = require("../../recipe/emailverification"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); +const EmailVerification = require("../../dist/recipe/emailverification"); const express = require("express"); const request = require("supertest"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`emailverify: ${printPath("[test/thirdpartyemailpassword/emailverify.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartyemailpassword/getUsersByEmailFeature.test.js b/test/thirdpartyemailpassword/getUsersByEmailFeature.test.js index 7fd8315e3..ba7ad0376 100644 --- a/test/thirdpartyemailpassword/getUsersByEmailFeature.test.js +++ b/test/thirdpartyemailpassword/getUsersByEmailFeature.test.js @@ -1,16 +1,16 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); const { thirdPartySignInUp, getUsersByEmail, emailPasswordSignUp, -} = require("../../lib/build/recipe/thirdpartyemailpassword"); -const { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let { middleware, errorHandler } = require("../../framework/express"); +} = require("../../dist/recipe/thirdpartyemailpassword"); +const { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`getUsersByEmail: ${printPath("[test/thirdpartyemailpassword/getUsersByEmailFeature.test.js]")}`, function () { const MockThirdPartyProvider = { diff --git a/test/thirdpartyemailpassword/override.test.js b/test/thirdpartyemailpassword/override.test.js index 9d83581b4..ddc00f696 100644 --- a/test/thirdpartyemailpassword/override.test.js +++ b/test/thirdpartyemailpassword/override.test.js @@ -14,15 +14,15 @@ */ const { printPath, setupST, startST, stopST, killAllST, cleanST, resetAll, signUPRequest } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const { Querier } = require("../../lib/build/querier"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); +let { ProcessState } = require("../../dist/processState"); +const { Querier } = require("../../dist/querier"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); const express = require("express"); const request = require("supertest"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/thirdpartyemailpassword/override.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/thirdpartyemailpassword/signinFeature.test.js b/test/thirdpartyemailpassword/signinFeature.test.js index 7e1bf1be3..892b1f877 100644 --- a/test/thirdpartyemailpassword/signinFeature.test.js +++ b/test/thirdpartyemailpassword/signinFeature.test.js @@ -25,15 +25,15 @@ const { signUPRequestNoBody, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPassword = require("../../recipe/thirdpartyemailpassword"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); const express = require("express"); const request = require("supertest"); let nock = require("nock"); const { response } = require("express"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let bodyParser = require("body-parser"); describe(`signinFeature: ${printPath("[test/thirdpartyemailpassword/signinFeature.test.js]")}`, function () { diff --git a/test/thirdpartyemailpassword/signoutFeature.test.js b/test/thirdpartyemailpassword/signoutFeature.test.js index 0921aec06..aec87205d 100644 --- a/test/thirdpartyemailpassword/signoutFeature.test.js +++ b/test/thirdpartyemailpassword/signoutFeature.test.js @@ -24,13 +24,13 @@ const { } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPasswordRecipe = require("../../lib/build/recipe/thirdpartyemailpassword/recipe").default; +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPasswordRecipe = require("../../dist/recipe/thirdpartyemailpassword/recipe").default; let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signoutTest: ${printPath("[test/thirdpartyemailpassword/signoutFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartyemailpassword/signupFeature.test.js b/test/thirdpartyemailpassword/signupFeature.test.js index dbb601294..0d10563d3 100644 --- a/test/thirdpartyemailpassword/signupFeature.test.js +++ b/test/thirdpartyemailpassword/signupFeature.test.js @@ -15,17 +15,17 @@ const { printPath, setupST, startST, killAllST, cleanST, signUPRequest } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyEmailPasswordRecipe = require("../../lib/build/recipe/thirdpartyemailpassword/recipe").default; -let ThirdPartyEmailPassword = require("../../lib/build/recipe/thirdpartyemailpassword"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyEmailPasswordRecipe = require("../../dist/recipe/thirdpartyemailpassword/recipe").default; +let ThirdPartyEmailPassword = require("../../dist/recipe/thirdpartyemailpassword"); let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -const EmailVerification = require("../../recipe/emailverification"); -let { Querier } = require("../../lib/build/querier"); -let { maxVersion } = require("../../lib/build/utils"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let { Querier } = require("../../dist/querier"); +let { maxVersion } = require("../../dist/utils"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signupTest: ${printPath("[test/thirdpartyemailpassword/signupFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartypasswordless/api.test.js b/test/thirdpartypasswordless/api.test.js index 55e8b85d7..920552c66 100644 --- a/test/thirdpartypasswordless/api.test.js +++ b/test/thirdpartypasswordless/api.test.js @@ -14,14 +14,14 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig, stopST } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let ThirdPartyPasswordless = require("../../recipe/thirdpartypasswordless"); +let Session = require("../../dist/recipe/session"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let SuperTokens = require("../../lib/build/supertokens").default; +let { ProcessState } = require("../../dist/processState"); +let SuperTokens = require("../../dist/supertokens").default; const request = require("supertest"); const express = require("express"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let { isCDIVersionCompatible } = require("../utils"); describe(`apisFunctions: ${printPath("[test/thirdpartypasswordless/apis.test.js]")}`, function () { diff --git a/test/thirdpartypasswordless/authorisationUrlFeature.test.js b/test/thirdpartypasswordless/authorisationUrlFeature.test.js index 72a7d88bc..6c70404c4 100644 --- a/test/thirdpartypasswordless/authorisationUrlFeature.test.js +++ b/test/thirdpartypasswordless/authorisationUrlFeature.test.js @@ -15,13 +15,13 @@ const { printPath, setupST, startST, killAllST, cleanST, isCDIVersionCompatible } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyPasswordlessRecipe = require("../../lib/build/recipe/thirdpartypasswordless/recipe").default; +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyPasswordlessRecipe = require("../../dist/recipe/thirdpartypasswordless/recipe").default; let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`authorisationTest: ${printPath("[test/thirdpartyemailpassword/authorisationFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartypasswordless/config.test.js b/test/thirdpartypasswordless/config.test.js index 938e69921..973b74462 100644 --- a/test/thirdpartypasswordless/config.test.js +++ b/test/thirdpartypasswordless/config.test.js @@ -14,16 +14,16 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig, stopST, resetAll } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let ThirdPartyPasswordless = require("../../recipe/thirdpartypasswordless"); +let Session = require("../../dist/recipe/session"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let SuperTokens = require("../../lib/build/supertokens").default; +let { ProcessState } = require("../../dist/processState"); +let SuperTokens = require("../../dist/supertokens").default; const request = require("supertest"); const express = require("express"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); let { isCDIVersionCompatible, generateRandomCode } = require("../utils"); -let ThirdPartyPasswordlessRecipe = require("../../lib/build/recipe/thirdpartypasswordless/recipe").default; +let ThirdPartyPasswordlessRecipe = require("../../dist/recipe/thirdpartypasswordless/recipe").default; describe(`config tests: ${printPath("[test/thirdpartypasswordless/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/thirdpartypasswordless/emailDelivery.test.js b/test/thirdpartypasswordless/emailDelivery.test.js index 79a72b331..b6f31e0d7 100644 --- a/test/thirdpartypasswordless/emailDelivery.test.js +++ b/test/thirdpartypasswordless/emailDelivery.test.js @@ -14,19 +14,19 @@ */ const { printPath, setupST, startST, killAllST, cleanST, extractInfoFromResponse, delay } = require("../utils"); let STExpress = require("../.."); -const EmailVerification = require("../../recipe/emailverification"); -let Session = require("../../recipe/session"); +const EmailVerification = require("../../dist/recipe/emailverification"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdpartyPasswordless = require("../../recipe/thirdpartypasswordless"); -let { SMTPService } = require("../../recipe/thirdpartypasswordless/emaildelivery"); +let { ProcessState } = require("../../dist/processState"); +let ThirdpartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +let { SMTPService } = require("../../dist/recipe/thirdpartypasswordless/emaildelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); let { isCDIVersionCompatible } = require("../utils"); -describe(`emailDelivery: ${printPath("[test/thirdpartypasswordless/emailDelivery.test.js]")}`, function () { +describe(`emailDelivery: ${printPath("[test/thirdpartypasswordless/emaildelivery/services.test.js]")}`, function () { before(function () { this.customProvider = { id: "supertokens", diff --git a/test/thirdpartypasswordless/getUsersByEmailFeature.test.js b/test/thirdpartypasswordless/getUsersByEmailFeature.test.js index 35ee975ad..8d70b6ddd 100644 --- a/test/thirdpartypasswordless/getUsersByEmailFeature.test.js +++ b/test/thirdpartypasswordless/getUsersByEmailFeature.test.js @@ -15,14 +15,14 @@ const { printPath, setupST, startST, killAllST, cleanST, isCDIVersionCompatible } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyPasswordlessRecipe = require("../../lib/build/recipe/thirdpartypasswordless/recipe").default; -let ThirdPartyPasswordless = require("../../lib/build/recipe/thirdpartypasswordless"); -const { thirdPartySignInUp } = require("../../lib/build/recipe/thirdpartypasswordless"); -const { getUsersByEmail } = require("../../lib/build/recipe/thirdpartypasswordless"); -const { maxVersion } = require("../../lib/build/utils"); -let { Querier } = require("../../lib/build/querier"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyPasswordlessRecipe = require("../../dist/recipe/thirdpartypasswordless/recipe").default; +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +const { thirdPartySignInUp } = require("../../dist/recipe/thirdpartypasswordless"); +const { getUsersByEmail } = require("../../dist/recipe/thirdpartypasswordless"); +const { maxVersion } = require("../../dist/utils"); +let { Querier } = require("../../dist/querier"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`getUsersByEmail: ${printPath("[test/thirdpartypasswordless/getUsersByEmailFeature.test.js]")}`, function () { const MockThirdPartyProvider = { diff --git a/test/thirdpartypasswordless/override.test.js b/test/thirdpartypasswordless/override.test.js index 81bde8791..746e69dc6 100644 --- a/test/thirdpartypasswordless/override.test.js +++ b/test/thirdpartypasswordless/override.test.js @@ -24,16 +24,16 @@ const { isCDIVersionCompatible, } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let SessionRecipe = require("../../lib/build/recipe/session/recipe").default; +let Session = require("../../dist/recipe/session"); +let SessionRecipe = require("../../dist/recipe/session/recipe").default; let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const { Querier } = require("../../lib/build/querier"); -let ThirdPartyPasswordless = require("../../recipe/thirdpartypasswordless"); +let { ProcessState } = require("../../dist/processState"); +const { Querier } = require("../../dist/querier"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); const express = require("express"); const request = require("supertest"); let nock = require("nock"); -let { middleware, errorHandler } = require("../../framework/express"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`overrideTest: ${printPath("[test/thirdpartypasswordless/override.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartypasswordless/provider.test.js b/test/thirdpartypasswordless/provider.test.js index b2b034c6e..f6db93f3a 100644 --- a/test/thirdpartypasswordless/provider.test.js +++ b/test/thirdpartypasswordless/provider.test.js @@ -15,10 +15,10 @@ const { printPath, setupST, startST, killAllST, cleanST, isCDIVersionCompatible } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyPasswordlessRecipe = require("../../lib/build/recipe/thirdpartypasswordless/recipe").default; -let ThirdPartyPasswordless = require("../../lib/build/recipe/thirdpartypasswordless"); -let { middleware, errorHandler } = require("../../framework/express"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyPasswordlessRecipe = require("../../dist/recipe/thirdpartypasswordless/recipe").default; +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +let { middleware, errorHandler } = require("../../dist/framework/express"); const privateKey = `-----BEGIN EC PRIVATE KEY-----\nMHQCAQEEIP92u8DjfW31UDDudzWtcsiH/gJ5RpdgL6EV4FTuADZWoAcGBSuBBAAK\noUQDQgAEBorYK2YgYN1BDxVNtBgq8ZdoIR5m02kfJKFI/Vq1+uagvjjZVLpeUEgQ\n79ENddF5P8V8gRri+XzD2zNYpYXGNQ==\n-----END EC PRIVATE KEY-----`; diff --git a/test/thirdpartypasswordless/recipeFunctions.test.js b/test/thirdpartypasswordless/recipeFunctions.test.js index b71117b14..cdc20c319 100644 --- a/test/thirdpartypasswordless/recipeFunctions.test.js +++ b/test/thirdpartypasswordless/recipeFunctions.test.js @@ -14,11 +14,11 @@ */ const { printPath, setupST, startST, killAllST, cleanST, setKeyValueInConfig } = require("../utils"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let ThirdPartyPasswordless = require("../../recipe/thirdpartypasswordless"); +let Session = require("../../dist/recipe/session"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -const EmailVerification = require("../../recipe/emailverification"); +let { ProcessState } = require("../../dist/processState"); +const EmailVerification = require("../../dist/recipe/emailverification"); let { isCDIVersionCompatible } = require("../utils"); describe(`recipeFunctions: ${printPath("[test/thirdpartypasswordless/recipeFunctions.test.js]")}`, function () { diff --git a/test/thirdpartypasswordless/signinupFeature.test.js b/test/thirdpartypasswordless/signinupFeature.test.js index 48bde4760..034e5f8af 100644 --- a/test/thirdpartypasswordless/signinupFeature.test.js +++ b/test/thirdpartypasswordless/signinupFeature.test.js @@ -23,14 +23,14 @@ const { } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyPasswordless = require("../../lib/build/recipe/thirdpartypasswordless"); -const EmailVerification = require("../../lib/build/recipe/emailverification"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +const EmailVerification = require("../../dist/recipe/emailverification"); let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signinupTest: ${printPath("[test/thirdpartypasswordless/signinupFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartypasswordless/signoutFeature.test.js b/test/thirdpartypasswordless/signoutFeature.test.js index f4550e095..7ada607b6 100644 --- a/test/thirdpartypasswordless/signoutFeature.test.js +++ b/test/thirdpartypasswordless/signoutFeature.test.js @@ -24,13 +24,13 @@ const { } = require("../utils"); let STExpress = require("../../"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdPartyPasswordless = require("../../lib/build/recipe/thirdpartypasswordless"); +let { ProcessState } = require("../../dist/processState"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); let nock = require("nock"); const express = require("express"); const request = require("supertest"); -let Session = require("../../recipe/session"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`signoutTest: ${printPath("[test/thirdpartypasswordless/signoutFeature.test.js]")}`, function () { before(function () { diff --git a/test/thirdpartypasswordless/smsDelivery.test.js b/test/thirdpartypasswordless/smsDelivery.test.js index d464794cd..d0cbb9554 100644 --- a/test/thirdpartypasswordless/smsDelivery.test.js +++ b/test/thirdpartypasswordless/smsDelivery.test.js @@ -14,18 +14,18 @@ */ const { printPath, setupST, startST, killAllST, cleanST, delay } = require("../utils"); let STExpress = require("../.."); -let Session = require("../../recipe/session"); +let Session = require("../../dist/recipe/session"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); -let ThirdpartyPasswordless = require("../../recipe/thirdpartypasswordless"); -let { TwilioService, SupertokensService } = require("../../recipe/thirdpartypasswordless/smsdelivery"); +let { ProcessState } = require("../../dist/processState"); +let ThirdpartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +let { TwilioService, SupertokensService } = require("../../dist/recipe/thirdpartypasswordless/smsdelivery/services"); let nock = require("nock"); let supertest = require("supertest"); -const { middleware, errorHandler } = require("../../framework/express"); +const { middleware, errorHandler } = require("../../dist/framework/express"); let express = require("express"); let { isCDIVersionCompatible } = require("../utils"); -describe(`smsDelivery: ${printPath("[test/thirdpartypasswordless/smsDelivery.test.js]")}`, function () { +describe(`smsDelivery: ${printPath("[test/thirdpartypasswordless/smsdelivery/services.test.js]")}`, function () { beforeEach(async function () { process.env.TEST_MODE = "testing"; await killAllST(); diff --git a/test/thirdpartypasswordless/users.test.js b/test/thirdpartypasswordless/users.test.js index ac4dd3ec1..94455f033 100644 --- a/test/thirdpartypasswordless/users.test.js +++ b/test/thirdpartypasswordless/users.test.js @@ -21,13 +21,13 @@ const { signInUPCustomRequest, isCDIVersionCompatible, } = require("../utils"); -const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../lib/build/"); +const { getUserCount, getUsersNewestFirst, getUsersOldestFirst } = require("../../dist/"); let assert = require("assert"); -let { ProcessState } = require("../../lib/build/processState"); +let { ProcessState } = require("../../dist/processState"); let STExpress = require("../../"); -let Session = require("../../recipe/session"); -let ThirdPartyPasswordless = require("../../lib/build/recipe/thirdpartypasswordless"); -let { middleware, errorHandler } = require("../../framework/express"); +let Session = require("../../dist/recipe/session"); +let ThirdPartyPasswordless = require("../../dist/recipe/thirdpartypasswordless"); +let { middleware, errorHandler } = require("../../dist/framework/express"); describe(`usersTest: ${printPath("[test/thirdpartypasswordless/users.test.js]")}`, function () { before(function () { diff --git a/test/userContext.test.js b/test/userContext.test.js index 9ecad16ff..051ab7c79 100644 --- a/test/userContext.test.js +++ b/test/userContext.test.js @@ -24,15 +24,15 @@ const { let assert = require("assert"); const express = require("express"); const request = require("supertest"); -let { ProcessState, PROCESS_STATE } = require("../lib/build/processState"); +let { ProcessState, PROCESS_STATE } = require("../dist/processState"); let SuperTokens = require(".."); -let Session = require("../recipe/session"); -let EmailPassword = require("../recipe/emailpassword"); -let { Querier } = require("../lib/build/querier"); -const { default: NormalisedURLPath } = require("../lib/build/normalisedURLPath"); -const { verifySession } = require("../recipe/session/framework/express"); +let Session = require("../dist/recipe/session"); +let EmailPassword = require("../dist/recipe/emailpassword"); +let { Querier } = require("../dist/querier"); +const { default: NormalisedURLPath } = require("../dist/normalisedURLPath"); +const { verifySession } = require("../dist/recipe/session/framework/express"); const { default: next } = require("next"); -let { middleware, errorHandler } = require("../framework/express"); +let { middleware, errorHandler } = require("../dist/framework/express"); let STExpress = require("../"); describe(`userContext: ${printPath("[test/userContext.test.js]")}`, function () { diff --git a/test/useridmapping/createUserIdMapping.test.js b/test/useridmapping/createUserIdMapping.test.js index c465f6473..b371e1b70 100644 --- a/test/useridmapping/createUserIdMapping.test.js +++ b/test/useridmapping/createUserIdMapping.test.js @@ -2,12 +2,12 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword").default; -const SessionRecipe = require("../../lib/build/recipe/session").default; -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const EmailPasswordRecipe = require("../../dist/recipe/emailpassword").default; +const SessionRecipe = require("../../dist/recipe/session").default; +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`createUserIdMappingTest: ${printPath("[test/useridmapping/createUserIdMapping.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/useridmapping/deleteUserIdMapping.test.js b/test/useridmapping/deleteUserIdMapping.test.js index 8e069194b..9daa04e58 100644 --- a/test/useridmapping/deleteUserIdMapping.test.js +++ b/test/useridmapping/deleteUserIdMapping.test.js @@ -2,12 +2,12 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword").default; -const SessionRecipe = require("../../lib/build/recipe/session").default; -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const EmailPasswordRecipe = require("../../dist/recipe/emailpassword").default; +const SessionRecipe = require("../../dist/recipe/session").default; +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`deleteUserIdMappingTest: ${printPath("[test/useridmapping/deleteUserIdMapping.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/useridmapping/getUserIdMapping.test.js b/test/useridmapping/getUserIdMapping.test.js index b872abb6e..90b4c5b96 100644 --- a/test/useridmapping/getUserIdMapping.test.js +++ b/test/useridmapping/getUserIdMapping.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword").default; -const SessionRecipe = require("../../lib/build/recipe/session").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const EmailPasswordRecipe = require("../../dist/recipe/emailpassword").default; +const SessionRecipe = require("../../dist/recipe/session").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`getUserIdMappingTest: ${printPath("[test/useridmapping/getUserIdMapping.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/useridmapping/recipeTests/emailpassword.test.js b/test/useridmapping/recipeTests/emailpassword.test.js index 07261d8f9..99fdaf08b 100644 --- a/test/useridmapping/recipeTests/emailpassword.test.js +++ b/test/useridmapping/recipeTests/emailpassword.test.js @@ -1,11 +1,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const EmailPasswordRecipe = require("../../../lib/build/recipe/emailpassword").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const EmailPasswordRecipe = require("../../../dist/recipe/emailpassword").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with emailpassword: ${printPath( "[test/useridmapping/recipeTests/emailpassword.test.js]" diff --git a/test/useridmapping/recipeTests/passwordless.test.js b/test/useridmapping/recipeTests/passwordless.test.js index 26c15b6d3..39cb2bf78 100644 --- a/test/useridmapping/recipeTests/passwordless.test.js +++ b/test/useridmapping/recipeTests/passwordless.test.js @@ -1,11 +1,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const PasswordlessRecipe = require("../../../lib/build/recipe/passwordless").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const PasswordlessRecipe = require("../../../dist/recipe/passwordless").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with passwordless: ${printPath( "[test/useridmapping/recipeTests/passwordless.test.js]" diff --git a/test/useridmapping/recipeTests/supertokens.test.js b/test/useridmapping/recipeTests/supertokens.test.js index 3ab890fc5..882e72314 100644 --- a/test/useridmapping/recipeTests/supertokens.test.js +++ b/test/useridmapping/recipeTests/supertokens.test.js @@ -1,12 +1,12 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const EmailPasswordRecipe = require("../../../lib/build/recipe/emailpassword").default; -const UserMetadataRecipe = require("../../../lib/build/recipe/usermetadata").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const EmailPasswordRecipe = require("../../../dist/recipe/emailpassword").default; +const UserMetadataRecipe = require("../../../dist/recipe/usermetadata").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with supertokens recipe: ${printPath( "[test/useridmapping/recipeTests/supertokens.test.js]" diff --git a/test/useridmapping/recipeTests/thirdparty.test.js b/test/useridmapping/recipeTests/thirdparty.test.js index 0d74353f7..e129f5dca 100644 --- a/test/useridmapping/recipeTests/thirdparty.test.js +++ b/test/useridmapping/recipeTests/thirdparty.test.js @@ -1,11 +1,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const ThirdPartyRecipe = require("../../../lib/build/recipe/thirdparty").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const ThirdPartyRecipe = require("../../../dist/recipe/thirdparty").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with thirdparty: ${printPath( "[test/useridmapping/recipeTests/thirdparty.test.js]" diff --git a/test/useridmapping/recipeTests/thirdpartyemailpassword.test.js b/test/useridmapping/recipeTests/thirdpartyemailpassword.test.js index 7eb82db53..8101ecfac 100644 --- a/test/useridmapping/recipeTests/thirdpartyemailpassword.test.js +++ b/test/useridmapping/recipeTests/thirdpartyemailpassword.test.js @@ -1,11 +1,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const ThirdPartyEmailPasswordRecipe = require("../../../lib/build/recipe/thirdpartyemailpassword").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const ThirdPartyEmailPasswordRecipe = require("../../../dist/recipe/thirdpartyemailpassword").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with ThirdPartyEmailPassword: ${printPath( "[test/useridmapping/recipeTests/thirdpartyemailpassword.test.js]" diff --git a/test/useridmapping/recipeTests/thirdpartypasswordless.test.js b/test/useridmapping/recipeTests/thirdpartypasswordless.test.js index 7d325d0be..c595ae263 100644 --- a/test/useridmapping/recipeTests/thirdpartypasswordless.test.js +++ b/test/useridmapping/recipeTests/thirdpartypasswordless.test.js @@ -1,11 +1,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../../utils"); -const { ProcessState } = require("../../../lib/build/processState"); +const { ProcessState } = require("../../../dist/processState"); const STExpress = require("../../.."); -const ThirdPartyPasswordlessRecipe = require("../../../lib/build/recipe/thirdpartypasswordless").default; -const SessionRecipe = require("../../../lib/build/recipe/session").default; -const { Querier } = require("../../../lib/build/querier"); -const { maxVersion } = require("../../../lib/build/utils"); +const ThirdPartyPasswordlessRecipe = require("../../../dist/recipe/thirdpartypasswordless").default; +const SessionRecipe = require("../../../dist/recipe/session").default; +const { Querier } = require("../../../dist/querier"); +const { maxVersion } = require("../../../dist/utils"); describe(`userIdMapping with thirdPartyPasswordless: ${printPath( "[test/useridmapping/recipeTests/thirdpartypasswordless.test.js]" diff --git a/test/useridmapping/updateOrDeleteUserIdMappingInfo.test.js b/test/useridmapping/updateOrDeleteUserIdMappingInfo.test.js index aaa1ab0d8..2501d2f16 100644 --- a/test/useridmapping/updateOrDeleteUserIdMappingInfo.test.js +++ b/test/useridmapping/updateOrDeleteUserIdMappingInfo.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const EmailPasswordRecipe = require("../../lib/build/recipe/emailpassword").default; -const SessionRecipe = require("../../lib/build/recipe/session").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const EmailPasswordRecipe = require("../../dist/recipe/emailpassword").default; +const SessionRecipe = require("../../dist/recipe/session").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`updateOrDeleteUserIdMappingInfoTest: ${printPath( "[test/useridmapping/updateOrDeleteUserIdMappingInfo.test.js]" diff --git a/test/usermetadata/clearUserMetadata.test.js b/test/usermetadata/clearUserMetadata.test.js index f15f4e922..40715ca63 100644 --- a/test/usermetadata/clearUserMetadata.test.js +++ b/test/usermetadata/clearUserMetadata.test.js @@ -2,10 +2,10 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`clearUserMetadataTest: ${printPath("[test/usermetadata/clearUserMetadata.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/usermetadata/config.test.js b/test/usermetadata/config.test.js index 5c20e7eeb..d4a9d8008 100644 --- a/test/usermetadata/config.test.js +++ b/test/usermetadata/config.test.js @@ -1,9 +1,9 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -const { ProcessState } = require("../../lib/build/processState"); +const { ProcessState } = require("../../dist/processState"); const STExpress = require("../.."); -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata/recipe").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const UserMetadataRecipe = require("../../dist/recipe/usermetadata/recipe").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`configTest: ${printPath("[test/usermetadata/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/usermetadata/getUserMetadata.test.js b/test/usermetadata/getUserMetadata.test.js index 9c116dec9..ea51a75b4 100644 --- a/test/usermetadata/getUserMetadata.test.js +++ b/test/usermetadata/getUserMetadata.test.js @@ -2,10 +2,10 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); const STExpress = require("../../"); -const { ProcessState } = require("../../lib/build/processState"); -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`getUserMetadataTest: ${printPath("[test/usermetadata/getUserMetadata.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/usermetadata/override.test.js b/test/usermetadata/override.test.js index d03e53f0d..2e71de9c6 100644 --- a/test/usermetadata/override.test.js +++ b/test/usermetadata/override.test.js @@ -2,10 +2,10 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); const STExpress = require("../../"); -const { ProcessState } = require("../../lib/build/processState"); -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`overrideTest: ${printPath("[test/usermetadata/override.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/usermetadata/updateUserMetadata.test.js b/test/usermetadata/updateUserMetadata.test.js index a67fabf6f..53fab27a7 100644 --- a/test/usermetadata/updateUserMetadata.test.js +++ b/test/usermetadata/updateUserMetadata.test.js @@ -2,10 +2,10 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserMetadataRecipe = require("../../lib/build/recipe/usermetadata").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const { ProcessState } = require("../../dist/processState"); +const UserMetadataRecipe = require("../../dist/recipe/usermetadata").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`updateUserMetadataTest: ${printPath("[test/usermetadata/updateUserMetadata.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/addRoleToUser.test.js b/test/userroles/addRoleToUser.test.js index 31fefa746..bbcebdd85 100644 --- a/test/userroles/addRoleToUser.test.js +++ b/test/userroles/addRoleToUser.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`addRoleToUserTest: ${printPath("[test/userroles/addRoleToUser.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/claims.test.js b/test/userroles/claims.test.js index f47b840ab..bc1f4e107 100644 --- a/test/userroles/claims.test.js +++ b/test/userroles/claims.test.js @@ -9,12 +9,12 @@ const { mockRequest, setKeyValueInConfig, } = require("../utils"); -const { ProcessState } = require("../../lib/build/processState"); +const { ProcessState } = require("../../dist/processState"); const STExpress = require("../.."); -const UserRoles = require("../../lib/build/recipe/userroles").default; -const Session = require("../../lib/build/recipe/session").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); +const UserRoles = require("../../dist/recipe/userroles").default; +const Session = require("../../dist/recipe/session").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); describe(`claimsTest: ${printPath("[test/userroles/claims.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/config.test.js b/test/userroles/config.test.js index cac2dc39d..ab4ab3bfd 100644 --- a/test/userroles/config.test.js +++ b/test/userroles/config.test.js @@ -1,10 +1,10 @@ const { printPath, setupST, startST, killAllST, cleanST } = require("../utils"); -const { ProcessState } = require("../../lib/build/processState"); +const { ProcessState } = require("../../dist/processState"); const STExpress = require("../.."); -const UserRolesRecipe = require("../../lib/build/recipe/userroles/recipe").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const UserRolesRecipe = require("../../dist/recipe/userroles/recipe").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`configTest: ${printPath("[test/userroles/config.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/createNewRoleOrAddPermissions.test.js b/test/userroles/createNewRoleOrAddPermissions.test.js index 8aa5b81bd..81303205a 100644 --- a/test/userroles/createNewRoleOrAddPermissions.test.js +++ b/test/userroles/createNewRoleOrAddPermissions.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`createNewRoleOrAddPermissionsTest: ${printPath( "[test/userroles/createNewRoleOrAddPermissions.test.js]" diff --git a/test/userroles/deleteRole.test.js b/test/userroles/deleteRole.test.js index ba6451603..16c7dcd40 100644 --- a/test/userroles/deleteRole.test.js +++ b/test/userroles/deleteRole.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getPermissionsForRole: ${printPath("[test/userroles/getPermissionsForRole.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/getPermissionsForRole.test.js b/test/userroles/getPermissionsForRole.test.js index e6263eb0b..e6476e1cc 100644 --- a/test/userroles/getPermissionsForRole.test.js +++ b/test/userroles/getPermissionsForRole.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getPermissionsForRole: ${printPath("[test/userroles/getPermissionsForRole.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/getRolesForUser.test.js b/test/userroles/getRolesForUser.test.js index 2a1701454..d0f3035eb 100644 --- a/test/userroles/getRolesForUser.test.js +++ b/test/userroles/getRolesForUser.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getRolesForUser: ${printPath("[test/userroles/getRolesForUser.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/getRolesThatHavePermissions.test.js b/test/userroles/getRolesThatHavePermissions.test.js index eb91c771c..81009e91d 100644 --- a/test/userroles/getRolesThatHavePermissions.test.js +++ b/test/userroles/getRolesThatHavePermissions.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getRolesThatHavePermissions: ${printPath( "[test/userroles/getRolesThatHavePermissions.test.js]" diff --git a/test/userroles/getUsersThatHaveRole.test.js b/test/userroles/getUsersThatHaveRole.test.js index 67bb59166..e8f5f2a29 100644 --- a/test/userroles/getUsersThatHaveRole.test.js +++ b/test/userroles/getUsersThatHaveRole.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getUsersThatHaveRole: ${printPath("[test/userroles/getUsersThatHaveRole.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/removePermissionsFromRole.test.js b/test/userroles/removePermissionsFromRole.test.js index a1b19dc4f..375fe24de 100644 --- a/test/userroles/removePermissionsFromRole.test.js +++ b/test/userroles/removePermissionsFromRole.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`getPermissionsForRole: ${printPath("[test/userroles/getPermissionsForRole.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/userroles/removeUserRole.test.js b/test/userroles/removeUserRole.test.js index f1fd35d90..c99025d63 100644 --- a/test/userroles/removeUserRole.test.js +++ b/test/userroles/removeUserRole.test.js @@ -2,11 +2,11 @@ const assert = require("assert"); const { printPath, setupST, startST, killAllST, cleanST, areArraysEqual } = require("../utils"); const STExpress = require("../.."); -const { ProcessState } = require("../../lib/build/processState"); -const UserRolesRecipe = require("../../lib/build/recipe/userroles").default; -const { Querier } = require("../../lib/build/querier"); -const { maxVersion } = require("../../lib/build/utils"); -const { default: SessionRecipe } = require("../../lib/build/recipe/session/recipe"); +const { ProcessState } = require("../../dist/processState"); +const UserRolesRecipe = require("../../dist/recipe/userroles").default; +const { Querier } = require("../../dist/querier"); +const { maxVersion } = require("../../dist/utils"); +const { default: SessionRecipe } = require("../../dist/recipe/session/recipe"); describe(`removeUserRoleTest: ${printPath("[test/userroles/removeUserRole.test.js]")}`, function () { beforeEach(async function () { diff --git a/test/utils.js b/test/utils.js index 876bf51e1..a6a3f23de 100644 --- a/test/utils.js +++ b/test/utils.js @@ -16,24 +16,24 @@ const { exec } = require("child_process"); const nock = require("nock"); const request = require("supertest"); let fs = require("fs"); -let SuperTokens = require("../lib/build/supertokens").default; -let SessionRecipe = require("../lib/build/recipe/session/recipe").default; -let ThirPartyRecipe = require("../lib/build/recipe/thirdparty/recipe").default; -let ThirPartyPasswordless = require("../lib/build/recipe/thirdpartypasswordless/recipe").default; -let ThirdPartyEmailPasswordRecipe = require("../lib/build/recipe/thirdpartyemailpassword/recipe").default; -let ThirdPartyPasswordlessRecipe = require("../lib/build/recipe/thirdpartypasswordless/recipe").default; -let EmailPasswordRecipe = require("../lib/build/recipe/emailpassword/recipe").default; -let DashboardRecipe = require("../lib/build/recipe/dashboard/recipe").default; -const EmailVerificationRecipe = require("../lib/build/recipe/emailverification/recipe").default; -let JWTRecipe = require("..//lib/build/recipe/jwt/recipe").default; -const UserMetadataRecipe = require("../lib/build/recipe/usermetadata/recipe").default; -let PasswordlessRecipe = require("..//lib/build/recipe/passwordless/recipe").default; -const UserRolesRecipe = require("../lib/build/recipe/userroles/recipe").default; -let { ProcessState } = require("../lib/build/processState"); -let { Querier } = require("../lib/build/querier"); -let { maxVersion } = require("../lib/build/utils"); -const { default: OpenIDRecipe } = require("../lib/build/recipe/openid/recipe"); -const { wrapRequest } = require("../framework/express"); +let SuperTokens = require("../dist/supertokens").default; +let SessionRecipe = require("../dist/recipe/session/recipe").default; +let ThirPartyRecipe = require("../dist/recipe/thirdparty/recipe").default; +let ThirPartyPasswordless = require("../dist/recipe/thirdpartypasswordless/recipe").default; +let ThirdPartyEmailPasswordRecipe = require("../dist/recipe/thirdpartyemailpassword/recipe").default; +let ThirdPartyPasswordlessRecipe = require("../dist/recipe/thirdpartypasswordless/recipe").default; +let EmailPasswordRecipe = require("../dist/recipe/emailpassword/recipe").default; +let DashboardRecipe = require("../dist/recipe/dashboard/recipe").default; +const EmailVerificationRecipe = require("../dist/recipe/emailverification/recipe").default; +let JWTRecipe = require("..//dist/recipe/jwt/recipe").default; +const UserMetadataRecipe = require("../dist/recipe/usermetadata/recipe").default; +let PasswordlessRecipe = require("..//dist/recipe/passwordless/recipe").default; +const UserRolesRecipe = require("../dist/recipe/userroles/recipe").default; +let { ProcessState } = require("../dist/processState"); +let { Querier } = require("../dist/querier"); +let { maxVersion } = require("../dist/utils"); +const { default: OpenIDRecipe } = require("../dist/recipe/openid/recipe"); +const { wrapRequest } = require("../dist/framework/express"); const { join } = require("path"); const users = require("./users.json"); diff --git a/test/utils.test.js b/test/utils.test.js index 0d84bc480..6e470934b 100644 --- a/test/utils.test.js +++ b/test/utils.test.js @@ -1,5 +1,5 @@ const assert = require("assert"); -const { getFromObjectCaseInsensitive } = require("../lib/build/utils"); +const { getFromObjectCaseInsensitive } = require("../dist/utils"); describe("SuperTokens utils test", () => { it("Test getFromObjectCaseInsensitive", () => { diff --git a/test/with-typescript/index.ts b/test/with-typescript/index.ts index 327b5fcaf..09d1831b3 100644 --- a/test/with-typescript/index.ts +++ b/test/with-typescript/index.ts @@ -1,32 +1,32 @@ import * as express from "express"; import Supertokens from "../.."; -import Session, { RecipeInterface, SessionClaimValidator, VerifySessionOptions } from "../../recipe/session"; -import EmailVerification from "../../recipe/emailverification"; -import EmailPassword from "../../recipe/emailpassword"; -import { verifySession } from "../../recipe/session/framework/express"; -import { middleware, errorHandler, SessionRequest } from "../../framework/express"; -import NextJS from "../../nextjs"; -import ThirdPartyEmailPassword from "../../recipe/thirdpartyemailpassword"; -import ThirdParty from "../../recipe/thirdparty"; -import Passwordless from "../../recipe/passwordless"; -import ThirdPartyPasswordless from "../../recipe/thirdpartypasswordless"; -import { SMTPService as SMTPServiceTPP } from "../../recipe/thirdpartypasswordless/emaildelivery"; -import { SMTPService as SMTPServiceP } from "../../recipe/passwordless/emaildelivery"; -import { SMTPService as SMTPServiceTPEP } from "../../recipe/thirdpartyemailpassword/emaildelivery"; -import { SMTPService as SMTPServiceEP } from "../../recipe/emailpassword/emaildelivery"; +import Session, { RecipeInterface, SessionClaimValidator, VerifySessionOptions } from "../../dist/recipe/session"; +import EmailVerification from "../../dist/recipe/emailverification"; +import EmailPassword from "../../dist/recipe/emailpassword"; +import { verifySession } from "../../dist/recipe/session/framework/express"; +import { middleware, errorHandler, SessionRequest } from "../../dist/framework/express"; +import NextJS from "../../dist/nextjs"; +import ThirdPartyEmailPassword from "../../dist/recipe/thirdpartyemailpassword"; +import ThirdParty from "../../dist/recipe/thirdparty"; +import Passwordless from "../../dist/recipe/passwordless"; +import ThirdPartyPasswordless from "../../dist/recipe/thirdpartypasswordless"; +import { SMTPService as SMTPServiceTPP } from "../../dist/recipe/thirdpartypasswordless/emaildelivery/services"; +import { SMTPService as SMTPServiceP } from "../../dist/recipe/passwordless/emaildelivery/services"; +import { SMTPService as SMTPServiceTPEP } from "../../dist/recipe/thirdpartyemailpassword/emaildelivery/services"; +import { SMTPService as SMTPServiceEP } from "../../dist/recipe/emailpassword/emaildelivery/services"; import { TwilioService as TwilioServiceTPP, SupertokensService as SupertokensServiceTPP, -} from "../../recipe/thirdpartypasswordless/smsdelivery"; +} from "../../dist/recipe/thirdpartypasswordless/smsdelivery/services"; import { TwilioService as TwilioServiceP, SupertokensService as SupertokensServiceP, -} from "../../recipe/thirdpartypasswordless/smsdelivery"; -import UserMetadata from "../../recipe/usermetadata"; -import { BooleanClaim, PrimitiveClaim } from "../../recipe/session/claims"; -import UserRoles from "../../recipe/userroles"; -import Dashboard from "../../recipe/dashboard"; -import JWT from "../../recipe/jwt"; +} from "../../dist/recipe/thirdpartypasswordless/smsdelivery/services"; +import UserMetadata from "../../dist/recipe/usermetadata"; +import { BooleanClaim, PrimitiveClaim } from "../../dist/recipe/session/claims"; +import UserRoles from "../../dist/recipe/userroles"; +import Dashboard from "../../dist/recipe/dashboard"; +import JWT from "../../dist/recipe/jwt"; UserRoles.init({ override: { @@ -819,9 +819,9 @@ ThirdParty.init({ }); import { TypeInput } from "../../types"; -import { TypeInput as SessionTypeInput } from "../../recipe/session/types"; -import { TypeInput as EPTypeInput } from "../../recipe/emailpassword/types"; -import SuperTokensError from "../../lib/build/error"; +import { TypeInput as SessionTypeInput } from "../../dist/recipe/session/types"; +import { TypeInput as EPTypeInput } from "../../dist/recipe/emailpassword/types"; +import SuperTokensError from "../../dist/error"; let app = express(); let sessionConfig: SessionTypeInput = { diff --git a/tsconfig.json b/tsconfig.json new file mode 100644 index 000000000..7e188a1cb --- /dev/null +++ b/tsconfig.json @@ -0,0 +1,22 @@ +{ + "$schema": "https://json.schemastore.org/tsconfig", + "display": "Node 16", + "compilerOptions": { + "lib": [ + "es2021", + "DOM" + ], + "module": "Node16", + "target": "es2021", + "strict": true, + "esModuleInterop": true, + "skipLibCheck": true, + "forceConsistentCasingInFileNames": true, + "moduleResolution": "node" + }, + "include": [ + "src", + "playground", + "lib" + ] +} \ No newline at end of file diff --git a/tsup.config.ts b/tsup.config.ts new file mode 100644 index 000000000..d8fd87dc6 --- /dev/null +++ b/tsup.config.ts @@ -0,0 +1,23 @@ +import type { Options } from 'tsup' + +import pkg from './package.json' +const external = [ + ...Object.keys(pkg.dependencies || {}), + ...Object.keys(pkg.peerDependencies || {}), +] + +export default { + entryPoints: [ + 'lib/ts/**/*.ts', + ], + outDir: 'dist', + format: ['esm', 'cjs'], + target: 'node16', + dts: true, + external, + clean: true, + minify: true, + esbuildOptions: (options) => { + options.chunkNames = `__chunk/[name]-[hash]`; + } +} \ No newline at end of file diff --git a/types/index.d.ts b/types/index.d.ts deleted file mode 100644 index 909977c27..000000000 --- a/types/index.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -export * from "../lib/build/types"; -/** - * 'export *' does not re-export a default. - * import NextJS from "supertokens-node/nextjs"; - * the above import statement won't be possible unless either - * - user add "esModuleInterop": true in their tsconfig.json file - * - we do the following change: - */ -import * as _default from "../lib/build/types"; -export default _default; diff --git a/types/index.js b/types/index.js deleted file mode 100644 index 37012d0d4..000000000 --- a/types/index.js +++ /dev/null @@ -1,6 +0,0 @@ -"use strict"; -function __export(m) { - for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; -} -exports.__esModule = true; -__export(require("../lib/build/types"));