@mojaloop/database-lib 11.1.0 → 11.1.2
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/.circleci/config.yml +5 -559
- package/.nvmrc +1 -1
- package/CHANGELOG.md +4 -0
- package/CODEOWNERS +1 -1
- package/LICENSE.md +4 -5
- package/audit-ci.jsonc +1 -10
- package/package.json +11 -7
package/.circleci/config.yml
CHANGED
|
@@ -1,565 +1,11 @@
|
|
|
1
|
-
# CircleCI v2.1 Config
|
|
2
1
|
version: 2.1
|
|
3
|
-
|
|
4
|
-
##
|
|
5
|
-
# orbs
|
|
6
|
-
#
|
|
7
|
-
# Orbs used in this pipeline
|
|
8
|
-
##
|
|
2
|
+
setup: true
|
|
9
3
|
orbs:
|
|
10
|
-
|
|
11
|
-
pr-tools: mojaloop/pr-tools@0.1.10 # Ref: https://github.com/mojaloop/ci-config/
|
|
12
|
-
gh: circleci/github-cli@2.2.0
|
|
13
|
-
|
|
14
|
-
##
|
|
15
|
-
# defaults
|
|
16
|
-
#
|
|
17
|
-
# YAML defaults templates, in alphabetical order
|
|
18
|
-
##
|
|
19
|
-
defaults_docker_Dependencies: &defaults_docker_Dependencies |
|
|
20
|
-
apk --no-cache add git
|
|
21
|
-
apk --no-cache add ca-certificates
|
|
22
|
-
apk --no-cache add curl
|
|
23
|
-
apk --no-cache add openssh-client
|
|
24
|
-
apk add --no-cache -t build-dependencies make gcc g++ python3 libtool autoconf automake jq bash
|
|
25
|
-
|
|
26
|
-
defaults_awsCliDependencies: &defaults_awsCliDependencies |
|
|
27
|
-
apk --no-cache add aws-cli
|
|
28
|
-
|
|
29
|
-
defaults_license_scanner: &defaults_license_scanner
|
|
30
|
-
name: Install and set up license-scanner
|
|
31
|
-
command: |
|
|
32
|
-
git clone https://github.com/mojaloop/license-scanner /tmp/license-scanner
|
|
33
|
-
cd /tmp/license-scanner && make build default-files set-up
|
|
34
|
-
|
|
35
|
-
defaults_npm_auth: &defaults_npm_auth
|
|
36
|
-
name: Update NPM registry auth token
|
|
37
|
-
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc
|
|
38
|
-
|
|
39
|
-
defaults_npm_publish_release: &defaults_npm_publish_release
|
|
40
|
-
name: Publish NPM $RELEASE_TAG artifact
|
|
41
|
-
command: |
|
|
42
|
-
source $BASH_ENV
|
|
43
|
-
echo "Publishing tag $RELEASE_TAG"
|
|
44
|
-
npm publish --tag $RELEASE_TAG --access public
|
|
45
|
-
|
|
46
|
-
defaults_export_version_from_package: &defaults_export_version_from_package
|
|
47
|
-
name: Format the changelog into the github release body and get release tag
|
|
48
|
-
command: |
|
|
49
|
-
git diff --no-indent-heuristic main~1 HEAD CHANGELOG.md | sed -n '/^+[^+]/ s/^+//p' > /tmp/changes
|
|
50
|
-
echo 'export RELEASE_CHANGES=`cat /tmp/changes`' >> $BASH_ENV
|
|
51
|
-
echo 'export RELEASE_TAG=`cat package-lock.json | jq -r .version`' >> $BASH_ENV
|
|
52
|
-
|
|
53
|
-
defaults_configure_git: &defaults_configure_git
|
|
54
|
-
name: Configure git
|
|
55
|
-
command: |
|
|
56
|
-
git config user.email ${GIT_CI_EMAIL}
|
|
57
|
-
git config user.name ${GIT_CI_USER}
|
|
58
|
-
|
|
59
|
-
defaults_configure_nvm: &defaults_configure_nvm
|
|
60
|
-
name: Configure NVM
|
|
61
|
-
command: |
|
|
62
|
-
cd $HOME
|
|
63
|
-
|
|
64
|
-
export ENV_DOT_PROFILE=$HOME/.profile
|
|
65
|
-
touch $ENV_DOT_PROFILE
|
|
66
|
-
|
|
67
|
-
echo "1. Export env variable"
|
|
68
|
-
export NVM_DIR="$HOME/.nvm"
|
|
69
|
-
if [ -z "$NVMRC_VERSION" ]; then
|
|
70
|
-
echo "==> Configuring NVMRC_VERSION!"
|
|
71
|
-
export NVMRC_VERSION=$(cat $CIRCLE_WORKING_DIRECTORY/.nvmrc)
|
|
72
|
-
echo "export NVMRC_VERSION=$NVMRC_VERSION" >> $ENV_DOT_PROFILE
|
|
73
|
-
fi
|
|
74
|
-
|
|
75
|
-
if [ -f "$NVM_DIR" ]; then
|
|
76
|
-
echo "==> $NVM_DIR exists. Skipping steps 2-4!"
|
|
77
|
-
else
|
|
78
|
-
echo "==> $NVM_DIR does not exists. Executing steps 2-4!"
|
|
79
|
-
|
|
80
|
-
echo "2. Installing NVM"
|
|
81
|
-
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
|
|
82
|
-
|
|
83
|
-
echo "3. Executing $NVM_DIR/nvm.sh"
|
|
84
|
-
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
|
|
85
|
-
fi
|
|
86
|
-
|
|
87
|
-
## Ref: https://github.com/nvm-sh/nvm/issues/1102#issuecomment-550572252
|
|
88
|
-
if [ ! -z "$NVM_ARCH_UNOFFICIAL_OVERRIDE" ]; then
|
|
89
|
-
echo "==> Handle NVM_ARCH_UNOFFICIAL_OVERRIDE=$NVM_ARCH_UNOFFICIAL_OVERRIDE!"
|
|
90
|
-
echo "nvm_get_arch() { nvm_echo \"${NVM_ARCH_UNOFFICIAL_OVERRIDE}\"; }" >> $ENV_DOT_PROFILE
|
|
91
|
-
echo "export NVM_NODEJS_ORG_MIRROR=https://unofficial-builds.nodejs.org/download/release" >> $ENV_DOT_PROFILE
|
|
92
|
-
source $ENV_DOT_PROFILE
|
|
93
|
-
fi
|
|
94
|
-
|
|
95
|
-
echo "4. Installing Node version: $NVMRC_VERSION"
|
|
96
|
-
nvm install $NVMRC_VERSION
|
|
97
|
-
nvm alias default $NVMRC_VERSION
|
|
98
|
-
nvm use $NVMRC_VERSION
|
|
99
|
-
|
|
100
|
-
cd $CIRCLE_WORKING_DIRECTORY
|
|
101
|
-
|
|
102
|
-
defaults_display_versions: &defaults_display_versions
|
|
103
|
-
name: Display Versions
|
|
104
|
-
command: |
|
|
105
|
-
echo "What is the active version of Nodejs?"
|
|
106
|
-
echo "node: $(node --version)"
|
|
107
|
-
echo "yarn: $(yarn --version)"
|
|
108
|
-
echo "npm: $(npm --version)"
|
|
109
|
-
echo "nvm: $(nvm --version)"
|
|
110
|
-
|
|
111
|
-
##
|
|
112
|
-
# Executors
|
|
113
|
-
#
|
|
114
|
-
# CircleCI Executors
|
|
115
|
-
##
|
|
116
|
-
executors:
|
|
117
|
-
default-docker:
|
|
118
|
-
working_directory: &WORKING_DIR /home/circleci/project
|
|
119
|
-
shell: "/bin/sh -leo pipefail" ## Ref: https://circleci.com/docs/env-vars/#alpine-linux
|
|
120
|
-
environment:
|
|
121
|
-
BASH_ENV: /etc/profile ## Ref: https://circleci.com/docs/env-vars/#alpine-linux
|
|
122
|
-
NVM_ARCH_UNOFFICIAL_OVERRIDE: x64-musl ## Ref: https://github.com/nvm-sh/nvm/issues/1102#issuecomment-550572252
|
|
123
|
-
docker:
|
|
124
|
-
- image: node:lts-alpine
|
|
125
|
-
|
|
126
|
-
default-machine:
|
|
127
|
-
working_directory: *WORKING_DIR
|
|
128
|
-
shell: "/bin/bash -leo pipefail"
|
|
129
|
-
machine:
|
|
130
|
-
image: ubuntu-2204:2023.04.2 # Ref: https://circleci.com/developer/machine/image/ubuntu-2204
|
|
131
|
-
|
|
132
|
-
jobs:
|
|
133
|
-
setup:
|
|
134
|
-
executor: default-docker
|
|
135
|
-
steps:
|
|
136
|
-
- run:
|
|
137
|
-
name: Install general dependencies
|
|
138
|
-
command: *defaults_docker_Dependencies
|
|
139
|
-
- checkout
|
|
140
|
-
- run:
|
|
141
|
-
<<: *defaults_configure_nvm
|
|
142
|
-
- run:
|
|
143
|
-
<<: *defaults_display_versions
|
|
144
|
-
- run:
|
|
145
|
-
name: Install NPM dependencies
|
|
146
|
-
command: npm ci
|
|
147
|
-
- save_cache:
|
|
148
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
149
|
-
paths:
|
|
150
|
-
- node_modules
|
|
151
|
-
|
|
152
|
-
test-dependencies:
|
|
153
|
-
executor: default-docker
|
|
154
|
-
steps:
|
|
155
|
-
- run:
|
|
156
|
-
name: Install general dependencies
|
|
157
|
-
command: *defaults_docker_Dependencies
|
|
158
|
-
- checkout
|
|
159
|
-
- run:
|
|
160
|
-
<<: *defaults_configure_nvm
|
|
161
|
-
- run:
|
|
162
|
-
<<: *defaults_display_versions
|
|
163
|
-
- restore_cache:
|
|
164
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
165
|
-
- run:
|
|
166
|
-
name: Execute dependency tests
|
|
167
|
-
command: npm run dep:check
|
|
168
|
-
|
|
169
|
-
test-lint:
|
|
170
|
-
executor: default-docker
|
|
171
|
-
steps:
|
|
172
|
-
- run:
|
|
173
|
-
name: Install general dependencies
|
|
174
|
-
command: *defaults_docker_Dependencies
|
|
175
|
-
- checkout
|
|
176
|
-
- run:
|
|
177
|
-
<<: *defaults_configure_nvm
|
|
178
|
-
- run:
|
|
179
|
-
<<: *defaults_display_versions
|
|
180
|
-
- restore_cache:
|
|
181
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
182
|
-
- run:
|
|
183
|
-
name: Execute lint tests
|
|
184
|
-
command: npm run lint
|
|
185
|
-
|
|
186
|
-
test-unit:
|
|
187
|
-
executor: default-docker
|
|
188
|
-
steps:
|
|
189
|
-
- run:
|
|
190
|
-
name: Install general dependencies
|
|
191
|
-
command: *defaults_docker_Dependencies
|
|
192
|
-
- checkout
|
|
193
|
-
- run:
|
|
194
|
-
<<: *defaults_configure_nvm
|
|
195
|
-
- run:
|
|
196
|
-
<<: *defaults_display_versions
|
|
197
|
-
- restore_cache:
|
|
198
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
199
|
-
- run:
|
|
200
|
-
# This is needed for legacy core tests. Remove this once 'tape' is fully deprecated.
|
|
201
|
-
name: Install tape, tapes and tap-xunit
|
|
202
|
-
command: npm install tape tapes tap-xunit
|
|
203
|
-
- run:
|
|
204
|
-
name: Create dir for test results
|
|
205
|
-
command: mkdir -p ./test/results
|
|
206
|
-
- run:
|
|
207
|
-
name: Execute unit tests
|
|
208
|
-
command: npm -s run test:xunit
|
|
209
|
-
- store_artifacts:
|
|
210
|
-
path: ./test/results
|
|
211
|
-
destination: test
|
|
212
|
-
- store_test_results:
|
|
213
|
-
path: ./test/results
|
|
214
|
-
|
|
215
|
-
test-coverage:
|
|
216
|
-
executor: default-docker
|
|
217
|
-
steps:
|
|
218
|
-
- run:
|
|
219
|
-
name: Install general dependencies
|
|
220
|
-
command: *defaults_docker_Dependencies
|
|
221
|
-
- run:
|
|
222
|
-
name: Install AWS CLI dependencies
|
|
223
|
-
command: *defaults_awsCliDependencies
|
|
224
|
-
- checkout
|
|
225
|
-
- run:
|
|
226
|
-
<<: *defaults_configure_nvm
|
|
227
|
-
- run:
|
|
228
|
-
<<: *defaults_display_versions
|
|
229
|
-
- restore_cache:
|
|
230
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
231
|
-
- run:
|
|
232
|
-
name: Execute code coverage check
|
|
233
|
-
command: npm -s run test:coverage-check
|
|
234
|
-
- store_artifacts:
|
|
235
|
-
path: coverage
|
|
236
|
-
destination: test
|
|
237
|
-
- store_test_results:
|
|
238
|
-
path: coverage
|
|
239
|
-
|
|
240
|
-
vulnerability-check:
|
|
241
|
-
executor: default-docker
|
|
242
|
-
steps:
|
|
243
|
-
- run:
|
|
244
|
-
name: Install general dependencies
|
|
245
|
-
command: *defaults_docker_Dependencies
|
|
246
|
-
- checkout
|
|
247
|
-
- run:
|
|
248
|
-
<<: *defaults_configure_nvm
|
|
249
|
-
- run:
|
|
250
|
-
<<: *defaults_display_versions
|
|
251
|
-
- restore_cache:
|
|
252
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
253
|
-
- run:
|
|
254
|
-
name: Create dir for test results
|
|
255
|
-
command: mkdir -p ./audit/results
|
|
256
|
-
- run:
|
|
257
|
-
name: Check for new npm vulnerabilities
|
|
258
|
-
command: npm run audit:check -- -o json > ./audit/results/auditResults.json
|
|
259
|
-
- store_artifacts:
|
|
260
|
-
path: ./audit/results
|
|
261
|
-
destination: audit
|
|
262
|
-
|
|
263
|
-
audit-licenses:
|
|
264
|
-
executor: default-docker
|
|
265
|
-
steps:
|
|
266
|
-
- run:
|
|
267
|
-
name: Install general dependencies
|
|
268
|
-
command: *defaults_docker_Dependencies
|
|
269
|
-
- run:
|
|
270
|
-
<<: *defaults_license_scanner
|
|
271
|
-
- checkout
|
|
272
|
-
- restore_cache:
|
|
273
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
274
|
-
- run:
|
|
275
|
-
name: Run the license-scanner
|
|
276
|
-
command: cd /tmp/license-scanner && pathToRepo=$CIRCLE_WORKING_DIRECTORY make run
|
|
277
|
-
- store_artifacts:
|
|
278
|
-
path: /tmp/license-scanner/results
|
|
279
|
-
destination: licenses
|
|
280
|
-
|
|
281
|
-
release:
|
|
282
|
-
executor: default-docker
|
|
283
|
-
steps:
|
|
284
|
-
- run:
|
|
285
|
-
name: Install general dependencies
|
|
286
|
-
command: *defaults_docker_Dependencies
|
|
287
|
-
- checkout
|
|
288
|
-
- restore_cache:
|
|
289
|
-
keys:
|
|
290
|
-
- dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
291
|
-
- run:
|
|
292
|
-
<<: *defaults_configure_git
|
|
293
|
-
- run:
|
|
294
|
-
name: Setup Slack config
|
|
295
|
-
command: |
|
|
296
|
-
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
297
|
-
echo "export SLACK_RELEASE_TYPE='GitHub Release'" >> $BASH_ENV
|
|
298
|
-
echo "export SLACK_RELEASE_TAG='${RELEASE_TAG} on ${CIRCLE_BRANCH} branch'" >> $BASH_ENV
|
|
299
|
-
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
300
|
-
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
301
|
-
- run:
|
|
302
|
-
name: Generate changelog and bump package version
|
|
303
|
-
command: npm run release -- --no-verify
|
|
304
|
-
- run:
|
|
305
|
-
name: Push the release
|
|
306
|
-
command: git push --follow-tags origin ${CIRCLE_BRANCH}
|
|
307
|
-
- slack/notify:
|
|
308
|
-
event: fail
|
|
309
|
-
template: SLACK_TEMP_RELEASE_FAILURE
|
|
310
|
-
|
|
311
|
-
github-release:
|
|
312
|
-
executor: default-machine
|
|
313
|
-
shell: "/bin/bash -eo pipefail"
|
|
314
|
-
steps:
|
|
315
|
-
- run:
|
|
316
|
-
name: Install git
|
|
317
|
-
command: |
|
|
318
|
-
sudo apt-get update && sudo apt-get install -y git
|
|
319
|
-
- gh/install
|
|
320
|
-
- checkout
|
|
321
|
-
- run:
|
|
322
|
-
<<: *defaults_configure_git
|
|
323
|
-
- run:
|
|
324
|
-
name: Fetch updated release branch
|
|
325
|
-
command: |
|
|
326
|
-
git fetch origin
|
|
327
|
-
git checkout origin/${CIRCLE_BRANCH}
|
|
328
|
-
- run:
|
|
329
|
-
<<: *defaults_export_version_from_package
|
|
330
|
-
- run:
|
|
331
|
-
name: Check the release changes
|
|
332
|
-
command: |
|
|
333
|
-
echo "Changes are: ${RELEASE_CHANGES}"
|
|
334
|
-
- run:
|
|
335
|
-
name: Setup Slack config
|
|
336
|
-
command: |
|
|
337
|
-
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
338
|
-
echo "export SLACK_RELEASE_TYPE='Github Release'" >> $BASH_ENV
|
|
339
|
-
echo "export SLACK_RELEASE_TAG=v${RELEASE_TAG}" >> $BASH_ENV
|
|
340
|
-
echo "export SLACK_RELEASE_URL=https://github.com/mojaloop/${CIRCLE_PROJECT_REPONAME}/releases/tag/v${RELEASE_TAG}" >> $BASH_ENV
|
|
341
|
-
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
342
|
-
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
343
|
-
- run:
|
|
344
|
-
name: Create Release
|
|
345
|
-
command: |
|
|
346
|
-
gh release create "v${RELEASE_TAG}" --title "v${RELEASE_TAG} Release" --draft=false --notes "${RELEASE_CHANGES}" ./CHANGELOG.md
|
|
347
|
-
- slack/notify:
|
|
348
|
-
event: pass
|
|
349
|
-
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
350
|
-
- slack/notify:
|
|
351
|
-
event: fail
|
|
352
|
-
template: SLACK_TEMP_RELEASE_FAILURE
|
|
353
|
-
|
|
354
|
-
publish:
|
|
355
|
-
executor: default-docker
|
|
356
|
-
steps:
|
|
357
|
-
- run:
|
|
358
|
-
name: Install general dependencies
|
|
359
|
-
command: *defaults_docker_Dependencies
|
|
360
|
-
- checkout
|
|
361
|
-
- restore_cache:
|
|
362
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
363
|
-
- run:
|
|
364
|
-
name: Setup for LATEST release
|
|
365
|
-
command: |
|
|
366
|
-
echo "export RELEASE_TAG=$RELEASE_TAG_PROD" >> $BASH_ENV
|
|
367
|
-
echo "RELEASE_TAG=$RELEASE_TAG_PROD"
|
|
368
|
-
|
|
369
|
-
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
370
|
-
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
371
|
-
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
372
|
-
- run:
|
|
373
|
-
name: Setup Slack config
|
|
374
|
-
command: |
|
|
375
|
-
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
376
|
-
echo "export SLACK_RELEASE_TYPE='NPM Release'" >> $BASH_ENV
|
|
377
|
-
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
378
|
-
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
379
|
-
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
380
|
-
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
381
|
-
- run:
|
|
382
|
-
<<: *defaults_npm_auth
|
|
383
|
-
- run:
|
|
384
|
-
<<: *defaults_npm_publish_release
|
|
385
|
-
- slack/notify:
|
|
386
|
-
event: pass
|
|
387
|
-
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
388
|
-
- slack/notify:
|
|
389
|
-
event: fail
|
|
390
|
-
template: SLACK_TEMP_RELEASE_FAILURE
|
|
391
|
-
|
|
392
|
-
publish-snapshot:
|
|
393
|
-
executor: default-docker
|
|
394
|
-
steps:
|
|
395
|
-
- run:
|
|
396
|
-
name: Install general dependencies
|
|
397
|
-
command: *defaults_docker_Dependencies
|
|
398
|
-
- checkout
|
|
399
|
-
- restore_cache:
|
|
400
|
-
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
|
|
401
|
-
- run:
|
|
402
|
-
name: Setup for SNAPSHOT release
|
|
403
|
-
command: |
|
|
404
|
-
echo "export RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}" >> $BASH_ENV
|
|
405
|
-
echo "RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}"
|
|
406
|
-
|
|
407
|
-
echo "Override package version: ${CIRCLE_TAG:1}"
|
|
408
|
-
npx standard-version --skip.tag --skip.commit --skip.changelog --release-as ${CIRCLE_TAG:1}
|
|
409
|
-
|
|
410
|
-
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
|
|
411
|
-
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
|
|
412
|
-
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
|
|
413
|
-
- run:
|
|
414
|
-
name: Setup Slack config
|
|
415
|
-
command: |
|
|
416
|
-
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
|
|
417
|
-
echo "export SLACK_RELEASE_TYPE='NPM Snapshot'" >> $BASH_ENV
|
|
418
|
-
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
419
|
-
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
|
|
420
|
-
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
|
|
421
|
-
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
|
|
422
|
-
- run:
|
|
423
|
-
<<: *defaults_npm_auth
|
|
424
|
-
- run:
|
|
425
|
-
<<: *defaults_npm_publish_release
|
|
426
|
-
- slack/notify:
|
|
427
|
-
event: pass
|
|
428
|
-
template: SLACK_TEMP_RELEASE_SUCCESS
|
|
429
|
-
- slack/notify:
|
|
430
|
-
event: fail
|
|
431
|
-
template: SLACK_TEMP_RELEASE_FAILURE
|
|
432
|
-
|
|
4
|
+
build: mojaloop/build@1.0.46
|
|
433
5
|
workflows:
|
|
434
|
-
|
|
6
|
+
setup:
|
|
435
7
|
jobs:
|
|
436
|
-
-
|
|
437
|
-
context: org-global
|
|
438
|
-
- setup:
|
|
439
|
-
context: org-global
|
|
440
|
-
filters:
|
|
441
|
-
tags:
|
|
442
|
-
only: /.*/
|
|
443
|
-
branches:
|
|
444
|
-
ignore:
|
|
445
|
-
- /feature*/
|
|
446
|
-
- /bugfix*/
|
|
447
|
-
- test-dependencies:
|
|
448
|
-
context: org-global
|
|
449
|
-
requires:
|
|
450
|
-
- setup
|
|
451
|
-
filters:
|
|
452
|
-
tags:
|
|
453
|
-
only: /.*/
|
|
454
|
-
branches:
|
|
455
|
-
ignore:
|
|
456
|
-
- main
|
|
457
|
-
- test-lint:
|
|
458
|
-
context: org-global
|
|
459
|
-
requires:
|
|
460
|
-
- setup
|
|
461
|
-
filters:
|
|
462
|
-
tags:
|
|
463
|
-
only: /.*/
|
|
464
|
-
branches:
|
|
465
|
-
ignore:
|
|
466
|
-
- /feature*/
|
|
467
|
-
- /bugfix*/
|
|
468
|
-
- test-unit:
|
|
469
|
-
context: org-global
|
|
470
|
-
requires:
|
|
471
|
-
- setup
|
|
472
|
-
filters:
|
|
473
|
-
tags:
|
|
474
|
-
only: /.*/
|
|
475
|
-
branches:
|
|
476
|
-
ignore:
|
|
477
|
-
- /feature*/
|
|
478
|
-
- /bugfix*/
|
|
479
|
-
- test-coverage:
|
|
480
|
-
context: org-global
|
|
481
|
-
requires:
|
|
482
|
-
- setup
|
|
483
|
-
filters:
|
|
484
|
-
tags:
|
|
485
|
-
only: /.*/
|
|
486
|
-
branches:
|
|
487
|
-
ignore:
|
|
488
|
-
- /feature*/
|
|
489
|
-
- /bugfix*/
|
|
490
|
-
- vulnerability-check:
|
|
491
|
-
context: org-global
|
|
492
|
-
requires:
|
|
493
|
-
- setup
|
|
494
|
-
filters:
|
|
495
|
-
tags:
|
|
496
|
-
only: /.*/
|
|
497
|
-
branches:
|
|
498
|
-
ignore:
|
|
499
|
-
- /feature*/
|
|
500
|
-
- /bugfix*/
|
|
501
|
-
- audit-licenses:
|
|
502
|
-
context: org-global
|
|
503
|
-
requires:
|
|
504
|
-
- setup
|
|
505
|
-
filters:
|
|
506
|
-
tags:
|
|
507
|
-
only: /.*/
|
|
508
|
-
branches:
|
|
509
|
-
ignore:
|
|
510
|
-
- /feature*/
|
|
511
|
-
- /bugfix*/
|
|
512
|
-
# New commits to main release automatically
|
|
513
|
-
- release:
|
|
514
|
-
context: org-global
|
|
515
|
-
requires:
|
|
516
|
-
- pr-tools/pr-title-check
|
|
517
|
-
- test-lint
|
|
518
|
-
- test-unit
|
|
519
|
-
- test-coverage
|
|
520
|
-
- vulnerability-check
|
|
521
|
-
- audit-licenses
|
|
522
|
-
filters:
|
|
523
|
-
branches:
|
|
524
|
-
only:
|
|
525
|
-
- main
|
|
526
|
-
- /release\/v.*/
|
|
527
|
-
- github-release:
|
|
528
|
-
context: org-global
|
|
529
|
-
requires:
|
|
530
|
-
- release
|
|
531
|
-
filters:
|
|
532
|
-
branches:
|
|
533
|
-
only:
|
|
534
|
-
- main
|
|
535
|
-
- /release\/v.*/
|
|
536
|
-
- publish:
|
|
537
|
-
context: org-global
|
|
538
|
-
requires:
|
|
539
|
-
- pr-tools/pr-title-check
|
|
540
|
-
- test-lint
|
|
541
|
-
- test-unit
|
|
542
|
-
- test-coverage
|
|
543
|
-
- vulnerability-check
|
|
544
|
-
- audit-licenses
|
|
545
|
-
filters:
|
|
546
|
-
tags:
|
|
547
|
-
only: /v[0-9]+(\.[0-9]+)*/
|
|
548
|
-
branches:
|
|
549
|
-
ignore:
|
|
550
|
-
- /.*/
|
|
551
|
-
- publish-snapshot:
|
|
552
|
-
context: org-global
|
|
553
|
-
requires:
|
|
554
|
-
- pr-tools/pr-title-check
|
|
555
|
-
- test-lint
|
|
556
|
-
- test-unit
|
|
557
|
-
- test-coverage
|
|
558
|
-
- vulnerability-check
|
|
559
|
-
- audit-licenses
|
|
8
|
+
- build/workflow:
|
|
560
9
|
filters:
|
|
561
10
|
tags:
|
|
562
|
-
only: /v
|
|
563
|
-
branches:
|
|
564
|
-
ignore:
|
|
565
|
-
- /.*/
|
|
11
|
+
only: /v\d+(\.\d+){2}(-[a-zA-Z-][0-9a-zA-Z-]*\.\d+)?/
|
package/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
18.
|
|
1
|
+
18.20.4
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [11.1.2](https://github.com/mojaloop/database-lib/compare/v11.1.1...v11.1.2) (2025-01-27)
|
|
6
|
+
|
|
7
|
+
### [11.1.1](https://github.com/mojaloop/database-lib/compare/v11.1.0...v11.1.1) (2025-01-08)
|
|
8
|
+
|
|
5
9
|
## [11.1.0](https://github.com/mojaloop/database-lib/compare/v11.0.6...v11.1.0) (2024-12-20)
|
|
6
10
|
|
|
7
11
|
|
package/CODEOWNERS
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
## @global-owner1 and @global-owner2 will be requested for
|
|
6
6
|
## review when someone opens a pull request.
|
|
7
7
|
#* @global-owner1 @global-owner2
|
|
8
|
-
* @bushjames @elnyry-sam-k @kleyow @oderayi @vijayg10
|
|
8
|
+
* @bushjames @elnyry-sam-k @kleyow @oderayi @vijayg10 @shashi165 @gibaros
|
|
9
9
|
## Order is important; the last matching pattern takes the most
|
|
10
10
|
## precedence. When someone opens a pull request that only
|
|
11
11
|
## modifies JS files, only @js-owner and not the global
|
package/LICENSE.md
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
# LICENSE
|
|
2
2
|
|
|
3
|
-
Copyright © 2020 Mojaloop Foundation
|
|
3
|
+
Copyright © 2020-2025 Mojaloop Foundation
|
|
4
4
|
|
|
5
|
-
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0
|
|
6
|
-
(the "License") and you may not use these files except in compliance with the [License](http://www.apache.org/licenses/LICENSE-2.0).
|
|
5
|
+
The Mojaloop files are made available by the Mojaloop Foundation under the Apache License, Version 2.0 (the "License") and you may not use these files except in compliance with the License.
|
|
7
6
|
|
|
8
|
-
You may obtain a copy of the License at
|
|
7
|
+
You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
9
8
|
|
|
10
|
-
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the
|
|
9
|
+
Unless required by applicable law or agreed to in writing, the Mojaloop files are distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
package/audit-ci.jsonc
CHANGED
|
@@ -3,14 +3,5 @@
|
|
|
3
3
|
// audit-ci supports reading JSON, JSONC, and JSON5 config files.
|
|
4
4
|
// Only use one of ["low": true, "moderate": true, "high": true, "critical": true]
|
|
5
5
|
"moderate": true,
|
|
6
|
-
"allowlist": [
|
|
7
|
-
"GHSA-pfrx-2q88-qq97",
|
|
8
|
-
"GHSA-4jv9-3563-23j3",
|
|
9
|
-
"GHSA-vh95-rmgr-6w4m",
|
|
10
|
-
"GHSA-xvch-5gv4-984h",
|
|
11
|
-
"GHSA-p8p7-x288-28g6",
|
|
12
|
-
"GHSA-72xf-g2v4-qvf3",
|
|
13
|
-
"GHSA-w5p7-h5w8-2hfq",
|
|
14
|
-
"GHSA-3xgq-45jj-v275" // pre-commit uses an old version of cross-spawn
|
|
15
|
-
]
|
|
6
|
+
"allowlist": []
|
|
16
7
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mojaloop/database-lib",
|
|
3
|
-
"version": "11.1.
|
|
3
|
+
"version": "11.1.2",
|
|
4
4
|
"description": "Shared database code for central services",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,6 +34,8 @@
|
|
|
34
34
|
"test:xunit": "npm run test:unit | tap-xunit > ./test/results/xunit.xml",
|
|
35
35
|
"test:coverage": "npx nyc --reporter=lcov --reporter=text-summary tapes -- 'test/unit/**/**.test.js'",
|
|
36
36
|
"test:coverage-check": "npm run test:coverage && nyc check-coverage",
|
|
37
|
+
"test:functional": "echo 'No functional tests defined'",
|
|
38
|
+
"test:integration": "echo 'No integration tests defined'",
|
|
37
39
|
"audit:fix": "npm audit fix",
|
|
38
40
|
"audit:check": "npx audit-ci --config ./audit-ci.jsonc",
|
|
39
41
|
"dep:check": "npx ncu -e 2",
|
|
@@ -41,7 +43,7 @@
|
|
|
41
43
|
"release": "standard-version --releaseCommitMessageFormat 'chore(release): {{currentTag}} [skip ci]'"
|
|
42
44
|
},
|
|
43
45
|
"dependencies": {
|
|
44
|
-
"@mojaloop/central-services-error-handling": "13.0.
|
|
46
|
+
"@mojaloop/central-services-error-handling": "13.0.4",
|
|
45
47
|
"knex": "3.1.0",
|
|
46
48
|
"lodash": "4.17.21",
|
|
47
49
|
"mysql": "2.18.1"
|
|
@@ -54,21 +56,23 @@
|
|
|
54
56
|
"ajv": "6.12.3",
|
|
55
57
|
"ejs": "3.1.10",
|
|
56
58
|
"sanitize-html": "2.12.1",
|
|
57
|
-
"
|
|
58
|
-
"
|
|
59
|
+
"markdown-it": "12.3.2",
|
|
60
|
+
"undici": "6.21.1"
|
|
59
61
|
},
|
|
60
62
|
"widdershins": {
|
|
61
63
|
"swagger2openapi": "7.0.8",
|
|
62
|
-
"yargs-parser": "13.1.2",
|
|
63
64
|
"markdown-it": "12.3.2"
|
|
64
65
|
}
|
|
65
66
|
}
|
|
66
|
-
}
|
|
67
|
+
},
|
|
68
|
+
"cross-spawn": "7.0.6",
|
|
69
|
+
"trim": "0.0.3",
|
|
70
|
+
"yargs-parser": "21.1.1"
|
|
67
71
|
},
|
|
68
72
|
"devDependencies": {
|
|
69
73
|
"@mojaloop/sdk-standard-components": ">=19.x.x",
|
|
70
74
|
"audit-ci": "^7.1.0",
|
|
71
|
-
"npm-check-updates": "17.1.
|
|
75
|
+
"npm-check-updates": "17.1.14",
|
|
72
76
|
"nyc": "17.1.0",
|
|
73
77
|
"pre-commit": "1.2.2",
|
|
74
78
|
"proxyquire": "2.1.3",
|