Cleanup and applied learnings
This commit is contained in:
43
.drone.yml
43
.drone.yml
@@ -7,9 +7,15 @@ workspace:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: yarn install
|
- name: yarn install
|
||||||
image: node:latest
|
image: node:20-bullseye-slim
|
||||||
|
environment:
|
||||||
|
YARN_VERSION: 3.5.0
|
||||||
commands:
|
commands:
|
||||||
|
- yarn set version stable
|
||||||
- yarn install
|
- yarn install
|
||||||
|
volumes:
|
||||||
|
- name: yarnrc
|
||||||
|
path: /drone/auth/.yarnrc.yml
|
||||||
- name: Code Style Checks
|
- name: Code Style Checks
|
||||||
image: node:latest
|
image: node:latest
|
||||||
commands:
|
commands:
|
||||||
@@ -40,7 +46,7 @@ steps:
|
|||||||
- name: Build
|
- name: Build
|
||||||
image: node:latest
|
image: node:latest
|
||||||
commands:
|
commands:
|
||||||
- yarn build
|
- yarn build:production
|
||||||
- name: Send Build Status Notifications
|
- name: Send Build Status Notifications
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
settings:
|
settings:
|
||||||
@@ -57,6 +63,11 @@ steps:
|
|||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: yarnrc
|
||||||
|
host:
|
||||||
|
path: /volume1/docker/.yarnrc.yml
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
- main
|
- main
|
||||||
@@ -74,22 +85,24 @@ workspace:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Build Package
|
- name: Build Package
|
||||||
image: node:latest
|
image: node:20-bullseye-slim
|
||||||
commands:
|
|
||||||
- yarn install
|
|
||||||
- yarn build
|
|
||||||
- name: Publish NPM
|
|
||||||
image: node:20-alpine
|
|
||||||
failure: ignore
|
|
||||||
environment:
|
environment:
|
||||||
NPM_TOKEN:
|
YARN_VERSION: 3.5.0
|
||||||
from_secret: reg_token
|
|
||||||
commands:
|
commands:
|
||||||
- yarn publish -t ${DRONE_TAG}
|
- yarn set version stable
|
||||||
|
- yarn install
|
||||||
|
volumes:
|
||||||
|
- name: yarnrc
|
||||||
|
path: /drone/auth/.yarnrc.yml
|
||||||
|
- name: Publish NPM
|
||||||
|
image: node:20-bullseye-slim
|
||||||
|
commands:
|
||||||
|
- yarn npm publish
|
||||||
volumes:
|
volumes:
|
||||||
- name: npmrc
|
- name: npmrc
|
||||||
path: /drone/auth/.npmrc
|
path: /drone/auth/.npmrc
|
||||||
secrets: [reg_token]
|
- name: yarnrc
|
||||||
|
path: /drone/auth/.yarnrc.yml
|
||||||
- name: Report NPM Publish Status
|
- name: Report NPM Publish Status
|
||||||
image: plugins/webhook
|
image: plugins/webhook
|
||||||
settings:
|
settings:
|
||||||
@@ -111,7 +124,6 @@ steps:
|
|||||||
auto_tag: true
|
auto_tag: true
|
||||||
repo: git.mifi.dev/mifi/auth-service
|
repo: git.mifi.dev/mifi/auth-service
|
||||||
registry: git.mifi.dev
|
registry: git.mifi.dev
|
||||||
debug: true
|
|
||||||
ssh-agent-key:
|
ssh-agent-key:
|
||||||
from_secret: reg_token
|
from_secret: reg_token
|
||||||
username: <token>
|
username: <token>
|
||||||
@@ -144,6 +156,9 @@ volumes:
|
|||||||
- name: npmrc
|
- name: npmrc
|
||||||
host:
|
host:
|
||||||
path: /volume1/docker/beethoven/labs-auth/.npmrc
|
path: /volume1/docker/beethoven/labs-auth/.npmrc
|
||||||
|
- name: yarnrc
|
||||||
|
host:
|
||||||
|
path: /volume1/docker/.yarnrc.yml
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- Test Pipeline
|
- Test Pipeline
|
||||||
|
|||||||
@@ -1,9 +1,12 @@
|
|||||||
.build.yarnrc.yml
|
.build.yarnrc.yml
|
||||||
.drone.yml
|
.drone.yml
|
||||||
.prettierrc
|
.env*
|
||||||
|
.eslintrc*
|
||||||
|
.npmrc
|
||||||
|
.prettierrc*
|
||||||
.yarnrc.yml
|
.yarnrc.yml
|
||||||
babel.config.*
|
babel.config.*
|
||||||
jest.config.*
|
jest.config.*
|
||||||
src
|
src
|
||||||
tsconfig.json
|
tsconfig*.json
|
||||||
tslint.json
|
tslint.json
|
||||||
|
|||||||
873
.yarn/releases/yarn-3.5.1.cjs
vendored
Executable file
873
.yarn/releases/yarn-3.5.1.cjs
vendored
Executable file
File diff suppressed because one or more lines are too long
@@ -1 +1,3 @@
|
|||||||
nodeLinker: node-modules
|
nodeLinker: node-modules
|
||||||
|
|
||||||
|
yarnPath: .yarn/releases/yarn-3.5.1.cjs
|
||||||
|
|||||||
@@ -5,13 +5,13 @@
|
|||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tsc",
|
||||||
"build:production": "tsc -p .",
|
"build:production": "tsc -p ./tsconfig.production.json",
|
||||||
"format": "prettier:fix && lint:fix",
|
"format": "prettier:fix && lint:fix",
|
||||||
"lint": "eslint --ext .ts,.tsx src/",
|
"lint": "eslint --ext .ts,.tsx src/",
|
||||||
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
|
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
|
||||||
"prettier": "prettier --check 'src/**/*.ts'",
|
"prettier": "prettier --check 'src/**/*.ts'",
|
||||||
"prettier:fix": "prettier --write 'src/**/*.ts'",
|
"prettier:fix": "prettier --write 'src/**/*.ts'",
|
||||||
"serve-dev": "node-ts src/index.ts",
|
"serve-dev": "ts-node src/index.ts",
|
||||||
"serve": "node lib/index.js",
|
"serve": "node lib/index.js",
|
||||||
"start": "nodemon",
|
"start": "nodemon",
|
||||||
"test": "jest --passWithNoTests"
|
"test": "jest --passWithNoTests"
|
||||||
@@ -81,6 +81,7 @@
|
|||||||
"description": "",
|
"description": "",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://git.mifi.dev/mifi/auth-api.git"
|
"url": "https://git.mifi.dev/mifi/auth-service.git"
|
||||||
}
|
},
|
||||||
|
"packageManager": "yarn@3.5.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,16 @@
|
|||||||
"extends": "@tsconfig/node16/tsconfig.json",
|
"extends": "@tsconfig/node16/tsconfig.json",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowSyntheticDefaultImports": true,
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"declaration": true,
|
||||||
"experimentalDecorators": true,
|
"experimentalDecorators": true,
|
||||||
"emitDecoratorMetadata": true,
|
"emitDecoratorMetadata": true,
|
||||||
"noImplicitAny": true,
|
"noImplicitAny": true,
|
||||||
"outDir": "./lib/",
|
"outDir": "lib/",
|
||||||
"rootDirs": ["src"],
|
"rootDirs": ["./", "src/"],
|
||||||
"sourceMap": true
|
"strict": true,
|
||||||
}
|
"esModuleInterop": true,
|
||||||
|
"sourceMap": true,
|
||||||
|
"removeComments": false
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
}
|
}
|
||||||
|
|||||||
17
tsconfig.production.json
Normal file
17
tsconfig.production.json
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": "@tsconfig/node16/tsconfig.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"allowSyntheticDefaultImports": true,
|
||||||
|
"declaration": true,
|
||||||
|
"experimentalDecorators": true,
|
||||||
|
"emitDecoratorMetadata": true,
|
||||||
|
"noImplicitAny": true,
|
||||||
|
"outDir": "lib/",
|
||||||
|
"rootDirs": ["./", "src/"],
|
||||||
|
"strict": true,
|
||||||
|
"esModuleInterop": true,
|
||||||
|
"sourceMap": false,
|
||||||
|
"removeComments": true
|
||||||
|
},
|
||||||
|
"include": ["src"]
|
||||||
|
}
|
||||||
28
yarn.lock
28
yarn.lock
@@ -2698,14 +2698,14 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@mifi/auth-db@npm:^1.x.x":
|
"@mifi/auth-db@npm:^1.x.x":
|
||||||
version: 1.0.4
|
version: 1.0.5
|
||||||
resolution: "@mifi/auth-db@npm:1.0.4::__archiveUrl=https%3A%2F%2Fgit.mifi.dev%2Fapi%2Fpackages%2Fmifi%2Fnpm%2F%2540mifi%252Fauth-db%2F-%2F1.0.4%2Fauth-db-1.0.4.tgz"
|
resolution: "@mifi/auth-db@npm:1.0.5::__archiveUrl=https%3A%2F%2Fgit.mifi.dev%2Fapi%2Fpackages%2Fmifi%2Fnpm%2F%2540mifi%252Fauth-db%2F-%2F1.0.5%2Fauth-db-1.0.5.tgz"
|
||||||
dependencies:
|
dependencies:
|
||||||
"@mifi/services-common": 1.x.x
|
"@mifi/services-common": 1.x.x
|
||||||
dotenv: ^16.0.3
|
dotenv: ^16.0.3
|
||||||
jsonwebtoken: ^9.0.0
|
jsonwebtoken: ^9.0.0
|
||||||
mongoose: ^6.9.2
|
mongoose: ^6.9.2
|
||||||
checksum: 7d89e1e0311e337545526d7362381011a1ef65d6051d7247a684272b17b0e9291dbbb30b4962e2c316af1c28a8ec1df8a1f199e589c929ce8984585eb4547e5a
|
checksum: af58e75e757ffe0a75fd5c924f4ee81cdf736ce0cecd5b76608f13144435776b5ce51eda24fd5646cef990bd5b9247433e35978dfd268fa33b51fdd6ba0c980e
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -2775,9 +2775,9 @@ __metadata:
|
|||||||
linkType: soft
|
linkType: soft
|
||||||
|
|
||||||
"@mifi/services-common@npm:1.x.x, @mifi/services-common@npm:^1.x.x":
|
"@mifi/services-common@npm:1.x.x, @mifi/services-common@npm:^1.x.x":
|
||||||
version: 1.0.1
|
version: 1.0.6
|
||||||
resolution: "@mifi/services-common@npm:1.0.1::__archiveUrl=https%3A%2F%2Fgit.mifi.dev%2Fapi%2Fpackages%2Fmifi%2Fnpm%2F%2540mifi%252Fservices-common%2F-%2F1.0.1%2Fservices-common-1.0.1.tgz"
|
resolution: "@mifi/services-common@npm:1.0.6::__archiveUrl=https%3A%2F%2Fgit.mifi.dev%2Fapi%2Fpackages%2Fmifi%2Fnpm%2F%2540mifi%252Fservices-common%2F-%2F1.0.6%2Fservices-common-1.0.6.tgz"
|
||||||
checksum: b8ba60584616826615bf4600dc45a0fbe390a2ff5c1a8238e0f9e016fd2ff069e4c6fd96d4d02af7eb41671436a58ab69e6017301a509a175aeff08d7b056fc2
|
checksum: 22e9aa2714d088a286fc76ddf88c89698764f966ea5f3a208da45df893ec8a0c4e43848f4ba59746cd96b16880dbfa9f3a88610e43aa3825cbdb78afc11f59dc
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -2888,8 +2888,8 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"@pkgr/utils@npm:^2.3.1":
|
"@pkgr/utils@npm:^2.3.1":
|
||||||
version: 2.4.0
|
version: 2.4.1
|
||||||
resolution: "@pkgr/utils@npm:2.4.0"
|
resolution: "@pkgr/utils@npm:2.4.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
cross-spawn: ^7.0.3
|
cross-spawn: ^7.0.3
|
||||||
fast-glob: ^3.2.12
|
fast-glob: ^3.2.12
|
||||||
@@ -2897,7 +2897,7 @@ __metadata:
|
|||||||
open: ^9.1.0
|
open: ^9.1.0
|
||||||
picocolors: ^1.0.0
|
picocolors: ^1.0.0
|
||||||
tslib: ^2.5.0
|
tslib: ^2.5.0
|
||||||
checksum: 2ed93a92fd58d612c7a7d04f91ce50c967d2e2d5c4f63802f62a882fcb7d91208cf89640bb3baad10ef7d42bea1e196fba956e7e36a68e9f94d2738e8974a24a
|
checksum: 654682860272541a40485b01e0763b155ec31faeba85b2c51e38b59c4ff1f8918c37b87b5ecbda3ff482d8486eba086e92b991fe4a8ed62efbbbdf83c0f64409
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -5004,12 +5004,12 @@ __metadata:
|
|||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"enhanced-resolve@npm:^5.12.0":
|
"enhanced-resolve@npm:^5.12.0":
|
||||||
version: 5.14.0
|
version: 5.14.1
|
||||||
resolution: "enhanced-resolve@npm:5.14.0"
|
resolution: "enhanced-resolve@npm:5.14.1"
|
||||||
dependencies:
|
dependencies:
|
||||||
graceful-fs: ^4.2.4
|
graceful-fs: ^4.2.4
|
||||||
tapable: ^2.2.0
|
tapable: ^2.2.0
|
||||||
checksum: fff1aaebbf376371e5df4502e111967f6247c37611ad3550e4e7fca657f6dcb29ef7ffe88bf14e5010b78997f1ddd984a8db97af87ee0a5477771398fd326f5b
|
checksum: ad2a31928b6649eed40d364838449587f731baa63863e83d2629bebaa8be1eabac18b90f89c1784bc805b0818363e99b22547159edd485d7e5ccf18cdc640642
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@@ -9508,11 +9508,11 @@ __metadata:
|
|||||||
|
|
||||||
"typescript@patch:typescript@^4.5.4#~builtin<compat/typescript>, typescript@patch:typescript@^4.9.5#~builtin<compat/typescript>":
|
"typescript@patch:typescript@^4.5.4#~builtin<compat/typescript>, typescript@patch:typescript@^4.9.5#~builtin<compat/typescript>":
|
||||||
version: 4.9.5
|
version: 4.9.5
|
||||||
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=23ec76"
|
resolution: "typescript@patch:typescript@npm%3A4.9.5#~builtin<compat/typescript>::version=4.9.5&hash=289587"
|
||||||
bin:
|
bin:
|
||||||
tsc: bin/tsc
|
tsc: bin/tsc
|
||||||
tsserver: bin/tsserver
|
tsserver: bin/tsserver
|
||||||
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
|
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user