@comasoft/nestjs 0.2.23 → 0.2.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,"__esModule",{value:!0}),exports.COMMON_LOGGER_OPTIONS=void 0;const e=require("ua-parser-js");exports.COMMON_LOGGER_OPTIONS={customLogLevel:(e,r,s)=>r.statusCode>=400&&r.statusCode<500?"warn":r.statusCode>=500||s?"error":"info",customProps:(r,s)=>{const
|
|
1
|
+
Object.defineProperty(exports,"__esModule",{value:!0}),exports.COMMON_LOGGER_OPTIONS=void 0;const e=require("ua-parser-js");exports.COMMON_LOGGER_OPTIONS={customLogLevel:(e,r,s)=>r.statusCode>=400&&r.statusCode<500?"warn":r.statusCode>=500||s?"error":"info",customProps:(r,s)=>{const a=new e.UAParser(r.headers["user-agent"]),o=a.getBrowser(),t=a.getOS(),d=a.getDevice().type||"desktop";return{method:r.method,url:r.url,ip:r.headers["x-forwarded-for"]||r.connection.remoteAddress,statusCode:s.statusCode,browser:o.name||"unknown",os:t.name||"unknown",deviceType:d||"unknown"}},serializers:{req:()=>{},res:()=>{},err(e){var r;return{type:null==e?void 0:e.name,message:null==e?void 0:e.message,code:null===(r=null==e?void 0:e.response)||void 0===r?void 0:r.code,stack:null==e?void 0:e.stack}}},redact:{remove:!0,paths:["email","password","req.query","req.params","req.query","res.headers","req.headers.host","req.headers.connection","req.headers.accept","req.headers.origin","req.headers.referer",'req.headers["content-type"]','req.headers["sec-ch-ua"]','req.headers["sec-ch-ua-mobile"]','req.headers["user-agent"]','req.headers["sec-ch-ua-platform"]','req.headers["sec-fetch-site"]','req.headers["sec-fetch-mode"]','req.headers["sec-fetch-dest"]','req.headers["accept-encoding"]','req.headers["accept-language"]','req.headers["if-none-match"]']}};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=this&&this.__awaiter||function(e,t,o,
|
|
1
|
+
var e=this&&this.__awaiter||function(e,t,o,r){return new(o||(o=Promise))(function(n,s){function fulfilled(e){try{step(r.next(e))}catch(e){s(e)}}function rejected(e){try{step(r.throw(e))}catch(e){s(e)}}function step(e){e.done?n(e.value):function adopt(e){return e instanceof o?e:new o(function(t){t(e)})}(e.value).then(fulfilled,rejected)}step((r=r.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.GoogleStrategy=void 0;const t=require("@nestjs/passport"),o=require("passport-google-oauth20");class GoogleStrategy extends((0,t.PassportStrategy)(o.Strategy,"google")){constructor(){const e=process.env.GOOGLE_CLIENT_ID,t=process.env.GOOGLE_CLIENT_SECRET,o=process.env.GOOGLE_CALLBACK_URL;if(!e||!t||!o)throw new Error("Google OAuth Environment Variables are not set");super({clientID:e,clientSecret:t,callbackURL:o})}validate(t,o,r){return e(this,void 0,void 0,function*(){try{const e=r._json;return{vendor_uid:e.sub,name:e.name,nickname:e.given_name,email:null==e?void 0:e.email,profile_image:null==e?void 0:e.picture,refresh_token:o}}catch(e){throw console.error("Google validation error:",e),e}})}}exports.GoogleStrategy=GoogleStrategy;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n.throw(e))}catch(e){o(e)}}function step(e){e.done?a(e.value):function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NaverStrategy=void 0;const t=require("@nestjs/passport"),r=require("passport-naver");class NaverStrategy extends((0,t.PassportStrategy)(r.Strategy,"naver")){constructor(){const e=process.env.NAVER_CLIENT_ID,t=process.env.NAVER_CLIENT_SECRET,r=process.env.NAVER_CALLBACK_URL;if(!e||!t||!r)throw new Error("Naver OAuth Environment Variables are not set");super({clientID:e,clientSecret:t,callbackURL:r})}validate(t,r,n){return e(this,void 0,void 0,function*(){var e;const{id:t,emails:a,displayName:o,_json:i}=n;return{vendor_uid:t,name:i.name||o,nickname:i.nickname||o,email:(null===(e=null==a?void 0:a[0])||void 0===e?void 0:e.value)||i.email,profile_image:i.profile_image,refresh_token:r}})}}exports.NaverStrategy=NaverStrategy;
|
|
1
|
+
var e=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))(function(a,o){function fulfilled(e){try{step(n.next(e))}catch(e){o(e)}}function rejected(e){try{step(n.throw(e))}catch(e){o(e)}}function step(e){e.done?a(e.value):function adopt(e){return e instanceof r?e:new r(function(t){t(e)})}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())})};Object.defineProperty(exports,"__esModule",{value:!0}),exports.NaverStrategy=void 0;const t=require("@nestjs/passport"),r=require("passport-naver");class NaverStrategy extends((0,t.PassportStrategy)(r.Strategy,"naver")){constructor(){const e=process.env.NAVER_CLIENT_ID,t=process.env.NAVER_CLIENT_SECRET,r=process.env.NAVER_CALLBACK_URL;if(!e||!t||!r)throw new Error("Naver OAuth Environment Variables are not set");super({clientID:e,clientSecret:t,callbackURL:r})}validate(t,r,n){return e(this,void 0,void 0,function*(){var e;try{const{id:t,emails:a,displayName:o,_json:i}=n;return{vendor_uid:t,name:i.name||o,nickname:i.nickname||o,email:(null===(e=null==a?void 0:a[0])||void 0===e?void 0:e.value)||i.email,profile_image:i.profile_image,refresh_token:r}}catch(e){throw console.error("Naver validation error:",e),e}})}}exports.NaverStrategy=NaverStrategy;
|