Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
tubackkhoa committed Nov 28, 2023
2 parents 34bd377 + 5f97862 commit 9d80d3d
Show file tree
Hide file tree
Showing 265 changed files with 14,735 additions and 8,625 deletions.
10 changes: 10 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
node_modules
bin
pkg
target
coverage
dist
build
packages/contracts-{build,sdk}
packages/oraidex-common-ui

60 changes: 60 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
{
"root": true,
"env": {
"node": true,
"commonjs": true,
"es2021": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:security/recommended",
"plugin:import/recommended"
],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": "latest"
},
"settings": {
"import/resolver": {
"node": true,
"typescript": true
}
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"no-console": "off",
"quotes": [
"error",
"double"
],
"semi": [
"error",
"always"
]
},
"overrides": [
{
"files": [
"*.ts",
"*.tsx"
],
"rules": {
"@typescript-eslint/no-explicit-any": [
"warn"
],
"@typescript-eslint/no-unused-vars": "warn"
}
},
{
"files": [
"*.js"
],
"rules": {
"@typescript-eslint/no-var-requires": "warn"
}
}
]
}
2 changes: 1 addition & 1 deletion .github/workflows/publish_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build packages/contracts-sdk && yarn build packages/oraidex-sync && yarn --cwd packages/oraidex-server/ build && yarn build packages/oraidex-common && yarn build packages/universal-swap
run: yarn build && yarn build-tsc packages/oraidex-sync && yarn --cwd packages/oraidex-server/ build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Oraidex Server
Expand Down
62 changes: 62 additions & 0 deletions .github/workflows/publish_package_common_ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: publish_package_common_ui

# Controls when the action will run.
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [feat/add-chart-ui]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
node-version: ["18"]

steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache
with:
path: |
${{ steps.yarn-cache-dir-path.outputs.dir }}
./node_modules/
key: ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Oraidex Common UI
id: publish-common-ui
continue-on-error: true
run: yarn deploy packages/oraidex-common-ui
env:
CI: false
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: send result via discord
uses: appleboy/discord-action@master
with:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
username: "GitBot"
message: "Repo oraidex-sdk has just published. Oraidex common-ui: ${{ steps.publish-common-ui.outcome }}. ${{ github.event.head_commit.author.name }}"
4 changes: 2 additions & 2 deletions .github/workflows/publish_package_universal_common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build packages/contracts-sdk && yarn build packages/oraidex-common && yarn build packages/universal-swap
run: yarn build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish Oraidex Common
Expand All @@ -67,4 +67,4 @@ jobs:
webhook_id: ${{ secrets.WEBHOOK_ID }}
webhook_token: ${{ secrets.WEBHOOK_TOKEN }}
username: "GitBot"
message: "Repo oraidex-sdk has just published. Oraidex common: ${{ steps.publish-common.outcome }}. Universal swap: ${{ steps.publish-universal-swap.outcome }}"
message: "Repo oraidex-sdk has just published. Oraidex common: ${{ steps.publish-common.outcome }}. Universal swap: ${{ steps.publish-universal-swap.outcome }}"
2 changes: 1 addition & 1 deletion .github/workflows/publish_staging_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn
- name: Build
run: yarn build packages/contracts-sdk && yarn build packages/oraidex-sync && yarn --cwd packages/oraidex-server-staging/ build
run: yarn build-tsc packages/contracts-sdk && yarn build-tsc packages/oraidex-sync && yarn --cwd packages/oraidex-server-staging/ build
- name: Authenticate with private NPM package
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
- name: Publish
Expand Down
6 changes: 6 additions & 0 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"singleQuote": false,
"trailingComma": "none",
"jsxSingleQuote": false,
"printWidth": 120
}
2 changes: 1 addition & 1 deletion docs/assets/search.js

Large diffs are not rendered by default.

Loading

0 comments on commit 9d80d3d

Please sign in to comment.