@reduck-ai/sdk 1.0.19 → 1.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,3 @@
1
+ export declare const BUILD_ENV: "production" | "staging" | "local";
2
+ export declare const APP_URL = "https://reduck.ai";
3
+ export declare const RUNNER_URL = "https://runner.pointandclick.ai";
@@ -0,0 +1,4 @@
1
+ // Auto-generated by scripts/generate-build-env.mjs — do not edit
2
+ export const BUILD_ENV = "production";
3
+ export const APP_URL = "https://reduck.ai";
4
+ export const RUNNER_URL = "https://runner.pointandclick.ai";
package/dist/client.js CHANGED
@@ -7,15 +7,14 @@ import { authHeader } from "./types.js";
7
7
  import { Run } from "./run.js";
8
8
  import { fetchDevices } from "./device.js";
9
9
  import { fetchRun, fetchRuns } from "./session.js";
10
- const DEFAULT_RUNNER_BASE_URL = "https://runner.pointandclick.ai";
11
- const DEFAULT_APP_BASE_URL = "https://reduck.ai";
10
+ import { RUNNER_URL, APP_URL } from "./build-env.generated.js";
12
11
  export class ReduckClient {
13
12
  _runnerBaseUrl;
14
13
  _appBaseUrl;
15
14
  _headers;
16
15
  constructor(opts) {
17
- this._runnerBaseUrl = (opts.runnerBaseUrl ?? process.env.REDUCK_RUNNER_URL ?? DEFAULT_RUNNER_BASE_URL).replace(/\/$/, "");
18
- this._appBaseUrl = (opts.appBaseUrl ?? process.env.REDUCK_APP_URL ?? DEFAULT_APP_BASE_URL).replace(/\/$/, "");
16
+ this._runnerBaseUrl = (opts.runnerBaseUrl ?? RUNNER_URL).replace(/\/$/, "");
17
+ this._appBaseUrl = (opts.appBaseUrl ?? APP_URL).replace(/\/$/, "");
19
18
  this._headers = { ...opts.headers, ...authHeader(opts) };
20
19
  }
21
20
  async consentNotice() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@reduck-ai/sdk",
3
- "version": "1.0.19",
3
+ "version": "1.1.2",
4
4
  "description": "TypeScript SDK for Reduck — run browser automations programmatically.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Reduck AI <contact@reduck.ai> (https://reduck.ai)",
@@ -28,7 +28,12 @@
28
28
  "access": "public"
29
29
  },
30
30
  "scripts": {
31
+ "generate-env": "node ../scripts/generate-build-env.mjs ./src/build-env.generated.ts",
32
+ "prebuild": "pnpm generate-env",
31
33
  "build": "pnpm exec tsc",
34
+ "build:production": "REDUCK_BUILD_ENV=production pnpm build",
35
+ "build:staging": "REDUCK_BUILD_ENV=staging pnpm build",
36
+ "precheck": "pnpm generate-env",
32
37
  "check": "pnpm exec tsc --noEmit",
33
38
  "dev": "pnpm exec tsc --watch"
34
39
  },
@@ -38,5 +43,9 @@
38
43
  "devDependencies": {
39
44
  "@types/ws": "^8.0.0",
40
45
  "typescript": "^5.0.0"
46
+ },
47
+ "repository": {
48
+ "type": "git",
49
+ "url": "git+https://github.com/conception-ai/conception-clean-for-real.git"
41
50
  }
42
51
  }