@telia-ace/alliance-internal-node-utilities 1.0.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/LICENSE.txt +9 -0
- package/README.md +3 -0
- package/dist/auth.d.ts +19 -0
- package/dist/config.d.ts +9 -0
- package/dist/constants.d.ts +5 -0
- package/dist/exceptions.d.ts +33 -0
- package/dist/index.cjs +5 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.mjs +5 -0
- package/dist/logging.d.ts +21 -0
- package/dist/vite-plugin-css-import.d.ts +2 -0
- package/package.json +41 -0
package/CHANGELOG.md
ADDED
package/LICENSE.txt
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
(c) Copyright Telia Company AB 2023
|
|
2
|
+
|
|
3
|
+
This software may be used and/or copied only with the written
|
|
4
|
+
permission from Telia Company AB, or in accordance with
|
|
5
|
+
the terms and conditions stipulated in the agreement/contract
|
|
6
|
+
under which the software has been supplied.
|
|
7
|
+
All rights reserved.
|
|
8
|
+
|
|
9
|
+
Software packages under the scopes @telia-ace, @webprovisions and @webprovisions-registry are also subjected to the above statement.
|
package/README.md
ADDED
package/dist/auth.d.ts
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ConfigService } from '@nestjs/config';
|
|
2
|
+
type BearerTokenSettings = {
|
|
3
|
+
privateKey: string;
|
|
4
|
+
aud: string;
|
|
5
|
+
sub: string;
|
|
6
|
+
name: string;
|
|
7
|
+
user: {
|
|
8
|
+
type: string;
|
|
9
|
+
permissions: string[];
|
|
10
|
+
};
|
|
11
|
+
workspace: {
|
|
12
|
+
name: string;
|
|
13
|
+
slug: string;
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
export declare function createBearerToken({ privateKey, aud, sub, name, user, workspace, }: BearerTokenSettings): string;
|
|
17
|
+
export declare function getPrivateKey(configService: ConfigService): string;
|
|
18
|
+
export declare function createSystemUserToken(configService: ConfigService): string;
|
|
19
|
+
export {};
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export declare enum SharedConfigKeys {
|
|
2
|
+
AuthAuthority = "AUTH_AUTHORITY",
|
|
3
|
+
AuthCookieName = "AUTH_COOKIE_NAME",
|
|
4
|
+
AuthCookieSecret = "AUTH_COOKIE_SECRET",
|
|
5
|
+
DbEndpoint = "DB_ENDPOINT",
|
|
6
|
+
JwtPrivateKey = "JWT_PRIVATE_KEY",
|
|
7
|
+
ServiceLogLevel = "SERVICE_LOG_LEVEL",
|
|
8
|
+
ServicePort = "SERVICE_PORT"
|
|
9
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ArgumentsHost, ExceptionFilter, HttpException } from '@nestjs/common';
|
|
2
|
+
export declare enum GatewayErrorCodes {
|
|
3
|
+
NoMatchingEndpoint = 10000,
|
|
4
|
+
NoObjectId = 10001,
|
|
5
|
+
NoTargetAppHeader = 10002,
|
|
6
|
+
NoTargetWorkspaceHeader = 10003,
|
|
7
|
+
NoManifestsInCache = 10004,
|
|
8
|
+
NoDevSessionInCache = 10005,
|
|
9
|
+
NoManifest = 10006,
|
|
10
|
+
NoRequestContext = 10007,
|
|
11
|
+
NoUserInRequestContext = 10008,
|
|
12
|
+
NoAppInRequestContext = 10009,
|
|
13
|
+
NoWorkspaceInRequestContext = 10010,
|
|
14
|
+
NoManifestInRequestContext = 10011,
|
|
15
|
+
NoUserPermissionsInRequestContext = 10012
|
|
16
|
+
}
|
|
17
|
+
export declare enum DatabasesErrorCodes {
|
|
18
|
+
NoPublicKey = 11000,
|
|
19
|
+
NoAuthHeader = 11001
|
|
20
|
+
}
|
|
21
|
+
export declare enum PortalErrorCodes {
|
|
22
|
+
NoObjectId = 12000
|
|
23
|
+
}
|
|
24
|
+
type ErrorCodes = GatewayErrorCodes | DatabasesErrorCodes | PortalErrorCodes;
|
|
25
|
+
export declare class AllianceException extends HttpException {
|
|
26
|
+
info: string;
|
|
27
|
+
code: ErrorCodes;
|
|
28
|
+
constructor(code: ErrorCodes, variables?: Record<string, string>);
|
|
29
|
+
}
|
|
30
|
+
export declare class AllianceExceptionFilter implements ExceptionFilter {
|
|
31
|
+
catch(exception: AllianceException, host: ArgumentsHost): void;
|
|
32
|
+
}
|
|
33
|
+
export {};
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
"use strict";const nestjsPino=require("nestjs-pino"),jsonwebtoken=require("jsonwebtoken"),common=require("@nestjs/common"),config=require("@nestjs/config"),node_fs=require("node:fs"),node_path=require("node:path"),promises=require("node:stream/promises");var SharedConfigKeys=(e=>(e.AuthAuthority="AUTH_AUTHORITY",e.AuthCookieName="AUTH_COOKIE_NAME",e.AuthCookieSecret="AUTH_COOKIE_SECRET",e.DbEndpoint="DB_ENDPOINT",e.JwtPrivateKey="JWT_PRIVATE_KEY",e.ServiceLogLevel="SERVICE_LOG_LEVEL",e.ServicePort="SERVICE_PORT",e))(SharedConfigKeys||{});function createBearerToken({privateKey:e,aud:o,sub:t,name:i,user:n,workspace:d}){return`Bearer ${jsonwebtoken.sign({iss:"Alliance",aud:o,sub:t,name:i,"https://alliance.teliacompany.net/user_type":n.type,"https://alliance.teliacompany.net/user_privileges":n.permissions,"https://alliance.teliacompany.net/workspace":d.slug,"https://alliance.teliacompany.net/workspace_name":d.name,"https://alliance.teliacompany.net/tenant":d.slug,"https://alliance.teliacompany.net/tenant_name":d.name},e,{expiresIn:"1h",algorithm:"RS256"})}`}function getPrivateKey(e){return`-----BEGIN RSA PRIVATE KEY-----
|
|
2
|
+
`+e.getOrThrow(SharedConfigKeys.JwtPrivateKey)+`
|
|
3
|
+
-----END RSA PRIVATE KEY-----`}function createSystemUserToken(e){return createBearerToken({aud:"system",sub:"system",name:"system",workspace:{slug:"system",name:"system"},user:{type:"system",permissions:[]},privateKey:getPrivateKey(e)})}var AllianceHeaders=(e=>(e.TargetUrl="alliance-target-url",e.TargetApp="alliance-target-app",e.TargetWorkspace="alliance-target-workspace",e))(AllianceHeaders||{}),r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=(e,o,t,i)=>{for(var n=i>1?void 0:i?u(o,t):o,d=e.length-1,R;d>=0;d--)(R=e[d])&&(n=(i?R(o,t,n):R(n))||n);return i&&n&&r(o,t,n),n},GatewayErrorCodes=(e=>(e[e.NoMatchingEndpoint=1e4]="NoMatchingEndpoint",e[e.NoObjectId=10001]="NoObjectId",e[e.NoTargetAppHeader=10002]="NoTargetAppHeader",e[e.NoTargetWorkspaceHeader=10003]="NoTargetWorkspaceHeader",e[e.NoManifestsInCache=10004]="NoManifestsInCache",e[e.NoDevSessionInCache=10005]="NoDevSessionInCache",e[e.NoManifest=10006]="NoManifest",e[e.NoRequestContext=10007]="NoRequestContext",e[e.NoUserInRequestContext=10008]="NoUserInRequestContext",e[e.NoAppInRequestContext=10009]="NoAppInRequestContext",e[e.NoWorkspaceInRequestContext=10010]="NoWorkspaceInRequestContext",e[e.NoManifestInRequestContext=10011]="NoManifestInRequestContext",e[e.NoUserPermissionsInRequestContext=10012]="NoUserPermissionsInRequestContext",e))(GatewayErrorCodes||{}),DatabasesErrorCodes=(e=>(e[e.NoPublicKey=11e3]="NoPublicKey",e[e.NoAuthHeader=11001]="NoAuthHeader",e))(DatabasesErrorCodes||{}),PortalErrorCodes=(e=>(e[e.NoObjectId=12e3]="NoObjectId",e))(PortalErrorCodes||{});const g={[1e4]:{httpCode:common.HttpStatus.BAD_REQUEST,message:"Could not find endpoint matching request in app manifest."},[10001]:{httpCode:common.HttpStatus.UNAUTHORIZED,message:"No object id available on authenticated user."},[10002]:{httpCode:common.HttpStatus.BAD_REQUEST,message:`Request missing header '${AllianceHeaders.TargetApp}'.`},[10003]:{httpCode:common.HttpStatus.BAD_REQUEST,message:`Request missing header '${AllianceHeaders.TargetWorkspace}'.`},[10004]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"App manifests missing in cache."},[10005]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No dev session in memory cache."},[10006]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"Could not find manifest for app '{{appSlug}}'."},[10007]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No request context."},[10008]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No user in request context."},[10009]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No app in request context."},[10010]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No workspace in request context."},[10011]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No manifest in request context."},[10012]:{httpCode:common.HttpStatus.INTERNAL_SERVER_ERROR,message:"No user permissions in request context."},[11e3]:{httpCode:common.HttpStatus.UNAUTHORIZED,message:"No public key available to decode JWT."},[11001]:{httpCode:common.HttpStatus.UNAUTHORIZED,message:"No authorization header found."},[12e3]:{httpCode:common.HttpStatus.UNAUTHORIZED,message:"No object id found in user claims."}};function E(e,o){return Object.entries(o).reduce((t,[i,n])=>t.replaceAll(`{{${i}}}`,n),e)}class AllianceException extends common.HttpException{constructor(o,t={}){const{message:i,httpCode:n}=g[o];super(E(i,t),n),this.code=o,this.info=`https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${o}`}}exports.AllianceExceptionFilter=class{catch(o,t){const i=t.switchToHttp().getResponse(),n=o.getStatus();i.status(n).json({httpCode:n,code:o.code,info:o.info,message:o.message})}},exports.AllianceExceptionFilter=c([common.Catch(AllianceException)],exports.AllianceExceptionFilter);var l=Object.defineProperty,p=Object.getOwnPropertyDescriptor,s=(e,o,t,i)=>{for(var n=i>1?void 0:i?p(o,t):o,d=e.length-1,R;d>=0;d--)(R=e[d])&&(n=(i?R(o,t,n):R(n))||n);return i&&n&&l(o,t,n),n},a=(e,o)=>(t,i)=>o(t,i,e);exports.LoggerService=class{constructor(o){this.logger=o,this.log=(...t)=>this.logger.info(...t),this.trace=(...t)=>this.logger.trace(...t),this.debug=(...t)=>this.logger.debug(...t),this.info=(...t)=>this.logger.info(...t),this.warn=(...t)=>this.logger.warn(...t),this.error=(...t)=>this.logger.error(...t),this.fatal=(...t)=>this.logger.fatal(...t)}},exports.LoggerService=s([common.Injectable(),a(0,nestjsPino.InjectPinoLogger())],exports.LoggerService),exports.LoggerModule=class{static forRoot({logLevel:o,redact:t=!0}={}){return{module:exports.LoggerModule,controllers:[],imports:[nestjsPino.LoggerModule.forRootAsync({imports:[config.ConfigModule],inject:[config.ConfigService],useFactory:async i=>({pinoHttp:{level:o||i.get(SharedConfigKeys.ServiceLogLevel)||"silent",redact:t?["authorization","headers.authorization","req.headers.authorization","req.remoteAddress","req.remotePort"]:[],transport:{target:"pino-pretty",options:{colorize:!0,colorizeObjects:!0}}}})})],global:!0,providers:[exports.LoggerService],exports:[]}}},exports.LoggerModule=s([common.Module({providers:[exports.LoggerService],exports:[exports.LoggerService]})],exports.LoggerModule);function viteCssImportPlugin(e,o=!1){return{name:"vite-plugin-css-import",apply:"build",enforce:"post",writeBundle:async(t,i)=>{const n=Object.keys(i).filter(m=>m.endsWith(".css"));if(!n.length)return;const d=node_path.resolve(process.cwd(),`${e}-temp.js`),R=node_path.resolve(process.cwd(),`${e}.js`),S=n.reduce((m,N)=>{if(o){const x=node_path.dirname(R),A=node_path.relative(x,N);return`${m}import "${A.replaceAll("\\","/")}";
|
|
4
|
+
`}return`${m}import "./${N}";
|
|
5
|
+
`},""),h=node_fs.createWriteStream(d);h.write(S,"utf8");const C=node_fs.createReadStream(R);await promises.pipeline(C,h),node_fs.rmSync(R,{force:!0}),node_fs.renameSync(d,R),h.end()}}}exports.LoggerErrorInterceptor=nestjsPino.LoggerErrorInterceptor,exports.AllianceException=AllianceException,exports.AllianceHeaders=AllianceHeaders,exports.DatabasesErrorCodes=DatabasesErrorCodes,exports.GatewayErrorCodes=GatewayErrorCodes,exports.PortalErrorCodes=PortalErrorCodes,exports.SharedConfigKeys=SharedConfigKeys,exports.createBearerToken=createBearerToken,exports.createSystemUserToken=createSystemUserToken,exports.getPrivateKey=getPrivateKey,exports.viteCssImportPlugin=viteCssImportPlugin;
|
package/dist/index.d.ts
ADDED
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{InjectPinoLogger as S,LoggerModule as b}from"nestjs-pino";export{LoggerErrorInterceptor}from"nestjs-pino";import{sign as x}from"jsonwebtoken";import{HttpStatus as a,Catch as q,HttpException as L,Injectable as P,Module as w}from"@nestjs/common";import{ConfigModule as U,ConfigService as k}from"@nestjs/config";import{createWriteStream as j,createReadStream as H,rmSync as D,renameSync as V}from"node:fs";import{resolve as h,dirname as M,relative as K}from"node:path";import{pipeline as $}from"node:stream/promises";var l=(e=>(e.AuthAuthority="AUTH_AUTHORITY",e.AuthCookieName="AUTH_COOKIE_NAME",e.AuthCookieSecret="AUTH_COOKIE_SECRET",e.DbEndpoint="DB_ENDPOINT",e.JwtPrivateKey="JWT_PRIVATE_KEY",e.ServiceLogLevel="SERVICE_LOG_LEVEL",e.ServicePort="SERVICE_PORT",e))(l||{});function N({privateKey:e,aud:t,sub:s,name:r,user:o,workspace:n}){return`Bearer ${x({iss:"Alliance",aud:t,sub:s,name:r,"https://alliance.teliacompany.net/user_type":o.type,"https://alliance.teliacompany.net/user_privileges":o.permissions,"https://alliance.teliacompany.net/workspace":n.slug,"https://alliance.teliacompany.net/workspace_name":n.name,"https://alliance.teliacompany.net/tenant":n.slug,"https://alliance.teliacompany.net/tenant_name":n.name},e,{expiresIn:"1h",algorithm:"RS256"})}`}function E(e){return`-----BEGIN RSA PRIVATE KEY-----
|
|
2
|
+
`+e.getOrThrow(l.JwtPrivateKey)+`
|
|
3
|
+
-----END RSA PRIVATE KEY-----`}function W(e){return N({aud:"system",sub:"system",name:"system",workspace:{slug:"system",name:"system"},user:{type:"system",permissions:[]},privateKey:E(e)})}var u=(e=>(e.TargetUrl="alliance-target-url",e.TargetApp="alliance-target-app",e.TargetWorkspace="alliance-target-workspace",e))(u||{}),B=Object.defineProperty,z=Object.getOwnPropertyDescriptor,J=(e,t,s,r)=>{for(var o=r>1?void 0:r?z(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(r?i(t,s,o):i(o))||o);return r&&o&&B(t,s,o),o},f=(e=>(e[e.NoMatchingEndpoint=1e4]="NoMatchingEndpoint",e[e.NoObjectId=10001]="NoObjectId",e[e.NoTargetAppHeader=10002]="NoTargetAppHeader",e[e.NoTargetWorkspaceHeader=10003]="NoTargetWorkspaceHeader",e[e.NoManifestsInCache=10004]="NoManifestsInCache",e[e.NoDevSessionInCache=10005]="NoDevSessionInCache",e[e.NoManifest=10006]="NoManifest",e[e.NoRequestContext=10007]="NoRequestContext",e[e.NoUserInRequestContext=10008]="NoUserInRequestContext",e[e.NoAppInRequestContext=10009]="NoAppInRequestContext",e[e.NoWorkspaceInRequestContext=10010]="NoWorkspaceInRequestContext",e[e.NoManifestInRequestContext=10011]="NoManifestInRequestContext",e[e.NoUserPermissionsInRequestContext=10012]="NoUserPermissionsInRequestContext",e))(f||{}),C=(e=>(e[e.NoPublicKey=11e3]="NoPublicKey",e[e.NoAuthHeader=11001]="NoAuthHeader",e))(C||{}),A=(e=>(e[e.NoObjectId=12e3]="NoObjectId",e))(A||{});const Y={[1e4]:{httpCode:a.BAD_REQUEST,message:"Could not find endpoint matching request in app manifest."},[10001]:{httpCode:a.UNAUTHORIZED,message:"No object id available on authenticated user."},[10002]:{httpCode:a.BAD_REQUEST,message:`Request missing header '${u.TargetApp}'.`},[10003]:{httpCode:a.BAD_REQUEST,message:`Request missing header '${u.TargetWorkspace}'.`},[10004]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"App manifests missing in cache."},[10005]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No dev session in memory cache."},[10006]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"Could not find manifest for app '{{appSlug}}'."},[10007]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No request context."},[10008]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No user in request context."},[10009]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No app in request context."},[10010]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No workspace in request context."},[10011]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No manifest in request context."},[10012]:{httpCode:a.INTERNAL_SERVER_ERROR,message:"No user permissions in request context."},[11e3]:{httpCode:a.UNAUTHORIZED,message:"No public key available to decode JWT."},[11001]:{httpCode:a.UNAUTHORIZED,message:"No authorization header found."},[12e3]:{httpCode:a.UNAUTHORIZED,message:"No object id found in user claims."}};function Z(e,t){return Object.entries(t).reduce((s,[r,o])=>s.replaceAll(`{{${r}}}`,o),e)}class I extends L{constructor(t,s={}){const{message:r,httpCode:o}=Y[t];super(Z(r,s),o),this.code=t,this.info=`https://github.com/telia-company/ace-alliance-sdk/wiki/error-codes#${t}`}}let m=class{catch(e,t){const s=t.switchToHttp().getResponse(),r=e.getStatus();s.status(r).json({httpCode:r,code:e.code,info:e.info,message:e.message})}};m=J([q(I)],m);var G=Object.defineProperty,Q=Object.getOwnPropertyDescriptor,y=(e,t,s,r)=>{for(var o=r>1?void 0:r?Q(t,s):t,n=e.length-1,i;n>=0;n--)(i=e[n])&&(o=(r?i(t,s,o):i(o))||o);return r&&o&&G(t,s,o),o},F=(e,t)=>(s,r)=>t(s,r,e);let c=class{constructor(e){this.logger=e,this.log=(...t)=>this.logger.info(...t),this.trace=(...t)=>this.logger.trace(...t),this.debug=(...t)=>this.logger.debug(...t),this.info=(...t)=>this.logger.info(...t),this.warn=(...t)=>this.logger.warn(...t),this.error=(...t)=>this.logger.error(...t),this.fatal=(...t)=>this.logger.fatal(...t)}};c=y([P(),F(0,S())],c);let g=class{static forRoot({logLevel:e,redact:t=!0}={}){return{module:g,controllers:[],imports:[b.forRootAsync({imports:[U],inject:[k],useFactory:async s=>({pinoHttp:{level:e||s.get(l.ServiceLogLevel)||"silent",redact:t?["authorization","headers.authorization","req.headers.authorization","req.remoteAddress","req.remotePort"]:[],transport:{target:"pino-pretty",options:{colorize:!0,colorizeObjects:!0}}}})})],global:!0,providers:[c],exports:[]}}};g=y([w({providers:[c],exports:[c]})],g);function X(e,t=!1){return{name:"vite-plugin-css-import",apply:"build",enforce:"post",writeBundle:async(s,r)=>{const o=Object.keys(r).filter(p=>p.endsWith(".css"));if(!o.length)return;const n=h(process.cwd(),`${e}-temp.js`),i=h(process.cwd(),`${e}.js`),T=o.reduce((p,R)=>{if(t){const _=M(i),O=K(_,R);return`${p}import "${O.replaceAll("\\","/")}";
|
|
4
|
+
`}return`${p}import "./${R}";
|
|
5
|
+
`},""),d=j(n);d.write(T,"utf8");const v=H(i);await $(v,d),D(i,{force:!0}),V(n,i),d.end()}}}export{I as AllianceException,m as AllianceExceptionFilter,u as AllianceHeaders,C as DatabasesErrorCodes,f as GatewayErrorCodes,g as LoggerModule,c as LoggerService,A as PortalErrorCodes,l as SharedConfigKeys,N as createBearerToken,W as createSystemUserToken,E as getPrivateKey,X as viteCssImportPlugin};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { DynamicModule } from '@nestjs/common';
|
|
2
|
+
import { PinoLogger } from 'nestjs-pino';
|
|
3
|
+
export declare class LoggerService {
|
|
4
|
+
private readonly logger;
|
|
5
|
+
constructor(logger: PinoLogger);
|
|
6
|
+
log: PinoLogger['info'];
|
|
7
|
+
trace: PinoLogger['trace'];
|
|
8
|
+
debug: PinoLogger['debug'];
|
|
9
|
+
info: PinoLogger['info'];
|
|
10
|
+
warn: PinoLogger['warn'];
|
|
11
|
+
error: PinoLogger['error'];
|
|
12
|
+
fatal: PinoLogger['fatal'];
|
|
13
|
+
}
|
|
14
|
+
type ModuleSettings = {
|
|
15
|
+
logLevel?: string;
|
|
16
|
+
redact?: boolean;
|
|
17
|
+
};
|
|
18
|
+
export declare class LoggerModule {
|
|
19
|
+
static forRoot({ logLevel, redact }?: ModuleSettings): DynamicModule;
|
|
20
|
+
}
|
|
21
|
+
export {};
|
package/package.json
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@telia-ace/alliance-internal-node-utilities",
|
|
3
|
+
"version": "1.0.1-next.0",
|
|
4
|
+
"description": "Utilities used internally by packages developed by team Alliance.",
|
|
5
|
+
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
|
+
"author": "Telia Company AB",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"files": [
|
|
11
|
+
"LICENSE.txt",
|
|
12
|
+
"README.md",
|
|
13
|
+
"CHANGELOG.md",
|
|
14
|
+
"dist"
|
|
15
|
+
],
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@nestjs/common": "^9.4.0",
|
|
18
|
+
"@nestjs/config": "^2.3.1",
|
|
19
|
+
"jsonwebtoken": "^9.0.0",
|
|
20
|
+
"nestjs-pino": "^3.2.0",
|
|
21
|
+
"pino-http": "^8.3.3",
|
|
22
|
+
"pino-pretty": "^10.0.0"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@types/express": "^4.17.17",
|
|
26
|
+
"@types/jsonwebtoken": "^9.0.2",
|
|
27
|
+
"@types/node": "^20.1.2",
|
|
28
|
+
"vite": "^4.3.5",
|
|
29
|
+
"unbuild": "^1.2.1"
|
|
30
|
+
},
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"access": "public"
|
|
33
|
+
},
|
|
34
|
+
"scripts": {
|
|
35
|
+
"build:dev": "tsc && unbuild --mode development",
|
|
36
|
+
"build:prod": "rimraf dist && tsc && unbuild --mode prod",
|
|
37
|
+
"build:test": "rimraf dist && tsc && unbuild --mode test",
|
|
38
|
+
"build:docker": "unbuild",
|
|
39
|
+
"dev": "tsc && unbuild --mode development --watch"
|
|
40
|
+
}
|
|
41
|
+
}
|