Skip to content

Commit

Permalink
refactor: Package version update (#484)
Browse files Browse the repository at this point in the history
* refactor: package version update for twilio

* twilio import update
  • Loading branch information
bhumilsarvaiya authored Feb 10, 2023
1 parent 4bd44fb commit bcdd10e
Show file tree
Hide file tree
Showing 220 changed files with 1,959 additions and 833 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [unreleased]

## [13.0.2] - 2023-02-10

- Package version update for twilio to ^4.7.2 and verify-apple-id-token to ^3.0.1
- Package typescript version changed to 4.2

## [13.0.1] - 2023-02-06

- Email template updates
Expand Down
1 change: 1 addition & 0 deletions lib/build/constants.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion lib/build/framework/awsLambda/framework.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export interface SessionEventV2 extends SupertokensLambdaEventV2 {
export interface SessionEvent extends SupertokensLambdaEvent {
session?: SessionContainerInterface;
}
export declare const middleware: (handler?: Handler<any, any> | undefined) => Handler<any, any>;
export declare const middleware: (handler?: Handler<any, any> | undefined) => Handler;
export interface AWSFramework extends Framework {
middleware: (handler?: Handler) => Handler;
}
Expand Down
11 changes: 9 additions & 2 deletions lib/build/framework/awsLambda/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,19 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
const querystring_1 = require("querystring");
class AWSRequest extends request_1.BaseRequest {
constructor(event) {
Expand Down Expand Up @@ -259,7 +265,7 @@ class AWSResponse extends response_1.BaseResponse {
}
}
exports.AWSResponse = AWSResponse;
exports.middleware = (handler) => {
const middleware = (handler) => {
return (event, context, callback) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens = supertokens_1.default.getInstanceOrThrowError();
Expand Down Expand Up @@ -292,6 +298,7 @@ exports.middleware = (handler) => {
}
});
};
exports.middleware = middleware;
exports.AWSWrapper = {
middleware: exports.middleware,
wrapRequest: (unwrapped) => {
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/awsLambda/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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;
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/constants.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"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
Expand Down
14 changes: 11 additions & 3 deletions lib/build/framework/express/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
class ExpressRequest extends request_1.BaseRequest {
constructor(request) {
super();
Expand Down Expand Up @@ -152,7 +158,7 @@ class ExpressResponse extends response_1.BaseResponse {
}
}
exports.ExpressResponse = ExpressResponse;
exports.middleware = () => {
const middleware = () => {
return (req, res, next) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens;
Expand All @@ -177,7 +183,8 @@ exports.middleware = () => {
}
});
};
exports.errorHandler = () => {
exports.middleware = middleware;
const errorHandler = () => {
return (err, req, res, next) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens = supertokens_1.default.getInstanceOrThrowError();
Expand All @@ -190,6 +197,7 @@ exports.errorHandler = () => {
}
});
};
exports.errorHandler = errorHandler;
exports.ExpressWrapper = {
middleware: exports.middleware,
errorHandler: exports.errorHandler,
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/express/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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;
Expand Down
17 changes: 1 addition & 16 deletions lib/build/framework/fastify/framework.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// @ts-nocheck
/// <reference types="node" />
import type { FastifyRequest as OriginalFastifyRequest, FastifyReply, FastifyPluginCallback } from "fastify";
import type { HTTPMethod } from "../../types";
import { BaseRequest } from "../request";
Expand Down Expand Up @@ -50,19 +49,5 @@ export interface FasitfyFramework extends Framework {
plugin: FastifyPluginCallback;
errorHandler: () => (err: any, req: OriginalFastifyRequest, res: FastifyReply) => Promise<void>;
}
export declare const errorHandler: () => (
err: any,
req: OriginalFastifyRequest<
import("fastify/types/route").RouteGenericInterface,
import("http").Server,
import("http").IncomingMessage
>,
res: FastifyReply<
import("http").Server,
import("http").IncomingMessage,
import("http").ServerResponse,
import("fastify/types/route").RouteGenericInterface,
unknown
>
) => Promise<void>;
export declare const errorHandler: () => (err: any, req: OriginalFastifyRequest, res: FastifyReply) => Promise<void>;
export declare const FastifyWrapper: FasitfyFramework;
11 changes: 9 additions & 2 deletions lib/build/framework/fastify/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
const constants_1 = require("../constants");
class FastifyRequest extends request_1.BaseRequest {
constructor(request) {
Expand Down Expand Up @@ -206,7 +212,7 @@ function plugin(fastify, _, done) {
done();
}
plugin[Symbol.for("skip-override")] = true;
exports.errorHandler = () => {
const errorHandler = () => {
return (err, req, res) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens = supertokens_1.default.getInstanceOrThrowError();
Expand All @@ -215,6 +221,7 @@ exports.errorHandler = () => {
yield supertokens.errorHandler(err, request, response);
});
};
exports.errorHandler = errorHandler;
exports.FastifyWrapper = {
plugin,
errorHandler: exports.errorHandler,
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/fastify/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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;
Expand Down
8 changes: 7 additions & 1 deletion lib/build/framework/hapi/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
class HapiRequest extends request_1.BaseRequest {
constructor(request) {
super();
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/hapi/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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;
Expand Down
63 changes: 55 additions & 8 deletions lib/build/framework/index.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,42 @@
"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
Expand All @@ -15,15 +52,25 @@ Object.defineProperty(exports, "__esModule", { value: true });
* under the License.
*/
var request_1 = require("./request");
exports.BaseRequest = request_1.BaseRequest;
Object.defineProperty(exports, "BaseRequest", {
enumerable: true,
get: function () {
return request_1.BaseRequest;
},
});
var response_1 = require("./response");
exports.BaseResponse = response_1.BaseResponse;
const expressFramework = require("./express");
const fastifyFramework = require("./fastify");
const hapiFramework = require("./hapi");
const loopbackFramework = require("./loopback");
const koaFramework = require("./koa");
const awsLambdaFramework = require("./awsLambda");
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,
Expand Down
11 changes: 9 additions & 2 deletions lib/build/framework/koa/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,19 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
class KoaRequest extends request_1.BaseRequest {
constructor(ctx) {
super();
Expand Down Expand Up @@ -174,7 +180,7 @@ class KoaResponse extends response_1.BaseResponse {
}
}
exports.KoaResponse = KoaResponse;
exports.middleware = () => {
const middleware = () => {
return (ctx, next) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens = supertokens_1.default.getInstanceOrThrowError();
Expand All @@ -190,6 +196,7 @@ exports.middleware = () => {
}
});
};
exports.middleware = middleware;
exports.KoaWrapper = {
middleware: exports.middleware,
wrapRequest: (unwrapped) => {
Expand Down
1 change: 1 addition & 0 deletions lib/build/framework/koa/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* 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;
Expand Down
11 changes: 9 additions & 2 deletions lib/build/framework/loopback/framework.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,18 @@ var __awaiter =
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 = require("../../supertokens");
const supertokens_1 = __importDefault(require("../../supertokens"));
class LoopbackRequest extends request_1.BaseRequest {
constructor(ctx) {
super();
Expand Down Expand Up @@ -142,7 +148,7 @@ class LoopbackResponse extends response_1.BaseResponse {
}
}
exports.LoopbackResponse = LoopbackResponse;
exports.middleware = (ctx, next) =>
const middleware = (ctx, next) =>
__awaiter(void 0, void 0, void 0, function* () {
let supertokens = supertokens_1.default.getInstanceOrThrowError();
let request = new LoopbackRequest(ctx);
Expand All @@ -157,6 +163,7 @@ exports.middleware = (ctx, next) =>
return yield supertokens.errorHandler(err, request, response);
}
});
exports.middleware = middleware;
exports.LoopbackWrapper = {
middleware: exports.middleware,
wrapRequest: (unwrapped) => {
Expand Down
Loading

0 comments on commit bcdd10e

Please sign in to comment.