Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
564 changes: 502 additions & 62 deletions .data/aml/generate.py

Large diffs are not rendered by default.

74,518 changes: 74,009 additions & 509 deletions .data/aml/mongo_seed/accounts.json

Large diffs are not rendered by default.

800,140 changes: 784,070 additions & 16,070 deletions .data/aml/mongo_seed/aml_cases.json

Large diffs are not rendered by default.

3,818 changes: 3,574 additions & 244 deletions .data/aml/mongo_seed/sanctions.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions .data/aml/postgres/customers.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions .data/aml/postgres/financial_transfers.csv
Git LFS file not shown
4 changes: 2 additions & 2 deletions .data/aml/postgres/sars.csv
Git LFS file not shown
32 changes: 17 additions & 15 deletions hasura/.env.aml.template
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
APP_ACCOUNT_OPERATIONS_AUTHORIZATION_HEADER="Bearer Enz_aZ0tH5zCSFGLlUjHig=="
APP_ACCOUNT_OPERATIONS_HASURA_CONNECTOR_PORT=8061
APP_ACCOUNT_OPERATIONS_HASURA_SERVICE_TOKEN_SECRET="Enz_aZ0tH5zCSFGLlUjHig=="
APP_ACCOUNT_OPERATIONS_AUTHORIZATION_HEADER="Bearer MWx_ZKVA0rAnG-SI5Feuuw=="
APP_ACCOUNT_OPERATIONS_HASURA_CONNECTOR_PORT=6962
APP_ACCOUNT_OPERATIONS_HASURA_SERVICE_TOKEN_SECRET="MWx_ZKVA0rAnG-SI5Feuuw=="
APP_ACCOUNT_OPERATIONS_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
APP_ACCOUNT_OPERATIONS_OTEL_SERVICE_NAME="app_account_operations"
APP_ACCOUNT_OPERATIONS_READ_URL="http://local.hasura.dev:8061"
APP_ACCOUNT_OPERATIONS_WRITE_URL="http://local.hasura.dev:8061"
APP_AML_MONITORING_AUTHORIZATION_HEADER="Bearer hxSsHZS9wsAG3_MFa3H54w=="
APP_AML_MONITORING_HASURA_SERVICE_TOKEN_SECRET="hxSsHZS9wsAG3_MFa3H54w=="
APP_AML_MONITORING_MONGODB_DATABASE_URI="mongodb://presales:[email protected]:27017/aml"
APP_ACCOUNT_OPERATIONS_READ_URL="http://local.hasura.dev:6962"
APP_ACCOUNT_OPERATIONS_WRITE_URL="http://local.hasura.dev:6962"
APP_AML_MONITORING_AUTHORIZATION_HEADER="Bearer -zPG0Ff8dEVtCaatlz_JUg=="
APP_AML_MONITORING_HASURA_CONNECTOR_PORT=5942
APP_AML_MONITORING_HASURA_SERVICE_TOKEN_SECRET="-zPG0Ff8dEVtCaatlz_JUg=="
APP_AML_MONITORING_MONGODB_DATABASE_URI="mongodb://root:[email protected]:27017/aml"
APP_AML_MONITORING_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
APP_AML_MONITORING_OTEL_SERVICE_NAME="app_aml_monitoring"
APP_AML_MONITORING_READ_URL="http://local.hasura.dev:4441"
APP_AML_MONITORING_WRITE_URL="http://local.hasura.dev:4441"
APP_BANKING_CORE_AUTHORIZATION_HEADER="Bearer VF1Vzn6p98AxSQg9Qgf3Fg=="
APP_BANKING_CORE_CONNECTION_URI="postgres://postgres:[email protected]:5432/"
APP_BANKING_CORE_HASURA_SERVICE_TOKEN_SECRET="VF1Vzn6p98AxSQg9Qgf3Fg=="
APP_AML_MONITORING_READ_URL="http://local.hasura.dev:5942"
APP_AML_MONITORING_WRITE_URL="http://local.hasura.dev:5942"
APP_BANKING_CORE_AUTHORIZATION_HEADER="Bearer jPouz7oPfEDS9FOlvxQCPg=="
APP_BANKING_CORE_HASURA_CONNECTOR_PORT=6421
APP_BANKING_CORE_HASURA_SERVICE_TOKEN_SECRET="jPouz7oPfEDS9FOlvxQCPg=="
APP_BANKING_CORE_JDBC_URL="jdbc:postgresql://local.hasura.dev:5432/postgres?user=postgres&password=hbGciOiJIUzI1NiIsInR5cCI6IkpX"
APP_BANKING_CORE_OTEL_EXPORTER_OTLP_ENDPOINT="http://local.hasura.dev:4317"
APP_BANKING_CORE_OTEL_SERVICE_NAME="app_banking_core"
APP_BANKING_CORE_READ_URL="http://local.hasura.dev:5544"
APP_BANKING_CORE_WRITE_URL="http://local.hasura.dev:5544"
APP_BANKING_CORE_READ_URL="http://local.hasura.dev:6421"
APP_BANKING_CORE_WRITE_URL="http://local.hasura.dev:6421"
JWT_SECRET="hptj8supNeslwet7nhGGr5Uu5MombVVjDmcGMOyrWa8"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/hasura/ndc-nodejs-lambda:v1.11.0
FROM ghcr.io/hasura/ndc-nodejs-lambda:v1.16.0

COPY package-lock.json package.json /functions/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
version: v2
ndcSpecGeneration: v0.2
packagingDefinition:
type: ManagedDockerBuild
supportedEnvironmentVariables: []
commands:
upgradeConfiguration:
type: Dockerized
dockerImage: ghcr.io/hasura/ndc-nodejs-lambda:v1.11.0
commandArgs: []
dockerImage: ghcr.io/hasura/ndc-nodejs-lambda:v1.16.0
commandArgs:
- /scripts/upgrade.sh
dockerComposeWatch:
- path: package.json
action: rebuild
Expand All @@ -26,4 +29,10 @@ nativeToolchainDefinition:
type: ShellScript
bash: ./watch.sh
powershell: ./watch.ps1
upgradeConfiguration:
type: ShellScript
bash: |
./upgrade-connector.sh "$HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH" "1.16.0"
powershell: |
& ./upgrade-connector.ps1 "$env:HASURA_PLUGIN_CONNECTOR_CONTEXT_PATH" "1.16.0"
documentationPage: https://hasura.info/nodejs-getting-started
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
param(
[Parameter(Mandatory=$true)]
[string]$connector_path,

[Parameter(Mandatory=$true)]
[string]$target_connector_version,

[Parameter(Mandatory=$false)]
[string[]]$npm_flags = @()
)

if (-not (Get-Command "npm" -ErrorAction SilentlyContinue)) {
Write-Host "npm could not be found. Is Node.js installed?"
exit 1
}

Push-Location $connector_path -ErrorAction Stop
try {
try {
$packageJson = Get-Content 'package.json' -Raw | ConvertFrom-Json
$existing_connector_version = $packageJson.dependencies.'@hasura/ndc-lambda-sdk'
} catch {
Write-Host "Unable to read the @hasura/ndc-lambda-sdk version from your package.json"
Write-Host "Please manually upgrade the @hasura/ndc-lambda-sdk package in your package.json to version $target_connector_version"
exit 1
}

if (-not $existing_connector_version) {
# This is very strange, their package.json must have the SDK installed but doesn't
# We'll roll with it and just install the package
Write-Host "Missing the @hasura/ndc-lambda-sdk package in your package.json. Installing version $target_connector_version"
} else {
Write-Host "Upgrading @hasura/ndc-lambda-sdk package from version $existing_connector_version to version $target_connector_version"
}

try {
& npm install "@hasura/ndc-lambda-sdk@$target_connector_version" --save-exact --no-update-notifier @npm_flags
$exit_status = $LASTEXITCODE
} catch {
$exit_status = 1
}

if ($exit_status -ne 0) {
Write-Host "Failed to upgrade @hasura/ndc-lambda-sdk package to version $target_connector_version"
Write-Host "Please manually upgrade the @hasura/ndc-lambda-sdk package in your package.json to version $target_connector_version"
exit 1
}

Write-Host "Successfully upgraded @hasura/ndc-lambda-sdk package to version $target_connector_version"
} finally {
Pop-Location
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
#!/usr/bin/env bash
set -eu -o pipefail

connector_path="${1:-}"
target_connector_version="${2:-}"
npm_flags="${3:-}"

if [ -z "$connector_path" ]; then
echo "Error: connector path must be passed as the first argument"
exit 1
fi

if [ -z "$target_connector_version" ]; then
echo "Error: target connector version must be passed as the second argument"
exit 1
fi

if ! command -v npm &> /dev/null
then
echo "npm could not be found on the PATH. Is Node.js installed?"
exit 1
fi

if ! command -v jq &> /dev/null
then
echo "jq could not be found on the PATH. Is jq installed?"
exit 1
fi

cd "$connector_path"

set +e
existing_connector_version=$(jq '.dependencies["@hasura/ndc-lambda-sdk"]' -r package.json)
exit_status=$?
if [ $exit_status -ne 0 ]; then
echo "Unable to read the @hasura/ndc-lambda-sdk version from your package.json"
echo "Please manually upgrade the @hasura/ndc-lambda-sdk package in your package.json to version $target_connector_version"
exit 1
fi

if [ $existing_connector_version = "null" ]; then
# This is very strange, their package.json must have the SDK installed but doesn't
# We'll roll with it and just install the package
echo "Missing the @hasura/ndc-lambda-sdk package in your package.json. Installing version $target_connector_version"
else
echo "Upgrading @hasura/ndc-lambda-sdk package from version $existing_connector_version to version $target_connector_version"
fi

npm install "@hasura/ndc-lambda-sdk@$target_connector_version" --save-exact --no-update-notifier $npm_flags
exit_status=$?
set -e

if [ $exit_status -ne 0 ]; then
echo "Failed to upgrade @hasura/ndc-lambda-sdk package to version $target_connector_version"
echo "Please manually upgrade the @hasura/ndc-lambda-sdk package in your package.json to version $target_connector_version"
exit 1
fi

echo "Successfully upgraded @hasura/ndc-lambda-sdk package to version $target_connector_version"
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ services:
extra_hosts:
- local.hasura.dev:host-gateway
ports:
- 8061:8080
- 6962:8080
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: v2
definition:
name: account_operations
subgraph: app
source: hasura/nodejs:v1.11.0
source: hasura/nodejs:v1.16.0
context: .
envMapping:
HASURA_CONNECTOR_PORT:
Expand Down
Loading