Skip to content

Commit

Permalink
chore(mojaloop/#2990): pull in changes from master (#405)
Browse files Browse the repository at this point in the history
* MBP-604: Pull changes from mojaloop-connector.

* Fix test cases.

* fix lint errors.

* Update src/InboundServer/index.js

Co-authored-by: Kevin Leyow <kleyow@gmail.com>

* fix audit errors.

* bump packages.

* update constributors list.

* Refactor to use new Redis API.

* fix api call.

* fix audit errors.

* bump version

* fix audit errors.

* update packages.

* fix audit errors.

* revert version change.

* uncomment test feature.

* chore(release): 15.0.1 [skip ci]

* chore!: add dummy pr to major version bump due to unsquashed title (#327)

chore(snapshot): 15.0.2-snapshot.0

* chore(release): 16.0.0 [skip ci]

* feat: suppress health check logs (#328)

Suppress health check logs.

* chore(release): 17.0.0 [skip ci]

* fix: creating inbound server (#329)

* fix creating InboundServer

* update circleci node image.

* Revert "update circleci node image."

This reverts commit 5a38cb0.

* remove SHELL=sh from audit commands.

* Use per commit dep cache.

* chore(release): 17.0.1 [skip ci]

* fix(mojaloop/#2811): sdk-scheme-adapter sending incorrect transferState on a PUT transfers Callback (#331)

fix(mojaloop/#2811): sdk-scheme-adapter sending incorrect transferState on a PUT transfers Callback - mojaloop/project#2811
- fixed transfer-state for callback-response by PayeeFSP to use FSPIOP `TransferState` & `BulkTransferState` Enums from central-services-shared
- re-factored & consolidated enums into a common `SDKStateEnum` which is used for all `currentState` assignments and comparisons
- removed duplicate/unnecessary enums
- updated unit tests to use enums
- updated dependencies
- fixed audit issue
- Fixed image-scan issue as docker image used a root user by adding a non-root user 'ml-user'
- re-aligned Dockerfile working directory to /opt/app for consistency across ml-projects
- aligned CI config for consistency across ml-projects

fix(mojaloop/#2816): SDK-Scheme-Adapter is missing/incorrect bulkTransferState on a PUT /bulkTransfer/{id} Callback by the PayeeFSP- mojaloop/project#2816
- fixed bad enum mapping for bulkTransferState for `COMPLETED` (it was `COMMITTED`)
- added missed bulkTransferState enum for `REJECTED`

BREAKING CHANGE: docker image now uses `/opt/app` instead of the root folder which will impact config mounts, and the secrets folder is no longer included in the docker image which aligns with best practices. Both these changes should NOT be a breaking change but I have marked them as such to make this change more obvious.

* fix: updated dependencies

* chore(release): 18.0.0 [skip ci]

* chore: added .npmignore so that the test folder is not included when publishing packages (#332)

* chore: added .npmignore so that the test folder is not included when publishing packages
* chore: fixes for audit-resolve

* chore: uodated deps (#333)

* chore: added .npmignore so that the test folder is not included when publishing packages

* chore: fixes for audit-resolve

* chore: updated dependencies

* chore(release): 18.0.1 [skip ci]

* chore: updates to readme for header badges [skip ci] (#334)

- updated readme to include docker-pulls

* fix: ws-connection-issue (#339)

- downgraded ws lib dependency from v8.x to v7.5.5 due to breaking change that cause intermitant disconnections
- added ncurc.yaml file with ws lib dependency added with an appropriate comment
- added @mojaloop/api-snippets to dep:check ignore list as it requires PR [sdk-scheme-adapter/pull/340](#340) has been merged

* chore(release): 18.0.2 [skip ci]

* feat!: use updated outbound OpenAPI specification from api-snippets (#340)

* feat!: use updated outbound OpenAPI specification from api-snippets

* use audit-ci for audit check.

* move api-snippets to deps.

* chore(release): 19.0.0 [skip ci]

* fix(mojaloop/2886): fix bulk-quotes and bulk-transfers functionality (#344)

fix(mojaloop/2886): fix bulk-quotes and bulk-transfers functionality (#344)

* fix: added bulk-quotes to inbound api definition
* chore: updated TTK version, updated TTK config files  and changed ttk port
* fix: bulk quotes callback redis publish channel
* fix: fixed bulk quotes and bulk transfers response in outbound api
* chore: updated mojaloop sim api in ttk

* chore(release): 19.0.1 [skip ci]

* chore: address merge mistakes

* Update .dockerignore

Co-authored-by: Miguel de Barros <miguel@debarros.me>

* Update .dockerignore

Co-authored-by: Miguel de Barros <miguel@debarros.me>

Co-authored-by: Yevhen Kyriukha <kirgene@gmail.com>
Co-authored-by: mojaloopci <info@mojaloop.io>
Co-authored-by: Miguel de Barros <miguel@debarros.me>
Co-authored-by: vijayg10 <33152110+vijayg10@users.noreply.github.com>
  • Loading branch information
5 people authored Oct 20, 2022
1 parent b0b3617 commit efd90d9
Show file tree
Hide file tree
Showing 11 changed files with 833 additions and 655 deletions.
128 changes: 0 additions & 128 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,16 +37,6 @@ defaults_license_scanner: &defaults_license_scanner
git clone https://github.com/mojaloop/license-scanner /tmp/license-scanner
cd /tmp/license-scanner && make build default-files set-up
defaults_npm_auth: &defaults_npm_auth
name: Update NPM registry auth token
command: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > .npmrc

defaults_npm_publish_release: &defaults_npm_publish_release
name: Publish NPM $RELEASE_TAG artifact
command: |
source $BASH_ENV
echo "Publishing tag $RELEASE_TAG"
npm publish --tag $RELEASE_TAG --access public
defaults_export_version_from_package: &defaults_export_version_from_package
name: Format the changelog into the github release body and get release tag
Expand Down Expand Up @@ -609,84 +599,6 @@ jobs:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

publish-npm:
executor: default-docker
environment: *defaults_environment
steps:
- run:
name: Install general dependencies
command: *defaults_Dependencies
- checkout
- restore_cache:
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Setup for LATEST release
command: |
echo "export RELEASE_TAG=$RELEASE_TAG_PROD" >> $BASH_ENV
echo "RELEASE_TAG=$RELEASE_TAG_PROD"
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- run:
name: Setup Slack config
command: |
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
echo "export SLACK_RELEASE_TYPE='NPM Release'" >> $BASH_ENV
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
- run:
<<: *defaults_npm_auth
- run:
<<: *defaults_npm_publish_release
- slack/notify:
event: pass
template: SLACK_TEMP_RELEASE_SUCCESS
- slack/notify:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

publish-npm-snapshot:
executor: default-docker
environment: *defaults_environment
steps:
- run:
name: Install general dependencies
command: *defaults_Dependencies
- checkout
- restore_cache:
key: dependency-cache-{{ .Environment.CIRCLE_SHA1 }}
- run:
name: Setup for SNAPSHOT release
command: |
echo "export RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}" >> $BASH_ENV
echo "RELEASE_TAG=${RELEASE_TAG_SNAPSHOT}"
echo "Override package version: ${CIRCLE_TAG:1}"
npx standard-version --skip.tag --skip.commit --skip.changelog --release-as ${CIRCLE_TAG:1}
PACKAGE_VERSION=$(cat package-lock.json | jq -r .version)
echo "export PACKAGE_VERSION=${PACKAGE_VERSION}" >> $BASH_ENV
echo "PACKAGE_VERSION=${PACKAGE_VERSION}"
- run:
name: Setup Slack config
command: |
echo "export SLACK_PROJECT_NAME=${CIRCLE_PROJECT_REPONAME}" >> $BASH_ENV
echo "export SLACK_RELEASE_TYPE='NPM Snapshot'" >> $BASH_ENV
echo "export SLACK_RELEASE_TAG=v${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_RELEASE_URL=https://www.npmjs.com/package/@mojaloop/${CIRCLE_PROJECT_REPONAME}/v/${CIRCLE_TAG:1}" >> $BASH_ENV
echo "export SLACK_BUILD_ID=${CIRCLE_BUILD_NUM}" >> $BASH_ENV
echo "export SLACK_CI_URL=${CIRCLE_BUILD_URL}" >> $BASH_ENV
- run:
<<: *defaults_npm_auth
- run:
<<: *defaults_npm_publish_release
- slack/notify:
event: pass
template: SLACK_TEMP_RELEASE_SUCCESS
- slack/notify:
event: fail
template: SLACK_TEMP_RELEASE_FAILURE

##
# Workflows
#
Expand Down Expand Up @@ -899,43 +811,3 @@ workflows:
branches:
ignore:
- /.*/

- publish-npm:
context: org-global
requires:
- pr-tools/pr-title-check
- validate-openapi
- test-dependencies
- test-lint
- test-unit
- test-integration
- vulnerability-check
- audit-licenses
- license-scan
- image-scan
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*/
branches:
ignore:
- /.*/

- publish-npm-snapshot:
context: org-global
requires:
- pr-tools/pr-title-check
- validate-openapi
- test-dependencies
- test-lint
- test-unit
- test-integration
- vulnerability-check
- audit-licenses
- license-scan
- image-scan
filters:
tags:
only: /v[0-9]+(\.[0-9]+)*\-snapshot+((\.[0-9]+)?)/
branches:
ignore:
- /.*/
30 changes: 30 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,34 @@
# Changelog: [mojaloop/sdk-scheme-adapter](https://github.com/mojaloop/sdk-scheme-adapter)
### [19.0.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v19.0.0...v19.0.1) (2022-08-24)


### Bug Fixes

* **mojaloop/2886:** fix bulk-quotes and bulk-transfers functionality ([#344](https://github.com/mojaloop/sdk-scheme-adapter/issues/344)) ([85f308b](https://github.com/mojaloop/sdk-scheme-adapter/commit/85f308be589b41f0c7281c65163d791b8052accf))

## [19.0.0](https://github.com/mojaloop/sdk-scheme-adapter/compare/v18.0.2...v19.0.0) (2022-07-28)


### ⚠ BREAKING CHANGES

* use updated outbound OpenAPI specification from api-snippets (#340)

### Features

* use updated outbound OpenAPI specification from api-snippets ([#340](https://github.com/mojaloop/sdk-scheme-adapter/issues/340)) ([92eb491](https://github.com/mojaloop/sdk-scheme-adapter/commit/92eb4918fcbebc4532ebd1434aa7c565822e15bd))

### [18.0.2](https://github.com/mojaloop/sdk-scheme-adapter/compare/v18.0.1...v18.0.2) (2022-07-27)


### Bug Fixes

* ws-connection-issue ([#339](https://github.com/mojaloop/sdk-scheme-adapter/issues/339)) ([e29e158](https://github.com/mojaloop/sdk-scheme-adapter/commit/e29e158807d1c758e18418752339b8b10d42377b))


### Chore

* updates to readme for header badges [skip ci] ([#334](https://github.com/mojaloop/sdk-scheme-adapter/issues/334)) ([415bb33](https://github.com/mojaloop/sdk-scheme-adapter/commit/415bb3380a17cfd35841095bb9b2f399e969f5c6))

### [18.0.1](https://github.com/mojaloop/sdk-scheme-adapter/compare/v18.0.0...v18.0.1) (2022-07-12)


Expand Down
8 changes: 1 addition & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For information on the background and context of this project please see the pre

DFSP backends must implement the [DFSP Inbound API](docs/dfspInboundApi.yaml) in order for the scheme adapter to make incoming transfers i.e. to receive funds to a customer account.

DFSP backends can call the [DFSP Outbound API](/src/outboundApi/api.yaml) in order to make outgoing transfers i.e. to send funds from a customer account.
DFSP backends can call the [DFSP Outbound API](https://github.com/mojaloop/api-snippets/blob/master/docs/sdk-scheme-adapter-outbound-v2_0_0-openapi3-snippets.yaml) in order to make outgoing transfers i.e. to send funds from a customer account.

## Docker Image

Expand Down Expand Up @@ -192,12 +192,6 @@ To rebuild the inbound interface run
npm run build:openapi:inbound
```

To rebuild the outbound interface run

```bash
npm run build:openapi:outbound
```

## Automated Releases

As part of our CI/CD process, we use a combination of CircleCI, standard-version
Expand Down
2 changes: 1 addition & 1 deletion docker/ml-testing-toolkit/spec_files/user_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,4 @@
},
"DEFAULT_ENVIRONMENT_FILE_NAME": "dfsp_local_environment.json",
"LABELS": []
}
}
16 changes: 8 additions & 8 deletions modules/api-svc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@
"dependencies": {
"@koa/cors": "^4.0.0",
"@mojaloop/api-snippets": "^16.0.4",
"@mojaloop/central-services-error-handling": "^12.0.4",
"@mojaloop/central-services-error-handling": "^12.0.5",
"@mojaloop/central-services-logger": "^11.0.1",
"@mojaloop/central-services-metrics": "^12.0.5",
"@mojaloop/central-services-shared": "17.3.1",
"@mojaloop/event-sdk": "^11.0.2",
"@mojaloop/sdk-scheme-adapter-private-shared-lib": "workspace:^",
"@mojaloop/sdk-standard-components": "^17.1.1",
"ajv": "8.11.0",
"axios": "^1.1.2",
"axios": "^1.1.3",
"co-body": "^6.1.0",
"dotenv": "^16.0.3",
"env-var": "^7.3.0",
Expand All @@ -92,19 +92,19 @@
"ws": "^8.9.0"
},
"devDependencies": {
"@babel/core": "^7.19.3",
"@babel/core": "^7.19.6",
"@babel/preset-env": "^7.19.4",
"@redocly/openapi-cli": "^1.0.0-beta.94",
"@types/jest": "^29.1.2",
"babel-jest": "^29.1.2",
"@types/jest": "^29.2.0",
"babel-jest": "^29.2.1",
"eslint": "^8.25.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jest": "^27.1.1",
"jest": "^29.1.2",
"eslint-plugin-jest": "^27.1.3",
"jest": "^29.2.1",
"jest-junit": "^14.0.1",
"nock": "^13.2.9",
"npm-check-updates": "^16.3.11",
"npm-check-updates": "^16.3.14",
"openapi-response-validator": "^12.0.2",
"openapi-typescript": "^5.4.1",
"redis-mock": "^0.56.3",
Expand Down
2 changes: 1 addition & 1 deletion modules/api-svc/test/unit/ControlServer/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ class Server extends ws.Server {
*/
broadcast(msg) {
this.clients.forEach((client) => {
if (client.readyState === ws.WebSocket.OPEN) {
if (client.readyState === ws.OPEN) {
client.send(msg);
}
});
Expand Down
12 changes: 6 additions & 6 deletions modules/outbound-command-event-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@
"devDependencies": {
"@types/convict": "^6.1.1",
"@types/express": "^4.17.14",
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"@types/jest": "^29.2.0",
"@types/node": "^18.11.3",
"@types/node-cache": "^4.2.5",
"@types/supertest": "^2.0.12",
"@types/swagger-ui-express": "^4.1.3",
"@types/yamljs": "^0.2.31",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"copyfiles": "^2.4.1",
"eslint": "^8.25.0",
"jest": "^29.1.2",
"jest": "^29.2.1",
"nodemon": "^2.0.20",
"npm-check-updates": "^16.3.11",
"npm-check-updates": "^16.3.14",
"replace": "^1.2.1",
"standard-version": "^9.5.0",
"ts-jest": "^29.0.3",
Expand Down
12 changes: 6 additions & 6 deletions modules/outbound-domain-event-handler/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,19 +53,19 @@
"devDependencies": {
"@types/convict": "^6.1.1",
"@types/express": "^4.17.14",
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"@types/jest": "^29.2.0",
"@types/node": "^18.11.3",
"@types/node-cache": "^4.2.5",
"@types/supertest": "^2.0.12",
"@types/swagger-ui-express": "^4.1.3",
"@types/yamljs": "^0.2.31",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"copyfiles": "^2.4.1",
"eslint": "^8.25.0",
"jest": "^29.1.2",
"jest": "^29.2.1",
"nodemon": "^2.0.20",
"npm-check-updates": "^16.3.11",
"npm-check-updates": "^16.3.14",
"replace": "^1.2.1",
"standard-version": "^9.5.0",
"ts-jest": "^29.0.3",
Expand Down
6 changes: 3 additions & 3 deletions modules/private-shared-lib/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/node": "^18.8.3",
"@types/node": "^18.11.3",
"eslint": "^8.25.0",
"jest": "^29.1.2",
"npm-check-updates": "^16.3.11",
"jest": "^29.2.1",
"npm-check-updates": "^16.3.14",
"replace": "^1.2.1",
"standard-version": "^9.5.0",
"ts-jest": "^29.0.3",
Expand Down
22 changes: 14 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,14 @@
"url": "https://github.com/mojaloop/sdk-scheme-adapter/issues#readme"
},
"contributors": [
"Miguel de Barros <miguel.debarros@modusbox.com>",
"Kamuela Franco <kamuela.franco@modusbox.com>",
"Steven Oderayi <steven.oderayi@modusbox.com>",
"Valentin Genev <valentin.genev@modusbox.com>",
"Shashikant Hirugade <shashikant.hirugade@modusbox.com>",
"Paweł Marzec <pawel.marzec@modusbox.com>",
"Kevin Leyow <kevin.leyow@modusbox.com",
"Miguel de Barros <miguel.debarros@modusbox.com>",
"Yevhen Kyriukha <yevhen.kyriukha@modusbox.com>",
"Vijay Kumar Guthi <vijaya.guthi@modusbox.com>"
],
"packageManager": "yarn@3.2.0",
Expand Down Expand Up @@ -61,23 +67,23 @@
"wait-4-docker": "node ./scripts/_wait4_all.js"
},
"dependencies": {
"nx": "14.8.3",
"nx": "15.0.0",
"tslib": "^2.4.0"
},
"devDependencies": {
"@types/jest": "^29.1.2",
"@types/node": "^18.8.3",
"@types/jest": "^29.2.0",
"@types/node": "^18.11.3",
"@types/node-cache": "^4.2.5",
"@typescript-eslint/eslint-plugin": "^5.40.0",
"@typescript-eslint/parser": "^5.40.0",
"@typescript-eslint/eslint-plugin": "^5.40.1",
"@typescript-eslint/parser": "^5.40.1",
"audit-ci": "^6.3.0",
"eslint": "^8.25.0",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-plugin-import": "latest",
"husky": "^8.0.1",
"jest": "^29.1.2",
"jest": "^29.2.1",
"nodemon": "^2.0.20",
"npm-check-updates": "^16.3.11",
"npm-check-updates": "^16.3.14",
"replace": "^1.2.1",
"standard-version": "^9.5.0",
"ts-jest": "^29.0.3",
Expand Down
Loading

0 comments on commit efd90d9

Please sign in to comment.