@reduck-ai/sdk 1.0.19 → 1.1.0
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.
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
|
-
|
|
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 ??
|
|
18
|
-
this._appBaseUrl = (opts.appBaseUrl ??
|
|
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,11 +1,17 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reduck-ai/sdk",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
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)",
|
|
7
7
|
"homepage": "https://reduck.ai",
|
|
8
|
-
"keywords": [
|
|
8
|
+
"keywords": [
|
|
9
|
+
"reduck",
|
|
10
|
+
"browser-automation",
|
|
11
|
+
"sdk",
|
|
12
|
+
"ai",
|
|
13
|
+
"rpa"
|
|
14
|
+
],
|
|
9
15
|
"funding": "https://reduck.ai",
|
|
10
16
|
"sideEffects": false,
|
|
11
17
|
"type": "module",
|
|
@@ -27,16 +33,21 @@
|
|
|
27
33
|
"publishConfig": {
|
|
28
34
|
"access": "public"
|
|
29
35
|
},
|
|
30
|
-
"scripts": {
|
|
31
|
-
"build": "pnpm exec tsc",
|
|
32
|
-
"check": "pnpm exec tsc --noEmit",
|
|
33
|
-
"dev": "pnpm exec tsc --watch"
|
|
34
|
-
},
|
|
35
36
|
"dependencies": {
|
|
36
37
|
"ws": "^8.0.0"
|
|
37
38
|
},
|
|
38
39
|
"devDependencies": {
|
|
39
40
|
"@types/ws": "^8.0.0",
|
|
40
41
|
"typescript": "^5.0.0"
|
|
42
|
+
},
|
|
43
|
+
"scripts": {
|
|
44
|
+
"generate-env": "node ../scripts/generate-build-env.mjs ./src/build-env.generated.ts",
|
|
45
|
+
"prebuild": "pnpm generate-env",
|
|
46
|
+
"build": "pnpm exec tsc",
|
|
47
|
+
"build:production": "REDUCK_BUILD_ENV=production pnpm build",
|
|
48
|
+
"build:staging": "REDUCK_BUILD_ENV=staging pnpm build",
|
|
49
|
+
"precheck": "pnpm generate-env",
|
|
50
|
+
"check": "pnpm exec tsc --noEmit",
|
|
51
|
+
"dev": "pnpm exec tsc --watch"
|
|
41
52
|
}
|
|
42
|
-
}
|
|
53
|
+
}
|