@intuned/runtime 1.3.6 → 1.3.8
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/commands/common/utils/unixSocket.d.ts +19 -5
- package/dist/commands/common/utils/unixSocket.js +53 -10
- package/dist/commands/interface/run.js +11 -12
- package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +1 -1
- package/dist/commands/intuned-cli/commands/authsession_record.command.js +3 -2
- package/dist/commands/intuned-cli/controller/deploy.js +1 -1
- package/dist/commands/intuned-cli/controller/save.js +1 -1
- package/dist/common/extensionsHelpers.d.ts +1 -8
- package/dist/common/extensionsHelpers.js +4 -5
- package/dist/common/settingsSchema.d.ts +10 -37
- package/dist/common/settingsSchema.js +1 -5
- package/package.json +1 -2
|
@@ -1,9 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
export interface InterfaceClient {
|
|
2
|
+
sendJSON(data: any): void;
|
|
3
|
+
receiveJSON(): AsyncGenerator<any, void, unknown>;
|
|
4
|
+
close(): void;
|
|
5
|
+
get closed(): boolean;
|
|
6
|
+
}
|
|
7
|
+
export declare class SocketClient implements InterfaceClient {
|
|
5
8
|
static readonly LENGTH_HEADER_LENGTH = 4;
|
|
6
|
-
|
|
9
|
+
private readonly socket;
|
|
10
|
+
constructor(socketPath: string);
|
|
11
|
+
sendJSON(data: any): void;
|
|
12
|
+
receiveJSON(): AsyncGenerator<any, void, unknown>;
|
|
13
|
+
close(): Promise<void>;
|
|
14
|
+
get closed(): boolean;
|
|
15
|
+
}
|
|
16
|
+
export declare class JSONLFileClient implements InterfaceClient {
|
|
17
|
+
private readonly fileStream;
|
|
18
|
+
constructor(filePath: string);
|
|
7
19
|
sendJSON(data: any): void;
|
|
8
20
|
receiveJSON(): AsyncGenerator<any, void, unknown>;
|
|
21
|
+
close(): Promise<void>;
|
|
22
|
+
get closed(): boolean;
|
|
9
23
|
}
|
|
@@ -3,18 +3,24 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
7
|
-
|
|
6
|
+
exports.SocketClient = exports.JSONLFileClient = void 0;
|
|
7
|
+
var net = _interopRequireWildcard(require("net"));
|
|
8
|
+
var fs = _interopRequireWildcard(require("fs-extra"));
|
|
9
|
+
var _readline = require("readline");
|
|
10
|
+
var _promises = require("timers/promises");
|
|
11
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
12
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
class SocketClient {
|
|
8
14
|
static LENGTH_HEADER_LENGTH = 4;
|
|
9
|
-
constructor(
|
|
10
|
-
this.socket =
|
|
15
|
+
constructor(socketPath) {
|
|
16
|
+
this.socket = net.createConnection(socketPath);
|
|
11
17
|
}
|
|
12
18
|
sendJSON(data) {
|
|
13
19
|
const dataToSend = JSON.stringify(data);
|
|
14
20
|
const length = Buffer.byteLength(dataToSend);
|
|
15
|
-
const buffer = Buffer.alloc(
|
|
21
|
+
const buffer = Buffer.alloc(SocketClient.LENGTH_HEADER_LENGTH + length);
|
|
16
22
|
buffer.writeUInt32BE(length, 0);
|
|
17
|
-
buffer.write(dataToSend,
|
|
23
|
+
buffer.write(dataToSend, SocketClient.LENGTH_HEADER_LENGTH);
|
|
18
24
|
this.socket.write(buffer);
|
|
19
25
|
}
|
|
20
26
|
async *receiveJSON() {
|
|
@@ -32,13 +38,50 @@ class JSONUnixSocket {
|
|
|
32
38
|
}
|
|
33
39
|
buffer = Buffer.concat([buffer, chunk]);
|
|
34
40
|
const length = buffer.readUInt32BE(0);
|
|
35
|
-
if (buffer.length < length +
|
|
41
|
+
if (buffer.length < length + SocketClient.LENGTH_HEADER_LENGTH) {
|
|
36
42
|
continue;
|
|
37
43
|
}
|
|
38
|
-
const data = buffer.subarray(
|
|
39
|
-
buffer = buffer.subarray(length +
|
|
44
|
+
const data = buffer.subarray(SocketClient.LENGTH_HEADER_LENGTH, length + SocketClient.LENGTH_HEADER_LENGTH);
|
|
45
|
+
buffer = buffer.subarray(length + SocketClient.LENGTH_HEADER_LENGTH);
|
|
40
46
|
yield JSON.parse(data.toString());
|
|
41
47
|
}
|
|
42
48
|
}
|
|
49
|
+
async close() {
|
|
50
|
+
this.socket.end();
|
|
51
|
+
await Promise.race([new Promise(resolve => this.socket.once("close", resolve)), new Promise(resolve => this.socket.once("error", resolve)), (0, _promises.setTimeout)(3000)]);
|
|
52
|
+
}
|
|
53
|
+
get closed() {
|
|
54
|
+
return this.socket.closed;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
exports.SocketClient = SocketClient;
|
|
58
|
+
class JSONLFileClient {
|
|
59
|
+
constructor(filePath) {
|
|
60
|
+
this.fileStream = fs.createReadStream(filePath, {
|
|
61
|
+
encoding: "utf-8"
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
sendJSON(data) {
|
|
65
|
+
console.log("Sending message", data);
|
|
66
|
+
}
|
|
67
|
+
async *receiveJSON() {
|
|
68
|
+
const rl = (0, _readline.createInterface)({
|
|
69
|
+
input: this.fileStream,
|
|
70
|
+
crlfDelay: Infinity
|
|
71
|
+
});
|
|
72
|
+
for await (const line of rl) {
|
|
73
|
+
if (line.trim() === "") {
|
|
74
|
+
continue;
|
|
75
|
+
}
|
|
76
|
+
yield JSON.parse(line);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
async close() {
|
|
80
|
+
this.fileStream.close();
|
|
81
|
+
await Promise.race([new Promise(resolve => this.fileStream.once("close", resolve)), new Promise(resolve => this.fileStream.once("error", resolve)), (0, _promises.setTimeout)(3000)]);
|
|
82
|
+
}
|
|
83
|
+
get closed() {
|
|
84
|
+
return this.fileStream.closed;
|
|
85
|
+
}
|
|
43
86
|
}
|
|
44
|
-
exports.
|
|
87
|
+
exports.JSONLFileClient = JSONLFileClient;
|
|
@@ -7,7 +7,6 @@ exports.runAutomationCLI = runAutomationCLI;
|
|
|
7
7
|
var _commander = require("commander");
|
|
8
8
|
var _dotenv = _interopRequireDefault(require("dotenv"));
|
|
9
9
|
var _asyncLocalStorage = require("../../common/asyncLocalStorage");
|
|
10
|
-
var net = _interopRequireWildcard(require("net"));
|
|
11
10
|
var _zod = _interopRequireDefault(require("zod"));
|
|
12
11
|
var _runApi = require("../../common/runApi");
|
|
13
12
|
var _enums = require("../../runtime/enums");
|
|
@@ -59,22 +58,23 @@ _dotenv.default.config({
|
|
|
59
58
|
path: `.env`
|
|
60
59
|
});
|
|
61
60
|
function runAutomationCLI(importFunction) {
|
|
62
|
-
_commander.program.description("run user automation and communicate using unix socket").argument("<socket-path>", "path to unix socket").action(async socketPath
|
|
61
|
+
_commander.program.description("run user automation and communicate using unix socket").argument("<socket-path>", "path to unix socket").option("--jsonl", "use a JSONL client instead of socket.", false).action(async (socketPath, {
|
|
62
|
+
jsonl
|
|
63
|
+
}) => {
|
|
63
64
|
let context;
|
|
64
65
|
const throttleTime = 60 * 1000;
|
|
65
66
|
let timeoutTimestamp = Date.now();
|
|
66
|
-
const client =
|
|
67
|
+
const client = jsonl ? new _unixSocket.JSONLFileClient(socketPath) : new _unixSocket.SocketClient(socketPath);
|
|
67
68
|
const abortController = new AbortController();
|
|
68
69
|
const interruptSignalHandler = async () => {
|
|
69
70
|
abortController.abort();
|
|
70
71
|
await (0, _promises.setTimeout)(60_000);
|
|
71
|
-
client.
|
|
72
|
+
await client.close();
|
|
72
73
|
process.exit(1);
|
|
73
74
|
};
|
|
74
75
|
process.on("SIGINT", interruptSignalHandler);
|
|
75
76
|
process.on("SIGTERM", interruptSignalHandler);
|
|
76
|
-
const
|
|
77
|
-
const messagesGenerator = jsonUnixSocket.receiveJSON();
|
|
77
|
+
const messagesGenerator = client.receiveJSON();
|
|
78
78
|
async function receiveMessages() {
|
|
79
79
|
const data = await messagesGenerator.next();
|
|
80
80
|
if (data.done) {
|
|
@@ -109,7 +109,7 @@ function runAutomationCLI(importFunction) {
|
|
|
109
109
|
extendTimeoutCallback: async () => {
|
|
110
110
|
if (Date.now() - timeoutTimestamp < throttleTime) return;
|
|
111
111
|
timeoutTimestamp = Date.now();
|
|
112
|
-
|
|
112
|
+
client.sendJSON({
|
|
113
113
|
type: "extend"
|
|
114
114
|
});
|
|
115
115
|
}
|
|
@@ -149,7 +149,7 @@ function runAutomationCLI(importFunction) {
|
|
|
149
149
|
break;
|
|
150
150
|
}
|
|
151
151
|
if (message.type === "error") {
|
|
152
|
-
|
|
152
|
+
client.sendJSON({
|
|
153
153
|
type: "done",
|
|
154
154
|
result: message.error.json,
|
|
155
155
|
success: false
|
|
@@ -157,7 +157,7 @@ function runAutomationCLI(importFunction) {
|
|
|
157
157
|
break;
|
|
158
158
|
}
|
|
159
159
|
if (message.type === "ping") {
|
|
160
|
-
|
|
160
|
+
client.sendJSON({
|
|
161
161
|
type: "pong"
|
|
162
162
|
});
|
|
163
163
|
break;
|
|
@@ -171,7 +171,7 @@ function runAutomationCLI(importFunction) {
|
|
|
171
171
|
} = messageOrResult;
|
|
172
172
|
const success = result.isOk();
|
|
173
173
|
const resultToSend = success ? result.value : result.error.json;
|
|
174
|
-
|
|
174
|
+
client.sendJSON({
|
|
175
175
|
type: "done",
|
|
176
176
|
result: resultToSend,
|
|
177
177
|
success
|
|
@@ -179,8 +179,7 @@ function runAutomationCLI(importFunction) {
|
|
|
179
179
|
break;
|
|
180
180
|
}
|
|
181
181
|
if (!client.closed) {
|
|
182
|
-
client.
|
|
183
|
-
await Promise.race([new Promise(resolve => client.once("close", resolve)), new Promise(resolve => client.once("error", resolve)), (0, _promises.setTimeout)(3000)]);
|
|
182
|
+
await client.close();
|
|
184
183
|
}
|
|
185
184
|
process.exit(0);
|
|
186
185
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const authSessionRecordCommand: import("commander").Command;
|
|
1
|
+
export declare const authSessionRecordCommand: import("commander").Command | null;
|
|
@@ -13,7 +13,8 @@ var _types = require("./types");
|
|
|
13
13
|
const optionsSchema = _run_authsession.baseRunAuthSessionCommandOptionsSchema.extend({
|
|
14
14
|
id: _zod.z.string().optional()
|
|
15
15
|
});
|
|
16
|
-
const
|
|
16
|
+
const isAuthSessionRecorderEnabled = process.env.INTUNED_AUTH_SESSION_RECORDER_ENABLED === "true";
|
|
17
|
+
const authSessionRecordCommand = exports.authSessionRecordCommand = isAuthSessionRecorderEnabled ? (0, _types.withBaseOptions)(_authsession.authSessionCommand.command("record").description("Record a new auth session").option("--id <id>", "ID of the auth session to use for the command. Defaults to auth-session-[current timestamp]").option("--check-attempts <number>", "Number of attempts to check the auth session validity", "1")).action((0, _helpers.cliCommandWrapper)(undefined, optionsSchema, async (_, {
|
|
17
18
|
checkAttempts,
|
|
18
19
|
...rest
|
|
19
20
|
}) => {
|
|
@@ -28,4 +29,4 @@ const authSessionRecordCommand = exports.authSessionRecordCommand = (0, _types.w
|
|
|
28
29
|
finishUrl,
|
|
29
30
|
...rest
|
|
30
31
|
});
|
|
31
|
-
}));
|
|
32
|
+
})) : null;
|
|
@@ -105,7 +105,7 @@ async function runDeployProject(projectName, auth) {
|
|
|
105
105
|
throw e;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
|
-
const projectNameSchema = exports.projectNameSchema = _zod.z.string().min(1, "Project Name is required").max(
|
|
108
|
+
const projectNameSchema = exports.projectNameSchema = _zod.z.string().min(1, "Project Name is required").max(200, "Name must be 200 characters or less").regex(/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/, "Name can only contain lowercase letters, numbers, hyphens, and underscores in between").refine(value => !_zod.z.string().uuid().safeParse(value).success, {
|
|
109
109
|
message: "Name cannot be a UUID"
|
|
110
110
|
});
|
|
111
111
|
const checkIntunedProjectDeployStatus = async (workspaceId, projectName, apiKey) => {
|
|
@@ -112,7 +112,7 @@ ${_constants2.API_KEY_ENV_VAR_KEY}=${apiKey}`);
|
|
|
112
112
|
(0, _terminal.terminal)(`^g^+Updated .env file with project credentials.^:\n`);
|
|
113
113
|
}
|
|
114
114
|
}
|
|
115
|
-
const projectNameSchema = exports.projectNameSchema = _zod.z.string().min(1, "Project Name is required").max(
|
|
115
|
+
const projectNameSchema = exports.projectNameSchema = _zod.z.string().min(1, "Project Name is required").max(200, "Name must be 200 characters or less").regex(/^[a-z0-9]+(?:[-_][a-z0-9]+)*$/, "Name can only contain lowercase letters, numbers, hyphens, and underscores in between").refine(value => !_zod.z.string().uuid().safeParse(value).success, {
|
|
116
116
|
message: "Name cannot be a UUID"
|
|
117
117
|
});
|
|
118
118
|
const validateProjectName = projectName => {
|
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import * as playwright from "playwright";
|
|
2
|
-
import {
|
|
3
|
-
type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
|
|
4
|
-
workspaceId: string;
|
|
5
|
-
projectId: string;
|
|
6
|
-
baseUrl: string;
|
|
7
|
-
token?: string;
|
|
8
|
-
};
|
|
2
|
+
import { CaptchaSolverSettingsWithRunContext } from "./settingsSchema";
|
|
9
3
|
export declare function buildExtensionsList(): string[];
|
|
10
4
|
export declare function getIntunedExtensionPath(): string;
|
|
11
5
|
export declare function isIntunedExtensionEnabled(): boolean;
|
|
12
6
|
export declare function getIntunedExtensionWorker(context: playwright.BrowserContext): Promise<playwright.Worker | null>;
|
|
13
7
|
export declare function getIntunedExtensionSettings(): Promise<CaptchaSolverSettingsWithRunContext>;
|
|
14
8
|
export declare function setupIntunedExtension(): Promise<void>;
|
|
15
|
-
export {};
|
|
@@ -56,18 +56,17 @@ async function getIntunedExtensionWorker(context) {
|
|
|
56
56
|
}
|
|
57
57
|
async function getIntunedExtensionSettings() {
|
|
58
58
|
const settings = await (0, _settings.getSettings)();
|
|
59
|
-
const captchaSolverSettings = settings.captchaSolver ?? _settingsSchema.captchaSolverSettingsSchema.parse({});
|
|
60
59
|
const [domain, workspaceId, projectId] = [process.env.FUNCTIONS_DOMAIN, process.env[_constants.WORKSPACE_ID_ENV_VAR_KEY], process.env.INTUNED_INTEGRATION_ID ?? process.env[_constants.PROJECT_ID_ENV_VAR_KEY]];
|
|
61
60
|
if (!domain || !workspaceId || !projectId) {
|
|
62
61
|
const missingEnvVars = [domain && "FUNCTIONS_DOMAIN", workspaceId && _constants.WORKSPACE_ID_ENV_VAR_KEY, projectId && `INTUNED_INTEGRATION_ID OR ${_constants.PROJECT_ID_ENV_VAR_KEY}`];
|
|
63
62
|
throw new Error(`Missing required environment variables: ${missingEnvVars}`);
|
|
64
63
|
}
|
|
65
64
|
return {
|
|
66
|
-
...
|
|
67
|
-
baseUrl: domain,
|
|
68
|
-
token: _jwtTokenManager.backendFunctionsTokenManager.token,
|
|
65
|
+
...(settings.captchaSolver ?? _settingsSchema.captchaSolverSettingsSchema.parse({})),
|
|
69
66
|
workspaceId,
|
|
70
|
-
projectId
|
|
67
|
+
projectId,
|
|
68
|
+
baseUrl: domain,
|
|
69
|
+
token: _jwtTokenManager.backendFunctionsTokenManager.token
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
72
|
async function setupIntunedExtension() {
|
|
@@ -1,10 +1,6 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
2
|
export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
3
3
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
4
|
-
workspaceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
5
|
-
projectId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
6
|
-
baseUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
7
|
-
token: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
8
4
|
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
9
5
|
enabled: z.ZodBoolean;
|
|
10
6
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -93,7 +89,7 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
93
89
|
inputLocators: string[];
|
|
94
90
|
labelLocators: string[];
|
|
95
91
|
}>>;
|
|
96
|
-
settings: z.ZodDefault<z.
|
|
92
|
+
settings: z.ZodDefault<z.ZodObject<{
|
|
97
93
|
autoSolve: z.ZodDefault<z.ZodBoolean>;
|
|
98
94
|
solveDelay: z.ZodDefault<z.ZodNumber>;
|
|
99
95
|
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
@@ -108,7 +104,7 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
108
104
|
solveDelay?: number | undefined;
|
|
109
105
|
maxRetries?: number | undefined;
|
|
110
106
|
timeout?: number | undefined;
|
|
111
|
-
}
|
|
107
|
+
}>>;
|
|
112
108
|
}, "strip", z.ZodTypeAny, {
|
|
113
109
|
enabled: boolean;
|
|
114
110
|
settings: {
|
|
@@ -117,10 +113,6 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
117
113
|
maxRetries: number;
|
|
118
114
|
timeout: number;
|
|
119
115
|
};
|
|
120
|
-
workspaceId?: string | null | undefined;
|
|
121
|
-
projectId?: string | null | undefined;
|
|
122
|
-
baseUrl?: string | null | undefined;
|
|
123
|
-
token?: string | null | undefined;
|
|
124
116
|
cloudflare?: {
|
|
125
117
|
enabled: boolean;
|
|
126
118
|
} | undefined;
|
|
@@ -159,10 +151,6 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
159
151
|
} | undefined;
|
|
160
152
|
}, {
|
|
161
153
|
enabled?: boolean | undefined;
|
|
162
|
-
workspaceId?: string | null | undefined;
|
|
163
|
-
projectId?: string | null | undefined;
|
|
164
|
-
baseUrl?: string | null | undefined;
|
|
165
|
-
token?: string | null | undefined;
|
|
166
154
|
cloudflare?: {
|
|
167
155
|
enabled: boolean;
|
|
168
156
|
} | undefined;
|
|
@@ -206,7 +194,12 @@ export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
206
194
|
timeout?: number | undefined;
|
|
207
195
|
} | undefined;
|
|
208
196
|
}>>;
|
|
209
|
-
export type
|
|
197
|
+
export type CaptchaSolverSettingsWithRunContext = z.infer<typeof captchaSolverSettingsSchema> & {
|
|
198
|
+
workspaceId: string;
|
|
199
|
+
projectId: string;
|
|
200
|
+
baseUrl: string;
|
|
201
|
+
token?: string;
|
|
202
|
+
};
|
|
210
203
|
export declare const settingsSchema: z.ZodObject<{
|
|
211
204
|
authSessions: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
212
205
|
enabled: z.ZodBoolean;
|
|
@@ -217,10 +210,6 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
217
210
|
}>>>;
|
|
218
211
|
captchaSolver: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
219
212
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
220
|
-
workspaceId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
221
|
-
projectId: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
222
|
-
baseUrl: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
223
|
-
token: z.ZodNullable<z.ZodOptional<z.ZodString>>;
|
|
224
213
|
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
225
214
|
enabled: z.ZodBoolean;
|
|
226
215
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -309,7 +298,7 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
309
298
|
inputLocators: string[];
|
|
310
299
|
labelLocators: string[];
|
|
311
300
|
}>>;
|
|
312
|
-
settings: z.ZodDefault<z.
|
|
301
|
+
settings: z.ZodDefault<z.ZodObject<{
|
|
313
302
|
autoSolve: z.ZodDefault<z.ZodBoolean>;
|
|
314
303
|
solveDelay: z.ZodDefault<z.ZodNumber>;
|
|
315
304
|
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
@@ -324,7 +313,7 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
324
313
|
solveDelay?: number | undefined;
|
|
325
314
|
maxRetries?: number | undefined;
|
|
326
315
|
timeout?: number | undefined;
|
|
327
|
-
}
|
|
316
|
+
}>>;
|
|
328
317
|
}, "strip", z.ZodTypeAny, {
|
|
329
318
|
enabled: boolean;
|
|
330
319
|
settings: {
|
|
@@ -333,10 +322,6 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
333
322
|
maxRetries: number;
|
|
334
323
|
timeout: number;
|
|
335
324
|
};
|
|
336
|
-
workspaceId?: string | null | undefined;
|
|
337
|
-
projectId?: string | null | undefined;
|
|
338
|
-
baseUrl?: string | null | undefined;
|
|
339
|
-
token?: string | null | undefined;
|
|
340
325
|
cloudflare?: {
|
|
341
326
|
enabled: boolean;
|
|
342
327
|
} | undefined;
|
|
@@ -375,10 +360,6 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
375
360
|
} | undefined;
|
|
376
361
|
}, {
|
|
377
362
|
enabled?: boolean | undefined;
|
|
378
|
-
workspaceId?: string | null | undefined;
|
|
379
|
-
projectId?: string | null | undefined;
|
|
380
|
-
baseUrl?: string | null | undefined;
|
|
381
|
-
token?: string | null | undefined;
|
|
382
363
|
cloudflare?: {
|
|
383
364
|
enabled: boolean;
|
|
384
365
|
} | undefined;
|
|
@@ -434,10 +415,6 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
434
415
|
maxRetries: number;
|
|
435
416
|
timeout: number;
|
|
436
417
|
};
|
|
437
|
-
workspaceId?: string | null | undefined;
|
|
438
|
-
projectId?: string | null | undefined;
|
|
439
|
-
baseUrl?: string | null | undefined;
|
|
440
|
-
token?: string | null | undefined;
|
|
441
418
|
cloudflare?: {
|
|
442
419
|
enabled: boolean;
|
|
443
420
|
} | undefined;
|
|
@@ -481,10 +458,6 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
481
458
|
} | undefined;
|
|
482
459
|
captchaSolver?: {
|
|
483
460
|
enabled?: boolean | undefined;
|
|
484
|
-
workspaceId?: string | null | undefined;
|
|
485
|
-
projectId?: string | null | undefined;
|
|
486
|
-
baseUrl?: string | null | undefined;
|
|
487
|
-
token?: string | null | undefined;
|
|
488
461
|
cloudflare?: {
|
|
489
462
|
enabled: boolean;
|
|
490
463
|
} | undefined;
|
|
@@ -28,10 +28,6 @@ const captchaSolverSolveSettingsSchema = z.object({
|
|
|
28
28
|
});
|
|
29
29
|
const captchaSolverSettingsSchema = exports.captchaSolverSettingsSchema = z.object({
|
|
30
30
|
enabled: z.boolean().default(false),
|
|
31
|
-
workspaceId: z.string().optional().nullable(),
|
|
32
|
-
projectId: z.string().optional().nullable(),
|
|
33
|
-
baseUrl: z.string().optional().nullable(),
|
|
34
|
-
token: z.string().optional().nullable(),
|
|
35
31
|
cloudflare: baseCaptchaSchema.optional(),
|
|
36
32
|
googleRecaptchaV2: baseCaptchaSchema.optional(),
|
|
37
33
|
googleRecaptchaV3: baseCaptchaSchema.optional(),
|
|
@@ -42,7 +38,7 @@ const captchaSolverSettingsSchema = exports.captchaSolverSettingsSchema = z.obje
|
|
|
42
38
|
lemin: baseCaptchaSchema.optional(),
|
|
43
39
|
customCaptcha: customCaptchaSchema.optional(),
|
|
44
40
|
text: textCaptchaSchema.optional(),
|
|
45
|
-
settings: captchaSolverSolveSettingsSchema.
|
|
41
|
+
settings: captchaSolverSolveSettingsSchema.default(captchaSolverSolveSettingsSchema.parse({}))
|
|
46
42
|
}).default({});
|
|
47
43
|
const authSessionsSchema = z.object({
|
|
48
44
|
enabled: z.boolean()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.8",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -71,7 +71,6 @@
|
|
|
71
71
|
"dotenv": "^16.3.1",
|
|
72
72
|
"fs-extra": "^11.3.0",
|
|
73
73
|
"image-size": "^1.1.1",
|
|
74
|
-
"inquirer": "12.6.0",
|
|
75
74
|
"jsonc-parser": "^3.3.1",
|
|
76
75
|
"jsonwebtoken": "9.0.2",
|
|
77
76
|
"lodash": "4.17.21",
|