diff --git a/.github/workflows/client_portal.yaml b/.github/workflows/client_portal.yaml index b22ca4e423..97e531c78e 100644 --- a/.github/workflows/client_portal.yaml +++ b/.github/workflows/client_portal.yaml @@ -57,4 +57,4 @@ jobs: cd client-portal echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin docker build -t erxes/client-portal:${GITHUB_REF#refs/heads/} -f Dockerfile . - docker push erxes/client-portal:${GITHUB_REF#refs/heads/} + docker push erxes/client-portal:${GITHUB_REF#refs/heads/} \ No newline at end of file diff --git a/.github/workflows/core.yaml b/.github/workflows/core.yaml index 08c4c33d82..04b456a668 100644 --- a/.github/workflows/core.yaml +++ b/.github/workflows/core.yaml @@ -14,22 +14,22 @@ on: jobs: core: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/coreui.yaml b/.github/workflows/coreui.yaml index e95aba223c..64832776b3 100644 --- a/.github/workflows/coreui.yaml +++ b/.github/workflows/coreui.yaml @@ -17,15 +17,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Build run: | diff --git a/.github/workflows/crons.yaml b/.github/workflows/crons.yaml index 3b73cba260..64e44991c3 100644 --- a/.github/workflows/crons.yaml +++ b/.github/workflows/crons.yaml @@ -13,22 +13,22 @@ on: jobs: crons: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/dashboard.yaml b/.github/workflows/dashboard.yaml index 3ad4c21b7c..b43df657e2 100644 --- a/.github/workflows/dashboard.yaml +++ b/.github/workflows/dashboard.yaml @@ -14,26 +14,26 @@ on: jobs: dashboard: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-dashboard-${{ hashFiles('yarn.lock', 'dashboard/yarn.lock') }} + key: ${{ runner.os }}-yarn-dashboard-${{ hashFiles('yarn.lock', 'plugin-dashboard-api/yarn.lock') }} restore-keys: | ${{ runner.os }}-yarn-dashboard ${{ runner.os }}-yarn- diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index adc4900254..e6f596facb 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -100,4 +100,4 @@ jobs: git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "github-actions[bot]" yarn install --frozen-lockfile - yarn deploy + yarn deploy \ No newline at end of file diff --git a/.github/workflows/email_verifier.yaml b/.github/workflows/email_verifier.yaml index 499024d610..4f3177ec86 100644 --- a/.github/workflows/email_verifier.yaml +++ b/.github/workflows/email_verifier.yaml @@ -66,4 +66,4 @@ jobs: cd email-verifier echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin docker build -t erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/} -f Dockerfile . - docker push erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/} + docker push erxes/erxes-email-verifier:${GITHUB_REF#refs/heads/} \ No newline at end of file diff --git a/.github/workflows/gateway.yaml b/.github/workflows/gateway.yaml index 454a445956..6f75cdf02e 100644 --- a/.github/workflows/gateway.yaml +++ b/.github/workflows/gateway.yaml @@ -17,19 +17,19 @@ jobs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-assets-api.yaml b/.github/workflows/plugin-assets-api.yaml index 34008f1d5b..19ff2d4778 100644 --- a/.github/workflows/plugin-assets-api.yaml +++ b/.github/workflows/plugin-assets-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-assets-ui.yaml b/.github/workflows/plugin-assets-ui.yaml index c1a8fffdd1..b2dc627e8b 100644 --- a/.github/workflows/plugin-assets-ui.yaml +++ b/.github/workflows/plugin-assets-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-automations-api.yaml b/.github/workflows/plugin-automations-api.yaml index f425892ec6..1d77c1082d 100644 --- a/.github/workflows/plugin-automations-api.yaml +++ b/.github/workflows/plugin-automations-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-automations-ui.yaml b/.github/workflows/plugin-automations-ui.yaml index ca35b84657..735cba5270 100644 --- a/.github/workflows/plugin-automations-ui.yaml +++ b/.github/workflows/plugin-automations-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-block-api.yaml b/.github/workflows/plugin-block-api.yaml index e579ee5936..77e730b857 100644 --- a/.github/workflows/plugin-block-api.yaml +++ b/.github/workflows/plugin-block-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-block-ui.yaml b/.github/workflows/plugin-block-ui.yaml index f1f4ed365e..a615b96fa9 100644 --- a/.github/workflows/plugin-block-ui.yaml +++ b/.github/workflows/plugin-block-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-calendar-ui.yaml b/.github/workflows/plugin-calendar-ui.yaml index bd3c4214e5..6d367058e9 100644 --- a/.github/workflows/plugin-calendar-ui.yaml +++ b/.github/workflows/plugin-calendar-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-calls-api.yaml b/.github/workflows/plugin-calls-api.yaml index 2748f9e21a..bc4da3f615 100644 --- a/.github/workflows/plugin-calls-api.yaml +++ b/.github/workflows/plugin-calls-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-calls-ui.yaml b/.github/workflows/plugin-calls-ui.yaml index eeb688041f..d7b4105a0a 100644 --- a/.github/workflows/plugin-calls-ui.yaml +++ b/.github/workflows/plugin-calls-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-cards-api.yaml b/.github/workflows/plugin-cards-api.yaml index e1ece83f82..ecc139a102 100644 --- a/.github/workflows/plugin-cards-api.yaml +++ b/.github/workflows/plugin-cards-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-cards-ui.yaml b/.github/workflows/plugin-cards-ui.yaml index 7b751b24c5..82239461f1 100644 --- a/.github/workflows/plugin-cards-ui.yaml +++ b/.github/workflows/plugin-cards-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-cars-api.yaml b/.github/workflows/plugin-cars-api.yaml index 96dde44932..429795d582 100644 --- a/.github/workflows/plugin-cars-api.yaml +++ b/.github/workflows/plugin-cars-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-cars-ui.yaml b/.github/workflows/plugin-cars-ui.yaml index 2190b71ea9..eb68e62c01 100644 --- a/.github/workflows/plugin-cars-ui.yaml +++ b/.github/workflows/plugin-cars-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-chats-api.yaml b/.github/workflows/plugin-chats-api.yaml index 4d71f07924..0790ac3e71 100644 --- a/.github/workflows/plugin-chats-api.yaml +++ b/.github/workflows/plugin-chats-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-chats-ui.yaml b/.github/workflows/plugin-chats-ui.yaml index de99820f5b..90f697f6c8 100644 --- a/.github/workflows/plugin-chats-ui.yaml +++ b/.github/workflows/plugin-chats-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-clientportal-api.yaml b/.github/workflows/plugin-clientportal-api.yaml index 80c9680401..85022ee3e5 100644 --- a/.github/workflows/plugin-clientportal-api.yaml +++ b/.github/workflows/plugin-clientportal-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-clientportal-ui.yaml b/.github/workflows/plugin-clientportal-ui.yaml index 45f9fbd98e..b482a2262a 100644 --- a/.github/workflows/plugin-clientportal-ui.yaml +++ b/.github/workflows/plugin-clientportal-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-contacts-api.yaml b/.github/workflows/plugin-contacts-api.yaml index 684f0a73e4..32e5ec85ff 100644 --- a/.github/workflows/plugin-contacts-api.yaml +++ b/.github/workflows/plugin-contacts-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-contacts-ui.yaml b/.github/workflows/plugin-contacts-ui.yaml index 3d69020447..4ce366e05b 100644 --- a/.github/workflows/plugin-contacts-ui.yaml +++ b/.github/workflows/plugin-contacts-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-dashboard-api.yaml b/.github/workflows/plugin-dashboard-api.yaml index f98e61d467..b0253a0dbf 100644 --- a/.github/workflows/plugin-dashboard-api.yaml +++ b/.github/workflows/plugin-dashboard-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-dashboard-ui.yaml b/.github/workflows/plugin-dashboard-ui.yaml index 64f70fbabd..a6de6f268c 100644 --- a/.github/workflows/plugin-dashboard-ui.yaml +++ b/.github/workflows/plugin-dashboard-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-documents-api.yaml b/.github/workflows/plugin-documents-api.yaml index dd7b57f327..c9d905c17d 100644 --- a/.github/workflows/plugin-documents-api.yaml +++ b/.github/workflows/plugin-documents-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-documents-ui.yaml b/.github/workflows/plugin-documents-ui.yaml index 9bdf416b03..16c31cd161 100644 --- a/.github/workflows/plugin-documents-ui.yaml +++ b/.github/workflows/plugin-documents-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-ebarimt-api.yaml b/.github/workflows/plugin-ebarimt-api.yaml index 1273071dfd..3bc0f875d3 100644 --- a/.github/workflows/plugin-ebarimt-api.yaml +++ b/.github/workflows/plugin-ebarimt-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-ebarimt-ui.yaml b/.github/workflows/plugin-ebarimt-ui.yaml index c51f70b368..18c01b01d5 100644 --- a/.github/workflows/plugin-ebarimt-ui.yaml +++ b/.github/workflows/plugin-ebarimt-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-ecommerce-api.yaml b/.github/workflows/plugin-ecommerce-api.yaml index e941bf8627..6ad26f8189 100644 --- a/.github/workflows/plugin-ecommerce-api.yaml +++ b/.github/workflows/plugin-ecommerce-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-emailtemplates-api.yaml b/.github/workflows/plugin-emailtemplates-api.yaml index ecc61383e0..2e94a91f67 100644 --- a/.github/workflows/plugin-emailtemplates-api.yaml +++ b/.github/workflows/plugin-emailtemplates-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-emailtemplates-ui.yaml b/.github/workflows/plugin-emailtemplates-ui.yaml index 6482b6289a..f144808a1e 100644 --- a/.github/workflows/plugin-emailtemplates-ui.yaml +++ b/.github/workflows/plugin-emailtemplates-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-engages-api.yaml b/.github/workflows/plugin-engages-api.yaml index 36786ddc02..5b6e773b77 100644 --- a/.github/workflows/plugin-engages-api.yaml +++ b/.github/workflows/plugin-engages-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-engages-ui.yaml b/.github/workflows/plugin-engages-ui.yaml index a0f783e024..7714e1c4e5 100644 --- a/.github/workflows/plugin-engages-ui.yaml +++ b/.github/workflows/plugin-engages-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-exm-api.yaml b/.github/workflows/plugin-exm-api.yaml index b177186045..c5dc6740bd 100644 --- a/.github/workflows/plugin-exm-api.yaml +++ b/.github/workflows/plugin-exm-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-exm-ui.yaml b/.github/workflows/plugin-exm-ui.yaml index bed71c5703..cb32c09d5f 100644 --- a/.github/workflows/plugin-exm-ui.yaml +++ b/.github/workflows/plugin-exm-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-exmfeed-api.yaml b/.github/workflows/plugin-exmfeed-api.yaml index 1c0ce81ea3..2b87eeb1ac 100644 --- a/.github/workflows/plugin-exmfeed-api.yaml +++ b/.github/workflows/plugin-exmfeed-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-exmfeed-ui.yaml b/.github/workflows/plugin-exmfeed-ui.yaml index c47e67eeef..b0121060ca 100644 --- a/.github/workflows/plugin-exmfeed-ui.yaml +++ b/.github/workflows/plugin-exmfeed-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-facebook-api.yaml b/.github/workflows/plugin-facebook-api.yaml index 2c7f6ca2e0..1a799bcf07 100644 --- a/.github/workflows/plugin-facebook-api.yaml +++ b/.github/workflows/plugin-facebook-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-facebook-ui.yaml b/.github/workflows/plugin-facebook-ui.yaml index 60d811d403..d00cffddf0 100644 --- a/.github/workflows/plugin-facebook-ui.yaml +++ b/.github/workflows/plugin-facebook-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-filemanager-api.yaml b/.github/workflows/plugin-filemanager-api.yaml index 581a7d800a..268da000cf 100644 --- a/.github/workflows/plugin-filemanager-api.yaml +++ b/.github/workflows/plugin-filemanager-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-filemanager-ui.yaml b/.github/workflows/plugin-filemanager-ui.yaml index 22ac69aa5c..7514f36055 100644 --- a/.github/workflows/plugin-filemanager-ui.yaml +++ b/.github/workflows/plugin-filemanager-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-forms-api.yaml b/.github/workflows/plugin-forms-api.yaml index 8cba203b1d..4e7f1637c0 100644 --- a/.github/workflows/plugin-forms-api.yaml +++ b/.github/workflows/plugin-forms-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-forms-ui.yaml b/.github/workflows/plugin-forms-ui.yaml index 1c9ddae0d6..efa943f88f 100644 --- a/.github/workflows/plugin-forms-ui.yaml +++ b/.github/workflows/plugin-forms-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-forum-api.yaml b/.github/workflows/plugin-forum-api.yaml index 8649ded32a..a2efb86785 100644 --- a/.github/workflows/plugin-forum-api.yaml +++ b/.github/workflows/plugin-forum-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-forum-ui.yaml b/.github/workflows/plugin-forum-ui.yaml index 0ff713d163..5d0ba63cfa 100644 --- a/.github/workflows/plugin-forum-ui.yaml +++ b/.github/workflows/plugin-forum-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-grants-api.yaml b/.github/workflows/plugin-grants-api.yaml index e01749436f..3c78338eee 100644 --- a/.github/workflows/plugin-grants-api.yaml +++ b/.github/workflows/plugin-grants-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-grants-ui.yaml b/.github/workflows/plugin-grants-ui.yaml index bc2bea4e08..98d8a700eb 100644 --- a/.github/workflows/plugin-grants-ui.yaml +++ b/.github/workflows/plugin-grants-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-imap-api.yaml b/.github/workflows/plugin-imap-api.yaml index b62e0267db..e0a88989f5 100644 --- a/.github/workflows/plugin-imap-api.yaml +++ b/.github/workflows/plugin-imap-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-imap-ui.yaml b/.github/workflows/plugin-imap-ui.yaml index a365fceb93..1d5e44de51 100644 --- a/.github/workflows/plugin-imap-ui.yaml +++ b/.github/workflows/plugin-imap-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-inbox-api.yaml b/.github/workflows/plugin-inbox-api.yaml index 6a2864e5af..a5ece799e7 100644 --- a/.github/workflows/plugin-inbox-api.yaml +++ b/.github/workflows/plugin-inbox-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-inbox-ui.yaml b/.github/workflows/plugin-inbox-ui.yaml index 17febc5387..7693775f82 100644 --- a/.github/workflows/plugin-inbox-ui.yaml +++ b/.github/workflows/plugin-inbox-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-integrations-api.yaml b/.github/workflows/plugin-integrations-api.yaml index e2d486f755..82e1d47241 100644 --- a/.github/workflows/plugin-integrations-api.yaml +++ b/.github/workflows/plugin-integrations-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-internalnotes-api.yaml b/.github/workflows/plugin-internalnotes-api.yaml index 7577483eed..bbd91b8e43 100644 --- a/.github/workflows/plugin-internalnotes-api.yaml +++ b/.github/workflows/plugin-internalnotes-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-inventories-api.yaml b/.github/workflows/plugin-inventories-api.yaml index b9ab9949e8..05ac73a121 100644 --- a/.github/workflows/plugin-inventories-api.yaml +++ b/.github/workflows/plugin-inventories-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-inventories-ui.yaml b/.github/workflows/plugin-inventories-ui.yaml index 4f8d799ff1..01d88970b6 100644 --- a/.github/workflows/plugin-inventories-ui.yaml +++ b/.github/workflows/plugin-inventories-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-khanbank-api.yaml b/.github/workflows/plugin-khanbank-api.yaml index ded08dec22..0959c210a6 100644 --- a/.github/workflows/plugin-khanbank-api.yaml +++ b/.github/workflows/plugin-khanbank-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-khanbank-ui.yaml b/.github/workflows/plugin-khanbank-ui.yaml index aa01f67ff1..33c59c18e4 100644 --- a/.github/workflows/plugin-khanbank-ui.yaml +++ b/.github/workflows/plugin-khanbank-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-knowledgebase-api.yaml b/.github/workflows/plugin-knowledgebase-api.yaml index 57bab103f9..f4ddd7101a 100644 --- a/.github/workflows/plugin-knowledgebase-api.yaml +++ b/.github/workflows/plugin-knowledgebase-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-knowledgebase-ui.yaml b/.github/workflows/plugin-knowledgebase-ui.yaml index 227c740d8e..ab319e6947 100644 --- a/.github/workflows/plugin-knowledgebase-ui.yaml +++ b/.github/workflows/plugin-knowledgebase-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-loans-api.yaml b/.github/workflows/plugin-loans-api.yaml index 5ec7023949..ed0ce6a52a 100644 --- a/.github/workflows/plugin-loans-api.yaml +++ b/.github/workflows/plugin-loans-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-loans-ui.yaml b/.github/workflows/plugin-loans-ui.yaml index 3ad25884c2..22afadfb90 100644 --- a/.github/workflows/plugin-loans-ui.yaml +++ b/.github/workflows/plugin-loans-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-logs-api.yaml b/.github/workflows/plugin-logs-api.yaml index 97aa352bd2..6568ed0261 100644 --- a/.github/workflows/plugin-logs-api.yaml +++ b/.github/workflows/plugin-logs-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-logs-ui.yaml b/.github/workflows/plugin-logs-ui.yaml index 890d470ecb..e8bfdbc6a1 100644 --- a/.github/workflows/plugin-logs-ui.yaml +++ b/.github/workflows/plugin-logs-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-loyalties-api.yaml b/.github/workflows/plugin-loyalties-api.yaml index 438733a2fb..587cbf1f5d 100644 --- a/.github/workflows/plugin-loyalties-api.yaml +++ b/.github/workflows/plugin-loyalties-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-loyalties-ui.yaml b/.github/workflows/plugin-loyalties-ui.yaml index 36a00da2e0..beabc63638 100644 --- a/.github/workflows/plugin-loyalties-ui.yaml +++ b/.github/workflows/plugin-loyalties-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-meetings-api.yaml b/.github/workflows/plugin-meetings-api.yaml index 3de9e0f049..7172ba7a9b 100644 --- a/.github/workflows/plugin-meetings-api.yaml +++ b/.github/workflows/plugin-meetings-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-meetings-ui.yaml b/.github/workflows/plugin-meetings-ui.yaml index 75da079ee1..2b6422f1a0 100644 --- a/.github/workflows/plugin-meetings-ui.yaml +++ b/.github/workflows/plugin-meetings-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-notifications-api.yaml b/.github/workflows/plugin-notifications-api.yaml index 6ae016883b..8e4854306c 100644 --- a/.github/workflows/plugin-notifications-api.yaml +++ b/.github/workflows/plugin-notifications-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-notifications-ui.yaml b/.github/workflows/plugin-notifications-ui.yaml index 5ac81fb1cf..e5c2ece9da 100644 --- a/.github/workflows/plugin-notifications-ui.yaml +++ b/.github/workflows/plugin-notifications-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-payment-api.yaml b/.github/workflows/plugin-payment-api.yaml index 7aceb70e1a..e67f4eaea9 100644 --- a/.github/workflows/plugin-payment-api.yaml +++ b/.github/workflows/plugin-payment-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-payment-ui.yaml b/.github/workflows/plugin-payment-ui.yaml index 653617a9e3..aefbc2ec5f 100644 --- a/.github/workflows/plugin-payment-ui.yaml +++ b/.github/workflows/plugin-payment-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-pos-api.yaml b/.github/workflows/plugin-pos-api.yaml index aaf0f9045a..e104a00213 100644 --- a/.github/workflows/plugin-pos-api.yaml +++ b/.github/workflows/plugin-pos-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-pos-ui.yaml b/.github/workflows/plugin-pos-ui.yaml index fb445c21d1..77bd1ad3a3 100644 --- a/.github/workflows/plugin-pos-ui.yaml +++ b/.github/workflows/plugin-pos-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-posclient-api.yaml b/.github/workflows/plugin-posclient-api.yaml index 8124b0f5e5..88030cc513 100644 --- a/.github/workflows/plugin-posclient-api.yaml +++ b/.github/workflows/plugin-posclient-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-pricing-api.yaml b/.github/workflows/plugin-pricing-api.yaml index 23422d9ef9..d75196b1ee 100644 --- a/.github/workflows/plugin-pricing-api.yaml +++ b/.github/workflows/plugin-pricing-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-pricing-ui.yaml b/.github/workflows/plugin-pricing-ui.yaml index 3501b00c90..a425d54a8d 100644 --- a/.github/workflows/plugin-pricing-ui.yaml +++ b/.github/workflows/plugin-pricing-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-processes-api.yaml b/.github/workflows/plugin-processes-api.yaml index 780d02f46b..e86cf8005f 100644 --- a/.github/workflows/plugin-processes-api.yaml +++ b/.github/workflows/plugin-processes-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-processes-ui.yaml b/.github/workflows/plugin-processes-ui.yaml index b25cb11a2e..29884fc4c4 100644 --- a/.github/workflows/plugin-processes-ui.yaml +++ b/.github/workflows/plugin-processes-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-productplaces-api.yaml b/.github/workflows/plugin-productplaces-api.yaml index fa5cb2821b..171effa35f 100644 --- a/.github/workflows/plugin-productplaces-api.yaml +++ b/.github/workflows/plugin-productplaces-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-productplaces-ui.yaml b/.github/workflows/plugin-productplaces-ui.yaml index fc558b9c17..7daa2677d1 100644 --- a/.github/workflows/plugin-productplaces-ui.yaml +++ b/.github/workflows/plugin-productplaces-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-products-api.yaml b/.github/workflows/plugin-products-api.yaml index 3e4ce997e7..09e8a7b1a8 100644 --- a/.github/workflows/plugin-products-api.yaml +++ b/.github/workflows/plugin-products-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-products-ui.yaml b/.github/workflows/plugin-products-ui.yaml index 7d02c1a184..79c7399328 100644 --- a/.github/workflows/plugin-products-ui.yaml +++ b/.github/workflows/plugin-products-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-reactions-api.yaml b/.github/workflows/plugin-reactions-api.yaml index 23680e3647..8cc2a969fb 100644 --- a/.github/workflows/plugin-reactions-api.yaml +++ b/.github/workflows/plugin-reactions-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-riskassessment-api.yaml b/.github/workflows/plugin-riskassessment-api.yaml index c197db6cf4..493beac885 100644 --- a/.github/workflows/plugin-riskassessment-api.yaml +++ b/.github/workflows/plugin-riskassessment-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-riskassessment-ui.yaml b/.github/workflows/plugin-riskassessment-ui.yaml index b7948dbc8e..a3785caf1a 100644 --- a/.github/workflows/plugin-riskassessment-ui.yaml +++ b/.github/workflows/plugin-riskassessment-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-salesplans-api.yaml b/.github/workflows/plugin-salesplans-api.yaml index e8a5f0c90e..9ecbb94651 100644 --- a/.github/workflows/plugin-salesplans-api.yaml +++ b/.github/workflows/plugin-salesplans-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-salesplans-ui.yaml b/.github/workflows/plugin-salesplans-ui.yaml index b538d0e288..485a33f84e 100644 --- a/.github/workflows/plugin-salesplans-ui.yaml +++ b/.github/workflows/plugin-salesplans-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-sample-api.yaml b/.github/workflows/plugin-sample-api.yaml index 6e6740858c..cfca99cf15 100644 --- a/.github/workflows/plugin-sample-api.yaml +++ b/.github/workflows/plugin-sample-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-sample-ui.yaml b/.github/workflows/plugin-sample-ui.yaml index 5c5b8f25bb..2ff923db74 100644 --- a/.github/workflows/plugin-sample-ui.yaml +++ b/.github/workflows/plugin-sample-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-segments-api.yaml b/.github/workflows/plugin-segments-api.yaml index 756e97ca41..07fc2ac4ad 100644 --- a/.github/workflows/plugin-segments-api.yaml +++ b/.github/workflows/plugin-segments-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-segments-ui.yaml b/.github/workflows/plugin-segments-ui.yaml index 6f5f2e58b1..f2e36b9cd5 100644 --- a/.github/workflows/plugin-segments-ui.yaml +++ b/.github/workflows/plugin-segments-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-syncerkhet-api.yaml b/.github/workflows/plugin-syncerkhet-api.yaml index 77e8af58e1..ebba4c4ba5 100644 --- a/.github/workflows/plugin-syncerkhet-api.yaml +++ b/.github/workflows/plugin-syncerkhet-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-syncerkhet-ui.yaml b/.github/workflows/plugin-syncerkhet-ui.yaml index 384fa0f1f2..49fd443768 100644 --- a/.github/workflows/plugin-syncerkhet-ui.yaml +++ b/.github/workflows/plugin-syncerkhet-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-tags-api.yaml b/.github/workflows/plugin-tags-api.yaml index 328f849800..c52ff71aa8 100644 --- a/.github/workflows/plugin-tags-api.yaml +++ b/.github/workflows/plugin-tags-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-tags-ui.yaml b/.github/workflows/plugin-tags-ui.yaml index 13a16d387e..fad4352362 100644 --- a/.github/workflows/plugin-tags-ui.yaml +++ b/.github/workflows/plugin-tags-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-timeclock-api.yaml b/.github/workflows/plugin-timeclock-api.yaml index d6f88d7084..3dece55309 100644 --- a/.github/workflows/plugin-timeclock-api.yaml +++ b/.github/workflows/plugin-timeclock-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-timeclock-ui.yaml b/.github/workflows/plugin-timeclock-ui.yaml index e05a6decd3..21792ea595 100644 --- a/.github/workflows/plugin-timeclock-ui.yaml +++ b/.github/workflows/plugin-timeclock-ui.yaml @@ -7,58 +7,58 @@ on: - staging - build-test paths: - - 'packages/erxes-ui/**' - - 'packages/ui-plugin-template/**' - - 'packages/ui-cards/**' - - 'packages/ui-forms/**' - - 'packages/ui-inbox/**' - - 'packages/ui-knowledgebase/**' - - 'packages/ui-leads/**' - - 'packages/ui-log/**' - - 'packages/ui-notifications/**' - - 'packages/ui-products/**' - - 'packages/ui-segments/**' - - 'packages/ui-settings/**' - - 'packages/ui-team/**' - - 'packages/ui-tags/**' - - 'packages/ui-timeclock/**' - - 'packages/plugin-timeclock-ui/**' - - '.github/workflows/plugin-timeclock-ui.yaml' + - "packages/erxes-ui/**" + - "packages/ui-plugin-template/**" + - "packages/ui-cards/**" + - "packages/ui-forms/**" + - "packages/ui-inbox/**" + - "packages/ui-knowledgebase/**" + - "packages/ui-leads/**" + - "packages/ui-log/**" + - "packages/ui-notifications/**" + - "packages/ui-products/**" + - "packages/ui-segments/**" + - "packages/ui-settings/**" + - "packages/ui-team/**" + - "packages/ui-tags/**" + - "packages/ui-timeclock/**" + - "packages/plugin-timeclock-ui/**" + - ".github/workflows/plugin-timeclock-ui.yaml" pull_request: branches: - dev - staging - build-test paths: - - 'packages/erxes-ui/**' - - 'packages/ui-plugin-template/**' - - 'packages/ui-cards/**' - - 'packages/ui-forms/**' - - 'packages/ui-inbox/**' - - 'packages/ui-knowledgebase/**' - - 'packages/ui-leads/**' - - 'packages/ui-log/**' - - 'packages/ui-notifications/**' - - 'packages/ui-products/**' - - 'packages/ui-segments/**' - - 'packages/ui-settings/**' - - 'packages/ui-team/**' - - 'packages/ui-tags/**' - - 'packages/ui-timeclock/**' - - 'packages/plugin-timeclock-ui/**' - - '.github/workflows/plugin-timeclock-ui.yaml' + - "packages/erxes-ui/**" + - "packages/ui-plugin-template/**" + - "packages/ui-cards/**" + - "packages/ui-forms/**" + - "packages/ui-inbox/**" + - "packages/ui-knowledgebase/**" + - "packages/ui-leads/**" + - "packages/ui-log/**" + - "packages/ui-notifications/**" + - "packages/ui-products/**" + - "packages/ui-segments/**" + - "packages/ui-settings/**" + - "packages/ui-team/**" + - "packages/ui-tags/**" + - "packages/ui-timeclock/**" + - "packages/plugin-timeclock-ui/**" + - ".github/workflows/plugin-timeclock-ui.yaml" jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-viber-api.yaml b/.github/workflows/plugin-viber-api.yaml index ef51d78aa8..b0904c0cd3 100644 --- a/.github/workflows/plugin-viber-api.yaml +++ b/.github/workflows/plugin-viber-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-viber-ui.yaml b/.github/workflows/plugin-viber-ui.yaml index 2afcca5f70..cce9a67bcd 100644 --- a/.github/workflows/plugin-viber-ui.yaml +++ b/.github/workflows/plugin-viber-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-webbuilder-api.yaml b/.github/workflows/plugin-webbuilder-api.yaml index d06e7c6d23..6d99533118 100644 --- a/.github/workflows/plugin-webbuilder-api.yaml +++ b/.github/workflows/plugin-webbuilder-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-webbuilder-ui.yaml b/.github/workflows/plugin-webbuilder-ui.yaml index 6d0ca15dee..f9f1bcfbaf 100644 --- a/.github/workflows/plugin-webbuilder-ui.yaml +++ b/.github/workflows/plugin-webbuilder-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-webhooks-api.yaml b/.github/workflows/plugin-webhooks-api.yaml index c1a3babc98..3a5c3391a6 100644 --- a/.github/workflows/plugin-webhooks-api.yaml +++ b/.github/workflows/plugin-webhooks-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-webhooks-ui.yaml b/.github/workflows/plugin-webhooks-ui.yaml index 2d40e0623c..04f6ce76c8 100644 --- a/.github/workflows/plugin-webhooks-ui.yaml +++ b/.github/workflows/plugin-webhooks-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugin-xyp-api.yaml b/.github/workflows/plugin-xyp-api.yaml new file mode 100644 index 0000000000..8b23300ab9 --- /dev/null +++ b/.github/workflows/plugin-xyp-api.yaml @@ -0,0 +1,66 @@ +name: Plugin xyp Api CI + +on: + push: + branches: + - dev + - staging + - build-test + paths: + - 'packages/api-utils/**' + - 'packages/api-plugin-template.erxes/**' + - 'packages/plugin-xyp-api/**' + - '.github/workflows/plugin-xyp-api.yaml' + pull_request: + branches: + - dev + - staging + - build-test + paths: + - 'packages/api-utils/**' + - 'packages/api-plugin-template.erxes/**' + - 'packages/plugin-xyp-api/**' + - '.github/workflows/plugin-xyp-api.yaml' + +jobs: + api: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 + with: + node-version: 18.17.x + + # https://github.com/actions/cache/blob/main/examples.md#node---yarn + - name: Get yarn cache directory path + id: yarn-cache-dir-path + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT + + - uses: actions/cache@v3 + id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + with: + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + key: ${{ runner.os }}-yarn-plugin-xyp-api-${{ hashFiles('yarn.lock', 'plugin-xyp-api/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-plugin-xyp-api- + ${{ runner.os }}-yarn- + + - name: Build + run: | + cp -r builder dist + cd dist + yarn install + yarn build plugin xyp + cd plugin-xyp-api/.erxes + cd dist/main/.erxes/src + + - name: Build docker image + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test' ) + run: | + cd dist/plugin-xyp-api/.erxes + echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + docker build -t erxes/plugin-xyp-api:${GITHUB_REF#refs/heads/} -f Dockerfile . + docker push erxes/plugin-xyp-api:${GITHUB_REF#refs/heads/} diff --git a/.github/workflows/plugin-xyp-ui.yaml b/.github/workflows/plugin-xyp-ui.yaml new file mode 100644 index 0000000000..391d2759f8 --- /dev/null +++ b/.github/workflows/plugin-xyp-ui.yaml @@ -0,0 +1,87 @@ +name: Plugin xyp UI CI + +on: + push: + branches: + - dev + - staging + - build-test + paths: + - "packages/erxes-ui/**" + - "packages/ui-plugin-template/**" + - "packages/ui-cards/**" + - "packages/ui-forms/**" + - "packages/ui-inbox/**" + - "packages/ui-knowledgebase/**" + - "packages/ui-leads/**" + - "packages/ui-log/**" + - "packages/ui-notifications/**" + - "packages/ui-products/**" + - "packages/ui-segments/**" + - "packages/ui-settings/**" + - "packages/ui-team/**" + - "packages/ui-tags/**" + - "packages/ui-xyp/**" + - "packages/plugin-xyp-ui/**" + - ".github/workflows/plugin-xyp-ui.yaml" + pull_request: + branches: + - dev + - staging + - build-test + paths: + - "packages/erxes-ui/**" + - "packages/ui-plugin-template/**" + - "packages/ui-cards/**" + - "packages/ui-forms/**" + - "packages/ui-inbox/**" + - "packages/ui-knowledgebase/**" + - "packages/ui-leads/**" + - "packages/ui-log/**" + - "packages/ui-notifications/**" + - "packages/ui-products/**" + - "packages/ui-segments/**" + - "packages/ui-settings/**" + - "packages/ui-team/**" + - "packages/ui-tags/**" + - "packages/ui-xyp/**" + - "packages/plugin-xyp-ui/**" + - ".github/workflows/plugin-xyp-ui.yaml" + +jobs: + ui: + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 + with: + node-version: 18.17.x + + - name: Build + run: | + yarn install --frozen-lockfile + cp -r packages/ui-plugin-template/.erxes packages/plugin-xyp-ui/.erxes + cp -r packages/plugin-xyp-ui/src packages/plugin-xyp-ui/.erxes/plugin-src + cd packages/plugin-xyp-ui + yarn install + yarn install-deps + yarn build + + - name: Configure AWS credentials + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') + uses: aws-actions/configure-aws-credentials@v1 + with: + aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} + aws-region: us-west-2 + + - name: Deploy + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') + run: | + tar -cf build.tar --directory=packages/plugin-xyp-ui/.erxes/dist . + cp build.tar packages/plugin-xyp-ui/.erxes/dist + rm -rf packages/plugin-xyp-ui/.erxes/dist/*.js + aws s3 sync packages/plugin-xyp-ui/.erxes/dist s3://erxes-${GITHUB_REF#refs/heads/}-plugins/uis/plugin-xyp-ui --delete diff --git a/.github/workflows/plugin-zalo-api.yaml b/.github/workflows/plugin-zalo-api.yaml index 1630286ebd..677c8bd42f 100644 --- a/.github/workflows/plugin-zalo-api.yaml +++ b/.github/workflows/plugin-zalo-api.yaml @@ -24,22 +24,22 @@ on: jobs: api: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/main/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} diff --git a/.github/workflows/plugin-zalo-ui.yaml b/.github/workflows/plugin-zalo-ui.yaml index c59349306b..fb211e6ef5 100644 --- a/.github/workflows/plugin-zalo-ui.yaml +++ b/.github/workflows/plugin-zalo-ui.yaml @@ -50,15 +50,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x - name: Build run: | @@ -71,7 +71,7 @@ jobs: yarn build - name: Configure AWS credentials - if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging') + if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') uses: aws-actions/configure-aws-credentials@v1 with: aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} diff --git a/.github/workflows/plugins-map.yaml b/.github/workflows/plugins-map.yaml index a4f1279e3a..6f71edb9d0 100644 --- a/.github/workflows/plugins-map.yaml +++ b/.github/workflows/plugins-map.yaml @@ -20,15 +20,15 @@ on: jobs: ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Use Node.js 14.18.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.18.x + node-version: 18.17.x - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Configure AWS credentials if: github.event_name == 'push' && ( github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev' || github.ref == 'refs/heads/staging' || github.ref == 'refs/heads/build-test') diff --git a/.github/workflows/pos-ui.yaml b/.github/workflows/pos-ui.yaml index db35f2236b..699575fad9 100644 --- a/.github/workflows/pos-ui.yaml +++ b/.github/workflows/pos-ui.yaml @@ -19,15 +19,15 @@ on: jobs: pos-ui: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - name: Use Node.js 16.14.x - uses: actions/setup-node@v1 - with: - node-version: 16.14.x + - uses: actions/checkout@v3 - - uses: actions/checkout@v2 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 + with: + node-version: 18.17.x - name: Build run: | diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 395f71784a..a05af81d33 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -5,9 +5,9 @@ on: - '*' jobs: release: - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get release version id: get_release_version run: echo ::set-output name=VERSION::${GITHUB_REF#refs/tags/} diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 595ad0b77c..9fb7a69f6f 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -1,12 +1,4 @@ on: - workflow_dispatch: {} - pull_request: {} - push: - branches: - - dev - - master - paths: - - .github/workflows/semgrep.yml schedule: # random HH:MM to avoid a load spike on GitHub Actions at 00:00 - cron: 22 6 * * * diff --git a/.github/workflows/widgets.yaml b/.github/workflows/widgets.yaml index fdea5bac70..7ee66bcf53 100644 --- a/.github/workflows/widgets.yaml +++ b/.github/workflows/widgets.yaml @@ -3,7 +3,7 @@ name: Widgets CI on: push: branches: - - 'dev' + - "dev" - "staging" paths: - "widgets/**" @@ -18,22 +18,22 @@ on: jobs: widgets: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -55,4 +55,4 @@ jobs: cd widgets echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin docker build -t erxes/widgets:${GITHUB_REF#refs/heads/} -f Dockerfile . - docker push erxes/widgets:${GITHUB_REF#refs/heads/} \ No newline at end of file + docker push erxes/widgets:${GITHUB_REF#refs/heads/} diff --git a/.github/workflows/workers.yaml b/.github/workflows/workers.yaml index 4fefab96a9..85dc19620a 100644 --- a/.github/workflows/workers.yaml +++ b/.github/workflows/workers.yaml @@ -3,32 +3,32 @@ name: Workers CI on: push: branches: - - 'dev' - - 'staging' + - "dev" + - "staging" paths: - - 'packages/api-utils/**' - - 'packages/api-plugin-template.erxes/**' - - 'packages/workers/**' - - '.github/workflows/workers.yaml' + - "packages/api-utils/**" + - "packages/api-plugin-template.erxes/**" + - "packages/workers/**" + - ".github/workflows/workers.yaml" jobs: workers: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - - name: Use Node.js 14.20.x - uses: actions/setup-node@v1 + - name: Use Node.js 18.17.x + uses: actions/setup-node@v3 with: - node-version: 14.20.x + node-version: 18.17.x # https://github.com/actions/cache/blob/master/examples.md#node---yarn - name: Get yarn cache directory path id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - - uses: actions/cache@v2 + - uses: actions/cache@v3 id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} @@ -50,4 +50,4 @@ jobs: cd dist/workers echo ${{ secrets.DOCKERHUB_TOKEN }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin docker build -t erxes/workers:${GITHUB_REF#refs/heads/} -f Dockerfile . - docker push erxes/workers:${GITHUB_REF#refs/heads/} \ No newline at end of file + docker push erxes/workers:${GITHUB_REF#refs/heads/} diff --git a/.node-version b/.node-version new file mode 100644 index 0000000000..860cc5000a --- /dev/null +++ b/.node-version @@ -0,0 +1 @@ +v18.17.1 diff --git a/builder/package.json b/builder/package.json index 9e765d8751..0b47de76ce 100644 --- a/builder/package.json +++ b/builder/package.json @@ -9,8 +9,8 @@ }, "devDependencies": { "fs-extra": "^9.0.1", - "ts-node": "^10.4.0", - "typescript": "^4.5.4", + "ts-node": "10.9.1", + "typescript": "4.9.5", "@types/node": "^17.0.3" } } diff --git a/cli/commands/dev.js b/cli/commands/dev.js index eb53317d87..dc2e6435c8 100644 --- a/cli/commands/dev.js +++ b/cli/commands/dev.js @@ -39,13 +39,13 @@ module.exports.devCmd = async program => { DEBUG: '*error*', NODE_ENV: 'development', JWT_TOKEN_SECRET: configs.jwt_token_secret, - MONGO_URL: 'mongodb://localhost/erxes', + MONGO_URL: 'mongodb://127.0.0.1/erxes', - REDIS_HOST: 'localhost', + REDIS_HOST: '127.0.0.1', REDIS_PORT: 6379, REDIS_PASSWORD: configs.redis.password, - RABBITMQ_HOST: 'amqp://localhost', - ELASTICSEARCH_URL: 'http://localhost:9200', + RABBITMQ_HOST: 'amqp://127.0.0.1', + ELASTICSEARCH_URL: 'http://127.0.0.1:9200', ENABLED_SERVICES_PATH: filePath('enabled-services.js'), ALLOWED_ORIGINS: configs.allowed_origins }; diff --git a/cli/commands/docker/utils.js b/cli/commands/docker/utils.js index 2bd83457d0..5dc36b7c1b 100644 --- a/cli/commands/docker/utils.js +++ b/cli/commands/docker/utils.js @@ -366,7 +366,7 @@ const deployDbs = async () => { } dockerComposeConfig.services.redis = { - image: 'redis:5.0.5', + image: 'redis:7.2.1', command: `redis-server --appendonly yes --requirepass ${configs.redis.password}`, ports: [`${REDIS_PORT}:6379`], networks: ['erxes'], @@ -559,13 +559,18 @@ const up = async ({ uis, downloadLocales, fromInstaller }) => { } }; + dockerComposeConfig.services["plugin-core-api"].deploy = deploy; + if(configs.core && Number(configs.core.replicas)) { + dockerComposeConfig.services["plugin-core-api"].deploy.replicas = Number(configs.core.replicas); + } dockerComposeConfig.services.coreui.deploy = deploy; dockerComposeConfig.services.gateway.deploy = deploy; } if (configs.essyncer) { + const essyncer_tag = configs.essyncer.image_tag || image_tag; dockerComposeConfig.services.essyncer = { - image: `erxes/essyncer:${image_tag}`, + image: `erxes/essyncer:${essyncer_tag}`, environment: { ELASTICSEARCH_URL: `http://${configs.db_server_address || (isSwarm ? 'erxes-dbs_elasticsearch' : 'elasticsearch')}:9200`, diff --git a/cli/commands/update.js b/cli/commands/update.js index d998603ded..40b9143d33 100644 --- a/cli/commands/update.js +++ b/cli/commands/update.js @@ -1,15 +1,14 @@ const fse = require("fs-extra"); -const execa = require("execa"); const start = require('./start'); const { filePath, log, execCommand } = require('./utils'); +const { execSync } = require('child_process'); module.exports = async function() { try { log('Stopping pm2 processes ...'); - // stop services try { - await execa("pm2", ["delete", 'all']); + execSync("pm2 delete all", { stdio: 'inherit' }); } catch (e) { console.log(e.message); } diff --git a/cli/commands/utils.js b/cli/commands/utils.js index 7861a28322..cfcaa12c83 100644 --- a/cli/commands/utils.js +++ b/cli/commands/utils.js @@ -1,5 +1,4 @@ const chalk = require('chalk'); -const execa = require('execa'); const fs = require('fs'); const cliProgress = require('cli-progress'); const request = require('request'); @@ -7,6 +6,7 @@ const fse = require('fs-extra'); const { resolve } = require('path'); const exec = require('child_process').exec; const colors = require('colors'); +const { execSync } = require('child_process'); const filePath = pathName => { if (pathName) { @@ -145,14 +145,6 @@ module.exports.downloadLatesVersion = async configs => { await fse.copy(filePath('build.tar.gz'), filePath('build-backup.tar.gz')); }; -const runCommand = (command, args, pipe) => { - if (pipe) { - return execa(command, args).stdout.pipe(process.stdout); - } - - return execa(command, args); -}; - module.exports.startServices = async configs => { log('Starting services using pm2 ...'); @@ -482,7 +474,8 @@ module.exports.startServices = async configs => { )}` ); - return runCommand('pm2', ['start', filePath('ecosystem.config.js')], false); + const ecosystemPath = filePath('ecosystem.config.js'); + return execSync(`pm2 start ${ecosystemPath}`); }; const generateNginxConf = async ({ @@ -555,6 +548,5 @@ const generateNginxConf = async ({ ); }; -module.exports.runCommand = runCommand; module.exports.downloadFile = downloadFile; module.exports.execCurl = execCurl; diff --git a/cli/installer/index.js b/cli/installer/index.js index 942d14822c..47cc385316 100644 --- a/cli/installer/index.js +++ b/cli/installer/index.js @@ -1,18 +1,9 @@ var amqplib = require('amqplib'); -var shell = require('shelljs'); var open = amqplib.connect(process.env.RABBITMQ_HOST); var queueName = 'managePluginInstall'; - -var runCommand = (command, method='exec') => { - return new Promise((resolve) => { - setTimeout(() => { - shell[method](command); - resolve('done'); - }, 500) - }); -} +const { execSync } = require('child_process'); var sleep = ms => { return new Promise(resolve => { @@ -50,43 +41,43 @@ open sendMessage(ch, 'started'); - await runCommand('..', 'cd'); + execSync('cd ..'); // Update configs.json - await runCommand(`npm run erxes installer-update-configs ${data.type} ${data.name}`); + execSync(`npm run erxes installer-update-configs ${data.type} ${data.name}`); if (data.type === 'install') { sendMessage(ch, 'Running up ....'); - await runCommand(`npm run erxes up -- --fromInstaller`); + execSync(`npm run erxes up -- --fromInstaller`); sendMessage(ch, 'Syncing ui ....'); - await runCommand(`npm run erxes syncui ${data.name}`); + execSync(`npm run erxes syncui ${data.name}`); sendMessage(ch, 'Restarting coreui ....'); - await runCommand(`npm run erxes restart coreui`); + execSync(`npm run erxes restart coreui`); sendMessage(ch, 'Waiting for 10 seconds for plugin api....'); await sleep(10000); sendMessage(ch, 'Restarting gateway ...'); - await runCommand(`npm run erxes restart gateway`); + execSync(`npm run erxes restart gateway`); } if (data.type === 'uninstall') { sendMessage(ch, 'Running up'); - await runCommand(`npm run erxes up -- --fromInstaller`); + execSync(`npm run erxes up -- --fromInstaller`); sendMessage(ch, `Removing ${data.name} service ....`); - await runCommand(`npm run erxes remove-service erxes_plugin_${data.name}_api`); + execSync(`npm run erxes remove-service erxes_plugin_${data.name}_api`); sendMessage(ch, `Restarting coreui ....`); - await runCommand(`npm run erxes restart coreui`); + execSync(`npm run erxes restart coreui`); sendMessage(ch, `Restarting gateway ....`); - await runCommand(`npm run erxes restart gateway`); + execSync(`npm run erxes restart gateway`); } - await runCommand('installer', 'cd'); + execSync('cd installer'); sendMessage(ch, `done`); diff --git a/cli/package.json b/cli/package.json index 614031ba33..e532db466f 100644 --- a/cli/package.json +++ b/cli/package.json @@ -1,6 +1,6 @@ { "name": "erxes", - "version": "0.4.23", + "version": "0.4.27", "description": "Free and open fair-code licensed all-in-one growth marketing & management software", "homepage": "https://erxes.io", "repository": "https://github.com/erxes/erxes", @@ -25,7 +25,6 @@ "colors": "^1.4.0", "commander": "^6.2.0", "dotenv": "^16.0.3", - "execa": "^4.1.0", "figlet": "^1.5.0", "fs-extra": "^9.0.1", "jsonwebtoken": "^8.5.1", @@ -33,7 +32,6 @@ "lodash": "^4.17.21", "pm2": "^5.2.2", "request": "^2.88.2", - "shelljs": "^0.8.5", "yaml": "^1.10.2" } } diff --git a/cli/yarn.lock b/cli/yarn.lock index 937ef3c506..eb4a4660a8 100644 --- a/cli/yarn.lock +++ b/cli/yarn.lock @@ -402,15 +402,6 @@ croner@~4.1.92: resolved "https://registry.yarnpkg.com/croner/-/croner-4.1.97.tgz#6e373dc7bb3026fab2deb0d82685feef20796766" integrity sha512-/f6gpQuxDaqXu+1kwQYSckUglPaOrHdbIlBAu0YuW8/Cdb45XwXYNUBXg3r/9Mo6n540Kn/smKcZWko5x99KrQ== -cross-spawn@^7.0.0: - version "7.0.3" - resolved "https://registry.yarnpkg.com/cross-spawn/-/cross-spawn-7.0.3.tgz#f73a85b9d5d41d045551c177e2882d4ac85728a6" - integrity sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w== - dependencies: - path-key "^3.1.0" - shebang-command "^2.0.0" - which "^2.0.1" - culvert@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/culvert/-/culvert-0.1.2.tgz#9502f5f0154a2d5a22a023e79f71cc936fa6ef6f" @@ -509,13 +500,6 @@ emoji-regex@^8.0.0: resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A== -end-of-stream@^1.1.0: - version "1.4.4" - resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" - integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== - dependencies: - once "^1.4.0" - enquirer@2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" @@ -570,21 +554,6 @@ eventemitter2@~0.4.14: resolved "https://registry.yarnpkg.com/eventemitter2/-/eventemitter2-0.4.14.tgz#8f61b75cde012b2e9eb284d4545583b5643b61ab" integrity sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ== -execa@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" - integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== - dependencies: - cross-spawn "^7.0.0" - get-stream "^5.0.0" - human-signals "^1.1.1" - is-stream "^2.0.0" - merge-stream "^2.0.0" - npm-run-path "^4.0.0" - onetime "^5.1.0" - signal-exit "^3.0.2" - strip-final-newline "^2.0.0" - extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" @@ -703,13 +672,6 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -get-stream@^5.0.0: - version "5.2.0" - resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3" - integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA== - dependencies: - pump "^3.0.0" - get-them-args@1.3.2: version "1.3.2" resolved "https://registry.yarnpkg.com/get-them-args/-/get-them-args-1.3.2.tgz#74a20ba8a4abece5ae199ad03f2bcc68fdfc9ba5" @@ -751,18 +713,6 @@ glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" -glob@^7.0.0: - version "7.1.6" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.6.tgz#141f33b81a7c2492e125594307480c46679278a6" - integrity sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - glob@^7.0.5: version "7.2.3" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.3.tgz#b8df0fb802bbfa8e89bd1d938b4e16578ed44f2b" @@ -842,11 +792,6 @@ https-proxy-agent@5, https-proxy-agent@^5.0.0: agent-base "6" debug "4" -human-signals@^1.1.1: - version "1.1.1" - resolved "https://registry.yarnpkg.com/human-signals/-/human-signals-1.1.1.tgz#c5b1cd14f50aeae09ab6c59fe63ba3395fe4dfa3" - integrity sha512-SEQu7vl8KjNL2eoGBLF3+wAjpsNfA9XMlXAYj/3EdaNfAlxKthD1xjEQfGOUhllCGGJVNY34bRr6lPINhNjyZw== - iconv-lite@0.4.24, iconv-lite@^0.4.4: version "0.4.24" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" @@ -872,11 +817,6 @@ ini@^1.3.5: resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c" integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew== -interpret@^1.0.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" - integrity sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA== - ip@^1.1.5: version "1.1.8" resolved "https://registry.yarnpkg.com/ip/-/ip-1.1.8.tgz#ae05948f6b075435ed3307acce04629da8cdbf48" @@ -894,13 +834,6 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-core-module@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.0.0.tgz#58531b70aed1db7c0e8d4eb1a0a2d1ddd64bd12d" - integrity sha512-jq1AH6C8MuteOoBPwkxHafmByhL9j5q4OaPGdbuD+ZtQJVzH+i6E3BJDQcBA09k57i2Hh2yQbEG8yObZ0jdlWw== - dependencies: - has "^1.0.3" - is-core-module@^2.9.0: version "2.11.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.11.0.tgz#ad4cb3e3863e814523c96f3f58d26cc570ff0144" @@ -930,11 +863,6 @@ is-number@^7.0.0: resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng== -is-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.0.tgz#bde9c32680d6fae04129d6ac9d921ce7815f78e3" - integrity sha512-XCoy+WlUr7d1+Z8GgSuXmpuUFC9fOhRXglJMx+dwLKTkL44Cjd4W1Z5P+BQZpr+cR93aGP4S/s7Ftw6Nd/kiEw== - is-typedarray@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-typedarray/-/is-typedarray-1.0.0.tgz#e479c80858df0c1b11ddda6940f96011fcda4a9a" @@ -945,11 +873,6 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ== -isexe@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" - integrity sha1-6PvzdNxVb/iUehDcsFctYz8s+hA= - isstream@~0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/isstream/-/isstream-0.1.2.tgz#47e63f7af55afa6f92e1500e690eb8b8529c099a" @@ -1124,11 +1047,6 @@ lru-cache@^6.0.0: dependencies: yallist "^4.0.0" -merge-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/merge-stream/-/merge-stream-2.0.0.tgz#52823629a14dd00c9770fb6ad47dc6310f2c1f60" - integrity sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w== - mime-db@1.44.0: version "1.44.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.44.0.tgz#fa11c5eb0aca1334b4233cb4d52f10c5a6272f92" @@ -1141,18 +1059,6 @@ mime-types@^2.1.12, mime-types@~2.1.19: dependencies: mime-db "1.44.0" -mimic-fn@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" - integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== - dependencies: - brace-expansion "^1.1.7" - minimatch@^3.1.1: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" @@ -1199,13 +1105,6 @@ normalize-path@^3.0.0, normalize-path@~3.0.0: resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== -npm-run-path@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-4.0.1.tgz#b7ecd1e5ed53da8e37a55e1c2269e0b97ed748ea" - integrity sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw== - dependencies: - path-key "^3.0.0" - nssocket@0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/nssocket/-/nssocket-0.6.0.tgz#59f96f6ff321566f33c70f7dbeeecdfdc07154fa" @@ -1219,20 +1118,13 @@ oauth-sign@~0.9.0: resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" integrity sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ== -once@^1.3.0, once@^1.3.1, once@^1.4.0: +once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= dependencies: wrappy "1" -onetime@^5.1.0: - version "5.1.2" - resolved "https://registry.yarnpkg.com/onetime/-/onetime-5.1.2.tgz#d0e96ebb56b07476df1dd9c4806e5237985ca45e" - integrity sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg== - dependencies: - mimic-fn "^2.1.0" - optionator@^0.8.1: version "0.8.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.8.3.tgz#84fa1d036fe9d3c7e21d99884b601167ec8fb495" @@ -1279,16 +1171,6 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-key@^3.0.0, path-key@^3.1.0: - version "3.1.1" - resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" - integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== - -path-parse@^1.0.6: - version "1.0.6" - resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.6.tgz#d62dbb5679405d72c4737ec58600e9ddcf06d24c" - integrity sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw== - path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" @@ -1434,14 +1316,6 @@ psl@^1.1.28: resolved "https://registry.yarnpkg.com/psl/-/psl-1.8.0.tgz#9326f8bcfb013adcc005fdff056acce020e51c24" integrity sha512-RIdOzyoavK+hA18OGGWDqUTsCLhtA7IcZ/6NCs4fFJaHBDab+pDDmDIByWFRQJq2Cd7r1OoQxBGKOaztq+hjIQ== -pump@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" - integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== - dependencies: - end-of-stream "^1.1.0" - once "^1.3.1" - punycode@^2.1.0, punycode@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/punycode/-/punycode-2.1.1.tgz#b58b010ac40c22c5657616c8d2c2c02c7bf479ec" @@ -1486,13 +1360,6 @@ readdirp@~3.6.0: dependencies: picomatch "^2.2.1" -rechoir@^0.6.2: - version "0.6.2" - resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" - integrity sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q= - dependencies: - resolve "^1.1.6" - request@^2.88.2: version "2.88.2" resolved "https://registry.yarnpkg.com/request/-/request-2.88.2.tgz#d73c918731cb5a87da047e207234146f664d12b3" @@ -1528,14 +1395,6 @@ require-in-the-middle@^5.0.0: module-details-from-path "^1.0.3" resolve "^1.22.1" -resolve@^1.1.6: - version "1.18.1" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.18.1.tgz#018fcb2c5b207d2a6424aee361c5a266da8f4130" - integrity sha512-lDfCPaMKfOJXjy0dPayzPdF1phampNWr3qFCjAu+rw/qbQmr5jWH5xN2hwh9QKfw9E5v4hwV7A+jrCmL8yjjqA== - dependencies: - is-core-module "^2.0.0" - path-parse "^1.0.6" - resolve@^1.22.1: version "1.22.1" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.1.tgz#27cb2ebb53f91abb49470a928bba7558066ac177" @@ -1592,42 +1451,16 @@ setprototypeof@1.2.0: resolved "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424" integrity sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw== -shebang-command@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-2.0.0.tgz#ccd0af4f8835fbdc265b82461aaf0c36663f34ea" - integrity sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA== - dependencies: - shebang-regex "^3.0.0" - -shebang-regex@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/shebang-regex/-/shebang-regex-3.0.0.tgz#ae16f1644d873ecad843b0307b143362d4c42172" - integrity sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A== - shell-exec@1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/shell-exec/-/shell-exec-1.0.2.tgz#2e9361b0fde1d73f476c4b6671fa17785f696756" integrity sha512-jyVd+kU2X+mWKMmGhx4fpWbPsjvD53k9ivqetutVW/BQ+WIZoDoP4d8vUMGezV6saZsiNoW2f9GIhg9Dondohg== -shelljs@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" - integrity sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow== - dependencies: - glob "^7.0.0" - interpret "^1.0.0" - rechoir "^0.6.2" - shimmer@^1.1.0, shimmer@^1.2.0: version "1.2.1" resolved "https://registry.yarnpkg.com/shimmer/-/shimmer-1.2.1.tgz#610859f7de327b587efebf501fb43117f9aff337" integrity sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw== -signal-exit@^3.0.2: - version "3.0.3" - resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.3.tgz#a1410c2edd8f077b08b4e253c8eacfcaf057461c" - integrity sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA== - signal-exit@^3.0.3: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -1719,11 +1552,6 @@ strip-ansi@^6.0.0: dependencies: ansi-regex "^5.0.0" -strip-final-newline@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/strip-final-newline/-/strip-final-newline-2.0.0.tgz#89b852fb2fcbe936f6f4b3187afb0a12c1ab58ad" - integrity sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA== - supports-color@^7.1.0: version "7.2.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-7.2.0.tgz#1b7dcdcb32b8138801b3e478ba6a51caa89648da" @@ -1861,13 +1689,6 @@ vm2@^3.9.8: acorn "^8.7.0" acorn-walk "^8.2.0" -which@^2.0.1: - version "2.0.2" - resolved "https://registry.yarnpkg.com/which/-/which-2.0.2.tgz#7c6a8dd0a636a0327e10b59c9286eee93f3f51b1" - integrity sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA== - dependencies: - isexe "^2.0.0" - word-wrap@~1.2.3: version "1.2.3" resolved "https://registry.yarnpkg.com/word-wrap/-/word-wrap-1.2.3.tgz#610636f6b1f703891bd34771ccb17fb93b47079c" diff --git a/cypress/tests/ui/auth.cy.js b/cypress/tests/auth.cy.js similarity index 83% rename from cypress/tests/ui/auth.cy.js rename to cypress/tests/auth.cy.js index 56609ccff9..a8d229f5cb 100644 --- a/cypress/tests/ui/auth.cy.js +++ b/cypress/tests/auth.cy.js @@ -11,12 +11,13 @@ describe("User sign up and login", () => { it("should redirect unauthenticated user to signin page", function () { cy.visit("/contacts/customer"); - cy.get('button.sc-bRBYWo').should("be.visible"); + cy.get('button.sc-bRBYWo',{timeout: 300000}).should("be.visible"); // cy.visualSnapshot("Redirect to SignIn"); }); it("input error message", () => { - cy.get('input[name=email]').type("{enter}"); + + cy.get('input[name=email]',{timeout:300000}).type("{enter}"); cy.get('label.sc-frDJqD').should('be.visible') }) diff --git a/cypress/tests/api/demo.cy.js b/cypress/tests/contacts/api/demo.cy.js similarity index 100% rename from cypress/tests/api/demo.cy.js rename to cypress/tests/contacts/api/demo.cy.js diff --git a/cypress/tests/ui/contacts/company.cy.js b/cypress/tests/contacts/ui/company.cy.js similarity index 87% rename from cypress/tests/ui/contacts/company.cy.js rename to cypress/tests/contacts/ui/company.cy.js index 900625cb2b..f25c00669a 100644 --- a/cypress/tests/ui/contacts/company.cy.js +++ b/cypress/tests/contacts/ui/company.cy.js @@ -15,7 +15,7 @@ describe("Contacts", () => { it("add company", () => { - cy.get('i[icon = "plus-circle"]').click(); + cy.get('i[icon = "plus-circle"]', { timeout: 300000 }).click(); cy.get("div .Select-placeholder") .contains("Enter company name") @@ -33,7 +33,7 @@ describe("Contacts", () => { it("set tag company", () => { - cy.get("#companiesCheckBox").click(); + cy.get("#companiesCheckBox",{ timeout: 300000 }).eq(0).click(); cy.get('button[icon="tag-alt"]').click(); @@ -47,8 +47,8 @@ describe("Contacts", () => { }) it("remove company", () => { - - cy.contains(random) + + cy.contains(random, { timeout: 300000 }) .parent() .parent() .parent() diff --git a/cypress/tests/ui/contacts/customer.cy.js b/cypress/tests/contacts/ui/customer.cy.js similarity index 91% rename from cypress/tests/ui/contacts/customer.cy.js rename to cypress/tests/contacts/ui/customer.cy.js index 0031392573..5a54f4ae85 100644 --- a/cypress/tests/ui/contacts/customer.cy.js +++ b/cypress/tests/contacts/ui/customer.cy.js @@ -14,8 +14,7 @@ describe("Customer", () => { it("add customer", () => { - cy.waitElm('button[icon="plus-circle"]'); - cy.get('button[icon="plus-circle"]').click(); + cy.get('button[icon="plus-circle"]', { timeout: 300000}).click(); const random = Math.random().toString(36).slice(2) diff --git a/cypress/tests/ui/contacts/lead.cy.js b/cypress/tests/contacts/ui/lead.cy.js similarity index 92% rename from cypress/tests/ui/contacts/lead.cy.js rename to cypress/tests/contacts/ui/lead.cy.js index e6f7c5f9db..b61a2ed3af 100644 --- a/cypress/tests/ui/contacts/lead.cy.js +++ b/cypress/tests/contacts/ui/lead.cy.js @@ -15,7 +15,7 @@ describe("Lead", () => { const random = Math.random().toString(36).slice(2) - cy.get('button[icon="plus-circle"]').click(); + cy.get('button[icon="plus-circle"]', {timeout: 300000}).click(); cy.get('input[name="firstName"]').type(random); @@ -38,7 +38,7 @@ describe("Lead", () => { const random2 = Math.random().toString(36).slice(2) - cy.get('button[icon="plus-circle"]').click(); + cy.get('button[icon="plus-circle"]',{timeout:300000}).click(); cy.get('input[name="firstName"]').type(random2); @@ -59,7 +59,7 @@ describe("Lead", () => { it("tag", () => { - cy.get("#customers>.crow") + cy.get("#customers>.crow",{timeout: 300000}) .eq(0) .get("#customersCheckBox") .click(); @@ -81,8 +81,8 @@ describe("Lead", () => { }) it("merge", () => { - - cy.get("#customers>.crow") + + cy.get("#customers>.crow",{timeout: 300000}) .eq(0) .within(() => { cy.get("input[type='checkbox']") diff --git a/docs/package.json b/docs/package.json index 8ed466a2dd..81f82e7bb5 100644 --- a/docs/package.json +++ b/docs/package.json @@ -3,11 +3,11 @@ "version": "0.0.0", "private": true, "scripts": { - "start": "docusaurus start --port 4300", - "build": "docusaurus build", - "swizzle": "docusaurus swizzle", - "deploy": "docusaurus deploy", - "generateDocs": "npx spectaql --embeddable --target-dir static/developers/docs/references spectaql.yml" + "start": "NODE_OPTIONS=--openssl-legacy-provider docusaurus start --port 4300", + "build": "NODE_OPTIONS=--openssl-legacy-provider docusaurus build", + "swizzle": "NODE_OPTIONS=--openssl-legacy-provider docusaurus swizzle", + "deploy": "NODE_OPTIONS=--openssl-legacy-provider docusaurus deploy", + "generateDocs": "NODE_OPTIONS=--openssl-legacy-provider npx spectaql --embeddable --target-dir static/developers/docs/references spectaql.yml" }, "dependencies": { "@docusaurus/core": "2.0.0-alpha.75", diff --git a/package.json b/package.json index 04e3b71633..5e918b8f7f 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "tslint": "^5.8.0", "tslint-config-prettier": "^1.18.0", "tslint-react": "^4.0.0", - "typescript": "^4.5.4", + "typescript": "4.9.5", "vite": "^4.4.8", "vite-plugin-eslint": "^1.8.1", "vite-plugin-istanbul": "^5.0.0", diff --git a/packages/api-plugin-templ/source-default/graphql/typeDefs.ts b/packages/api-plugin-templ/source-default/graphql/typeDefs.ts index c17cfc736b..62c7021823 100644 --- a/packages/api-plugin-templ/source-default/graphql/typeDefs.ts +++ b/packages/api-plugin-templ/source-default/graphql/typeDefs.ts @@ -1,4 +1,4 @@ -import { gql } from 'apollo-server-express'; +import gql from 'graphql-tag'; const types = ` type {Name} { diff --git a/packages/api-plugin-templ/source-empty/graphql/typeDefs.ts b/packages/api-plugin-templ/source-empty/graphql/typeDefs.ts index fb6a0ea024..878b04b3ed 100644 --- a/packages/api-plugin-templ/source-empty/graphql/typeDefs.ts +++ b/packages/api-plugin-templ/source-empty/graphql/typeDefs.ts @@ -1,4 +1,4 @@ -import { gql } from 'apollo-server-express'; +import gql from 'graphql-tag'; const types = ` type {Name} { diff --git a/packages/api-plugin-templ/source-integration/graphql/typeDefs.ts b/packages/api-plugin-templ/source-integration/graphql/typeDefs.ts index 467b0d9515..3255451002 100644 --- a/packages/api-plugin-templ/source-integration/graphql/typeDefs.ts +++ b/packages/api-plugin-templ/source-integration/graphql/typeDefs.ts @@ -1,4 +1,4 @@ -import { gql } from 'apollo-server-express'; +import gql from 'graphql-tag'; const types = ` type {Name} { diff --git a/packages/api-plugin-template.erxes/Dockerfile b/packages/api-plugin-template.erxes/Dockerfile index 3382c52a66..5e2aa960c8 100644 --- a/packages/api-plugin-template.erxes/Dockerfile +++ b/packages/api-plugin-template.erxes/Dockerfile @@ -1,4 +1,4 @@ -FROM node:14.21.3-alpine +FROM node:18.17.1-bookworm-slim WORKDIR /erxes-plugin-api RUN chown -R node:node /erxes-plugin-api COPY --chown=node:node . /erxes-plugin-api diff --git a/packages/api-plugin-template.erxes/package.json b/packages/api-plugin-template.erxes/package.json index 06f642c906..2964f7b14a 100644 --- a/packages/api-plugin-template.erxes/package.json +++ b/packages/api-plugin-template.erxes/package.json @@ -8,9 +8,6 @@ "test": "jest --coverage --forceExit --runInBand" }, "dependencies": { - "agentkeepalive": "^4.3.0", - "node-fetch": "^2.6.7", - "apollo-server-core": "^3.6.1", - "apollo-server-express": "^3.6.1" + } } \ No newline at end of file diff --git a/packages/api-plugin-template.erxes/src/index.ts b/packages/api-plugin-template.erxes/src/index.ts index 1c6bbf98a1..2d57c4de7b 100644 --- a/packages/api-plugin-template.erxes/src/index.ts +++ b/packages/api-plugin-template.erxes/src/index.ts @@ -9,8 +9,10 @@ import * as cors from 'cors'; import * as bodyParser from 'body-parser'; import * as express from 'express'; import { filterXSS } from 'xss'; -import { buildSubgraphSchema } from '@apollo/federation'; -import { ApolloServer } from 'apollo-server-express'; +import { buildSubgraphSchema } from '@apollo/subgraph'; +import { ApolloServer } from '@apollo/server'; +import { expressMiddleware } from '@apollo/server/express4'; +import { ApolloServerPluginDrainHttpServer } from '@apollo/server/plugin/drainHttpServer'; import * as cookieParser from 'cookie-parser'; import * as http from 'http'; @@ -22,7 +24,6 @@ import { logConsumers } from '@erxes/api-utils/src/logUtils'; import { getSubdomain } from '@erxes/api-utils/src/core'; import { internalNoteConsumers } from '@erxes/api-utils/src/internalNotes'; import pubsub from './pubsub'; -import { ApolloServerPluginDrainHttpServer } from 'apollo-server-core'; import * as path from 'path'; import * as ws from 'ws'; @@ -99,7 +100,7 @@ if (configs.getHandlers) { app.disable('x-powered-by'); -app.use(cors()); +app.use(cors(configs.corsOptions || {})); app.use(cookieParser()); @@ -208,73 +209,7 @@ const generateApolloServer = async serviceDiscovery => { ]), // for graceful shutdown - plugins: [ApolloServerPluginDrainHttpServer({ httpServer })], - context: async ({ req, res }) => { - let user: any = null; - - if (req.headers.user) { - if (Array.isArray(req.headers.user)) { - throw new Error(`Multiple user headers`); - } - const userJson = Buffer.from(req.headers.user, 'base64').toString( - 'utf-8' - ); - user = JSON.parse(userJson); - } - - let context; - - if (USE_BRAND_RESTRICTIONS !== 'true') { - context = { - brandIdSelector: {}, - singleBrandIdSelector: {}, - userBrandIdsSelector: {}, - docModifier: doc => doc, - commonQuerySelector: {}, - user, - res - }; - } else { - let scopeBrandIds = JSON.parse(req.cookies.scopeBrandIds || '[]'); - let brandIds = []; - let brandIdSelector = {}; - let commonQuerySelector = {}; - let commonQuerySelectorElk; - let userBrandIdsSelector = {}; - let singleBrandIdSelector = {}; - - if (user) { - brandIds = user.brandIds || []; - - if (scopeBrandIds.length === 0) { - scopeBrandIds = brandIds; - } - - if (!user.isOwner && scopeBrandIds.length > 0) { - brandIdSelector = { _id: { $in: scopeBrandIds } }; - commonQuerySelector = { scopeBrandIds: { $in: scopeBrandIds } }; - commonQuerySelectorElk = { terms: { scopeBrandIds } }; - userBrandIdsSelector = { brandIds: { $in: scopeBrandIds } }; - singleBrandIdSelector = { brandId: { $in: scopeBrandIds } }; - } - } - - context = { - brandIdSelector, - singleBrandIdSelector, - docModifier: doc => ({ ...doc, scopeBrandIds }), - commonQuerySelector, - commonQuerySelectorElk, - userBrandIdsSelector, - user, - res - }; - } - - await configs.apolloServerContext(context, req, res); - - return context; - } + plugins: [ApolloServerPluginDrainHttpServer({ httpServer })] }); }; @@ -289,11 +224,77 @@ async function startServer() { const apolloServer = await generateApolloServer(serviceDiscovery); await apolloServer.start(); - apolloServer.applyMiddleware({ - app, - path: '/graphql', - cors: configs.corsOptions || {} - }); + app.use( + '/graphql', + expressMiddleware(apolloServer, { + context: async ({ req, res }) => { + let user: any = null; + + if (req.headers.user) { + if (Array.isArray(req.headers.user)) { + throw new Error(`Multiple user headers`); + } + const userJson = Buffer.from(req.headers.user, 'base64').toString( + 'utf-8' + ); + user = JSON.parse(userJson); + } + + let context; + + if (USE_BRAND_RESTRICTIONS !== 'true') { + context = { + brandIdSelector: {}, + singleBrandIdSelector: {}, + userBrandIdsSelector: {}, + docModifier: doc => doc, + commonQuerySelector: {}, + user, + res + }; + } else { + let scopeBrandIds = JSON.parse(req.cookies.scopeBrandIds || '[]'); + let brandIds = []; + let brandIdSelector = {}; + let commonQuerySelector = {}; + let commonQuerySelectorElk; + let userBrandIdsSelector = {}; + let singleBrandIdSelector = {}; + + if (user) { + brandIds = user.brandIds || []; + + if (scopeBrandIds.length === 0) { + scopeBrandIds = brandIds; + } + + if (!user.isOwner && scopeBrandIds.length > 0) { + brandIdSelector = { _id: { $in: scopeBrandIds } }; + commonQuerySelector = { scopeBrandIds: { $in: scopeBrandIds } }; + commonQuerySelectorElk = { terms: { scopeBrandIds } }; + userBrandIdsSelector = { brandIds: { $in: scopeBrandIds } }; + singleBrandIdSelector = { brandId: { $in: scopeBrandIds } }; + } + } + + context = { + brandIdSelector, + singleBrandIdSelector, + docModifier: doc => ({ ...doc, scopeBrandIds }), + commonQuerySelector, + commonQuerySelectorElk, + userBrandIdsSelector, + user, + res + }; + } + + await configs.apolloServerContext(context, req, res); + + return context; + } + }) + ); await new Promise(resolve => httpServer.listen({ port: PORT }, resolve) @@ -309,7 +310,7 @@ async function startServer() { } console.log( - `🚀 ${configs.name} graphql api ready at http://localhost:${PORT}${apolloServer.graphqlPath}` + `🚀 ${configs.name} graphql api ready at http://localhost:${PORT}/graphql` ); const mongoUrl = MONGO_URL || ''; diff --git a/packages/api-plugin-template.erxes/src/pubsub.ts b/packages/api-plugin-template.erxes/src/pubsub.ts index 8782e938bf..6a721de286 100644 --- a/packages/api-plugin-template.erxes/src/pubsub.ts +++ b/packages/api-plugin-template.erxes/src/pubsub.ts @@ -2,7 +2,7 @@ import * as dotenv from 'dotenv'; dotenv.config(); import { RedisPubSub } from 'graphql-redis-subscriptions'; import { PubSub } from 'graphql-subscriptions'; -import * as Redis from 'ioredis'; +import Redis from 'ioredis'; const { REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, SKIP_REDIS } = process.env; diff --git a/packages/api-plugin-template/package.json b/packages/api-plugin-template/package.json index 78e8295a0d..239ee236e9 100644 --- a/packages/api-plugin-template/package.json +++ b/packages/api-plugin-template/package.json @@ -8,10 +8,9 @@ "start": "cd .erxes/dist/main/.erxes && node src" }, "dependencies": { - "@apollo/federation": "^0.33.8", + "@apollo/subgraph": "^2.4.12", "@sentry/node": "^7.50.0", - "apollo-server-core": "^3.6.1", - "apollo-server-express": "^3.6.1", + "@apollo/server" : "^4.9.3", "body-parser": "^1.17.1", "cookie-parser": "^1.4.6", "dataloader": "^2.0.0", @@ -19,8 +18,7 @@ "express": "^4.17.2", "redis": "^2.8.0", "validator": "^13.5.2", - "ws": "^8.8.1", - "xss": "^1.0.6" + "ws": "^8.8.1" }, "peerOptionalDependencies": { "kerberos": "^1.0.0" @@ -31,7 +29,6 @@ "@types/dotenv": "^4.0.3", "@types/express": "^4.16.0", "@types/formidable": "^1.0.31", - "@types/ioredis": "^3.2.15", "@types/json2csv": "^5.0.1", "@types/mongodb": "^3.1.2", "@types/mongoose": "5.7.3", @@ -40,9 +37,9 @@ "@types/underscore": "^1.8.9", "nodemon": "^2.0.15", "ora": "^3.4.0", - "ts-node": "^10.4.0", + "ts-node": "10.9.1", "tsc-alias": "^1.5.0", - "typescript": "^4.5.4" + "typescript": "4.9.5" }, "engines": { "node": ">=10.x.x" diff --git a/packages/api-utils/package.json b/packages/api-utils/package.json index f694e27e26..fca6c4dd76 100644 --- a/packages/api-utils/package.json +++ b/packages/api-utils/package.json @@ -11,29 +11,33 @@ "@babel/preset-env": "^7.11.0", "@babel/preset-typescript": "^7.10.4", "@babel/runtime": "^7.11.2", - "@types/ioredis": "^4.28.7", "@types/lodash": "^4.14.178", "@types/node": "^17.0.7", - "babel-preset-gatsby-package": "^0.5.2" + "babel-preset-gatsby-package": "^0.5.2", + "ts-node": "10.9.1" }, "dependencies": { + "@apollo/server" : "^4.9.3", + "@apollo/subgraph": "^2.4.12", "agentkeepalive": "^4.3.0", "amqplib": "^0.10.2", "crypto": "^1.0.1", "debug": "^4.1.1", "dotenv": "^4.0.0", "elasticsearch": "^16.7.2", - "graphql": "^15.8.0", - "graphql-redis-subscriptions": "^1.4.0", - "graphql-subscriptions": "^1.1.0", - "ioredis": "^4.28.2", + "graphql": "^16.7.1", + "graphql-redis-subscriptions": "^2.4.2", + "graphql-subscriptions": "^2.0.0", + "graphql-tag" : "^2.12.6", + "ioredis": "^5.3.2", "lodash": "^4.17.21", - "meteor-random": "^0.0.3", + "nanoid" : "^3.3.6", "moment": "^2.18.1", "mongoose": "5.7.5", "node-fetch": "^2.6.7", "request": "^2.88.0", "requestify": "^0.2.5", - "strip": "^3.0.0" + "strip": "^3.0.0", + "xss": "1.0.14" } } diff --git a/packages/api-utils/src/core.ts b/packages/api-utils/src/core.ts index a2bb26afca..5a28151e3f 100644 --- a/packages/api-utils/src/core.ts +++ b/packages/api-utils/src/core.ts @@ -1,8 +1,8 @@ import * as mongoose from 'mongoose'; import * as strip from 'strip'; -import * as Random from 'meteor-random'; import { IUserDocument } from './types'; import { IPermissionDocument } from './definitions/permissions'; +import { randomAlphanumeric } from '@erxes/api-utils/src/random'; export const getEnv = ({ name, @@ -222,7 +222,7 @@ export const getUniqueValue = async ( defaultValue?: string ) => { const getRandomValue = (type: string) => - type === 'email' ? generateRandomEmail() : Random.id(); + type === 'email' ? generateRandomEmail() : randomAlphanumeric(); let uniqueValue = defaultValue || getRandomValue(fieldName); diff --git a/packages/api-utils/src/customScalars.ts b/packages/api-utils/src/customScalars.ts index 7c94b4e418..b2878fc7a4 100644 --- a/packages/api-utils/src/customScalars.ts +++ b/packages/api-utils/src/customScalars.ts @@ -1,5 +1,5 @@ import { GraphQLScalarType } from 'graphql'; -import { Kind } from 'graphql/language'; // tslint:disable-line +import { Kind, ValueNode } from 'graphql/language'; // tslint:disable-line function jSONidentity(value: any) { return value; @@ -33,10 +33,10 @@ export default { Date: new GraphQLScalarType({ name: 'Date', description: 'Date custom scalar type', - parseValue(value) { + parseValue(value: any) { return new Date(value); // value from the client }, - serialize: value => { + serialize: (value: any) => { if (value instanceof Date) { return value.toISOString(); } @@ -48,11 +48,12 @@ export default { return new Date(value).toISOString(); }, + // @ts-ignore parseLiteral(ast) { if (ast.kind === Kind.INT) { return parseInt(ast.value, 10); // ast value is always in string format } - return null; + // return null; } }), diff --git a/packages/api-utils/src/definitions/utils.ts b/packages/api-utils/src/definitions/utils.ts index bc8044ef63..49bacf3e23 100644 --- a/packages/api-utils/src/definitions/utils.ts +++ b/packages/api-utils/src/definitions/utils.ts @@ -1,4 +1,4 @@ -import * as Random from 'meteor-random'; +import { nanoid } from 'nanoid'; /** * Mongoose field options wrapper @@ -10,10 +10,9 @@ export const field = options => { options.validate = /\S+/; } - // TODO: remove if (pkey) { options.type = String; - options.default = () => Random.id(); + options.default = () => nanoid(); } return options; diff --git a/packages/api-utils/src/random.ts b/packages/api-utils/src/random.ts new file mode 100644 index 0000000000..36a86410c6 --- /dev/null +++ b/packages/api-utils/src/random.ts @@ -0,0 +1,6 @@ +import { customAlphabet } from 'nanoid'; + +export const randomAlphanumeric = customAlphabet( + 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789' +); +export const randomLowercase = customAlphabet('abcdefghijklmnopqrstuvwxyz'); diff --git a/packages/api-utils/src/redis.ts b/packages/api-utils/src/redis.ts index d71ce5856a..7d1c2dc728 100644 --- a/packages/api-utils/src/redis.ts +++ b/packages/api-utils/src/redis.ts @@ -1,4 +1,4 @@ -import * as Redis from 'ioredis'; +import Redis from 'ioredis'; import * as dotenv from 'dotenv'; import * as fakeRedis from './redisSubstitute'; dotenv.config(); diff --git a/packages/api-utils/src/serviceDiscovery.ts b/packages/api-utils/src/serviceDiscovery.ts index 52c567974d..810c6feb56 100644 --- a/packages/api-utils/src/serviceDiscovery.ts +++ b/packages/api-utils/src/serviceDiscovery.ts @@ -1,6 +1,6 @@ import * as dotenv from 'dotenv'; import redisClient from './redis'; -import * as Redis from 'ioredis'; +import Redis from 'ioredis'; dotenv.config(); const REDIS_CHANNEL_REFRESH_ENABLED_SERVICES = 'refresh_enabled_services'; diff --git a/packages/api-utils/src/types.ts b/packages/api-utils/src/types.ts index b8de43106d..2e950fec3e 100644 --- a/packages/api-utils/src/types.ts +++ b/packages/api-utils/src/types.ts @@ -161,3 +161,5 @@ export interface IAttachment { size: number; type: string; } + +// trigger diff --git a/packages/core-ui/package.json b/packages/core-ui/package.json index e3b5de7ac7..956fc212b2 100644 --- a/packages/core-ui/package.json +++ b/packages/core-ui/package.json @@ -17,7 +17,7 @@ "dayjs": "1.8.15", "dotenv": "^10.0.0", "erxes-icon": "^1.2.1", - "graphql": "^15.8.0", + "graphql": "^16.7.1", "graphql-ws": "^5.5.5", "lodash": "^4.17.15", "lodash.flowright": "^3.5.0", @@ -34,7 +34,7 @@ "styled-components": "^3.2.6", "styled-components-ts": "^0.0.14", "underscore.string": "^3.3.5", - "xss": "^1.0.3" + "xss": "1.0.14" }, "scripts": { "generate-doterxes": "node commands/generate-doterxes.js", @@ -69,7 +69,7 @@ "postcss-loader": "^4.1.0", "style-loader": "^3.3.0", "timers-browserify": "^2.0.12", - "typescript": "3.4.1", + "typescript": "4.9.5", "util": "^0.12.4", "webpack": "^5.65.0", "webpack-cli": "^4.9.1", diff --git a/packages/core-ui/public/locales/mn.json b/packages/core-ui/public/locales/mn.json index 9568bf81c0..29b5ce413a 100644 --- a/packages/core-ui/public/locales/mn.json +++ b/packages/core-ui/public/locales/mn.json @@ -2422,5 +2422,13 @@ "Down payment": "Урьдчилгаа төлбөр", "Interest correction": "Хүүгийн өөрчлөлт", "Stored Interest": "Хүү хуримтлал", - "Is get E-Barimt": "И-Баримт авах эсэх" + "Is get E-Barimt": "И-Баримт авах эсэх", + "Skip Amount Calc /Month/":"Үндсэн зээлээс төлөгдөхгүй хугацаа/Сар/", + "Is Pay First Month":"Эхний сар төлөх эсэх", + "Is Barter":"Бартер эсэх", + "Custom payment Amount":"Дурын төлөх дүн", + "Custom Interest":"Дурын төлөх хүү", + "fixedMethod":"Тэнцүү төлбөр", + "equalMethod":"Үндсэн зээл тэнцүү", + "customMethod":"Дурын" } diff --git a/packages/core-ui/src/modules/settings/apps/components/AppList.tsx b/packages/core-ui/src/modules/settings/apps/components/AppList.tsx index 5c2deb35ce..9b5492d684 100644 --- a/packages/core-ui/src/modules/settings/apps/components/AppList.tsx +++ b/packages/core-ui/src/modules/settings/apps/components/AppList.tsx @@ -9,6 +9,7 @@ import ModalTrigger from 'modules/common/components/ModalTrigger'; import Pagination from 'modules/common/components/pagination/Pagination'; import React from 'react'; import Table from 'modules/common/components/table'; +import { Title } from '@erxes/ui-settings/src/styles'; import Wrapper from 'modules/layout/components/Wrapper'; import { __ } from 'modules/common/utils'; import styled from 'styled-components'; @@ -131,7 +132,12 @@ export default class AppList extends React.Component { } footer={} - actionBar={} + actionBar={ + {__('Apps')}} + right={righActionBar} + /> + } content={ { removeApp(app._id); }; - // const editTrigger = ( - // - // - // - // ); - - // const content = (props) => ( - // - // ); - const onClickToken = () => { copy(app.accessToken); diff --git a/packages/core-ui/src/modules/settings/brands/components/BrandRow.tsx b/packages/core-ui/src/modules/settings/brands/components/BrandRow.tsx deleted file mode 100644 index 58f8cf100f..0000000000 --- a/packages/core-ui/src/modules/settings/brands/components/BrandRow.tsx +++ /dev/null @@ -1,77 +0,0 @@ -import Button from 'modules/common/components/Button'; -import Icon from 'modules/common/components/Icon'; -import ModalTrigger from 'modules/common/components/ModalTrigger'; -import Tip from 'modules/common/components/Tip'; -import BrandForm from '@erxes/ui/src/brands/components/BrandForm'; -import React from 'react'; -import { Link } from 'react-router-dom'; -import { __ } from '../../../common/utils'; -import { SidebarListItem } from '../../styles'; -import { ActionButtons } from '@erxes/ui-settings/src/styles'; -import { IBrand } from '../types'; - -type Props = { - brand: IBrand; - remove: (id: string) => void; - isActive: boolean; - renderButton: (props: any) => JSX.Element; -}; - -class BrandRow extends React.Component { - remove = () => { - const { remove, brand } = this.props; - remove(brand._id); - }; - - renderEditAction = () => { - const { brand, renderButton } = this.props; - - const editTrigger = ( - - ); - - const content = props => ( - - ); - - return ( - - ); - }; - - render() { - const { brand, isActive } = this.props; - - return ( - - {brand.name} - - {this.renderEditAction()} - - ); - const content = (props) => ( + const content = props => ( { ); }; - remove = (brand) => { + remove = brand => { const { remove } = this.props; remove(brand._id); @@ -64,14 +57,19 @@ class Sidebar extends React.Component { render() { const { brands } = this.props; - return brands.map((brand) => ( + return brands.map(brand => ( {brand.name} + + + {brand.description || '-'} + + {this.renderEditAction(brand)} - + - + + + + )} {name} diff --git a/packages/plugin-timeclock-ui/src/components/sidebar/SideBar.tsx b/packages/plugin-timeclock-ui/src/components/sidebar/SideBar.tsx index a93902ed83..b82d8b6fff 100644 --- a/packages/plugin-timeclock-ui/src/components/sidebar/SideBar.tsx +++ b/packages/plugin-timeclock-ui/src/components/sidebar/SideBar.tsx @@ -2,7 +2,12 @@ import { router, __ } from '@erxes/ui/src/utils'; import Sidebar from '@erxes/ui/src/layout/components/Sidebar'; import React, { useState } from 'react'; import SelectTeamMembers from '@erxes/ui/src/team/containers/SelectTeamMembers'; -import { FlexColumnCustom, SidebarActions, SidebarHeader } from '../../styles'; +import { + FlexColumnCustom, + FlexRow, + SidebarActions, + SidebarHeader +} from '../../styles'; import { CustomRangeContainer } from '../../styles'; import DateControl from '@erxes/ui/src/components/form/DateControl'; import Button from '@erxes/ui/src/components/Button'; @@ -21,8 +26,9 @@ type Props = { branches: IBranch[]; departments: IDepartment[]; }; -// get 1st of the next Month + const NOW = new Date(); +// get 1st of the next Month const startOfNextMonth = new Date(NOW.getFullYear(), NOW.getMonth() + 1, 1); // get 1st of this month const startOfThisMonth = new Date(NOW.getFullYear(), NOW.getMonth(), 1); @@ -198,9 +204,71 @@ const LeftSideBar = (props: Props) => { return {renderSidebarActions()}; }; + const onDateButtonClick = (type: string) => { + if (type === 'today') { + setStartDate(NOW); + setEndDate(NOW); + setParams('startDate', NOW); + setParams('endDate', NOW); + } + + if (type === 'this month') { + const endOfThisMonth = new Date(startOfNextMonth - 1); + + setStartDate(startOfThisMonth); + setParams('startDate', startOfThisMonth); + + setEndDate(endOfThisMonth); + setParams('endDate', endOfThisMonth); + } + + if (type === 'this week') { + const startOfThisWeek = new Date(NOW); + const endOfThisWeek = new Date(NOW); + + // Set the date to the beginning of the current week (Monday) + startOfThisWeek.setDate(NOW.getDate() - NOW.getDay() + 1); + + // Set the date to the end of the week (Sunday) + endOfThisWeek.setDate(startOfThisWeek.getDate() + 6); + + setStartDate(startOfThisWeek); + setParams('startDate', startOfThisWeek); + + setEndDate(endOfThisWeek); + setParams('endDate', endOfThisWeek); + } + }; + return ( + + + + +
Departments +
+ + {operation.input.map((d: any) => ( +
+ + {d?.wsInputDetail} + + + +
+ ))} +
+ + +
+
+ + +
+
+
+ + ); + }; + + const relServiceTrigger = ( + + {__('Fetch data...')} + + ); + + const relQuickButtons = ( + + ); + + const renderServiceItem = (i, output) => { + const items = Object.keys(i).filter(key => typeof i[key] !== 'object'); + + const renderOutput = (value: any) => { + return output?.find(x => x.wsResponseName === value) || null; + }; + const renderData = (type: string, key: string) => { + if (type?.toLowerCase()?.includes('byte')) { + return ; + } + if (type?.toLowerCase()?.includes('date')) { + return moment(i[key]).format('YYYY-MM-DD'); + } + + return i[key]; + }; + + const renderRows = () => { + const rows = [] as any; + for (let i = 0; i < items.length; i += 3) { + const rowItems = items.slice(i, i + 3); + const row = ( + + {rowItems.map((key, j) => ( + + + {renderOutput(key)?.wsResponseDetail} + +
+ {renderData(renderOutput(key)?.wsResponseDatatype, key)} +
+ + ))} + + ); + + rows.push(row); + } + + return rows; + }; + + return ( + + {renderRows()} +
+ ); + }; + + const modalContent = (d: any) => { + const output = + (xypServiceList.find(x => x.wsOperationName === d?.serviceName) + ?.output as any) || []; + + if (d?.data?.list && d.data.list.length > 0) { + const renderListItems = (listItem: any, index: number) => { + const title = + listItem['name'] || + listItem['title'] || + listItem['markName'] + ' - ' + listItem['modelName'] || + d?.serviceDescription || + renderServiceName(d?.serviceName); + + return ( + + {renderServiceItem(listItem, output)} + + ); + }; + + return ( + + + {d.data.list.map((listItem, index: number) => + renderListItems(listItem, index) + )} + +
+ ); + } + return renderServiceItem(d.data, output); + }; + + const renderServiceName = (value: string) => { + return value; + }; + + const content = () => { + return ( + <> + + {loading && } + {xypdata?.data?.map((d, index) => ( + + {d?.serviceDescription.replace('дамжуулах сервис', '')} + + } + size="xl" + content={() => modalContent(d)} + key={d?.serviceName} + /> + ))} + + {xypdata === null && } + {relQuickButtons} + + ); + }; + + return ( + + {content()} + + ); +} + +export default Sidebar; diff --git a/packages/plugin-xyp-ui/src/modules/contacts/containers/CustomerSidebar.tsx b/packages/plugin-xyp-ui/src/modules/contacts/containers/CustomerSidebar.tsx new file mode 100644 index 0000000000..c7bbe52c1d --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/contacts/containers/CustomerSidebar.tsx @@ -0,0 +1,105 @@ +import React from 'react'; +import { gql, useQuery, useMutation, useLazyQuery } from '@apollo/client'; +import Spinner from '@erxes/ui/src/components/Spinner'; +import Alert from '@erxes/ui/src/utils/Alert'; +import CustomerSidebar from '../components/CustomerSidebar'; +import { mutations, queries } from '../graphql'; +import { IOperation } from '../types'; + +type Props = { + id: string; + mainType: string; +}; +const CustomerSidebarContainer = (props: Props) => { + const detail = useQuery(gql(queries.detail), { + variables: { contentTypeId: props.id, contentType: props.mainType }, + fetchPolicy: 'network-only' + }); + + const serviceChoosen = useQuery(gql(queries.serviceChoosen), { + fetchPolicy: 'network-only' + }); + + const xypServiceList = useQuery(gql(queries.xypServiceList), {}); + const [xypRequest] = useLazyQuery(gql(queries.xypRequest), { + fetchPolicy: 'network-only' + }); + + const [add] = useMutation(gql(mutations.add)); + const [edit] = useMutation(gql(mutations.edit)); + + const fetchData = (operation: IOperation, params: any) => { + xypRequest({ + variables: { + wsOperationName: operation.wsOperationName, + params: params + } + }).then(({ data }) => { + if (data?.xypRequest?.return?.resultCode === 0) { + const xypData = [ + { + serviceName: operation.wsOperationName, + serviceDescription: operation.wsOperationDetail, + data: data?.xypRequest?.return?.response + } + ]; + if (!detail?.data?.xypDataDetail) { + add({ + variables: { + contentType: props.mainType, + contentTypeId: props.id, + data: xypData + } + }).then(({ data }) => { + detail.refetch(); + if (data.xypDataAdd?._id) { + Alert.success('Successfully added an item'); + } else { + Alert.error('error'); + } + }); + } else { + const unique = detail?.data?.xypDataDetail.data.filter( + d => d.serviceName != operation.wsOperationName + ); + edit({ + variables: { + _id: detail?.data?.xypDataDetail._id, + contentType: props.mainType, + contentTypeId: props.id, + data: [...unique, ...xypData] + } + }).then(({ data }) => { + detail.refetch(); + if (data.xypDataUpdate?._id) { + Alert.success('Successfully edited an item'); + } else { + Alert.error('error'); + } + }); + } + } else { + Alert.error(`${data?.xypRequest?.return?.resultMessage}`); + } + }); + }; + + if (detail.loading) { + return ; + } + + const updatedProps = { + xypdata: detail?.data?.xypDataDetail, + loading: detail.loading || xypServiceList.loading, + error: xypServiceList?.error?.name || '', + refetch: detail.refetch, + xypServiceList: xypServiceList?.data?.xypServiceList || [], + serviceChoosenLoading: serviceChoosen.loading, + list: serviceChoosen?.data?.xypServiceListChoosen, + fetchData: fetchData + }; + + return ; +}; + +export default CustomerSidebarContainer; diff --git a/packages/plugin-xyp-ui/src/modules/contacts/graphql/index.ts b/packages/plugin-xyp-ui/src/modules/contacts/graphql/index.ts new file mode 100644 index 0000000000..8cff0604ab --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/contacts/graphql/index.ts @@ -0,0 +1,4 @@ +import mutations from './mutations'; +import queries from './queries'; + +export { queries, mutations }; diff --git a/packages/plugin-xyp-ui/src/modules/contacts/graphql/mutations.ts b/packages/plugin-xyp-ui/src/modules/contacts/graphql/mutations.ts new file mode 100644 index 0000000000..6085fae7c0 --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/contacts/graphql/mutations.ts @@ -0,0 +1,107 @@ +const remove = ` + mutation xypRemove($_id: String!){ + xypRemove(_id: $_id) + } + `; + +const edit = ` + mutation xypDataUpdate($_id:String!,$contentType: String, $contentTypeId: String, $data: JSON){ + xypDataUpdate(_id: $_id,contentType: $contentType, contentTypeId: $contentTypeId, data: $data){ + _id + } + }`; + +const add = ` + mutation xypDataAdd($contentType: String, $contentTypeId: String, $data: JSON){ + xypDataAdd(contentType: $contentType, contentTypeId: $contentTypeId, data: $data) { + _id + data + } + } + `; +const customerEdit = ` +mutation customersEdit($_id: String!, $avatar: String, $firstName: String, $lastName: String, $middleName: String, $sex: Int, $birthDate: Date, $primaryEmail: String, $primaryPhone: String, $phones: [String], $emails: [String], $ownerId: String, $position: String, $department: String, $leadStatus: String, $hasAuthority: String, $description: String, $isSubscribed: String, $links: JSON, $customFieldsData: JSON, $code: String, $emailValidationStatus: String, $phoneValidationStatus: String) { + customersEdit( + _id: $_id + avatar: $avatar + firstName: $firstName + lastName: $lastName + middleName: $middleName + sex: $sex + birthDate: $birthDate + primaryEmail: $primaryEmail + primaryPhone: $primaryPhone + phones: $phones + emails: $emails + ownerId: $ownerId + position: $position + department: $department + leadStatus: $leadStatus + hasAuthority: $hasAuthority + description: $description + isSubscribed: $isSubscribed + links: $links + customFieldsData: $customFieldsData + code: $code + emailValidationStatus: $emailValidationStatus + phoneValidationStatus: $phoneValidationStatus + ) { + _id + firstName + middleName + lastName + avatar + sex + birthDate + primaryEmail + emails + primaryPhone + phones + state + visitorContactInfo + modifiedAt + position + department + leadStatus + hasAuthority + description + isSubscribed + code + emailValidationStatus + phoneValidationStatus + score + isOnline + lastSeenAt + sessionCount + links + ownerId + owner { + _id + details { + fullName + __typename + } + __typename + } + integrationId + createdAt + remoteAddress + location + customFieldsData + trackedData + tagIds + getTags { + _id + name + colorCode + __typename + } + __typename + } +}`; +export default { + add, + remove, + edit, + customerEdit +}; diff --git a/packages/plugin-xyp-ui/src/modules/contacts/graphql/queries.ts b/packages/plugin-xyp-ui/src/modules/contacts/graphql/queries.ts new file mode 100644 index 0000000000..cb2c13b605 --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/contacts/graphql/queries.ts @@ -0,0 +1,186 @@ +const list = ` + query listQuery { + xypDataList { + _id + contentType + contentTypeId + data + } + } +`; +const serviceChoosen = ` + query xypServiceListChoosen { + xypServiceListChoosen + } +`; +const detail = ` +query xypDataDetail($id: String, $contentType: String, $contentTypeId: String) { + xypDataDetail(_id: $id, contentType: $contentType, contentTypeId: $contentTypeId) { + _id + contentType + contentTypeId + createdAt + data + updatedAt + } +}`; +const customerDetail = ` +query customerDetail($_id: String!) { + customerDetail(_id: $_id) { + _id + firstName + middleName + lastName + avatar + sex + birthDate + primaryEmail + emails + primaryPhone + phones + state + visitorContactInfo + modifiedAt + position + department + leadStatus + hasAuthority + description + isSubscribed + code + emailValidationStatus + phoneValidationStatus + score + isOnline + lastSeenAt + sessionCount + links + ownerId + integrationId + createdAt + remoteAddress + location + customFieldsData + trackedData + tagIds + urlVisits + __typename + } +}`; +const totalCount = ` + query xypsTotalCount{ + xypsTotalCount + } +`; +const xypRequest = ` +query xypRequest($params: JSON, $wsOperationName: String!) { + xypRequest(params: $params, wsOperationName: $wsOperationName) +} +`; +const xypServiceList = ` +query xypServiceListAll { + xypServiceList +}`; + +const fieldsGroups = ` +query fieldsGroups($contentType: String!, $isDefinedByErxes: Boolean, $config: JSON) { + fieldsGroups( + contentType: $contentType + isDefinedByErxes: $isDefinedByErxes + config: $config + ) { + name + _id + description + code + order + isVisible + isVisibleInDetail + contentType + isDefinedByErxes + logicAction + logics { + fieldId + logicOperator + logicValue + __typename + } + isMultiple + alwaysOpen + parentId + config + lastUpdatedUser { + details { + fullName + __typename + } + __typename + } + fields { + type + text + canHide + validation + options + isVisibleToCreate + locationOptions { + lat + lng + description + __typename + } + objectListConfigs { + key + label + type + __typename + } + groupId + searchable + showInCard + isRequired + _id + description + code + order + isVisible + isVisibleInDetail + contentType + isDefinedByErxes + logicAction + logics { + fieldId + logicOperator + logicValue + __typename + } + lastUpdatedUser { + details { + fullName + __typename + } + __typename + } + logicAction + logics { + fieldId + logicOperator + logicValue + __typename + } + relationType + __typename + } + __typename + } +}`; +export default { + detail, + customerDetail, + xypRequest, + list, + totalCount, + serviceChoosen, + xypServiceList, + fieldsGroups +}; diff --git a/packages/plugin-xyp-ui/src/modules/contacts/types.ts b/packages/plugin-xyp-ui/src/modules/contacts/types.ts new file mode 100644 index 0000000000..3f4a2ff207 --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/contacts/types.ts @@ -0,0 +1,65 @@ +export interface IXyp { + _id: string; + name?: string; + url?: string; + token?: string; + createdAt?: Date; + totalObjectCount?: number; + checked?: boolean; +} + +export interface IType { + _id: string; + name: string; +} + +// queries +export type XypQueryResponse = { + xyps: IXyp[]; + refetch: () => void; + loading: boolean; +}; +export type TypeQueryResponse = { + xypTypes: IType[]; + refetch: () => void; + loading: boolean; +}; + +// mutations +export type MutationVariables = { + _id?: string; + name: string; + createdAt?: Date; + expiryDate?: Date; + checked?: boolean; + type?: string; +}; +export type AddMutationResponse = { + addMutation: (params: { variables: MutationVariables }) => Promise; +}; + +export type EditMutationResponse = { + editMutation: (params: { variables: MutationVariables }) => Promise; +}; + +export type RemoveMutationResponse = { + removeMutation: (params: { variables: { _id: string } }) => Promise; +}; + +export type EditTypeMutationResponse = { + typesEdit: (params: { variables: MutationVariables }) => Promise; +}; + +export type RemoveTypeMutationResponse = { + typesRemove: (params: { variables: { _id: string } }) => Promise; +}; + +export interface IOperation { + orgName: string; + wsOperationDetail: string; + wsOperationName: string; //"WS100101_getCitizenIDCardInfo" + wsVersion: string; //"1.3.0" + wsWsdlEndpoint: string; // 'https://xyp.gov.mn/citizen-1.3.0/ws?WSDL'; + input: []; + output: []; +} diff --git a/packages/plugin-xyp-ui/src/modules/settings/components/SelectServices.tsx b/packages/plugin-xyp-ui/src/modules/settings/components/SelectServices.tsx new file mode 100644 index 0000000000..8739efa12f --- /dev/null +++ b/packages/plugin-xyp-ui/src/modules/settings/components/SelectServices.tsx @@ -0,0 +1,55 @@ +import { __ } from '@erxes/ui/src/utils/core'; +import React, { useEffect, useState } from 'react'; +import Select from 'react-select-plus'; + +import { ICategory } from '@erxes/ui/src/utils/categories'; + +type Props = { + loading?: boolean; + filtered: any[]; + value: string[]; + onSearch: (value: string) => void; + onChange: (value: string[]) => void; +}; + +const SelectServices: React.FC = props => { + const { filtered = [], value } = props; + + const [searchValue, setSearchValue] = useState(''); + + useEffect(() => { + let timeoutId: any = null; + + if (searchValue) { + timeoutId = setTimeout(() => { + props.onSearch(searchValue); + }, 500); + + return () => { + clearTimeout(timeoutId); + }; + } + }, [searchValue]); + + const onInputChange = value => { + setSearchValue(value); + }; + + const onChangeTag = (value: string[]) => { + props.onChange(value); + }; + + return ( + + + + + )} + /> + {notBankPts.map((pt: PaymentType) => ( + ( + + {pt.title} + + + + + + )} + key={pt.type} + /> + ))} +
+ + +
+ + + + +
+
+ + )} + + ) +} + +export default ReturnForm diff --git a/pos/app/(main)/(orders)/components/history/ReturnOdd.tsx b/pos/app/(main)/(orders)/components/history/ReturnOdd.tsx new file mode 100644 index 0000000000..4a599f1862 --- /dev/null +++ b/pos/app/(main)/(orders)/components/history/ReturnOdd.tsx @@ -0,0 +1,25 @@ +import { useWatch } from "react-hook-form" + +const ReturnOdd = ({ + totalAmount, + control, +}: { + totalAmount: number + control: any +}) => { + const results = useWatch({ control }) + // const formValues = getValues() + + const total = Object.values(results).reduce( + (acc: number, curr: any) => + isNaN(Number(curr)) ? acc : acc + Number(curr), + 0 + ) + return ( +
+ Зөрүү: {(totalAmount - total).toLocaleString()}₮ +
+ ) +} + +export default ReturnOdd diff --git a/pos/app/(main)/(orders)/components/history/historyItemAction.tsx b/pos/app/(main)/(orders)/components/history/historyItemAction.tsx index f73dfc229a..b10ad22a48 100644 --- a/pos/app/(main)/(orders)/components/history/historyItemAction.tsx +++ b/pos/app/(main)/(orders)/components/history/historyItemAction.tsx @@ -17,8 +17,12 @@ import { DropdownMenuTrigger, } from "@/components/ui/dropdown-menu" +import OrderCancel from "./orderCancel" +import OrderReturn from "./orderReturn" +import PaymentDetail from "./paymentDetail" + const HistoryItemAction = ({ row }: CellContext) => { - const { _id, paidDate } = row.original || {} + const { _id, paidDate, number, totalAmount } = row.original || {} const router = useRouter() const setActiveOrder = useSetAtom(activeOrderAtom) const setOpenDetail = useSetAtom(detailIdAtom) @@ -65,7 +69,12 @@ const HistoryItemAction = ({ row }: CellContext) => { setOpenDetail(_id)}> Дэлгэрэнгүй + + + + + ) } diff --git a/pos/app/(main)/(orders)/components/history/orderCancel.tsx b/pos/app/(main)/(orders)/components/history/orderCancel.tsx new file mode 100644 index 0000000000..0d29ce1f68 --- /dev/null +++ b/pos/app/(main)/(orders)/components/history/orderCancel.tsx @@ -0,0 +1,94 @@ +import { mutations } from "@/modules/orders/graphql" +import { openCancelDialogAtom, paymentDetailAtom } from "@/store/history.store" +import { useMutation } from "@apollo/client" +import { useAtom, useAtomValue, useSetAtom } from "jotai" + +import { + AlertDialog, + AlertDialogCancel, + AlertDialogContent, + AlertDialogDescription, + AlertDialogFooter, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog" +import { Button } from "@/components/ui/button" +import { DropdownMenuItem } from "@/components/ui/dropdown-menu" +import { useToast } from "@/components/ui/use-toast" + +export const OrderCancelTrigger = ({ + loading, + _id, +}: { + loading?: boolean + _id: string +}) => { + const changeOpen = useSetAtom(openCancelDialogAtom) + const { cashAmount, mobileAmount, paidAmounts } = + useAtomValue(paymentDetailAtom) || {} + + const paidTotal = + (cashAmount || 0) + + (mobileAmount || 0) + + (paidAmounts?.reduce((total, el) => el.amount + total, 0) || 0) + + return ( + changeOpen(_id)} + disabled={loading || paidTotal > 0} + > + Устгах + + ) +} + +const OrderCancel = ({ _id, number }: { _id: string; number: string }) => { + const [open, changeOpen] = useAtom(openCancelDialogAtom) + const { onError } = useToast() + + const [orderCancel, { loading }] = useMutation(mutations.ordersCancel, { + variables: { + _id, + }, + onCompleted() { + changeOpen(null) + }, + onError(error) { + onError(error) + changeOpen(null) + }, + refetchQueries: ["OrdersHistory"], + }) + + return ( + changeOpen(open === _id ? null : _id)} + > + + + + Та {number} дугаартай захиалгыг устгахдаа итгэлтэй байна уу? + + + Энэ үйлдлийг буцаах боломжгүй. Энэ нь таны захиалгийг бүрмөсөн + устгана + + + + Болих + + + + + ) +} + +export default OrderCancel diff --git a/pos/app/(main)/(orders)/components/history/orderReturn.tsx b/pos/app/(main)/(orders)/components/history/orderReturn.tsx new file mode 100644 index 0000000000..d6f3ea04b1 --- /dev/null +++ b/pos/app/(main)/(orders)/components/history/orderReturn.tsx @@ -0,0 +1,58 @@ +import { openReturnDialogAtom } from "@/store/history.store" +import { useAtom, useSetAtom } from "jotai" + +import { + AlertDialog, + AlertDialogContent, + AlertDialogHeader, + AlertDialogTitle, +} from "@/components/ui/alert-dialog" +import { DropdownMenuItem } from "@/components/ui/dropdown-menu" + +import ReturnForm from "./ReturnForm" + +const OrderReturn = ({ + _id, + number, + totalAmount, +}: { + _id: string + number: string + totalAmount: number +}) => { + const [open, changeOpen] = useAtom(openReturnDialogAtom) + + return ( + changeOpen(open === _id ? null : _id)} + > + + + + Буцаалт хийх + {number} + + + + + + ) +} + +export const OrderReturnTrigger = ({ + _id, + paidDate, +}: { + _id: string + paidDate: string | null +}) => { + const changeOpen = useSetAtom(openReturnDialogAtom) + return ( + changeOpen(_id)} disabled={!paidDate}> + Буцааx + + ) +} + +export default OrderReturn diff --git a/pos/app/(main)/(orders)/components/history/paymentDetail.tsx b/pos/app/(main)/(orders)/components/history/paymentDetail.tsx new file mode 100644 index 0000000000..7ffacce4df --- /dev/null +++ b/pos/app/(main)/(orders)/components/history/paymentDetail.tsx @@ -0,0 +1,36 @@ +import { queries } from "@/modules/orders/graphql" +import { paymentDetailAtom } from "@/store/history.store" +import { useQuery } from "@apollo/client" +import { useSetAtom } from "jotai" + +import { OrderCancelTrigger } from "./orderCancel" +import { OrderReturnTrigger } from "./orderReturn" + +const PaymentDetail = ({ + _id, + paidDate, +}: { + _id: string + paidDate: string | null +}) => { + const setPaymentDetail = useSetAtom(paymentDetailAtom) + + const { loading } = useQuery(queries.historyItemDetail, { + variables: { + _id, + }, + onCompleted(data) { + const { orderDetail } = data || {} + setPaymentDetail(orderDetail || {}) + }, + }) + + return ( + <> + + + + ) +} + +export default PaymentDetail diff --git a/pos/app/(main)/(orders)/components/progress/ActiveOrder.tsx b/pos/app/(main)/(orders)/components/progress/ActiveOrder.tsx index 82b8d864b7..ef17cd1e57 100644 --- a/pos/app/(main)/(orders)/components/progress/ActiveOrder.tsx +++ b/pos/app/(main)/(orders)/components/progress/ActiveOrder.tsx @@ -1,5 +1,4 @@ import { useEffect, useState } from "react" -import dynamic from "next/dynamic" import { columnNumberAtom, showItemsAtom } from "@/store/progress.store" import { useAtomValue } from "jotai" import { ChevronsUpDownIcon, SoupIcon, TruckIcon } from "lucide-react" @@ -24,8 +23,7 @@ import { import ActiveOrderItem from "./ActiveOrderItem" import ChangeOrderStatus from "./ChangeOrderStatus" import TimerBadge from "./TimerBadge" - -const DeliveryInfo = dynamic(() => import("./deliveryInfo")) +import DeliveryInfo from "./deliveryInfo" const ActiveOrder = ({ number, @@ -35,6 +33,7 @@ const ActiveOrder = ({ dueDate, items, _id, + deliveryInfo, }: IOrder) => { const numberArr = (number || "").split("_") const colNum = useAtomValue(columnNumberAtom) @@ -87,8 +86,8 @@ const ActiveOrder = ({ - - {type === "delivery" && } + + diff --git a/pos/app/(main)/(orders)/components/progress/ActiveOrderItem.tsx b/pos/app/(main)/(orders)/components/progress/ActiveOrderItem.tsx index 7c86c2c00d..68caf23a52 100644 --- a/pos/app/(main)/(orders)/components/progress/ActiveOrderItem.tsx +++ b/pos/app/(main)/(orders)/components/progress/ActiveOrderItem.tsx @@ -1,12 +1,13 @@ import { mutations } from "@/modules/orders/graphql" import { useMutation } from "@apollo/client" -import { SoupIcon, TruckIcon } from "lucide-react" +import { ExternalLinkIcon, SoupIcon, TruckIcon } from "lucide-react" import { OrderItem } from "@/types/order.types" import { ORDER_ITEM_STATUSES } from "@/lib/constants" -import { cn } from "@/lib/utils" -import { AspectRatio } from "@/components/ui/aspect-ratio" +import { cn, getEnv, READ_FILE } from "@/lib/utils" import Image from "@/components/ui/image" +import { Input } from "@/components/ui/input" +import { Label } from "@/components/ui/label" import { LoaderIcon } from "@/components/ui/loader" import { Toggle } from "@/components/ui/toggle" import { useToast } from "@/components/ui/use-toast" @@ -33,49 +34,84 @@ const ActiveOrderItem = ({ const isDone = status === ORDER_ITEM_STATUSES.DONE return ( - - changeStatus({ - variables: { - _id, - status: isDone - ? ORDER_ITEM_STATUSES.CONFIRM - : ORDER_ITEM_STATUSES.DONE, - }, - }) - } - > -
- - {!loading && } - {loading && } - {productName} - - x{count} -
- {!!description && ( -
- Нэмэлт: {description} +
+ + changeStatus({ + variables: { + _id, + status: isDone + ? ORDER_ITEM_STATUSES.CONFIRM + : ORDER_ITEM_STATUSES.DONE, + }, + }) + } + > +
+ + {!loading && } + {loading && } + {productName} + + x{count}
- )} - {!!attachment?.url && ( - - {productName - - )} -
+ +
+ {!!description && ( +
+ + +
+ )} + {!!attachment?.url && ( +
+ +
+ {productName + + + +
+
+ )} +
+
) } diff --git a/pos/app/(main)/(orders)/components/progress/deliveryInfo.tsx b/pos/app/(main)/(orders)/components/progress/deliveryInfo.tsx index 5692c69e52..6b3c5c40cd 100644 --- a/pos/app/(main)/(orders)/components/progress/deliveryInfo.tsx +++ b/pos/app/(main)/(orders)/components/progress/deliveryInfo.tsx @@ -1,13 +1,29 @@ -import { TruckIcon } from "lucide-react" +import { + Tooltip, + TooltipContent, + TooltipProvider, + TooltipTrigger, +} from "@/components/ui/tooltip" -import { Button } from "@/components/ui/button" +const DeliveryInfo = ({ + deliveryInfo, +}: { + deliveryInfo?: { description?: string } +}) => { + const { description } = deliveryInfo || {} -const DeliveryInfo = () => { + if ((description || "").length < 30) return

{description}

return ( - + + + +

{(description || "").slice(0, 30) + "..."}

+
+ +

{description || ""}

+
+
+
) } diff --git a/pos/app/(main)/checkout/components/BackButton.kiosk.tsx b/pos/app/(main)/checkout/components/BackButton.kiosk.tsx new file mode 100644 index 0000000000..08645628d0 --- /dev/null +++ b/pos/app/(main)/checkout/components/BackButton.kiosk.tsx @@ -0,0 +1,21 @@ +import Link from "next/link" +import { ChevronLeftIcon } from "lucide-react" + +import { Button } from "@/components/ui/button" + +const BackButton = () => { + return ( + + ) +} + +export default BackButton diff --git a/pos/app/(main)/checkout/components/HandleOrder.kiosk.tsx b/pos/app/(main)/checkout/components/HandleOrder.kiosk.tsx new file mode 100644 index 0000000000..5e0a327599 --- /dev/null +++ b/pos/app/(main)/checkout/components/HandleOrder.kiosk.tsx @@ -0,0 +1,49 @@ +import dynamic from "next/dynamic" +import Link from "next/link" +import { kioskDialogOpenAtom, kioskModalView } from "@/store" +import { useAtom } from "jotai" + +import { Button } from "@/components/ui/button" +import { Dialog, DialogTrigger } from "@/components/ui/dialog" + +import SuccessDialog from "./successDialog" + +const BillType = dynamic( + () => import("@/modules/checkout/components/ebarimt/billType.kiosk") +) + +const RegisterNumber = dynamic( + () => import("@/modules/checkout/components/ebarimt/registerNumber.kiosk") +) + +const SelectPaymentType = dynamic( + () => + import("@/modules/checkout/components/paymentType/selectPaymentType.kiosk") +) + +const HandleOrder = () => { + const [view, setView] = useAtom(kioskModalView) + const [open, setOpen] = useAtom(kioskDialogOpenAtom) + + return ( + <> + + setOpen((prev) => !prev)}> + + + + + {view === "billType" && } + {view === "registerNumber" && } + {view === "choosePay" && } + + + + ) +} + +export default HandleOrder diff --git a/pos/app/(main)/checkout/components/Items.kiosk.tsx b/pos/app/(main)/checkout/components/Items.kiosk.tsx new file mode 100644 index 0000000000..4e67b059cf --- /dev/null +++ b/pos/app/(main)/checkout/components/Items.kiosk.tsx @@ -0,0 +1,42 @@ +import { cartAtom } from "@/store/cart.store" +import { useAtomValue } from "jotai" + +import { AspectRatio } from "@/components/ui/aspect-ratio" +import Image from "@/components/ui/image" +import { ScrollArea } from "@/components/ui/scroll-area" + +const Items = () => { + const items = useAtomValue(cartAtom) + return ( + +
+ {items.map( + ({ count, productName, productImgUrl, unitPrice }, index) => { + return ( +
+
+ + {productName + +
+
{productName}
+
+ {count} x {unitPrice} +
+
+ ) + } + )} +
+
+ ) +} + +export default Items diff --git a/pos/app/(main)/checkout/components/successDialog.tsx b/pos/app/(main)/checkout/components/successDialog.tsx new file mode 100644 index 0000000000..7e05101f3d --- /dev/null +++ b/pos/app/(main)/checkout/components/successDialog.tsx @@ -0,0 +1,91 @@ +import { useEffect } from "react" +import { useRouter } from "next/navigation" +import usePrintBill from "@/modules/checkout/hooks/usePrintBill" +import { kioskDialogOpenAtom } from "@/store" +import { + activeOrderAtom, + orderNumberAtom, + orderTotalAmountAtom, + setInitialAtom, + unPaidAmountAtom, +} from "@/store/order.store" +import { ebarimtSheetAtom } from "@/store/ui.store" +import { AspectRatio } from "@radix-ui/react-aspect-ratio" +import { useAtomValue, useSetAtom } from "jotai" + +import useReciept from "@/lib/useReciept" +import { Button } from "@/components/ui/button" +import { Dialog, DialogContent } from "@/components/ui/dialog" + +const SuccessDialog = () => { + const number = useAtomValue(orderNumberAtom) + const unPaidAmount = useAtomValue(unPaidAmountAtom) + const orderTotalAmount = useAtomValue(orderTotalAmountAtom) + + const open = useAtomValue(ebarimtSheetAtom) + const setInitial = useSetAtom(setInitialAtom) + const router = useRouter() + const activeOrder = useAtomValue(activeOrderAtom) + const setKioskDialogOpen = useSetAtom(kioskDialogOpenAtom) + + const { changeVisiblity, printBill } = usePrintBill() + + const { iframeRef } = useReciept({ + onCompleted() { + changeVisiblity(false) + setKioskDialogOpen(false) + }, + }) + + const reset = () => { + setInitial() + router.push("/") + } + + useEffect(() => { + if (unPaidAmount === 0 && !!orderTotalAmount) { + printBill() + } + }, [printBill, unPaidAmount, orderTotalAmount]) + + return ( + + +
+ +
+
+ Таны захиалгын
+ дугаар +
+

+ {number.split("_")[1]} +

+
+ худалдаж авах хэсэгрүү очно уу. +
+
+
+
+ + +
+ {open && ( +