11 Commits

Author SHA1 Message Date
86d7fdf2b0 And again..
All checks were successful
continuous-integration/drone/pr Build is passing
2023-05-24 11:13:35 -04:00
ced18d6dea This lockfile...
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 11:08:09 -04:00
7da3c37447 Hmmm...
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 11:07:02 -04:00
a932e09998 try with a fresh yarn.lock
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 11:03:12 -04:00
81941faea0 Try try again
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 11:01:03 -04:00
5c973b9010 Hmmm... come on drone...
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 10:51:54 -04:00
b72721dc69 Prettier!
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 10:46:41 -04:00
da3f895777 Prettier...
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 10:33:06 -04:00
b8102fb291 Oops... paths.
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 10:31:30 -04:00
2ae97bba14 Restructuring the folders
Some checks failed
continuous-integration/drone/pr Build is failing
2023-05-24 10:23:44 -04:00
a475678dfa Added drone pipeline 2023-05-23 15:40:11 -04:00
14 changed files with 1209 additions and 22 deletions

135
.drone.yml Normal file
View File

@@ -0,0 +1,135 @@
kind: pipeline
type: docker
name: Test Pipeline
workspace:
path: /drone/auth
steps:
- name: yarn install
image: node:latest
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:
- yarn prettier
- name: Lint
image: node:latest
commands:
- yarn lint
- name: Unit Tests
image: node:latest
commands:
- yarn test
- name: Send Test Status Notification
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - Build # {{ build.number }}] Code Quality Checks {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
- name: Build
image: node:latest
commands:
- yarn build
- name: Send Build Status Notifications
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/9p65zpagctgkmndo8nwwm4199r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - Build # {{ build.number }}] Build package {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
volumes:
- name: yarnrc
host:
path: /volume1/docker/.yarnrc.yml
trigger:
branch:
- main
- develop
event:
- pull_request
---
kind: pipeline
type: docker
name: Publish Pipeline
workspace:
path: /drone/auth
steps:
- name: Build
image: node:latest
environment:
YARN_VERSION: 3.5.0
commands:
- yarn set version stable
- yarn install
- yarn build
volumes:
- name: yarnrc
path: /drone/auth/.yarnrc.yml
- name: Publish NPM
image: node:20-alpine
failure: ignore
commands:
- yarn npm publish
volumes:
- name: npmrc
path: /drone/auth/.npmrc
- name: Report NPM Publish Status
image: plugins/webhook
settings:
urls: https://lab.mifi.dev/hooks/ccw34hdf7tgbjmzp96nptn938r
content_type: application/json
template: |
{
"icon_url":"https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/120/apple/198/freezing-face_1f976.png",
"text": "[{{ repo.name }} - New npm package release {{tag}} from # {{ build.number }}] Deploy {{ build.status }} {{#success build.status}}:tada:{{else}}:poop:{{/success}}",
"username":"DroneBot"
}
when:
status:
- success
- failure
volumes:
- name: npmrc
host:
path: /volume1/docker/beethoven/labs-auth/.npmrc
- name: yarnrc
host:
path: /volume1/docker/.yarnrc.yml
depends_on:
- Test Pipeline
trigger:
event:
- tag

19
.eslintrc.js Normal file
View File

@@ -0,0 +1,19 @@
/* eslint-env node */
module.exports = {
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:import/errors',
'plugin:prettier/recommended',
'prettier',
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts', '.tsx'],
},
'import/resolver': 'typescript',
},
root: true,
};

3
.gitignore vendored
View File

@@ -130,3 +130,6 @@ dist
.yarn/install-state.gz
.pnp.*
# Project
lib/
.yarnrc.yml

9
.npmignore Normal file
View File

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

7
.prettierrc.js Normal file
View File

@@ -0,0 +1,7 @@
module.exports = {
parser: 'typescript',
printWidth: 120,
trailingComma: 'all',
tabWidth: 4,
singleQuote: true,
};

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

@@ -1,14 +1,16 @@
{
"name": "@mifi/services-common",
"version": "1.0.1",
"version": "1.0.2",
"author": "mifi (Mike Fitzpatrick)",
"license": "MIT",
"scripts": {
"build": "tsc",
"build:production": "tsc -p .",
"format": "prettier:fix && lint:fix",
"lint": "eslint --ext .ts,.tsx lib/",
"lint:fix": "eslint --fix --ext .ts,.tsx lib/",
"prettier": "prettier --check 'lib/**/*.ts'",
"prettier:fix": "prettier --write 'lib/**/*.ts'",
"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'",
"test": "jest --passWithNoTests"
},
"devDependencies": {
@@ -32,11 +34,13 @@
"prettier": "^2.8.4",
"prettier-eslint": "^15.0.1",
"prettier-eslint-cli": "^7.1.0",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
},
"description": "",
"repository": {
"type": "git",
"url": "https://git.mifi.dev/mifi/services-common.git"
}
},
"packageManager": "yarn@3.5.1"
}

167
yarn.lock
View File

@@ -1336,6 +1336,15 @@ __metadata:
languageName: node
linkType: hard
"@cspotcode/source-map-support@npm:^0.8.0":
version: 0.8.1
resolution: "@cspotcode/source-map-support@npm:0.8.1"
dependencies:
"@jridgewell/trace-mapping": 0.3.9
checksum: 5718f267085ed8edb3e7ef210137241775e607ee18b77d95aa5bd7514f47f5019aa2d82d96b3bf342ef7aa890a346fa1044532ff7cc3009e7d24fce3ce6200fa
languageName: node
linkType: hard
"@eslint-community/eslint-utils@npm:^4.2.0":
version: 4.4.0
resolution: "@eslint-community/eslint-utils@npm:4.4.0"
@@ -1678,6 +1687,13 @@ __metadata:
languageName: node
linkType: hard
"@jridgewell/resolve-uri@npm:^3.0.3":
version: 3.1.1
resolution: "@jridgewell/resolve-uri@npm:3.1.1"
checksum: f5b441fe7900eab4f9155b3b93f9800a916257f4e8563afbcd3b5a5337b55e52bd8ae6735453b1b745457d9f6cdb16d74cd6220bbdd98cf153239e13f6cbb653
languageName: node
linkType: hard
"@jridgewell/set-array@npm:^1.0.1":
version: 1.1.2
resolution: "@jridgewell/set-array@npm:1.1.2"
@@ -1699,6 +1715,16 @@ __metadata:
languageName: node
linkType: hard
"@jridgewell/trace-mapping@npm:0.3.9":
version: 0.3.9
resolution: "@jridgewell/trace-mapping@npm:0.3.9"
dependencies:
"@jridgewell/resolve-uri": ^3.0.3
"@jridgewell/sourcemap-codec": ^1.4.10
checksum: d89597752fd88d3f3480845691a05a44bd21faac18e2185b6f436c3b0fd0c5a859fbbd9aaa92050c4052caf325ad3e10e2e1d1b64327517471b7d51babc0ddef
languageName: node
linkType: hard
"@jridgewell/trace-mapping@npm:^0.3.12, @jridgewell/trace-mapping@npm:^0.3.15, @jridgewell/trace-mapping@npm:^0.3.17, @jridgewell/trace-mapping@npm:^0.3.9":
version: 0.3.18
resolution: "@jridgewell/trace-mapping@npm:0.3.18"
@@ -1779,6 +1805,7 @@ __metadata:
prettier: ^2.8.4
prettier-eslint: ^15.0.1
prettier-eslint-cli: ^7.1.0
ts-node: ^10.9.1
typescript: ^4.9.5
languageName: unknown
linkType: soft
@@ -1831,8 +1858,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
@@ -1840,7 +1867,7 @@ __metadata:
open: ^9.1.0
picocolors: ^1.0.0
tslib: ^2.5.0
checksum: 2ed93a92fd58d612c7a7d04f91ce50c967d2e2d5c4f63802f62a882fcb7d91208cf89640bb3baad10ef7d42bea1e196fba956e7e36a68e9f94d2738e8974a24a
checksum: 654682860272541a40485b01e0763b155ec31faeba85b2c51e38b59c4ff1f8918c37b87b5ecbda3ff482d8486eba086e92b991fe4a8ed62efbbbdf83c0f64409
languageName: node
linkType: hard
@@ -1898,7 +1925,28 @@ __metadata:
languageName: node
linkType: hard
"@tsconfig/node16@npm:^1.0.4":
"@tsconfig/node10@npm:^1.0.7":
version: 1.0.9
resolution: "@tsconfig/node10@npm:1.0.9"
checksum: a33ae4dc2a621c0678ac8ac4bceb8e512ae75dac65417a2ad9b022d9b5411e863c4c198b6ba9ef659e14b9fb609bbec680841a2e84c1172df7a5ffcf076539df
languageName: node
linkType: hard
"@tsconfig/node12@npm:^1.0.7":
version: 1.0.11
resolution: "@tsconfig/node12@npm:1.0.11"
checksum: 5ce29a41b13e7897a58b8e2df11269c5395999e588b9a467386f99d1d26f6c77d1af2719e407621412520ea30517d718d5192a32403b8dfcc163bf33e40a338a
languageName: node
linkType: hard
"@tsconfig/node14@npm:^1.0.0":
version: 1.0.3
resolution: "@tsconfig/node14@npm:1.0.3"
checksum: 19275fe80c4c8d0ad0abed6a96dbf00642e88b220b090418609c4376e1cef81bf16237bf170ad1b341452feddb8115d8dd2e5acdfdea1b27422071163dc9ba9d
languageName: node
linkType: hard
"@tsconfig/node16@npm:^1.0.2, @tsconfig/node16@npm:^1.0.4":
version: 1.0.4
resolution: "@tsconfig/node16@npm:1.0.4"
checksum: 202319785901f942a6e1e476b872d421baec20cf09f4b266a1854060efbf78cde16a4d256e8bc949d31e6cd9a90f1e8ef8fb06af96a65e98338a2b6b0de0a0ff
@@ -2202,7 +2250,14 @@ __metadata:
languageName: node
linkType: hard
"acorn@npm:^8.8.0":
"acorn-walk@npm:^8.1.1":
version: 8.2.0
resolution: "acorn-walk@npm:8.2.0"
checksum: 1715e76c01dd7b2d4ca472f9c58968516a4899378a63ad5b6c2d668bba8da21a71976c14ec5f5b75f887b6317c4ae0b897ab141c831d741dc76024d8745f1ad1
languageName: node
linkType: hard
"acorn@npm:^8.4.1, acorn@npm:^8.8.0":
version: 8.8.2
resolution: "acorn@npm:8.8.2"
bin:
@@ -2349,6 +2404,13 @@ __metadata:
languageName: node
linkType: hard
"arg@npm:^4.1.0":
version: 4.1.3
resolution: "arg@npm:4.1.3"
checksum: 544af8dd3f60546d3e4aff084d451b96961d2267d668670199692f8d054f0415d86fc5497d0e641e91546f0aa920e7c29e5250e99fc89f5552a34b5d93b77f43
languageName: node
linkType: hard
"argparse@npm:^1.0.7":
version: 1.0.10
resolution: "argparse@npm:1.0.10"
@@ -2924,6 +2986,13 @@ __metadata:
languageName: node
linkType: hard
"create-require@npm:^1.1.0":
version: 1.1.1
resolution: "create-require@npm:1.1.1"
checksum: a9a1503d4390d8b59ad86f4607de7870b39cad43d929813599a23714831e81c520bddf61bcdd1f8e30f05fd3a2b71ae8538e946eb2786dc65c2bbc520f692eff
languageName: node
linkType: hard
"cross-spawn@npm:^7.0.2, cross-spawn@npm:^7.0.3":
version: 7.0.3
resolution: "cross-spawn@npm:7.0.3"
@@ -3051,6 +3120,13 @@ __metadata:
languageName: node
linkType: hard
"diff@npm:^4.0.1":
version: 4.0.2
resolution: "diff@npm:4.0.2"
checksum: f2c09b0ce4e6b301c221addd83bf3f454c0bc00caa3dd837cf6c127d6edf7223aa2bbe3b688feea110b7f262adbfc845b757c44c8a9f8c0c5b15d8fa9ce9d20d
languageName: node
linkType: hard
"dir-glob@npm:^3.0.1":
version: 3.0.1
resolution: "dir-glob@npm:3.0.1"
@@ -3086,9 +3162,9 @@ __metadata:
linkType: hard
"electron-to-chromium@npm:^1.4.284":
version: 1.4.404
resolution: "electron-to-chromium@npm:1.4.404"
checksum: 40e9ce607877e5d2a0578e78a3bd461ca6574cefb738f2dd82c171fad124c833cb078844947d9d21d6e6cf13a7d9b75b500ef4522c8cc67e99ad47d6b36cf078
version: 1.4.405
resolution: "electron-to-chromium@npm:1.4.405"
checksum: d1cf421eaf63dbd5481bcc4296a94e5db5cf831bdc5cbdad283b4b0d53d8fd87254b64fa6cda88f1cb4789eab012f078c1eed4cbb01c5a34bd0ce657dcfe08c8
languageName: node
linkType: hard
@@ -3123,12 +3199,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
@@ -5217,6 +5293,13 @@ __metadata:
languageName: node
linkType: hard
"make-error@npm:^1.1.1":
version: 1.3.6
resolution: "make-error@npm:1.3.6"
checksum: b86e5e0e25f7f777b77fabd8e2cbf15737972869d852a22b7e73c17623928fccb826d8e46b9951501d3f20e51ad74ba8c59ed584f610526a48f8ccf88aaec402
languageName: node
linkType: hard
"make-fetch-happen@npm:^10.0.3":
version: 10.2.1
resolution: "make-fetch-happen@npm:10.2.1"
@@ -5483,9 +5566,9 @@ __metadata:
linkType: hard
"node-releases@npm:^2.0.8":
version: 2.0.11
resolution: "node-releases@npm:2.0.11"
checksum: ade1c8e19852aa7d7b45691c2708e6275703dd4994b16bc191cdbf66add29ccf87c595ecdb03a39db54a8aaba645f228bccd7d9477e4066f1d97a94f857dae9d
version: 2.0.12
resolution: "node-releases@npm:2.0.12"
checksum: b8c56db82c4642a0f443332b331a4396dae452a2ac5a65c8dbd93ef89ecb2fbb0da9d42ac5366d4764973febadca816cf7587dad492dce18d2a6b2af59cda260
languageName: node
linkType: hard
@@ -6584,6 +6667,44 @@ __metadata:
languageName: node
linkType: hard
"ts-node@npm:^10.9.1":
version: 10.9.1
resolution: "ts-node@npm:10.9.1"
dependencies:
"@cspotcode/source-map-support": ^0.8.0
"@tsconfig/node10": ^1.0.7
"@tsconfig/node12": ^1.0.7
"@tsconfig/node14": ^1.0.0
"@tsconfig/node16": ^1.0.2
acorn: ^8.4.1
acorn-walk: ^8.1.1
arg: ^4.1.0
create-require: ^1.1.0
diff: ^4.0.1
make-error: ^1.1.1
v8-compile-cache-lib: ^3.0.1
yn: 3.1.1
peerDependencies:
"@swc/core": ">=1.2.50"
"@swc/wasm": ">=1.2.50"
"@types/node": "*"
typescript: ">=2.7"
peerDependenciesMeta:
"@swc/core":
optional: true
"@swc/wasm":
optional: true
bin:
ts-node: dist/bin.js
ts-node-cwd: dist/bin-cwd.js
ts-node-esm: dist/bin-esm.js
ts-node-script: dist/bin-script.js
ts-node-transpile-only: dist/bin-transpile.js
ts-script: dist/bin-script-deprecated.js
checksum: 090adff1302ab20bd3486e6b4799e90f97726ed39e02b39e566f8ab674fd5bd5f727f43615debbfc580d33c6d9d1c6b1b3ce7d8e3cca3e20530a145ffa232c35
languageName: node
linkType: hard
"tsconfig-paths@npm:^3.14.1":
version: 3.14.2
resolution: "tsconfig-paths@npm:3.14.2"
@@ -6681,11 +6802,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
@@ -6787,6 +6908,13 @@ __metadata:
languageName: node
linkType: hard
"v8-compile-cache-lib@npm:^3.0.1":
version: 3.0.1
resolution: "v8-compile-cache-lib@npm:3.0.1"
checksum: 78089ad549e21bcdbfca10c08850022b22024cdcc2da9b168bcf5a73a6ed7bf01a9cebb9eac28e03cd23a684d81e0502797e88f3ccd27a32aeab1cfc44c39da0
languageName: node
linkType: hard
"v8-to-istanbul@npm:^9.0.1":
version: 9.1.0
resolution: "v8-to-istanbul@npm:9.1.0"
@@ -7002,6 +7130,13 @@ __metadata:
languageName: node
linkType: hard
"yn@npm:3.1.1":
version: 3.1.1
resolution: "yn@npm:3.1.1"
checksum: 2c487b0e149e746ef48cda9f8bad10fc83693cd69d7f9dcd8be4214e985de33a29c9e24f3c0d6bcf2288427040a8947406ab27f7af67ee9456e6b84854f02dd6
languageName: node
linkType: hard
"yocto-queue@npm:^0.1.0":
version: 0.1.0
resolution: "yocto-queue@npm:0.1.0"