Cleanup and applied learnings
Some checks failed
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build was killed

This commit is contained in:
2023-05-24 13:07:42 -04:00
parent f2dce58f5e
commit 6ef8c553ce
8 changed files with 954 additions and 38 deletions

View File

@@ -7,9 +7,15 @@ workspace:
steps:
- name: yarn install
image: node:latest
image: node:20-bullseye-slim
environment:
YARN_VERSION: 3.5.0
commands:
- yarn set version stable
- yarn install
volumes:
- name: yarnrc
path: /drone/auth/.yarnrc.yml
- name: Code Style Checks
image: node:latest
commands:
@@ -40,7 +46,7 @@ steps:
- name: Build
image: node:latest
commands:
- yarn build
- yarn build:production
- name: Send Build Status Notifications
image: plugins/webhook
settings:
@@ -57,6 +63,11 @@ steps:
- success
- failure
volumes:
- name: yarnrc
host:
path: /volume1/docker/.yarnrc.yml
trigger:
branch:
- main
@@ -74,22 +85,24 @@ workspace:
steps:
- name: Build Package
image: node:latest
commands:
- yarn install
- yarn build
- name: Publish NPM
image: node:20-alpine
failure: ignore
image: node:20-bullseye-slim
environment:
NPM_TOKEN:
from_secret: reg_token
YARN_VERSION: 3.5.0
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:
- name: npmrc
path: /drone/auth/.npmrc
secrets: [reg_token]
- name: yarnrc
path: /drone/auth/.yarnrc.yml
- name: Report NPM Publish Status
image: plugins/webhook
settings:
@@ -111,7 +124,6 @@ steps:
auto_tag: true
repo: git.mifi.dev/mifi/auth-service
registry: git.mifi.dev
debug: true
ssh-agent-key:
from_secret: reg_token
username: <token>
@@ -144,6 +156,9 @@ volumes:
- name: npmrc
host:
path: /volume1/docker/beethoven/labs-auth/.npmrc
- name: yarnrc
host:
path: /volume1/docker/.yarnrc.yml
depends_on:
- Test Pipeline

View File

@@ -1,9 +1,12 @@
.build.yarnrc.yml
.drone.yml
.prettierrc
.env*
.eslintrc*
.npmrc
.prettierrc*
.yarnrc.yml
babel.config.*
jest.config.*
src
tsconfig.json
tsconfig*.json
tslint.json

873
.yarn/releases/yarn-3.5.1.cjs vendored Executable file

File diff suppressed because one or more lines are too long

View File

@@ -1 +1,3 @@
nodeLinker: node-modules
yarnPath: .yarn/releases/yarn-3.5.1.cjs

View File

@@ -5,13 +5,13 @@
"license": "MIT",
"scripts": {
"build": "tsc",
"build:production": "tsc -p .",
"build:production": "tsc -p ./tsconfig.production.json",
"format": "prettier:fix && lint:fix",
"lint": "eslint --ext .ts,.tsx src/",
"lint:fix": "eslint --fix --ext .ts,.tsx src/",
"prettier": "prettier --check '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",
"start": "nodemon",
"test": "jest --passWithNoTests"
@@ -81,6 +81,7 @@
"description": "",
"repository": {
"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"
}

View File

@@ -2,11 +2,16 @@
"extends": "@tsconfig/node16/tsconfig.json",
"compilerOptions": {
"allowSyntheticDefaultImports": true,
"declaration": true,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"noImplicitAny": true,
"outDir": "./lib/",
"rootDirs": ["src"],
"sourceMap": true
}
"outDir": "lib/",
"rootDirs": ["./", "src/"],
"strict": true,
"esModuleInterop": true,
"sourceMap": true,
"removeComments": false
},
"include": ["src"]
}

17
tsconfig.production.json Normal file
View 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"]
}

View File

@@ -2698,14 +2698,14 @@ __metadata:
linkType: hard
"@mifi/auth-db@npm:^1.x.x":
version: 1.0.4
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"
version: 1.0.5
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:
"@mifi/services-common": 1.x.x
dotenv: ^16.0.3
jsonwebtoken: ^9.0.0
mongoose: ^6.9.2
checksum: 7d89e1e0311e337545526d7362381011a1ef65d6051d7247a684272b17b0e9291dbbb30b4962e2c316af1c28a8ec1df8a1f199e589c929ce8984585eb4547e5a
checksum: af58e75e757ffe0a75fd5c924f4ee81cdf736ce0cecd5b76608f13144435776b5ce51eda24fd5646cef990bd5b9247433e35978dfd268fa33b51fdd6ba0c980e
languageName: node
linkType: hard
@@ -2775,9 +2775,9 @@ __metadata:
linkType: soft
"@mifi/services-common@npm:1.x.x, @mifi/services-common@npm:^1.x.x":
version: 1.0.1
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"
checksum: b8ba60584616826615bf4600dc45a0fbe390a2ff5c1a8238e0f9e016fd2ff069e4c6fd96d4d02af7eb41671436a58ab69e6017301a509a175aeff08d7b056fc2
version: 1.0.6
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: 22e9aa2714d088a286fc76ddf88c89698764f966ea5f3a208da45df893ec8a0c4e43848f4ba59746cd96b16880dbfa9f3a88610e43aa3825cbdb78afc11f59dc
languageName: node
linkType: hard
@@ -2888,8 +2888,8 @@ __metadata:
linkType: hard
"@pkgr/utils@npm:^2.3.1":
version: 2.4.0
resolution: "@pkgr/utils@npm:2.4.0"
version: 2.4.1
resolution: "@pkgr/utils@npm:2.4.1"
dependencies:
cross-spawn: ^7.0.3
fast-glob: ^3.2.12
@@ -2897,7 +2897,7 @@ __metadata:
open: ^9.1.0
picocolors: ^1.0.0
tslib: ^2.5.0
checksum: 2ed93a92fd58d612c7a7d04f91ce50c967d2e2d5c4f63802f62a882fcb7d91208cf89640bb3baad10ef7d42bea1e196fba956e7e36a68e9f94d2738e8974a24a
checksum: 654682860272541a40485b01e0763b155ec31faeba85b2c51e38b59c4ff1f8918c37b87b5ecbda3ff482d8486eba086e92b991fe4a8ed62efbbbdf83c0f64409
languageName: node
linkType: hard
@@ -5004,12 +5004,12 @@ __metadata:
linkType: hard
"enhanced-resolve@npm:^5.12.0":
version: 5.14.0
resolution: "enhanced-resolve@npm:5.14.0"
version: 5.14.1
resolution: "enhanced-resolve@npm:5.14.1"
dependencies:
graceful-fs: ^4.2.4
tapable: ^2.2.0
checksum: fff1aaebbf376371e5df4502e111967f6247c37611ad3550e4e7fca657f6dcb29ef7ffe88bf14e5010b78997f1ddd984a8db97af87ee0a5477771398fd326f5b
checksum: ad2a31928b6649eed40d364838449587f731baa63863e83d2629bebaa8be1eabac18b90f89c1784bc805b0818363e99b22547159edd485d7e5ccf18cdc640642
languageName: node
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>":
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:
tsc: bin/tsc
tsserver: bin/tsserver
checksum: ab417a2f398380c90a6cf5a5f74badd17866adf57f1165617d6a551f059c3ba0a3e4da0d147b3ac5681db9ac76a303c5876394b13b3de75fdd5b1eaa06181c9d
checksum: 1f8f3b6aaea19f0f67cba79057674ba580438a7db55057eb89cc06950483c5d632115c14077f6663ea76fd09fce3c190e6414bb98582ec80aa5a4eaf345d5b68
languageName: node
linkType: hard