Skip to content

Commit

Permalink
fix: Add 'npm build' step when publishing cohort_sdk_client; examples…
Browse files Browse the repository at this point in the history
…/cohort_banking_with_sdk.rs should load configs from env; Do not print misleading througput from duration histograms;
  • Loading branch information
fmarek-kindred committed Jul 15, 2024
1 parent 4bdc6d4 commit 4ffd40a
Show file tree
Hide file tree
Showing 14 changed files with 518 additions and 1,163 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ jobs:
rm package-lock.json || true
echo "D: npm install $SDK_JS_PACKAGE_NAME@$VERSION_NAME --foreground-scripts"
npm install $SDK_JS_PACKAGE_NAME@$VERSION_NAME --foreground-scripts
npm build
npm version
pwd
ls -l
npm publish --foreground-scripts
echo ""
cd $currentDir
Expand Down
46 changes: 24 additions & 22 deletions cohort_banking_initiator_js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion cohort_banking_initiator_js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"typescript": "^5.1.6"
},
"dependencies": {
"@kindredgroup/cohort_sdk_client": "^0.0.1",
"@kindredgroup/cohort_sdk_client": "0.2.12",
"pg": "^8.11.3",
"winston": "^3.10.0"
}
Expand Down
2 changes: 1 addition & 1 deletion cohort_banking_initiator_js/src/banking-app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class BankingApp {
async () => {
const s = Date.now()
const newRequest = await this.createNewRequest(tx) as any
logger.info("%s", JSON.stringify(newRequest, null, 2))
logger.debug("%s", JSON.stringify(newRequest, null, 2))
const n = Date.now()
stateEnd = n - span_s
stateDuration = n - s
Expand Down
3 changes: 1 addition & 2 deletions cohort_banking_initiator_js/src/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ const logger = createLogger({
format.timestamp(),
format.align(),
format.splat(),
format.simple()
format.printf(({ timestamp, level, message }) => `${ timestamp } - ${ level }: ${ message }`)
),
// defaultMeta: { service: "cohort_banking_js" },
transports: [
new transports.Console()
],
Expand Down
Loading

0 comments on commit 4ffd40a

Please sign in to comment.