From ca361e10462bd74205eb490fe5d265476be4158d Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Tue, 16 Apr 2024 12:29:55 -0500 Subject: [PATCH] fix: prettier errors (#106) --- .eslintignore | 1 + .github/workflows/ci.yaml | 24 +++++++++++++++++++++++ .github/workflows/docs.yaml | 37 ++++++++++++++++++++++++++++++++++++ .prettierignore | 2 ++ packages/sdk/js/src/agent.ts | 5 ++--- 5 files changed, 66 insertions(+), 3 deletions(-) create mode 100644 .eslintignore create mode 100644 .github/workflows/ci.yaml create mode 100644 .github/workflows/docs.yaml create mode 100644 .prettierignore diff --git a/.eslintignore b/.eslintignore new file mode 100644 index 0000000..0cb35b9 --- /dev/null +++ b/.eslintignore @@ -0,0 +1 @@ +/apps/agentprotocol.ai/ diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..b707d15 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,24 @@ +name: CI + +on: [push, pull_request] + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + cache: npm + cache-dependency-path: package-lock.json + + - name: Install dependencies + run: npm ci + + - name: Run CI script + run: npm run ci diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 0000000..07ebee9 --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,37 @@ +name: Build JS SDK + +on: + pull_request: + types: + - opened + - synchronize + - reopened + paths: + - 'apps/agentprotocol.ai/**' + +jobs: + build: + runs-on: ubuntu-20.04 + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: '16.x' + registry-url: 'https://registry.npmjs.org' + cache: npm + cache-dependency-path: package-lock.json + + - name: Install dependencies + working-directory: ./apps/agentprotocol.ai/ + run: npm ci + + # - name: Lint + # working-directory: ./apps/agentprotocol.ai/ + # run: npm run lint + + - name: Build + working-directory: ./apps/agentprotocol.ai/ + run: npm run build diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..d35f624 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,2 @@ +packages/client/python/* +apps/agentprotocol.ai/* diff --git a/packages/sdk/js/src/agent.ts b/packages/sdk/js/src/agent.ts index 1862417..74676a3 100644 --- a/packages/sdk/js/src/agent.ts +++ b/packages/sdk/js/src/agent.ts @@ -348,9 +348,8 @@ export const getArtifactPath = ( workspace: string, artifact: Artifact ): string => { - const rootDir = path.isAbsolute(workspace) - ? workspace - : path.join(process.cwd(), workspace) + const isAbsolute: boolean = path.isAbsolute(workspace) + const rootDir = isAbsolute ? workspace : path.join(process.cwd(), workspace) return path.join( rootDir,