@intuned/runtime-dev 1.3.18-interface.13 → 1.3.18-interface.4
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/.babelrc +21 -0
- package/.eslintignore +10 -0
- package/.eslintrc.js +39 -0
- package/.turbo/turbo-build.log +2 -0
- package/WebTemplate.zip +0 -0
- package/dist/commands/api/run.d.ts +1 -3
- package/dist/commands/api/run.js +65 -2039
- package/dist/commands/auth-sessions/load.d.ts +1 -0
- package/dist/commands/auth-sessions/load.js +28 -1552
- package/dist/commands/auth-sessions/run-check.d.ts +1 -0
- package/dist/commands/auth-sessions/run-check.js +72 -1961
- package/dist/commands/auth-sessions/run-create.d.ts +1 -0
- package/dist/commands/auth-sessions/run-create.js +66 -1955
- package/dist/commands/browser/save-state.d.ts +1 -0
- package/dist/commands/browser/save-state.js +11 -102
- package/dist/commands/browser/start-browser.d.ts +1 -0
- package/dist/commands/browser/start-browser.js +9 -62
- package/dist/commands/build.d.ts +1 -2
- package/dist/commands/build.js +53 -172
- package/dist/commands/common/browserUtils.d.ts +14 -0
- package/dist/commands/common/browserUtils.js +58 -0
- package/dist/commands/common/getFirstLineNumber.d.ts +9 -0
- package/dist/commands/common/getFirstLineNumber.js +101 -0
- package/dist/commands/common/getFirstLineNumber.test.js +228 -0
- package/dist/commands/common/projectExclusions.d.ts +2 -0
- package/dist/commands/common/projectExclusions.js +8 -0
- package/dist/commands/common/sendMessageToClient.d.ts +1 -0
- package/dist/commands/common/sendMessageToClient.js +10 -0
- package/dist/commands/common/tsNodeImport.d.ts +2 -5
- package/dist/commands/common/tsNodeImport.js +16 -55
- package/dist/commands/common/utils/fileUtils.d.ts +6 -0
- package/dist/commands/common/utils/fileUtils.js +33 -0
- package/dist/commands/common/utils/interfaceClient.d.ts +31 -0
- package/dist/commands/common/utils/interfaceClient.js +99 -0
- package/dist/commands/common/utils/settings.d.ts +2 -0
- package/dist/commands/common/utils/settings.js +31 -0
- package/dist/commands/common/utils/template.d.ts +2 -0
- package/dist/commands/common/utils/template.js +31 -0
- package/dist/commands/get-headless-user-agent.d.ts +1 -2
- package/dist/commands/get-headless-user-agent.js +12 -348
- package/dist/commands/interface/pingPong.d.ts +2 -0
- package/dist/commands/interface/pingPong.js +11 -0
- package/dist/commands/interface/run.d.ts +1 -3
- package/dist/commands/interface/run.js +140 -2034
- package/dist/commands/interface/runApi.d.ts +1 -0
- package/dist/commands/interface/runApi.js +102 -0
- package/dist/commands/intuned-cli/commands/attempt.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/attempt.command.js +8 -0
- package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/attempt_api.command.js +30 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +8 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +19 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +24 -0
- 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 +32 -0
- package/dist/commands/intuned-cli/commands/authsession_scaffold.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/authsession_scaffold.command.js +16 -0
- package/dist/commands/intuned-cli/commands/build.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/build.command.js +12 -0
- package/dist/commands/intuned-cli/commands/command.d.ts +2 -0
- package/dist/commands/intuned-cli/commands/command.js +9 -0
- package/dist/commands/intuned-cli/commands/deploy.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/deploy.command.js +42 -0
- package/dist/commands/intuned-cli/commands/index.d.ts +18 -0
- package/dist/commands/intuned-cli/commands/index.js +203 -0
- package/dist/commands/intuned-cli/commands/provision.command.d.ts +13 -0
- package/dist/commands/intuned-cli/commands/provision.command.js +50 -0
- package/dist/commands/intuned-cli/commands/run.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/run.command.js +8 -0
- package/dist/commands/intuned-cli/commands/run_api.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/run_api.command.js +46 -0
- package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +34 -0
- package/dist/commands/intuned-cli/commands/run_authsession.command.js +17 -0
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +35 -0
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +35 -0
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +1 -0
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +33 -0
- package/dist/commands/intuned-cli/commands/types.d.ts +39 -0
- package/dist/commands/intuned-cli/commands/types.js +33 -0
- package/dist/commands/intuned-cli/constants/index.d.ts +17 -0
- package/dist/commands/intuned-cli/constants/index.js +25 -0
- package/dist/commands/intuned-cli/controller/__test__/api.test.js +398 -0
- package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +1060 -0
- package/dist/commands/intuned-cli/controller/api.d.ts +42 -0
- package/dist/commands/intuned-cli/controller/api.js +195 -0
- package/dist/commands/intuned-cli/controller/authSession.d.ts +209 -0
- package/dist/commands/intuned-cli/controller/authSession.js +425 -0
- package/dist/commands/intuned-cli/controller/build.d.ts +1 -0
- package/dist/commands/intuned-cli/controller/build.js +36 -0
- package/dist/commands/intuned-cli/controller/deploy.d.ts +5 -0
- package/dist/commands/intuned-cli/controller/deploy.js +318 -0
- package/dist/commands/intuned-cli/controller/index.d.ts +1 -0
- package/dist/commands/intuned-cli/controller/index.js +46 -0
- package/dist/commands/intuned-cli/controller/provision.d.ts +21 -0
- package/dist/commands/intuned-cli/controller/provision.js +300 -0
- package/dist/commands/intuned-cli/controller/scaffold.d.ts +1 -0
- package/dist/commands/intuned-cli/controller/scaffold.js +77 -0
- package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +152 -0
- package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +41 -0
- package/dist/commands/intuned-cli/helpers/api.d.ts +3 -0
- package/dist/commands/intuned-cli/helpers/api.js +16 -0
- package/dist/commands/intuned-cli/helpers/auth.d.ts +46 -0
- package/dist/commands/intuned-cli/helpers/auth.js +147 -0
- package/dist/commands/intuned-cli/helpers/backend.d.ts +8 -0
- package/dist/commands/intuned-cli/helpers/backend.js +35 -0
- package/dist/commands/intuned-cli/helpers/browser.d.ts +14 -0
- package/dist/commands/intuned-cli/helpers/browser.js +93 -0
- package/dist/commands/intuned-cli/helpers/context.d.ts +3 -0
- package/dist/commands/intuned-cli/helpers/context.js +33 -0
- package/dist/commands/intuned-cli/helpers/errors.d.ts +16 -0
- package/dist/commands/intuned-cli/helpers/errors.js +44 -0
- package/dist/commands/intuned-cli/helpers/index.d.ts +12 -0
- package/dist/commands/intuned-cli/helpers/index.js +137 -0
- package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +39 -0
- package/dist/commands/intuned-cli/helpers/intunedJson.js +20 -0
- package/dist/commands/intuned-cli/helpers/prompts.d.ts +3 -0
- package/dist/commands/intuned-cli/helpers/prompts.js +71 -0
- package/dist/commands/intuned-cli/helpers/proxy.d.ts +5 -0
- package/dist/commands/intuned-cli/helpers/proxy.js +23 -0
- package/dist/commands/intuned-cli/helpers/terminal.d.ts +5 -0
- package/dist/commands/intuned-cli/helpers/terminal.js +13 -0
- package/dist/commands/intuned-cli/helpers/timeout.d.ts +1 -0
- package/dist/commands/intuned-cli/helpers/timeout.js +23 -0
- 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.d.ts +2 -0
- package/dist/commands/intuned-cli/helpers/validation.js +14 -0
- package/dist/commands/intuned-cli/helpers/wrapper.d.ts +2 -0
- package/dist/commands/intuned-cli/helpers/wrapper.js +76 -0
- package/dist/commands/intuned-cli/index.d.ts +1 -0
- package/dist/commands/intuned-cli/index.js +16 -0
- package/dist/commands/intuned-cli/main.d.ts +1 -2
- package/dist/commands/intuned-cli/main.js +25 -5392
- package/dist/commands/intuned-cli/types.d.ts +70 -0
- package/dist/commands/intuned-cli/types.js +22 -0
- package/dist/commands/ts-check.d.ts +1 -0
- package/dist/commands/ts-check.js +29 -131
- package/dist/common/Logger/Logger/index.d.ts +12 -0
- package/dist/common/Logger/Logger/index.js +60 -0
- package/dist/common/Logger/Logger/types.d.ts +8 -0
- package/dist/common/Logger/Logger/types.js +5 -0
- package/dist/common/Logger/index.d.ts +12 -0
- package/dist/common/Logger/index.js +60 -0
- package/dist/common/Logger/types.d.ts +8 -0
- package/dist/common/Logger/types.js +5 -0
- package/dist/common/asyncLocalStorage/index.d.ts +8 -9
- package/dist/common/asyncLocalStorage/index.js +9 -33
- package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +1 -0
- package/dist/common/backendFunctions/getAuthSessionParameters.js +38 -0
- package/dist/common/binStartupScript.d.ts +1 -2
- package/dist/common/binStartupScript.js +11 -126
- package/dist/common/browserTabs.d.ts +72 -0
- package/dist/common/browserTabs.js +74 -0
- package/dist/common/cleanEnvironmentVariables.d.ts +1 -3
- package/dist/common/cleanEnvironmentVariables.js +7 -29
- package/dist/common/constants.d.ts +11 -13
- package/dist/common/constants.js +15 -57
- package/dist/common/contextStorageStateHelpers.d.ts +6 -8
- package/dist/common/contextStorageStateHelpers.js +22 -46
- package/dist/common/extension/extensionsHelpers.d.ts +11 -0
- package/dist/common/extension/extensionsHelpers.js +147 -0
- package/dist/common/extension/intunedExtensionServer.d.ts +24 -0
- package/dist/common/extension/intunedExtensionServer.js +178 -0
- package/dist/common/extension/types.d.ts +212 -0
- package/dist/common/extension/types.js +51 -0
- package/dist/common/formatZodError.d.ts +2 -0
- package/dist/common/formatZodError.js +18 -0
- package/dist/common/intunedJson.d.ts +229 -0
- package/dist/common/intunedJson.js +133 -0
- package/dist/common/jwtTokenManager.d.ts +4 -6
- package/dist/common/jwtTokenManager.js +41 -107
- package/dist/common/launchBrowser.d.ts +34 -0
- package/dist/common/launchBrowser.js +248 -0
- package/dist/common/playwrightContext.d.ts +30 -0
- package/dist/common/playwrightContext.js +153 -0
- package/dist/common/runApi/importUsingImportFunction.d.ts +7 -0
- package/dist/common/runApi/importUsingImportFunction.js +46 -0
- package/dist/common/runApi/index.d.ts +6 -9
- package/dist/common/runApi/index.js +78 -1765
- package/dist/common/settingsSchema.d.ts +51 -58
- package/dist/common/settingsSchema.js +20 -54
- package/dist/common/setupContextHook.d.ts +16 -0
- package/dist/common/setupContextHook.js +22 -0
- package/dist/common/telemetry.d.ts +3 -6
- package/dist/common/telemetry.js +9 -40
- package/dist/index.d.ts +4 -6
- package/dist/index.js +92 -783
- package/dist/runtime/RunError.d.ts +5 -0
- package/dist/runtime/RunError.js +19 -0
- package/dist/runtime/attemptStore.d.ts +2 -0
- package/dist/runtime/attemptStore.js +23 -0
- package/dist/runtime/captcha.d.ts +15 -0
- package/dist/runtime/captcha.js +191 -0
- package/dist/runtime/captcha.test.js +821 -0
- package/dist/runtime/downloadDirectory.d.ts +1 -0
- package/dist/runtime/downloadDirectory.js +19 -0
- package/dist/runtime/enums.d.js +5 -0
- package/dist/runtime/enums.d.ts +11 -0
- package/dist/runtime/enums.js +18 -0
- package/dist/runtime/executionHelpers.test.js +52 -0
- package/dist/runtime/export.d.js +5 -0
- package/dist/runtime/export.d.ts +284 -0
- package/dist/runtime/extendPayload.d.ts +2 -0
- package/dist/runtime/extendPayload.js +21 -0
- package/dist/runtime/extendTimeout.d.ts +1 -0
- package/dist/runtime/extendTimeout.js +23 -0
- package/dist/runtime/getAiGatewayConfig.d.ts +10 -0
- package/dist/runtime/getAiGatewayConfig.js +16 -0
- package/dist/runtime/getAuthSessionParameters.d.ts +1 -0
- package/dist/runtime/getAuthSessionParameters.js +20 -0
- package/dist/runtime/index.d.ts +10 -168
- package/dist/runtime/index.js +88 -778
- package/dist/runtime/persistentStore.d.ts +2 -0
- package/dist/runtime/persistentStore.js +37 -0
- package/dist/runtime/persistentStore.test.js +101 -0
- package/dist/runtime/runInfo.d.ts +2 -0
- package/dist/runtime/runInfo.js +21 -0
- package/package.json +16 -77
- package/template.tsconfig.json +11 -0
- package/tsconfig.eslint.json +5 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +49 -0
- package/dist/export.d-BAUMB-lG.d.ts +0 -140
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import * as z from
|
|
2
|
-
|
|
3
|
-
declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
1
|
+
import * as z from "zod";
|
|
2
|
+
export declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
4
3
|
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
5
4
|
port: z.ZodOptional<z.ZodNumber>;
|
|
6
5
|
cloudflare: z.ZodOptional<z.ZodObject<{
|
|
@@ -61,7 +60,6 @@ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
61
60
|
}>>;
|
|
62
61
|
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
63
62
|
enabled: z.ZodBoolean;
|
|
64
|
-
} & {
|
|
65
63
|
imageLocators: z.ZodArray<z.ZodString, "many">;
|
|
66
64
|
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
67
65
|
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
@@ -78,7 +76,6 @@ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
78
76
|
}>>;
|
|
79
77
|
text: z.ZodOptional<z.ZodObject<{
|
|
80
78
|
enabled: z.ZodBoolean;
|
|
81
|
-
} & {
|
|
82
79
|
labelLocators: z.ZodArray<z.ZodString, "many">;
|
|
83
80
|
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
84
81
|
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
@@ -117,26 +114,26 @@ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
117
114
|
maxRetries: number;
|
|
118
115
|
timeout: number;
|
|
119
116
|
};
|
|
117
|
+
port?: number | undefined;
|
|
120
118
|
cloudflare?: {
|
|
121
119
|
enabled: boolean;
|
|
122
120
|
} | undefined;
|
|
123
|
-
|
|
121
|
+
googleRecaptchaV2?: {
|
|
124
122
|
enabled: boolean;
|
|
125
123
|
} | undefined;
|
|
126
|
-
|
|
124
|
+
googleRecaptchaV3?: {
|
|
127
125
|
enabled: boolean;
|
|
128
126
|
} | undefined;
|
|
129
|
-
|
|
127
|
+
awscaptcha?: {
|
|
130
128
|
enabled: boolean;
|
|
131
129
|
} | undefined;
|
|
132
|
-
|
|
133
|
-
googleRecaptchaV2?: {
|
|
130
|
+
hcaptcha?: {
|
|
134
131
|
enabled: boolean;
|
|
135
132
|
} | undefined;
|
|
136
|
-
|
|
133
|
+
funcaptcha?: {
|
|
137
134
|
enabled: boolean;
|
|
138
135
|
} | undefined;
|
|
139
|
-
|
|
136
|
+
geetest?: {
|
|
140
137
|
enabled: boolean;
|
|
141
138
|
} | undefined;
|
|
142
139
|
lemin?: {
|
|
@@ -155,27 +152,27 @@ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
155
152
|
labelLocators: string[];
|
|
156
153
|
} | undefined;
|
|
157
154
|
}, {
|
|
155
|
+
enabled?: boolean | undefined;
|
|
156
|
+
port?: number | undefined;
|
|
158
157
|
cloudflare?: {
|
|
159
158
|
enabled: boolean;
|
|
160
159
|
} | undefined;
|
|
161
|
-
|
|
160
|
+
googleRecaptchaV2?: {
|
|
162
161
|
enabled: boolean;
|
|
163
162
|
} | undefined;
|
|
164
|
-
|
|
163
|
+
googleRecaptchaV3?: {
|
|
165
164
|
enabled: boolean;
|
|
166
165
|
} | undefined;
|
|
167
|
-
|
|
166
|
+
awscaptcha?: {
|
|
168
167
|
enabled: boolean;
|
|
169
168
|
} | undefined;
|
|
170
|
-
|
|
171
|
-
port?: number | undefined;
|
|
172
|
-
googleRecaptchaV2?: {
|
|
169
|
+
hcaptcha?: {
|
|
173
170
|
enabled: boolean;
|
|
174
171
|
} | undefined;
|
|
175
|
-
|
|
172
|
+
funcaptcha?: {
|
|
176
173
|
enabled: boolean;
|
|
177
174
|
} | undefined;
|
|
178
|
-
|
|
175
|
+
geetest?: {
|
|
179
176
|
enabled: boolean;
|
|
180
177
|
} | undefined;
|
|
181
178
|
lemin?: {
|
|
@@ -200,8 +197,8 @@ declare const captchaSolverSettingsSchema: z.ZodDefault<z.ZodObject<{
|
|
|
200
197
|
timeout?: number | undefined;
|
|
201
198
|
} | undefined;
|
|
202
199
|
}>>;
|
|
203
|
-
type CaptchaSolverSettings = z.infer<typeof captchaSolverSettingsSchema>;
|
|
204
|
-
type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
|
|
200
|
+
export type CaptchaSolverSettings = z.infer<typeof captchaSolverSettingsSchema>;
|
|
201
|
+
export type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
|
|
205
202
|
workspaceId: string;
|
|
206
203
|
projectId: string;
|
|
207
204
|
baseUrl: string;
|
|
@@ -213,7 +210,7 @@ type CaptchaSolverSettingsWithRunContext = CaptchaSolverSettings & {
|
|
|
213
210
|
token?: string;
|
|
214
211
|
};
|
|
215
212
|
};
|
|
216
|
-
declare const settingsSchema: z.ZodObject<{
|
|
213
|
+
export declare const settingsSchema: z.ZodObject<{
|
|
217
214
|
authSessions: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
218
215
|
enabled: z.ZodBoolean;
|
|
219
216
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -289,7 +286,6 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
289
286
|
}>>;
|
|
290
287
|
customCaptcha: z.ZodOptional<z.ZodObject<{
|
|
291
288
|
enabled: z.ZodBoolean;
|
|
292
|
-
} & {
|
|
293
289
|
imageLocators: z.ZodArray<z.ZodString, "many">;
|
|
294
290
|
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
295
291
|
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
@@ -306,7 +302,6 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
306
302
|
}>>;
|
|
307
303
|
text: z.ZodOptional<z.ZodObject<{
|
|
308
304
|
enabled: z.ZodBoolean;
|
|
309
|
-
} & {
|
|
310
305
|
labelLocators: z.ZodArray<z.ZodString, "many">;
|
|
311
306
|
submitLocators: z.ZodArray<z.ZodString, "many">;
|
|
312
307
|
inputLocators: z.ZodArray<z.ZodString, "many">;
|
|
@@ -345,26 +340,26 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
345
340
|
maxRetries: number;
|
|
346
341
|
timeout: number;
|
|
347
342
|
};
|
|
343
|
+
port?: number | undefined;
|
|
348
344
|
cloudflare?: {
|
|
349
345
|
enabled: boolean;
|
|
350
346
|
} | undefined;
|
|
351
|
-
|
|
347
|
+
googleRecaptchaV2?: {
|
|
352
348
|
enabled: boolean;
|
|
353
349
|
} | undefined;
|
|
354
|
-
|
|
350
|
+
googleRecaptchaV3?: {
|
|
355
351
|
enabled: boolean;
|
|
356
352
|
} | undefined;
|
|
357
|
-
|
|
353
|
+
awscaptcha?: {
|
|
358
354
|
enabled: boolean;
|
|
359
355
|
} | undefined;
|
|
360
|
-
|
|
361
|
-
googleRecaptchaV2?: {
|
|
356
|
+
hcaptcha?: {
|
|
362
357
|
enabled: boolean;
|
|
363
358
|
} | undefined;
|
|
364
|
-
|
|
359
|
+
funcaptcha?: {
|
|
365
360
|
enabled: boolean;
|
|
366
361
|
} | undefined;
|
|
367
|
-
|
|
362
|
+
geetest?: {
|
|
368
363
|
enabled: boolean;
|
|
369
364
|
} | undefined;
|
|
370
365
|
lemin?: {
|
|
@@ -383,27 +378,27 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
383
378
|
labelLocators: string[];
|
|
384
379
|
} | undefined;
|
|
385
380
|
}, {
|
|
381
|
+
enabled?: boolean | undefined;
|
|
382
|
+
port?: number | undefined;
|
|
386
383
|
cloudflare?: {
|
|
387
384
|
enabled: boolean;
|
|
388
385
|
} | undefined;
|
|
389
|
-
|
|
386
|
+
googleRecaptchaV2?: {
|
|
390
387
|
enabled: boolean;
|
|
391
388
|
} | undefined;
|
|
392
|
-
|
|
389
|
+
googleRecaptchaV3?: {
|
|
393
390
|
enabled: boolean;
|
|
394
391
|
} | undefined;
|
|
395
|
-
|
|
392
|
+
awscaptcha?: {
|
|
396
393
|
enabled: boolean;
|
|
397
394
|
} | undefined;
|
|
398
|
-
|
|
399
|
-
port?: number | undefined;
|
|
400
|
-
googleRecaptchaV2?: {
|
|
395
|
+
hcaptcha?: {
|
|
401
396
|
enabled: boolean;
|
|
402
397
|
} | undefined;
|
|
403
|
-
|
|
398
|
+
funcaptcha?: {
|
|
404
399
|
enabled: boolean;
|
|
405
400
|
} | undefined;
|
|
406
|
-
|
|
401
|
+
geetest?: {
|
|
407
402
|
enabled: boolean;
|
|
408
403
|
} | undefined;
|
|
409
404
|
lemin?: {
|
|
@@ -443,26 +438,26 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
443
438
|
maxRetries: number;
|
|
444
439
|
timeout: number;
|
|
445
440
|
};
|
|
441
|
+
port?: number | undefined;
|
|
446
442
|
cloudflare?: {
|
|
447
443
|
enabled: boolean;
|
|
448
444
|
} | undefined;
|
|
449
|
-
|
|
445
|
+
googleRecaptchaV2?: {
|
|
450
446
|
enabled: boolean;
|
|
451
447
|
} | undefined;
|
|
452
|
-
|
|
448
|
+
googleRecaptchaV3?: {
|
|
453
449
|
enabled: boolean;
|
|
454
450
|
} | undefined;
|
|
455
|
-
|
|
451
|
+
awscaptcha?: {
|
|
456
452
|
enabled: boolean;
|
|
457
453
|
} | undefined;
|
|
458
|
-
|
|
459
|
-
googleRecaptchaV2?: {
|
|
454
|
+
hcaptcha?: {
|
|
460
455
|
enabled: boolean;
|
|
461
456
|
} | undefined;
|
|
462
|
-
|
|
457
|
+
funcaptcha?: {
|
|
463
458
|
enabled: boolean;
|
|
464
459
|
} | undefined;
|
|
465
|
-
|
|
460
|
+
geetest?: {
|
|
466
461
|
enabled: boolean;
|
|
467
462
|
} | undefined;
|
|
468
463
|
lemin?: {
|
|
@@ -489,27 +484,27 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
489
484
|
enabled: boolean;
|
|
490
485
|
} | undefined;
|
|
491
486
|
captchaSolver?: {
|
|
487
|
+
enabled?: boolean | undefined;
|
|
488
|
+
port?: number | undefined;
|
|
492
489
|
cloudflare?: {
|
|
493
490
|
enabled: boolean;
|
|
494
491
|
} | undefined;
|
|
495
|
-
|
|
492
|
+
googleRecaptchaV2?: {
|
|
496
493
|
enabled: boolean;
|
|
497
494
|
} | undefined;
|
|
498
|
-
|
|
495
|
+
googleRecaptchaV3?: {
|
|
499
496
|
enabled: boolean;
|
|
500
497
|
} | undefined;
|
|
501
|
-
|
|
498
|
+
awscaptcha?: {
|
|
502
499
|
enabled: boolean;
|
|
503
500
|
} | undefined;
|
|
504
|
-
|
|
505
|
-
port?: number | undefined;
|
|
506
|
-
googleRecaptchaV2?: {
|
|
501
|
+
hcaptcha?: {
|
|
507
502
|
enabled: boolean;
|
|
508
503
|
} | undefined;
|
|
509
|
-
|
|
504
|
+
funcaptcha?: {
|
|
510
505
|
enabled: boolean;
|
|
511
506
|
} | undefined;
|
|
512
|
-
|
|
507
|
+
geetest?: {
|
|
513
508
|
enabled: boolean;
|
|
514
509
|
} | undefined;
|
|
515
510
|
lemin?: {
|
|
@@ -535,6 +530,4 @@ declare const settingsSchema: z.ZodObject<{
|
|
|
535
530
|
} | undefined;
|
|
536
531
|
} | undefined;
|
|
537
532
|
}>;
|
|
538
|
-
type IntunedSettings = z.infer<typeof settingsSchema>;
|
|
539
|
-
|
|
540
|
-
export { type CaptchaSolverSettings, type CaptchaSolverSettingsWithRunContext, type IntunedSettings, captchaSolverSettingsSchema, settingsSchema };
|
|
533
|
+
export type IntunedSettings = z.infer<typeof settingsSchema>;
|
|
@@ -1,59 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
var baseCaptchaSchema = z.object({
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.settingsSchema = exports.captchaSolverSettingsSchema = void 0;
|
|
7
|
+
var z = _interopRequireWildcard(require("zod"));
|
|
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
|
+
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({
|
|
38
11
|
enabled: z.boolean()
|
|
39
12
|
});
|
|
40
|
-
|
|
13
|
+
const customCaptchaSchema = baseCaptchaSchema.extend({
|
|
41
14
|
imageLocators: z.array(z.string()).min(1, "At least one image locator is required"),
|
|
42
15
|
submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
|
|
43
16
|
inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
|
|
44
17
|
});
|
|
45
|
-
|
|
18
|
+
const textCaptchaSchema = baseCaptchaSchema.extend({
|
|
46
19
|
labelLocators: z.array(z.string()).min(1, "At least one image locator is required"),
|
|
47
20
|
submitLocators: z.array(z.string()).min(1, "At least one submit locator is required"),
|
|
48
21
|
inputLocators: z.array(z.string()).min(1, "At least one input locator is required")
|
|
49
22
|
});
|
|
50
|
-
|
|
23
|
+
const captchaSolverSolveSettingsSchema = z.object({
|
|
51
24
|
autoSolve: z.boolean().default(true),
|
|
52
|
-
solveDelay: z.number().min(0).default(
|
|
25
|
+
solveDelay: z.number().min(0).default(2000),
|
|
53
26
|
maxRetries: z.number().min(0).default(3),
|
|
54
|
-
timeout: z.number().min(0).default(
|
|
27
|
+
timeout: z.number().min(0).default(30000)
|
|
55
28
|
});
|
|
56
|
-
|
|
29
|
+
const captchaSolverSettingsSchema = exports.captchaSolverSettingsSchema = z.object({
|
|
57
30
|
enabled: z.boolean().default(false),
|
|
58
31
|
port: z.number().int().min(1).max(65535).optional(),
|
|
59
32
|
cloudflare: baseCaptchaSchema.optional(),
|
|
@@ -66,27 +39,20 @@ var captchaSolverSettingsSchema = z.object({
|
|
|
66
39
|
lemin: baseCaptchaSchema.optional(),
|
|
67
40
|
customCaptcha: customCaptchaSchema.optional(),
|
|
68
41
|
text: textCaptchaSchema.optional(),
|
|
69
|
-
settings: captchaSolverSolveSettingsSchema.default(
|
|
70
|
-
captchaSolverSolveSettingsSchema.parse({})
|
|
71
|
-
)
|
|
42
|
+
settings: captchaSolverSolveSettingsSchema.default(captchaSolverSolveSettingsSchema.parse({}))
|
|
72
43
|
}).default({});
|
|
73
|
-
|
|
44
|
+
const authSessionsSchema = z.object({
|
|
74
45
|
enabled: z.boolean()
|
|
75
46
|
}).optional().default({
|
|
76
47
|
enabled: false
|
|
77
48
|
});
|
|
78
|
-
|
|
49
|
+
const stealthModeSchema = z.object({
|
|
79
50
|
enabled: z.boolean()
|
|
80
51
|
}).optional().default({
|
|
81
52
|
enabled: false
|
|
82
53
|
});
|
|
83
|
-
|
|
54
|
+
const settingsSchema = exports.settingsSchema = z.object({
|
|
84
55
|
authSessions: authSessionsSchema,
|
|
85
56
|
stealthMode: stealthModeSchema,
|
|
86
57
|
captchaSolver: captchaSolverSettingsSchema.optional()
|
|
87
|
-
});
|
|
88
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
89
|
-
0 && (module.exports = {
|
|
90
|
-
captchaSolverSettingsSchema,
|
|
91
|
-
settingsSchema
|
|
92
|
-
});
|
|
58
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type * as playwright from "playwright";
|
|
2
|
+
import { type Err, type Ok } from "neverthrow";
|
|
3
|
+
import { ImportFunction, type RunAutomationError } from "@intuned/runtime-interface";
|
|
4
|
+
export type InitializeContextHookOptions = {
|
|
5
|
+
apiName: string;
|
|
6
|
+
apiParameters: any;
|
|
7
|
+
cdpUrl: string;
|
|
8
|
+
};
|
|
9
|
+
export type SetupContextHook = (options: InitializeContextHookOptions) => Promise<{
|
|
10
|
+
page: playwright.Page | null;
|
|
11
|
+
context: playwright.BrowserContext;
|
|
12
|
+
cleanup?: () => Promise<void>;
|
|
13
|
+
} | null>;
|
|
14
|
+
export declare function loadSetupContextHook({ importFunction, }: {
|
|
15
|
+
importFunction: ImportFunction;
|
|
16
|
+
}): Promise<Ok<SetupContextHook | null, any> | Err<any, RunAutomationError>>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.loadSetupContextHook = loadSetupContextHook;
|
|
7
|
+
var _neverthrow = require("neverthrow");
|
|
8
|
+
var _importUsingImportFunction = require("./runApi/importUsingImportFunction");
|
|
9
|
+
var _runtimeInterface = require("@intuned/runtime-interface");
|
|
10
|
+
const setupContextHookPath = "hooks/setupContext";
|
|
11
|
+
async function loadSetupContextHook({
|
|
12
|
+
importFunction
|
|
13
|
+
}) {
|
|
14
|
+
const importedFunctionResult = await (0, _importUsingImportFunction.importUsingImportFunction)({
|
|
15
|
+
path: setupContextHookPath,
|
|
16
|
+
importFunction
|
|
17
|
+
});
|
|
18
|
+
if (importedFunctionResult.isErr() && importedFunctionResult.error instanceof _runtimeInterface.ApiNotFoundError) {
|
|
19
|
+
return (0, _neverthrow.ok)(null);
|
|
20
|
+
}
|
|
21
|
+
return importedFunctionResult;
|
|
22
|
+
}
|
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
import * as appInsights from
|
|
2
|
-
|
|
3
|
-
declare function
|
|
4
|
-
declare function getTelemetryClient(): appInsights.TelemetryClient | undefined;
|
|
5
|
-
|
|
6
|
-
export { getTelemetryClient, initializeAppInsights };
|
|
1
|
+
import * as appInsights from "applicationinsights";
|
|
2
|
+
export declare function initializeAppInsights(): void;
|
|
3
|
+
export declare function getTelemetryClient(): appInsights.TelemetryClient | undefined;
|
package/dist/common/telemetry.js
CHANGED
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
20
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
21
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
22
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
23
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
24
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
25
|
-
mod
|
|
26
|
-
));
|
|
27
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
1
|
+
"use strict";
|
|
28
2
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
__export(telemetry_exports, {
|
|
32
|
-
getTelemetryClient: () => getTelemetryClient,
|
|
33
|
-
initializeAppInsights: () => initializeAppInsights
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
34
5
|
});
|
|
35
|
-
|
|
36
|
-
|
|
6
|
+
exports.getTelemetryClient = getTelemetryClient;
|
|
7
|
+
exports.initializeAppInsights = initializeAppInsights;
|
|
8
|
+
var appInsights = _interopRequireWildcard(require("applicationinsights"));
|
|
9
|
+
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); }
|
|
10
|
+
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; }
|
|
37
11
|
function gracefulShutdown() {
|
|
38
12
|
console.log("Shutting down, so flushing app insights.");
|
|
39
13
|
appInsights.defaultClient.flush();
|
|
@@ -55,9 +29,4 @@ function initializeAppInsights() {
|
|
|
55
29
|
}
|
|
56
30
|
function getTelemetryClient() {
|
|
57
31
|
return appInsights.defaultClient;
|
|
58
|
-
}
|
|
59
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
60
|
-
0 && (module.exports = {
|
|
61
|
-
getTelemetryClient,
|
|
62
|
-
initializeAppInsights
|
|
63
|
-
});
|
|
32
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { getExecutionContext,
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import 'zod';
|
|
6
|
-
import 'node:async_hooks';
|
|
1
|
+
export { extendPayload, extendTimeout, runInfo, RunError, getAuthSessionParameters, attemptStore, persistentStore, getAiGatewayConfig, } from "./runtime";
|
|
2
|
+
export { runWithContext, getExecutionContext, } from "./common/asyncLocalStorage";
|
|
3
|
+
export { getDownloadDirectoryPath } from "./runtime/downloadDirectory";
|
|
4
|
+
export { waitForCaptchaSolve, withWaitForCaptchaSolve, onCaptchaEvent, onceCaptchaEvent, removeCaptchaEventListener, pauseCaptchaSolver, resumeCaptchaSolver, } from "./runtime/captcha";
|