@amplication/plugin-auth-jwt
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -1,2 +0,2 @@ | ||
import { AmplicationPlugin, CreateAdminUIParams, CreateServerAuthParams, DsgContext, Events } from "@amplication/code-gen-types"; | ||
import { AmplicationPlugin, CreateAdminUIParams, Module, CreateServerAuthParams, DsgContext, Events } from "@amplication/code-gen-types"; | ||
declare class JwtAuthPlugin implements AmplicationPlugin { | ||
@@ -6,4 +6,4 @@ register(): Events; | ||
beforeCreateAuthModules(context: DsgContext, eventParams: CreateServerAuthParams): CreateServerAuthParams; | ||
afterCreateAuthModules(context: DsgContext, eventParams: CreateServerAuthParams): Promise<import("@amplication/code-gen-types").Module[]>; | ||
afterCreateAuthModules(context: DsgContext, eventParams: CreateServerAuthParams, modules: Module[]): Promise<Module[]>; | ||
} | ||
export default JwtAuthPlugin; |
@@ -166,15 +166,2 @@ /******/ (() => { // webpackBootstrap | ||
/***/ 601: | ||
/***/ ((__unused_webpack_module, exports, __webpack_require__) => { | ||
Object.defineProperty(exports, "__esModule", ({ value: true })); | ||
exports.templatesPath = exports.staticsPath = void 0; | ||
const path_1 = __webpack_require__(17); | ||
exports.staticsPath = (0, path_1.join)(__dirname, "static"); | ||
exports.templatesPath = (0, path_1.join)(__dirname, "templates"); | ||
/***/ }), | ||
/***/ 17: | ||
@@ -221,3 +208,3 @@ /***/ ((module) => { | ||
const models_1 = __webpack_require__(930); | ||
const constants_1 = __webpack_require__(601); | ||
const path_1 = __webpack_require__(17); | ||
class JwtAuthPlugin { | ||
@@ -245,5 +232,6 @@ register() { | ||
} | ||
async afterCreateAuthModules(context, eventParams) { | ||
const staticsFiles = await context.utils.importStaticModules(constants_1.staticsPath, context.serverDirectories.srcDirectory); | ||
return staticsFiles; | ||
async afterCreateAuthModules(context, eventParams, modules) { | ||
const staticPath = (0, path_1.resolve)(__dirname, "./static"); | ||
const staticsFiles = await context.utils.importStaticModules(staticPath, context.serverDirectories.srcDirectory); | ||
return [...staticsFiles, ...modules]; | ||
} | ||
@@ -250,0 +238,0 @@ } |
{ | ||
"name": "@amplication/plugin-auth-jwt", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"description": "set jwt as provider for Amplication build", | ||
@@ -19,3 +19,3 @@ "main": "dist/index.js", | ||
"@nestjs/core": "^9.0.9", | ||
"@nestjs/jwt": "^9.0.0", | ||
"@nestjs/jwt": "10.0.1", | ||
"@nestjs/passport": "^9.0.0", | ||
@@ -30,3 +30,3 @@ "@types/lodash": "^4.14.182", | ||
"lodash": "^4.17.21", | ||
"passport-jwt": "4.0.0", | ||
"passport-jwt": "^4.0.1", | ||
"prettier": "^2.7.1", | ||
@@ -33,0 +33,0 @@ "ts-loader": "^9.4.2", |
import { | ||
AmplicationPlugin, | ||
CreateAdminUIParams, | ||
Module, | ||
CreateServerAuthParams, | ||
@@ -9,3 +10,3 @@ DsgContext, | ||
import { EnumAuthProviderType } from "@amplication/code-gen-types/src/models"; | ||
import { staticsPath } from "./constants"; | ||
import { resolve } from "path"; | ||
class JwtAuthPlugin implements AmplicationPlugin { | ||
@@ -45,10 +46,13 @@ register(): Events { | ||
context: DsgContext, | ||
eventParams: CreateServerAuthParams | ||
eventParams: CreateServerAuthParams, | ||
modules: Module[] | ||
) { | ||
const staticPath = resolve(__dirname, "./static"); | ||
const staticsFiles = await context.utils.importStaticModules( | ||
staticsPath, | ||
staticPath, | ||
context.serverDirectories.srcDirectory | ||
); | ||
return staticsFiles; | ||
return [...staticsFiles, ...modules]; | ||
} | ||
@@ -55,0 +59,0 @@ } |
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
46124
27
844
0