Skip to content

Commit

Permalink
Merge branch 'dev' into rc/sc-14620/add-import-position-to-order-planner
Browse files Browse the repository at this point in the history
  • Loading branch information
robercano committed Apr 16, 2024
2 parents 69e5fea + 962b716 commit 10a3869
Show file tree
Hide file tree
Showing 66 changed files with 4,440 additions and 4,204 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/merge-main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,5 @@ jobs:
git merge --ff-only dev
git push origin main
git status
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38 changes: 38 additions & 0 deletions .github/workflows/publish-client-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Client Package

on:
workflow_call:
inputs:
npm_access_token:
required: true
type: secret
version_changed:
required: true
type: boolean

jobs:
publish-client-package:
if: ${{ inputs.version_changed }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
corepack: true

- name: Install pnpm
run: corepack enable && corepack prepare pnpm@latest --activate

- name: Install dependencies with pnpm
run: pnpm i

- name: Build with pnpm
run: pnpm build

- name: Publish package with pnpm
run: pnpm publish:npm
working-directory: sdk/sdk-client
env:
NPM_ACCESS_TOKEN: ${{ inputs.npm_access_token }}
38 changes: 38 additions & 0 deletions .github/workflows/publish-common-package.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Publish Common Package

on:
workflow_call:
inputs:
npm_access_token:
required: true
type: secret
version_changed:
required: true
type: boolean

jobs:
publish-common-package:
if: ${{ inputs.version_changed }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org'
corepack: true

- name: Install pnpm
run: corepack enable && corepack prepare pnpm@latest --activate

- name: Install dependencies with pnpm
run: pnpm i

- name: Build with pnpm
run: pnpm build

- name: Publish package with pnpm
run: pnpm publish:npm
working-directory: sdk/sdk-common
env:
NPM_ACCESS_TOKEN: ${{ inputs.npm_access_token }}
92 changes: 92 additions & 0 deletions .github/workflows/publish-packages-manually.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
name: Publish Packages Manually

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false

on:
workflow_dispatch:
inputs:
branch:
description: 'Branch name'
required: true
type: choice
options:
- 'main'
- 'dev'
publish_option:
description: 'Select package(s) to publish'
required: true
type: choice
options:
- 'common'
- 'client'
- 'all'

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
common_changed: ${{ steps.common-version-check.outputs.changed }}
client_changed: ${{ steps.client-version-check.outputs.changed }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
ref: ${{ github.event.inputs.branch || github.ref_name }}
- id: common-version-check
run: |
if git diff HEAD^ HEAD -- sdk/sdk-common/bundle/package.json | grep '"version":'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
- id: client-version-check
run: |
if git diff HEAD^ HEAD -- sdk/sdk-client/bundle/package.json | grep '"version":'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
publish-common:
name: Publish Common Package
runs-on: ubuntu-latest
needs: prepare
if: >-
(needs.prepare.outputs.common_changed == 'true') &&
((github.event.inputs.publish_option == 'common') || (github.event.inputs.publish_option == 'all'))
steps:
- name: Checkout all files
id: checkout
uses: actions/checkout@v4

- name: Publish the package to npmjs
id: build_image
uses: ./.github/workflows/publish-common-package.yaml
with:
npm_access_token: ${{ secrets.NPM_ACCESS_TOKEN }}
version_changed: ${{ needs.prepare.outputs.common_changed }}

publish-client:
name: Publish Client Package
runs-on: ubuntu-latest
needs: prepare
if: >-
(needs.prepare.outputs.client_changed == 'true') &&
((github.event.inputs.publish_option == 'client') || (github.event.inputs.publish_option == 'all'))
steps:
- name: Checkout all files
id: checkout
uses: actions/checkout@v4

- name: Publish the package to npmjs
id: build_image
uses: ./.github/workflows/publish-client-package.yaml
with:
npm_access_token: ${{ secrets.NPM_ACCESS_TOKEN }}
version_changed: ${{ needs.prepare.outputs.client_changed }}
56 changes: 56 additions & 0 deletions .github/workflows/publish-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Publish Packages

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: false

on:
push:
branches:
- main
paths:
- 'sdk/sdk-common/bundle/package.json'
- 'sdk/sdk-client/bundle/package.json'

jobs:
prepare:
name: Prepare
runs-on: ubuntu-latest
outputs:
common_changed: ${{ steps.common-version-check.outputs.changed }}
client_changed: ${{ steps.client-version-check.outputs.changed }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- id: common-version-check
run: |
if git diff HEAD^ HEAD -- sdk/sdk-common/bundle/package.json | grep '"version":'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
- id: client-version-check
run: |
if git diff HEAD^ HEAD -- sdk/sdk-client/bundle/package.json | grep '"version":'; then
echo "::set-output name=changed::true"
else
echo "::set-output name=changed::false"
fi
publish-common:
needs: prepare
if: ${{ needs.prepare.outputs.common_changed == 'true' }}
uses: ./.github/workflows/publish-common-package.yaml
with:
npm_access_token: ${{ secrets.NPM_ACCESS_TOKEN }}
version_changed: ${{ needs.prepare.outputs.common_changed }}

publish-client:
needs: prepare
if: ${{ needs.prepare.outputs.client_changed == 'true' }}
uses: ./.github/workflows/publish-client-package.yaml
with:
npm_access_token: ${{ secrets.NPM_ACCESS_TOKEN }}
version_changed: ${{ needs.prepare.outputs.client_changed }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,4 +66,4 @@ artifacts
.vscode

# private http envs
*.private.env.json
*.private.env.json
6 changes: 3 additions & 3 deletions __template-package__/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@
"@aws-lambda-powertools/metrics": "^1.17.0",
"@aws-lambda-powertools/tracer": "^1.17.0",
"@summerfi/serverless-shared": "workspace:*",
"@summerfi/template-function": "link:",
"typescript": "^5.3.3"
"@summerfi/template-function": "link:"
},
"devDependencies": {
"@summerfi/eslint-config": "workspace:*",
"@summerfi/jest-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*"
"@summerfi/typescript-config": "workspace:*",
"typescript": "^5.4.5"
}
}
16 changes: 8 additions & 8 deletions external-api/get-collateral-locked-function/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@aws-lambda-powertools/logger": "^2.0.2",
"@aws-lambda-powertools/metrics": "^2.0.2",
"@aws-lambda-powertools/tracer": "^2.0.2",
"@summerfi/serverless-shared": "workspace:*",
"@aws-lambda-powertools/logger": "^2.0.4",
"@aws-lambda-powertools/metrics": "^2.0.4",
"@aws-lambda-powertools/tracer": "^2.0.4",
"@summerfi/aave-spark-subgraph": "workspace:*",
"@summerfi/ajna-subgraph": "workspace:*",
"@summerfi/morpho-blue-subgraph": "workspace:*",
"zod": "^3.22.4",
"bignumber.js": "^9.1.2"
"@summerfi/serverless-shared": "workspace:*",
"bignumber.js": "^9.1.2",
"zod": "^3.22.4"
},
"devDependencies": {
"@summerfi/eslint-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*",
"@types/node": "^20.11.5",
"eslint": "^8.56.0",
"@types/node": "^20.12.7",
"eslint": "^8.57.0",
"jest": "^29.7.0"
}
}
43 changes: 21 additions & 22 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,33 +21,34 @@
"format:fix": "prettier --write \"./**/*.{ts,tsx,js,jsx,json}\""
},
"devDependencies": {
"@graphql-codegen/add": "^5.0.0",
"@graphql-codegen/cli": "^5.0.0",
"@graphql-codegen/typed-document-node": "^5.0.1",
"@graphql-codegen/typescript": "^4.0.1",
"@graphql-codegen/typescript-operations": "^4.0.1",
"@graphql-codegen/add": "^5.0.2",
"@graphql-codegen/cli": "^5.0.2",
"@graphql-codegen/typed-document-node": "^5.0.6",
"@graphql-codegen/typescript": "^4.0.6",
"@graphql-codegen/typescript-operations": "^4.2.0",
"@graphql-typed-document-node/core": "^3.2.0",
"@summerfi/eslint-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*",
"@tsconfig/node20": "^20.1.2",
"@types/aws-lambda": "^8.10.126",
"@types/jest": "^29.5.8",
"@types/node": "^20.11.5",
"aws-cdk-lib": "2.110.1",
"@tsconfig/node20": "^20.1.4",
"@types/aws-lambda": "^8.10.137",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.7",
"aws-cdk-lib": "2.137.0",
"constructs": "10.3.0",
"dotenv": "^16.3.1",
"esbuild": "^0.19.8",
"eslint": "^8.56.0",
"dotenv": "^16.4.5",
"esbuild": "^0.20.2",
"eslint": "^8.57.0",
"jest": "^29.7.0",
"jest-expect-message": "^1.1.3",
"jest-extended": "^4.0.2",
"prettier": "^3.2.2",
"sst": "^2.39.7",
"ts-jest": "^29.1.1",
"madge": "^7.0.0",
"prettier": "^3.2.5",
"sst": "^2.41.4",
"ts-jest": "^29.1.2",
"tsc-alias": "^1.8.8",
"turbo": "^1.12.5",
"typescript": "^5.3.3",
"zx": "^7.2.3"
"turbo": "^1.13.2",
"typescript": "^5.4.5",
"zx": "^8.0.1"
},
"name": "summerfi-monorepo",
"packageManager": "pnpm@8.15.4",
Expand All @@ -56,8 +57,6 @@
},
"dependencies": {
"bignumber.js": "^9.1.2",
"madge": "^6.1.0",
"typescript": "^5.3.3",
"viem": "^2.9.3"
"viem": "^2.9.19"
}
}
10 changes: 5 additions & 5 deletions packages/aave-spark-subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@aws-lambda-powertools/logger": "^2.0.2",
"graphql-request": "^6.1.0",
"@summerfi/serverless-shared": "workspace:*"
"@aws-lambda-powertools/logger": "^2.0.4",
"@summerfi/serverless-shared": "workspace:*",
"graphql-request": "^6.1.0"
},
"devDependencies": {
"@summerfi/eslint-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*",
"@types/node": "^20.11.5",
"eslint": "^8.56.0"
"@types/node": "^20.12.7",
"eslint": "^8.57.0"
}
}
2 changes: 1 addition & 1 deletion packages/abis/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"devDependencies": {
"@summerfi/eslint-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*",
"eslint": "^8.56.0"
"eslint": "^8.57.0"
},
"exports": {
".": {
Expand Down
10 changes: 5 additions & 5 deletions packages/ajna-subgraph/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@aws-lambda-powertools/logger": "^2.0.2",
"graphql-request": "^6.1.0",
"@summerfi/serverless-shared": "workspace:*"
"@aws-lambda-powertools/logger": "^2.0.4",
"@summerfi/serverless-shared": "workspace:*",
"graphql-request": "^6.1.0"
},
"devDependencies": {
"@summerfi/eslint-config": "workspace:*",
"@summerfi/typescript-config": "workspace:*",
"@types/node": "^20.11.5",
"eslint": "^8.56.0"
"@types/node": "^20.12.7",
"eslint": "^8.57.0"
}
}
Loading

0 comments on commit 10a3869

Please sign in to comment.