@intuned/runtime-dev 1.3.4-dev.4 → 1.3.4-enhancements.1
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/WebTemplate.zip +0 -0
- package/bin/intuned +0 -0
- package/dist/commands/api/run.js +1 -2
- package/dist/commands/auth-sessions/run-check.js +0 -1
- package/dist/commands/auth-sessions/run-create.js +0 -1
- package/dist/commands/common/projectExclusions.js +1 -1
- package/dist/commands/common/tsNodeImport.js +1 -1
- package/dist/commands/common/utils/settings.js +5 -7
- package/dist/commands/intuned-cli/commands/attempt_api.command.js +10 -20
- package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +2 -7
- package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +5 -17
- package/dist/commands/intuned-cli/commands/authsession.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/authsession.command.js +8 -0
- package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/authsession_record.command.js +31 -0
- package/dist/commands/intuned-cli/commands/build.command.js +1 -1
- package/dist/commands/intuned-cli/commands/deploy.command.js +2 -7
- package/dist/commands/intuned-cli/commands/index.d.ts +2 -0
- package/dist/commands/intuned-cli/commands/index.js +22 -0
- package/dist/commands/intuned-cli/commands/init.command.js +1 -1
- package/dist/commands/intuned-cli/commands/run_api.command.js +13 -21
- package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +9 -1
- package/dist/commands/intuned-cli/commands/run_authsession.command.js +5 -1
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +1 -1
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +16 -20
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +1 -1
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +16 -20
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +1 -1
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +16 -20
- package/dist/commands/intuned-cli/commands/save.command.d.ts +3 -2
- package/dist/commands/intuned-cli/commands/save.command.js +6 -10
- package/dist/commands/intuned-cli/commands/types.d.ts +10 -0
- package/dist/commands/intuned-cli/commands/types.js +11 -3
- package/dist/commands/intuned-cli/controller/__test__/api.test.js +128 -10
- package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +428 -45
- package/dist/commands/intuned-cli/controller/api.d.ts +5 -7
- package/dist/commands/intuned-cli/controller/api.js +16 -7
- package/dist/commands/intuned-cli/controller/authSession.d.ts +18 -7
- package/dist/commands/intuned-cli/controller/authSession.js +153 -24
- package/dist/commands/intuned-cli/controller/save.js +10 -3
- package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +103 -0
- package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +40 -0
- package/dist/commands/intuned-cli/helpers/auth.d.ts +7 -2
- package/dist/commands/intuned-cli/helpers/auth.js +38 -23
- package/dist/commands/intuned-cli/helpers/backend.d.ts +1 -1
- package/dist/commands/intuned-cli/helpers/backend.js +2 -2
- package/dist/commands/intuned-cli/helpers/browser.d.ts +14 -0
- package/dist/commands/intuned-cli/helpers/browser.js +57 -0
- package/dist/commands/intuned-cli/helpers/errors.d.ts +0 -1
- package/dist/commands/intuned-cli/helpers/errors.js +0 -22
- package/dist/commands/intuned-cli/helpers/index.d.ts +2 -0
- package/dist/commands/intuned-cli/helpers/index.js +22 -0
- package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +69 -1
- package/dist/commands/intuned-cli/helpers/intunedJson.js +59 -7
- package/dist/commands/intuned-cli/helpers/traces.d.ts +2 -0
- package/dist/commands/intuned-cli/helpers/traces.js +32 -0
- package/dist/commands/intuned-cli/helpers/validation.js +5 -3
- package/dist/commands/intuned-cli/helpers/wrapper.d.ts +2 -0
- package/dist/commands/intuned-cli/helpers/wrapper.js +60 -0
- package/dist/common/constants.d.ts +0 -1
- package/dist/common/constants.js +1 -2
- package/dist/common/playwrightContext.d.ts +1 -0
- package/dist/common/playwrightContext.js +5 -18
- package/dist/common/runApi/types.d.ts +0 -5
- package/dist/common/runApi/types.js +1 -2
- package/dist/common/settingsSchema.d.ts +0 -513
- package/dist/common/settingsSchema.js +2 -40
- package/package.json +4 -1
- package/dist/common/extensionsHelpers.d.ts +0 -15
- package/dist/common/extensionsHelpers.js +0 -84
|
@@ -19,7 +19,6 @@ var _errors = require("./runApi/errors");
|
|
|
19
19
|
var _neverthrow = require("neverthrow");
|
|
20
20
|
var _setupContextHook = require("./setupContextHook");
|
|
21
21
|
var _portfinder = require("portfinder");
|
|
22
|
-
var _extensionsHelpers = require("./extensionsHelpers");
|
|
23
22
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
24
23
|
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); }
|
|
25
24
|
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; }
|
|
@@ -43,7 +42,8 @@ async function launchChromium({
|
|
|
43
42
|
headless = true,
|
|
44
43
|
downloadsPath,
|
|
45
44
|
cdpAddress,
|
|
46
|
-
cdpPort
|
|
45
|
+
cdpPort,
|
|
46
|
+
appModeInitialUrl
|
|
47
47
|
}) {
|
|
48
48
|
if (cdpAddress) {
|
|
49
49
|
const browser = await playwright.chromium.connectOverCDP(cdpAddress);
|
|
@@ -60,30 +60,20 @@ async function launchChromium({
|
|
|
60
60
|
context
|
|
61
61
|
};
|
|
62
62
|
}
|
|
63
|
-
const defaultArgsToIgnore = ["--disable-extensions", "--disable-component-extensions-with-background-pages", "--disable-background-networking", "--disable-backgrounding-occluded-windows", "--disable-background-timer-throttling"];
|
|
64
63
|
const extraArgs = [];
|
|
65
64
|
const userDataDir = await createUserDirWithPreferences();
|
|
66
|
-
if ((0, _extensionsHelpers.isIntunedExtensionEnabled)()) {
|
|
67
|
-
const extensionsList = (0, _extensionsHelpers.buildExtensionsList)();
|
|
68
|
-
const extensions = extensionsList.join(",");
|
|
69
|
-
extraArgs.push(`--disable-extensions-except=${extensions}`);
|
|
70
|
-
extraArgs.push(`--load-extension=${extensions}`);
|
|
71
|
-
await (0, _extensionsHelpers.setupIntunedExtension)();
|
|
72
|
-
}
|
|
73
65
|
if (cdpPort) {
|
|
74
66
|
extraArgs.push(`--remote-debugging-port=${cdpPort}`);
|
|
75
67
|
}
|
|
76
|
-
if (
|
|
77
|
-
|
|
78
|
-
extraArgs.push("--headless=new");
|
|
68
|
+
if (appModeInitialUrl) {
|
|
69
|
+
extraArgs.push(`--app=${appModeInitialUrl}`);
|
|
79
70
|
}
|
|
80
71
|
const context = await playwright.chromium.launchPersistentContext(userDataDir, {
|
|
81
72
|
headless,
|
|
82
73
|
viewport: null,
|
|
83
74
|
proxy,
|
|
84
75
|
downloadsPath,
|
|
85
|
-
args: extraArgs
|
|
86
|
-
ignoreDefaultArgs: defaultArgsToIgnore
|
|
76
|
+
args: extraArgs
|
|
87
77
|
});
|
|
88
78
|
context.once("close", async () => {
|
|
89
79
|
try {
|
|
@@ -97,9 +87,6 @@ async function launchChromium({
|
|
|
97
87
|
console.error("Failed to remove user data dir", error);
|
|
98
88
|
}
|
|
99
89
|
});
|
|
100
|
-
if ((0, _extensionsHelpers.isIntunedExtensionEnabled)()) {
|
|
101
|
-
await (0, _extensionsHelpers.getIntunedExtensionWorker)(context);
|
|
102
|
-
}
|
|
103
90
|
if (cdpPort) {
|
|
104
91
|
const createdCdpAddress = getLocalCdpAddress(cdpPort);
|
|
105
92
|
await waitOnCdpAddress(createdCdpAddress);
|
|
@@ -682,13 +682,10 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
682
682
|
}>, z.ZodObject<{
|
|
683
683
|
environment: z.ZodLiteral<"cdp">;
|
|
684
684
|
cdpAddress: z.ZodString;
|
|
685
|
-
mode: z.ZodUnion<[z.ZodLiteral<"vanilla">, z.ZodLiteral<"playwright">, z.ZodLiteral<"playwright-standalone">, z.ZodLiteral<"playwright-headless">]>;
|
|
686
685
|
}, "strip", z.ZodTypeAny, {
|
|
687
|
-
mode: "vanilla" | "playwright" | "playwright-standalone" | "playwright-headless";
|
|
688
686
|
environment: "cdp";
|
|
689
687
|
cdpAddress: string;
|
|
690
688
|
}, {
|
|
691
|
-
mode: "vanilla" | "playwright" | "playwright-standalone" | "playwright-headless";
|
|
692
689
|
environment: "cdp";
|
|
693
690
|
cdpAddress: string;
|
|
694
691
|
}>]>>;
|
|
@@ -713,7 +710,6 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
713
710
|
password: string;
|
|
714
711
|
} | undefined;
|
|
715
712
|
} | {
|
|
716
|
-
mode: "vanilla" | "playwright" | "playwright-standalone" | "playwright-headless";
|
|
717
713
|
environment: "cdp";
|
|
718
714
|
cdpAddress: string;
|
|
719
715
|
};
|
|
@@ -806,7 +802,6 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
806
802
|
password: string;
|
|
807
803
|
} | undefined;
|
|
808
804
|
} | {
|
|
809
|
-
mode: "vanilla" | "playwright" | "playwright-standalone" | "playwright-headless";
|
|
810
805
|
environment: "cdp";
|
|
811
806
|
cdpAddress: string;
|
|
812
807
|
} | undefined;
|
|
@@ -65,8 +65,7 @@ const runApiParametersSchema = exports.runApiParametersSchema = _zod.default.obj
|
|
|
65
65
|
}).optional()
|
|
66
66
|
}), _zod.default.object({
|
|
67
67
|
environment: _zod.default.literal("cdp"),
|
|
68
|
-
cdpAddress: _zod.default.string()
|
|
69
|
-
mode: _zod.default.union([_zod.default.literal("vanilla"), _zod.default.literal("playwright"), _zod.default.literal("playwright-standalone"), _zod.default.literal("playwright-headless")])
|
|
68
|
+
cdpAddress: _zod.default.string()
|
|
70
69
|
})]).default({
|
|
71
70
|
environment: "standalone"
|
|
72
71
|
}),
|
|
@@ -1,212 +1,4 @@
|
|
|
1
1
|
import * as z from "zod";
|
|
2
|
-
export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
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
|
-
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
9
|
-
enabled: z.ZodBoolean;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
enabled: boolean;
|
|
12
|
-
}, {
|
|
13
|
-
enabled: boolean;
|
|
14
|
-
}>>;
|
|
15
|
-
googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
|
|
16
|
-
enabled: z.ZodBoolean;
|
|
17
|
-
}, "strip", z.ZodTypeAny, {
|
|
18
|
-
enabled: boolean;
|
|
19
|
-
}, {
|
|
20
|
-
enabled: boolean;
|
|
21
|
-
}>>;
|
|
22
|
-
googleRecaptchaV3: z.ZodOptional<z.ZodObject<{
|
|
23
|
-
enabled: z.ZodBoolean;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
enabled: boolean;
|
|
26
|
-
}, {
|
|
27
|
-
enabled: boolean;
|
|
28
|
-
}>>;
|
|
29
|
-
awscaptcha: z.ZodOptional<z.ZodObject<{
|
|
30
|
-
enabled: z.ZodBoolean;
|
|
31
|
-
}, "strip", z.ZodTypeAny, {
|
|
32
|
-
enabled: boolean;
|
|
33
|
-
}, {
|
|
34
|
-
enabled: boolean;
|
|
35
|
-
}>>;
|
|
36
|
-
hcaptcha: z.ZodOptional<z.ZodObject<{
|
|
37
|
-
enabled: z.ZodBoolean;
|
|
38
|
-
}, "strip", z.ZodTypeAny, {
|
|
39
|
-
enabled: boolean;
|
|
40
|
-
}, {
|
|
41
|
-
enabled: boolean;
|
|
42
|
-
}>>;
|
|
43
|
-
funcaptcha: z.ZodOptional<z.ZodObject<{
|
|
44
|
-
enabled: z.ZodBoolean;
|
|
45
|
-
}, "strip", z.ZodTypeAny, {
|
|
46
|
-
enabled: boolean;
|
|
47
|
-
}, {
|
|
48
|
-
enabled: boolean;
|
|
49
|
-
}>>;
|
|
50
|
-
geetest: z.ZodOptional<z.ZodObject<{
|
|
51
|
-
enabled: z.ZodBoolean;
|
|
52
|
-
}, "strip", z.ZodTypeAny, {
|
|
53
|
-
enabled: boolean;
|
|
54
|
-
}, {
|
|
55
|
-
enabled: boolean;
|
|
56
|
-
}>>;
|
|
57
|
-
lemin: z.ZodOptional<z.ZodObject<{
|
|
58
|
-
enabled: z.ZodBoolean;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
enabled: boolean;
|
|
61
|
-
}, {
|
|
62
|
-
enabled: boolean;
|
|
63
|
-
}>>;
|
|
64
|
-
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
65
|
-
enabled: z.ZodBoolean;
|
|
66
|
-
imageLocators: z.ZodArray<z.ZodString, "many">;
|
|
67
|
-
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
68
|
-
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
69
|
-
}, "strip", z.ZodTypeAny, {
|
|
70
|
-
enabled: boolean;
|
|
71
|
-
imageLocators: string[];
|
|
72
|
-
submitLocators: string[];
|
|
73
|
-
inputLocators: string[];
|
|
74
|
-
}, {
|
|
75
|
-
enabled: boolean;
|
|
76
|
-
imageLocators: string[];
|
|
77
|
-
submitLocators: string[];
|
|
78
|
-
inputLocators: string[];
|
|
79
|
-
}>>;
|
|
80
|
-
text: z.ZodOptional<z.ZodObject<{
|
|
81
|
-
enabled: z.ZodBoolean;
|
|
82
|
-
labelLocators: z.ZodArray<z.ZodString, "many">;
|
|
83
|
-
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
84
|
-
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
85
|
-
}, "strip", z.ZodTypeAny, {
|
|
86
|
-
enabled: boolean;
|
|
87
|
-
submitLocators: string[];
|
|
88
|
-
inputLocators: string[];
|
|
89
|
-
labelLocators: string[];
|
|
90
|
-
}, {
|
|
91
|
-
enabled: boolean;
|
|
92
|
-
submitLocators: string[];
|
|
93
|
-
inputLocators: string[];
|
|
94
|
-
labelLocators: string[];
|
|
95
|
-
}>>;
|
|
96
|
-
settings: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
97
|
-
autoSolve: z.ZodDefault<z.ZodBoolean>;
|
|
98
|
-
solveDelay: z.ZodDefault<z.ZodNumber>;
|
|
99
|
-
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
100
|
-
timeout: z.ZodDefault<z.ZodNumber>;
|
|
101
|
-
}, "strip", z.ZodTypeAny, {
|
|
102
|
-
autoSolve: boolean;
|
|
103
|
-
solveDelay: number;
|
|
104
|
-
maxRetries: number;
|
|
105
|
-
timeout: number;
|
|
106
|
-
}, {
|
|
107
|
-
autoSolve?: boolean | undefined;
|
|
108
|
-
solveDelay?: number | undefined;
|
|
109
|
-
maxRetries?: number | undefined;
|
|
110
|
-
timeout?: number | undefined;
|
|
111
|
-
}>>>;
|
|
112
|
-
}, "strip", z.ZodTypeAny, {
|
|
113
|
-
enabled: boolean;
|
|
114
|
-
settings: {
|
|
115
|
-
autoSolve: boolean;
|
|
116
|
-
solveDelay: number;
|
|
117
|
-
maxRetries: number;
|
|
118
|
-
timeout: number;
|
|
119
|
-
};
|
|
120
|
-
workspaceId?: string | null | undefined;
|
|
121
|
-
projectId?: string | null | undefined;
|
|
122
|
-
baseUrl?: string | null | undefined;
|
|
123
|
-
token?: string | null | undefined;
|
|
124
|
-
cloudflare?: {
|
|
125
|
-
enabled: boolean;
|
|
126
|
-
} | undefined;
|
|
127
|
-
googleRecaptchaV2?: {
|
|
128
|
-
enabled: boolean;
|
|
129
|
-
} | undefined;
|
|
130
|
-
googleRecaptchaV3?: {
|
|
131
|
-
enabled: boolean;
|
|
132
|
-
} | undefined;
|
|
133
|
-
awscaptcha?: {
|
|
134
|
-
enabled: boolean;
|
|
135
|
-
} | undefined;
|
|
136
|
-
hcaptcha?: {
|
|
137
|
-
enabled: boolean;
|
|
138
|
-
} | undefined;
|
|
139
|
-
funcaptcha?: {
|
|
140
|
-
enabled: boolean;
|
|
141
|
-
} | undefined;
|
|
142
|
-
geetest?: {
|
|
143
|
-
enabled: boolean;
|
|
144
|
-
} | undefined;
|
|
145
|
-
lemin?: {
|
|
146
|
-
enabled: boolean;
|
|
147
|
-
} | undefined;
|
|
148
|
-
customCaptcha?: {
|
|
149
|
-
enabled: boolean;
|
|
150
|
-
imageLocators: string[];
|
|
151
|
-
submitLocators: string[];
|
|
152
|
-
inputLocators: string[];
|
|
153
|
-
} | undefined;
|
|
154
|
-
text?: {
|
|
155
|
-
enabled: boolean;
|
|
156
|
-
submitLocators: string[];
|
|
157
|
-
inputLocators: string[];
|
|
158
|
-
labelLocators: string[];
|
|
159
|
-
} | undefined;
|
|
160
|
-
}, {
|
|
161
|
-
enabled?: boolean | undefined;
|
|
162
|
-
workspaceId?: string | null | undefined;
|
|
163
|
-
projectId?: string | null | undefined;
|
|
164
|
-
baseUrl?: string | null | undefined;
|
|
165
|
-
token?: string | null | undefined;
|
|
166
|
-
cloudflare?: {
|
|
167
|
-
enabled: boolean;
|
|
168
|
-
} | undefined;
|
|
169
|
-
googleRecaptchaV2?: {
|
|
170
|
-
enabled: boolean;
|
|
171
|
-
} | undefined;
|
|
172
|
-
googleRecaptchaV3?: {
|
|
173
|
-
enabled: boolean;
|
|
174
|
-
} | undefined;
|
|
175
|
-
awscaptcha?: {
|
|
176
|
-
enabled: boolean;
|
|
177
|
-
} | undefined;
|
|
178
|
-
hcaptcha?: {
|
|
179
|
-
enabled: boolean;
|
|
180
|
-
} | undefined;
|
|
181
|
-
funcaptcha?: {
|
|
182
|
-
enabled: boolean;
|
|
183
|
-
} | undefined;
|
|
184
|
-
geetest?: {
|
|
185
|
-
enabled: boolean;
|
|
186
|
-
} | undefined;
|
|
187
|
-
lemin?: {
|
|
188
|
-
enabled: boolean;
|
|
189
|
-
} | undefined;
|
|
190
|
-
customCaptcha?: {
|
|
191
|
-
enabled: boolean;
|
|
192
|
-
imageLocators: string[];
|
|
193
|
-
submitLocators: string[];
|
|
194
|
-
inputLocators: string[];
|
|
195
|
-
} | undefined;
|
|
196
|
-
text?: {
|
|
197
|
-
enabled: boolean;
|
|
198
|
-
submitLocators: string[];
|
|
199
|
-
inputLocators: string[];
|
|
200
|
-
labelLocators: string[];
|
|
201
|
-
} | undefined;
|
|
202
|
-
settings?: {
|
|
203
|
-
autoSolve?: boolean | undefined;
|
|
204
|
-
solveDelay?: number | undefined;
|
|
205
|
-
maxRetries?: number | undefined;
|
|
206
|
-
timeout?: number | undefined;
|
|
207
|
-
} | undefined;
|
|
208
|
-
}>>;
|
|
209
|
-
export type CaptchaSolverSettings = z.infer<typeof captchaSolverSettingsSchema>;
|
|
210
2
|
export declare const settingsSchema: z.ZodObject<{
|
|
211
3
|
authSessions: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
212
4
|
enabled: z.ZodBoolean;
|
|
@@ -215,318 +7,13 @@ export declare const settingsSchema: z.ZodObject<{
|
|
|
215
7
|
}, {
|
|
216
8
|
enabled: boolean;
|
|
217
9
|
}>>>;
|
|
218
|
-
captchaSolver: z.ZodOptional<z.ZodDefault<z.ZodObject<{
|
|
219
|
-
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
|
-
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
225
|
-
enabled: z.ZodBoolean;
|
|
226
|
-
}, "strip", z.ZodTypeAny, {
|
|
227
|
-
enabled: boolean;
|
|
228
|
-
}, {
|
|
229
|
-
enabled: boolean;
|
|
230
|
-
}>>;
|
|
231
|
-
googleRecaptchaV2: z.ZodOptional<z.ZodObject<{
|
|
232
|
-
enabled: z.ZodBoolean;
|
|
233
|
-
}, "strip", z.ZodTypeAny, {
|
|
234
|
-
enabled: boolean;
|
|
235
|
-
}, {
|
|
236
|
-
enabled: boolean;
|
|
237
|
-
}>>;
|
|
238
|
-
googleRecaptchaV3: z.ZodOptional<z.ZodObject<{
|
|
239
|
-
enabled: z.ZodBoolean;
|
|
240
|
-
}, "strip", z.ZodTypeAny, {
|
|
241
|
-
enabled: boolean;
|
|
242
|
-
}, {
|
|
243
|
-
enabled: boolean;
|
|
244
|
-
}>>;
|
|
245
|
-
awscaptcha: z.ZodOptional<z.ZodObject<{
|
|
246
|
-
enabled: z.ZodBoolean;
|
|
247
|
-
}, "strip", z.ZodTypeAny, {
|
|
248
|
-
enabled: boolean;
|
|
249
|
-
}, {
|
|
250
|
-
enabled: boolean;
|
|
251
|
-
}>>;
|
|
252
|
-
hcaptcha: z.ZodOptional<z.ZodObject<{
|
|
253
|
-
enabled: z.ZodBoolean;
|
|
254
|
-
}, "strip", z.ZodTypeAny, {
|
|
255
|
-
enabled: boolean;
|
|
256
|
-
}, {
|
|
257
|
-
enabled: boolean;
|
|
258
|
-
}>>;
|
|
259
|
-
funcaptcha: z.ZodOptional<z.ZodObject<{
|
|
260
|
-
enabled: z.ZodBoolean;
|
|
261
|
-
}, "strip", z.ZodTypeAny, {
|
|
262
|
-
enabled: boolean;
|
|
263
|
-
}, {
|
|
264
|
-
enabled: boolean;
|
|
265
|
-
}>>;
|
|
266
|
-
geetest: z.ZodOptional<z.ZodObject<{
|
|
267
|
-
enabled: z.ZodBoolean;
|
|
268
|
-
}, "strip", z.ZodTypeAny, {
|
|
269
|
-
enabled: boolean;
|
|
270
|
-
}, {
|
|
271
|
-
enabled: boolean;
|
|
272
|
-
}>>;
|
|
273
|
-
lemin: z.ZodOptional<z.ZodObject<{
|
|
274
|
-
enabled: z.ZodBoolean;
|
|
275
|
-
}, "strip", z.ZodTypeAny, {
|
|
276
|
-
enabled: boolean;
|
|
277
|
-
}, {
|
|
278
|
-
enabled: boolean;
|
|
279
|
-
}>>;
|
|
280
|
-
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
281
|
-
enabled: z.ZodBoolean;
|
|
282
|
-
imageLocators: z.ZodArray<z.ZodString, "many">;
|
|
283
|
-
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
284
|
-
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
285
|
-
}, "strip", z.ZodTypeAny, {
|
|
286
|
-
enabled: boolean;
|
|
287
|
-
imageLocators: string[];
|
|
288
|
-
submitLocators: string[];
|
|
289
|
-
inputLocators: string[];
|
|
290
|
-
}, {
|
|
291
|
-
enabled: boolean;
|
|
292
|
-
imageLocators: string[];
|
|
293
|
-
submitLocators: string[];
|
|
294
|
-
inputLocators: string[];
|
|
295
|
-
}>>;
|
|
296
|
-
text: z.ZodOptional<z.ZodObject<{
|
|
297
|
-
enabled: z.ZodBoolean;
|
|
298
|
-
labelLocators: z.ZodArray<z.ZodString, "many">;
|
|
299
|
-
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
300
|
-
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
301
|
-
}, "strip", z.ZodTypeAny, {
|
|
302
|
-
enabled: boolean;
|
|
303
|
-
submitLocators: string[];
|
|
304
|
-
inputLocators: string[];
|
|
305
|
-
labelLocators: string[];
|
|
306
|
-
}, {
|
|
307
|
-
enabled: boolean;
|
|
308
|
-
submitLocators: string[];
|
|
309
|
-
inputLocators: string[];
|
|
310
|
-
labelLocators: string[];
|
|
311
|
-
}>>;
|
|
312
|
-
settings: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
313
|
-
autoSolve: z.ZodDefault<z.ZodBoolean>;
|
|
314
|
-
solveDelay: z.ZodDefault<z.ZodNumber>;
|
|
315
|
-
maxRetries: z.ZodDefault<z.ZodNumber>;
|
|
316
|
-
timeout: z.ZodDefault<z.ZodNumber>;
|
|
317
|
-
}, "strip", z.ZodTypeAny, {
|
|
318
|
-
autoSolve: boolean;
|
|
319
|
-
solveDelay: number;
|
|
320
|
-
maxRetries: number;
|
|
321
|
-
timeout: number;
|
|
322
|
-
}, {
|
|
323
|
-
autoSolve?: boolean | undefined;
|
|
324
|
-
solveDelay?: number | undefined;
|
|
325
|
-
maxRetries?: number | undefined;
|
|
326
|
-
timeout?: number | undefined;
|
|
327
|
-
}>>>;
|
|
328
|
-
}, "strip", z.ZodTypeAny, {
|
|
329
|
-
enabled: boolean;
|
|
330
|
-
settings: {
|
|
331
|
-
autoSolve: boolean;
|
|
332
|
-
solveDelay: number;
|
|
333
|
-
maxRetries: number;
|
|
334
|
-
timeout: number;
|
|
335
|
-
};
|
|
336
|
-
workspaceId?: string | null | undefined;
|
|
337
|
-
projectId?: string | null | undefined;
|
|
338
|
-
baseUrl?: string | null | undefined;
|
|
339
|
-
token?: string | null | undefined;
|
|
340
|
-
cloudflare?: {
|
|
341
|
-
enabled: boolean;
|
|
342
|
-
} | undefined;
|
|
343
|
-
googleRecaptchaV2?: {
|
|
344
|
-
enabled: boolean;
|
|
345
|
-
} | undefined;
|
|
346
|
-
googleRecaptchaV3?: {
|
|
347
|
-
enabled: boolean;
|
|
348
|
-
} | undefined;
|
|
349
|
-
awscaptcha?: {
|
|
350
|
-
enabled: boolean;
|
|
351
|
-
} | undefined;
|
|
352
|
-
hcaptcha?: {
|
|
353
|
-
enabled: boolean;
|
|
354
|
-
} | undefined;
|
|
355
|
-
funcaptcha?: {
|
|
356
|
-
enabled: boolean;
|
|
357
|
-
} | undefined;
|
|
358
|
-
geetest?: {
|
|
359
|
-
enabled: boolean;
|
|
360
|
-
} | undefined;
|
|
361
|
-
lemin?: {
|
|
362
|
-
enabled: boolean;
|
|
363
|
-
} | undefined;
|
|
364
|
-
customCaptcha?: {
|
|
365
|
-
enabled: boolean;
|
|
366
|
-
imageLocators: string[];
|
|
367
|
-
submitLocators: string[];
|
|
368
|
-
inputLocators: string[];
|
|
369
|
-
} | undefined;
|
|
370
|
-
text?: {
|
|
371
|
-
enabled: boolean;
|
|
372
|
-
submitLocators: string[];
|
|
373
|
-
inputLocators: string[];
|
|
374
|
-
labelLocators: string[];
|
|
375
|
-
} | undefined;
|
|
376
|
-
}, {
|
|
377
|
-
enabled?: boolean | undefined;
|
|
378
|
-
workspaceId?: string | null | undefined;
|
|
379
|
-
projectId?: string | null | undefined;
|
|
380
|
-
baseUrl?: string | null | undefined;
|
|
381
|
-
token?: string | null | undefined;
|
|
382
|
-
cloudflare?: {
|
|
383
|
-
enabled: boolean;
|
|
384
|
-
} | undefined;
|
|
385
|
-
googleRecaptchaV2?: {
|
|
386
|
-
enabled: boolean;
|
|
387
|
-
} | undefined;
|
|
388
|
-
googleRecaptchaV3?: {
|
|
389
|
-
enabled: boolean;
|
|
390
|
-
} | undefined;
|
|
391
|
-
awscaptcha?: {
|
|
392
|
-
enabled: boolean;
|
|
393
|
-
} | undefined;
|
|
394
|
-
hcaptcha?: {
|
|
395
|
-
enabled: boolean;
|
|
396
|
-
} | undefined;
|
|
397
|
-
funcaptcha?: {
|
|
398
|
-
enabled: boolean;
|
|
399
|
-
} | undefined;
|
|
400
|
-
geetest?: {
|
|
401
|
-
enabled: boolean;
|
|
402
|
-
} | undefined;
|
|
403
|
-
lemin?: {
|
|
404
|
-
enabled: boolean;
|
|
405
|
-
} | undefined;
|
|
406
|
-
customCaptcha?: {
|
|
407
|
-
enabled: boolean;
|
|
408
|
-
imageLocators: string[];
|
|
409
|
-
submitLocators: string[];
|
|
410
|
-
inputLocators: string[];
|
|
411
|
-
} | undefined;
|
|
412
|
-
text?: {
|
|
413
|
-
enabled: boolean;
|
|
414
|
-
submitLocators: string[];
|
|
415
|
-
inputLocators: string[];
|
|
416
|
-
labelLocators: string[];
|
|
417
|
-
} | undefined;
|
|
418
|
-
settings?: {
|
|
419
|
-
autoSolve?: boolean | undefined;
|
|
420
|
-
solveDelay?: number | undefined;
|
|
421
|
-
maxRetries?: number | undefined;
|
|
422
|
-
timeout?: number | undefined;
|
|
423
|
-
} | undefined;
|
|
424
|
-
}>>>;
|
|
425
10
|
}, "strip", z.ZodTypeAny, {
|
|
426
11
|
authSessions: {
|
|
427
12
|
enabled: boolean;
|
|
428
13
|
};
|
|
429
|
-
captchaSolver?: {
|
|
430
|
-
enabled: boolean;
|
|
431
|
-
settings: {
|
|
432
|
-
autoSolve: boolean;
|
|
433
|
-
solveDelay: number;
|
|
434
|
-
maxRetries: number;
|
|
435
|
-
timeout: number;
|
|
436
|
-
};
|
|
437
|
-
workspaceId?: string | null | undefined;
|
|
438
|
-
projectId?: string | null | undefined;
|
|
439
|
-
baseUrl?: string | null | undefined;
|
|
440
|
-
token?: string | null | undefined;
|
|
441
|
-
cloudflare?: {
|
|
442
|
-
enabled: boolean;
|
|
443
|
-
} | undefined;
|
|
444
|
-
googleRecaptchaV2?: {
|
|
445
|
-
enabled: boolean;
|
|
446
|
-
} | undefined;
|
|
447
|
-
googleRecaptchaV3?: {
|
|
448
|
-
enabled: boolean;
|
|
449
|
-
} | undefined;
|
|
450
|
-
awscaptcha?: {
|
|
451
|
-
enabled: boolean;
|
|
452
|
-
} | undefined;
|
|
453
|
-
hcaptcha?: {
|
|
454
|
-
enabled: boolean;
|
|
455
|
-
} | undefined;
|
|
456
|
-
funcaptcha?: {
|
|
457
|
-
enabled: boolean;
|
|
458
|
-
} | undefined;
|
|
459
|
-
geetest?: {
|
|
460
|
-
enabled: boolean;
|
|
461
|
-
} | undefined;
|
|
462
|
-
lemin?: {
|
|
463
|
-
enabled: boolean;
|
|
464
|
-
} | undefined;
|
|
465
|
-
customCaptcha?: {
|
|
466
|
-
enabled: boolean;
|
|
467
|
-
imageLocators: string[];
|
|
468
|
-
submitLocators: string[];
|
|
469
|
-
inputLocators: string[];
|
|
470
|
-
} | undefined;
|
|
471
|
-
text?: {
|
|
472
|
-
enabled: boolean;
|
|
473
|
-
submitLocators: string[];
|
|
474
|
-
inputLocators: string[];
|
|
475
|
-
labelLocators: string[];
|
|
476
|
-
} | undefined;
|
|
477
|
-
} | undefined;
|
|
478
14
|
}, {
|
|
479
15
|
authSessions?: {
|
|
480
16
|
enabled: boolean;
|
|
481
17
|
} | undefined;
|
|
482
|
-
captchaSolver?: {
|
|
483
|
-
enabled?: boolean | undefined;
|
|
484
|
-
workspaceId?: string | null | undefined;
|
|
485
|
-
projectId?: string | null | undefined;
|
|
486
|
-
baseUrl?: string | null | undefined;
|
|
487
|
-
token?: string | null | undefined;
|
|
488
|
-
cloudflare?: {
|
|
489
|
-
enabled: boolean;
|
|
490
|
-
} | undefined;
|
|
491
|
-
googleRecaptchaV2?: {
|
|
492
|
-
enabled: boolean;
|
|
493
|
-
} | undefined;
|
|
494
|
-
googleRecaptchaV3?: {
|
|
495
|
-
enabled: boolean;
|
|
496
|
-
} | undefined;
|
|
497
|
-
awscaptcha?: {
|
|
498
|
-
enabled: boolean;
|
|
499
|
-
} | undefined;
|
|
500
|
-
hcaptcha?: {
|
|
501
|
-
enabled: boolean;
|
|
502
|
-
} | undefined;
|
|
503
|
-
funcaptcha?: {
|
|
504
|
-
enabled: boolean;
|
|
505
|
-
} | undefined;
|
|
506
|
-
geetest?: {
|
|
507
|
-
enabled: boolean;
|
|
508
|
-
} | undefined;
|
|
509
|
-
lemin?: {
|
|
510
|
-
enabled: boolean;
|
|
511
|
-
} | undefined;
|
|
512
|
-
customCaptcha?: {
|
|
513
|
-
enabled: boolean;
|
|
514
|
-
imageLocators: string[];
|
|
515
|
-
submitLocators: string[];
|
|
516
|
-
inputLocators: string[];
|
|
517
|
-
} | undefined;
|
|
518
|
-
text?: {
|
|
519
|
-
enabled: boolean;
|
|
520
|
-
submitLocators: string[];
|
|
521
|
-
inputLocators: string[];
|
|
522
|
-
labelLocators: string[];
|
|
523
|
-
} | undefined;
|
|
524
|
-
settings?: {
|
|
525
|
-
autoSolve?: boolean | undefined;
|
|
526
|
-
solveDelay?: number | undefined;
|
|
527
|
-
maxRetries?: number | undefined;
|
|
528
|
-
timeout?: number | undefined;
|
|
529
|
-
} | undefined;
|
|
530
|
-
} | undefined;
|
|
531
18
|
}>;
|
|
532
19
|
export type IntunedSettings = z.infer<typeof settingsSchema>;
|
|
@@ -3,53 +3,15 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.settingsSchema =
|
|
6
|
+
exports.settingsSchema = void 0;
|
|
7
7
|
var z = _interopRequireWildcard(require("zod"));
|
|
8
8
|
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); }
|
|
9
9
|
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; }
|
|
10
|
-
const baseCaptchaSchema = z.object({
|
|
11
|
-
enabled: z.boolean()
|
|
12
|
-
});
|
|
13
|
-
const customCaptchaSchema = baseCaptchaSchema.extend({
|
|
14
|
-
imageLocators: z.array(z.string()).min(1, "At least one image locator is required"),
|
|
15
|
-
submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
|
|
16
|
-
inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
|
|
17
|
-
});
|
|
18
|
-
const textCaptchaSchema = baseCaptchaSchema.extend({
|
|
19
|
-
labelLocators: z.array(z.string()).min(1, "At least one image locator is required"),
|
|
20
|
-
submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
|
|
21
|
-
inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
|
|
22
|
-
});
|
|
23
|
-
const captchaSolverSolveSettingsSchema = z.object({
|
|
24
|
-
autoSolve: z.boolean().default(true),
|
|
25
|
-
solveDelay: z.number().min(0).default(2000),
|
|
26
|
-
maxRetries: z.number().min(0).default(3),
|
|
27
|
-
timeout: z.number().min(0).default(30000)
|
|
28
|
-
});
|
|
29
|
-
const captchaSolverSettingsSchema = exports.captchaSolverSettingsSchema = z.object({
|
|
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
|
-
cloudflare: baseCaptchaSchema.optional(),
|
|
36
|
-
googleRecaptchaV2: baseCaptchaSchema.optional(),
|
|
37
|
-
googleRecaptchaV3: baseCaptchaSchema.optional(),
|
|
38
|
-
awscaptcha: baseCaptchaSchema.optional(),
|
|
39
|
-
hcaptcha: baseCaptchaSchema.optional(),
|
|
40
|
-
funcaptcha: baseCaptchaSchema.optional(),
|
|
41
|
-
geetest: baseCaptchaSchema.optional(),
|
|
42
|
-
lemin: baseCaptchaSchema.optional(),
|
|
43
|
-
customCaptcha: customCaptchaSchema.optional(),
|
|
44
|
-
text: textCaptchaSchema.optional(),
|
|
45
|
-
settings: captchaSolverSolveSettingsSchema.optional().default({})
|
|
46
|
-
}).default({});
|
|
47
10
|
const authSessionsSchema = z.object({
|
|
48
11
|
enabled: z.boolean()
|
|
49
12
|
}).optional().default({
|
|
50
13
|
enabled: false
|
|
51
14
|
});
|
|
52
15
|
const settingsSchema = exports.settingsSchema = z.object({
|
|
53
|
-
authSessions: authSessionsSchema
|
|
54
|
-
captchaSolver: captchaSolverSettingsSchema.optional()
|
|
16
|
+
authSessions: authSessionsSchema
|
|
55
17
|
});
|