generated from CodrJS/ts-npm-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
DylanBulmer
committed
Apr 9, 2023
1 parent
c539f93
commit da0424c
Showing
6 changed files
with
138 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const GitConfig: { | ||
branch: string; | ||
commit: string; | ||
repo: string; | ||
} = { | ||
branch: process.env.GIT_BRANCH as string, | ||
commit: process.env.GIT_COMMIT as string, | ||
repo: process.env.GIT_REPO as string, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
export const NodeConfig: { | ||
env: string; | ||
version: string; | ||
modules: string[]; | ||
yarnVersion: string; | ||
} = { | ||
env: process.env.NODE_ENV as string, | ||
version: process.env.NODE_VERSION as string, | ||
modules: Object.keys(process.env) | ||
.filter(m => /npm_package_dependencies_/g.test(m)) | ||
.map(m => m.replace(/npm_package_dependencies_/g, "")) | ||
.map(m => | ||
m | ||
.split("_") | ||
.map((p, idx) => | ||
p === "" | ||
? "@" | ||
: idx === m.split("_").length - 1 && m.split("_").length !== 1 | ||
? `/${p}` | ||
: p, | ||
) | ||
.join(""), | ||
), | ||
yarnVersion: process.env.YARN_VERSION as string, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
export interface IOpenAPIServer { | ||
host: string; | ||
description: string; | ||
} | ||
|
||
export const OpenAPIConfig: { | ||
info: { | ||
title: string; | ||
description: string; | ||
}; | ||
servers: [ | ||
IOpenAPIServer, | ||
IOpenAPIServer, | ||
IOpenAPIServer, | ||
IOpenAPIServer, | ||
IOpenAPIServer, | ||
]; | ||
} = { | ||
info: { | ||
title: process.env.OPENAPI_TITLE as string, | ||
description: process.env.OPENAPI_DESC as string, | ||
}, | ||
servers: [ | ||
{ | ||
host: process.env.OPENAPI_SERVER_ONE_HOST as string, | ||
description: process.env.OPENAPI_SERVER_ONE_DESC as string, | ||
}, | ||
{ | ||
host: process.env.OPENAPI_SERVER_TWO_HOST as string, | ||
description: process.env.OPENAPI_SERVER_TWO_DESC as string, | ||
}, | ||
{ | ||
host: process.env.OPENAPI_SERVER_THREE_HOST as string, | ||
description: process.env.OPENAPI_SERVER_THREE_DESC as string, | ||
}, | ||
{ | ||
host: process.env.OPENAPI_SERVER_FOUR_HOST as string, | ||
description: process.env.OPENAPI_SERVER_FOUR_DESC as string, | ||
}, | ||
{ | ||
host: process.env.OPENAPI_SERVER_FIVE_HOST as string, | ||
description: process.env.OPENAPI_SERVER_FIVE_DESC as string, | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters