Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,29 +11,57 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
# TODO(published-sdk): use a single checkout at repo root (drop path: cli).
- name: Checkout CLI
uses: actions/checkout@v4
with:
path: cli

# TODO(published-sdk): remove — sdk-ts is built and fetched from npm, not sibling checkout.
- name: Checkout sdk-ts
uses: actions/checkout@v4
with:
repository: Decodo/sdk-ts
path: sdk-ts
ref: main

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
# TODO(published-sdk): drop package_json_file when checkout is at repo root.
package_json_file: cli/package.json

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 24
cache: pnpm
# TODO(published-sdk): revert to pnpm-lock.yaml (no cli/ prefix).
cache-dependency-path: cli/pnpm-lock.yaml

# TODO(published-sdk): remove — published @decodo/sdk-ts ships prebuilt artifacts.
- name: Build sdk-ts
# codegen needs inputs/decodo.ir.json (gitignored); compile committed src/generated instead.
run: pnpm install --frozen-lockfile && pnpm run build:esm && pnpm run build:cjs
working-directory: sdk-ts

- name: Install dependencies
# TODO(published-sdk): drop working-directory: cli on all steps below.
- name: Install CLI dependencies
run: pnpm install --frozen-lockfile
working-directory: cli

- name: Lint
run: pnpm lint
working-directory: cli

- name: Typecheck
run: pnpm typecheck
working-directory: cli

- name: Build
run: pnpm build
working-directory: cli

- name: Test
run: pnpm test
working-directory: cli
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@
"fix": "ultracite fix",
"test": "vitest run",
"test:watch": "vitest",
"pretest": "pnpm build"
"build:sdk-ts": "pnpm --dir ../sdk-ts run build:esm && pnpm --dir ../sdk-ts run build:cjs",
"prebuild": "pnpm run build:sdk-ts",
"pretest": "pnpm run build:sdk-ts && pnpm build"
},
"engines": {
"node": ">=18.0.0"
},
"packageManager": "pnpm@10.33.3",
"dependencies": {
"@decodo/sdk-ts": "file:../sdk-ts",
"commander": "^14.0.0",
"env-paths": "^3.0.0"
},
Expand Down
98 changes: 98 additions & 0 deletions pnpm-lock.yaml

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

3 changes: 1 addition & 2 deletions src/auth/commands/setup.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { stdin as input, stdout as output } from "node:process";
import { createInterface } from "node:readline/promises";
import { AuthenticationError, DecodoError } from "@decodo/sdk-ts";
import { Command } from "commander";
import { EXIT } from "../../platform/constants.js";
import { AuthenticationError } from "../../platform/errors/authentication-error.js";
import { DecodoError } from "../../platform/errors/decodo-error.js";
import { validateAuthToken } from "../../scrape/services/auth-validation.js";
import { PLAYGROUND_URL } from "../constants.js";
import { getConfigPath, writeConfig } from "../services/config.js";
Expand Down
8 changes: 0 additions & 8 deletions src/platform/errors/authentication-error.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/platform/errors/decodo-error.ts

This file was deleted.

8 changes: 0 additions & 8 deletions src/platform/errors/rate-limit-error.ts

This file was deleted.

6 changes: 0 additions & 6 deletions src/platform/errors/timeout-error.ts

This file was deleted.

11 changes: 0 additions & 11 deletions src/platform/errors/validation-error.ts

This file was deleted.

Loading
Loading