@intuned/runtime 1.3.16 → 1.3.18-interface.6
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/bin/intuned +0 -0
- package/bin/intuned-interface +7 -0
- package/dist/chunk-6ZRJOUQS.mjs +16 -0
- package/dist/chunk-6ZRJOUQS.mjs.map +1 -0
- package/dist/chunk-7YL2JUTE.mjs +146 -0
- package/dist/chunk-7YL2JUTE.mjs.map +1 -0
- package/dist/chunk-B3T6RXPC.mjs +794 -0
- package/dist/chunk-B3T6RXPC.mjs.map +1 -0
- package/dist/chunk-FGV5T6SI.mjs +27 -0
- package/dist/chunk-FGV5T6SI.mjs.map +1 -0
- package/dist/chunk-G4PO5RIV.mjs +85 -0
- package/dist/chunk-G4PO5RIV.mjs.map +1 -0
- package/dist/chunk-LZOMFHX3.mjs +38 -0
- package/dist/chunk-LZOMFHX3.mjs.map +1 -0
- package/dist/{common/formatZodError.js → chunk-NDMVGENG.mjs} +9 -9
- package/dist/chunk-NDMVGENG.mjs.map +1 -0
- package/dist/chunk-W4UX6G4X.mjs +17 -0
- package/dist/chunk-W4UX6G4X.mjs.map +1 -0
- package/dist/chunk-XC75QGFG.mjs +1106 -0
- package/dist/chunk-XC75QGFG.mjs.map +1 -0
- package/dist/chunk-XOAZ2MGA.mjs +59 -0
- package/dist/chunk-XOAZ2MGA.mjs.map +1 -0
- package/dist/commands/interface/run.d.mts +3 -0
- package/dist/commands/interface/run.d.ts +3 -1
- package/dist/commands/interface/run.js +2060 -178
- package/dist/commands/interface/run.js.map +1 -0
- package/dist/commands/interface/run.mjs +255 -0
- package/dist/commands/interface/run.mjs.map +1 -0
- package/dist/common/asyncLocalStorage/index.d.mts +17 -0
- package/dist/common/asyncLocalStorage/index.d.ts +9 -8
- package/dist/common/asyncLocalStorage/index.js +34 -9
- package/dist/common/asyncLocalStorage/index.js.map +1 -0
- package/dist/common/asyncLocalStorage/index.mjs +12 -0
- package/dist/common/asyncLocalStorage/index.mjs.map +1 -0
- package/dist/common/binStartupScript.d.mts +2 -0
- package/dist/common/binStartupScript.d.ts +2 -1
- package/dist/common/binStartupScript.js +127 -11
- package/dist/common/binStartupScript.js.map +1 -0
- package/dist/common/binStartupScript.mjs +135 -0
- package/dist/common/binStartupScript.mjs.map +1 -0
- package/dist/common/cleanEnvironmentVariables.d.mts +3 -0
- package/dist/common/cleanEnvironmentVariables.d.ts +3 -1
- package/dist/common/cleanEnvironmentVariables.js +30 -7
- package/dist/common/cleanEnvironmentVariables.js.map +1 -0
- package/dist/common/cleanEnvironmentVariables.mjs +8 -0
- package/dist/common/cleanEnvironmentVariables.mjs.map +1 -0
- package/dist/common/constants.d.mts +13 -0
- package/dist/common/constants.d.ts +13 -10
- package/dist/common/constants.js +58 -14
- package/dist/common/constants.js.map +1 -0
- package/dist/common/constants.mjs +28 -0
- package/dist/common/constants.mjs.map +1 -0
- package/dist/common/contextStorageStateHelpers.d.mts +24 -0
- package/dist/common/contextStorageStateHelpers.d.ts +8 -5
- package/dist/common/contextStorageStateHelpers.js +51 -23
- package/dist/common/contextStorageStateHelpers.js.map +1 -0
- package/dist/common/contextStorageStateHelpers.mjs +10 -0
- package/dist/common/contextStorageStateHelpers.mjs.map +1 -0
- package/dist/common/jwtTokenManager.d.mts +19 -0
- package/dist/common/jwtTokenManager.d.ts +6 -4
- package/dist/common/jwtTokenManager.js +112 -40
- package/dist/common/jwtTokenManager.js.map +1 -0
- package/dist/common/jwtTokenManager.mjs +11 -0
- package/dist/common/jwtTokenManager.mjs.map +1 -0
- package/dist/common/runApi/index.d.mts +11 -0
- package/dist/common/runApi/index.d.ts +10 -10
- package/dist/common/runApi/index.js +1776 -93
- package/dist/common/runApi/index.js.map +1 -0
- package/dist/common/runApi/index.mjs +18 -0
- package/dist/common/runApi/index.mjs.map +1 -0
- package/dist/common/settingsSchema.d.mts +536 -0
- package/dist/common/settingsSchema.d.ts +9 -6
- package/dist/common/settingsSchema.js +55 -20
- package/dist/common/settingsSchema.js.map +1 -0
- package/dist/common/settingsSchema.mjs +10 -0
- package/dist/common/settingsSchema.mjs.map +1 -0
- package/dist/common/telemetry.d.mts +6 -0
- package/dist/common/telemetry.d.ts +6 -3
- package/dist/common/telemetry.js +41 -9
- package/dist/common/telemetry.js.map +1 -0
- package/dist/common/telemetry.mjs +31 -0
- package/dist/common/telemetry.mjs.map +1 -0
- package/dist/export.d-BAUMB-lG.d.mts +140 -0
- package/dist/export.d-BAUMB-lG.d.ts +140 -0
- package/dist/index.d.mts +6 -0
- package/dist/index.d.ts +6 -5
- package/dist/index.js +783 -98
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +47 -0
- package/dist/index.mjs.map +1 -0
- package/dist/runtime/index.d.mts +163 -0
- package/dist/runtime/index.d.ts +163 -10
- package/dist/runtime/index.js +779 -88
- package/dist/runtime/index.js.map +1 -0
- package/dist/runtime/index.mjs +42 -0
- package/dist/runtime/index.mjs.map +1 -0
- package/package.json +80 -23
- package/.babelrc +0 -21
- package/.eslintignore +0 -10
- package/.eslintrc.js +0 -39
- package/InterfaceTemplate/index.playwright.ts +0 -6
- package/InterfaceTemplate/utils.ts +0 -61
- package/dist/commands/api/run.d.ts +0 -6
- package/dist/commands/api/run.js +0 -123
- package/dist/commands/auth-sessions/load.d.ts +0 -2
- package/dist/commands/auth-sessions/load.js +0 -35
- package/dist/commands/auth-sessions/run-check.d.ts +0 -2
- package/dist/commands/auth-sessions/run-check.js +0 -74
- package/dist/commands/auth-sessions/run-create.d.ts +0 -2
- package/dist/commands/auth-sessions/run-create.js +0 -78
- package/dist/commands/browser/save-state.d.ts +0 -2
- package/dist/commands/browser/save-state.js +0 -17
- package/dist/commands/browser/start-browser.d.ts +0 -2
- package/dist/commands/browser/start-browser.js +0 -14
- package/dist/commands/build.d.ts +0 -1
- package/dist/commands/build.js +0 -84
- package/dist/commands/common/browserUtils.d.ts +0 -14
- package/dist/commands/common/browserUtils.js +0 -58
- package/dist/commands/common/getFirstLineNumber.d.ts +0 -9
- package/dist/commands/common/getFirstLineNumber.js +0 -101
- package/dist/commands/common/getFirstLineNumber.test.js +0 -228
- package/dist/commands/common/projectExclusions.d.ts +0 -2
- package/dist/commands/common/projectExclusions.js +0 -8
- package/dist/commands/common/sendMessageToClient.d.ts +0 -1
- package/dist/commands/common/sendMessageToClient.js +0 -10
- package/dist/commands/common/tsNodeImport.d.ts +0 -2
- package/dist/commands/common/tsNodeImport.js +0 -34
- package/dist/commands/common/utils/fileUtils.d.ts +0 -6
- package/dist/commands/common/utils/fileUtils.js +0 -33
- package/dist/commands/common/utils/settings.d.ts +0 -2
- package/dist/commands/common/utils/settings.js +0 -31
- package/dist/commands/common/utils/template.d.ts +0 -2
- package/dist/commands/common/utils/template.js +0 -31
- package/dist/commands/common/utils/unixSocket.d.ts +0 -23
- package/dist/commands/common/utils/unixSocket.js +0 -87
- package/dist/commands/get-headless-user-agent.d.ts +0 -1
- package/dist/commands/get-headless-user-agent.js +0 -18
- package/dist/commands/intuned-cli/commands/attempt.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/attempt.command.js +0 -8
- package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/attempt_api.command.js +0 -30
- package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +0 -8
- package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +0 -19
- package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +0 -24
- package/dist/commands/intuned-cli/commands/authsession.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/authsession.command.js +0 -8
- package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/authsession_record.command.js +0 -32
- package/dist/commands/intuned-cli/commands/build.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/build.command.js +0 -12
- package/dist/commands/intuned-cli/commands/command.d.ts +0 -2
- package/dist/commands/intuned-cli/commands/command.js +0 -9
- package/dist/commands/intuned-cli/commands/deploy.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/deploy.command.js +0 -38
- package/dist/commands/intuned-cli/commands/index.d.ts +0 -18
- package/dist/commands/intuned-cli/commands/index.js +0 -203
- package/dist/commands/intuned-cli/commands/init.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/init.command.js +0 -13
- package/dist/commands/intuned-cli/commands/run.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/run.command.js +0 -8
- package/dist/commands/intuned-cli/commands/run_api.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/run_api.command.js +0 -46
- package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +0 -31
- package/dist/commands/intuned-cli/commands/run_authsession.command.js +0 -17
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +0 -35
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +0 -35
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +0 -1
- package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +0 -33
- package/dist/commands/intuned-cli/commands/save.command.d.ts +0 -13
- package/dist/commands/intuned-cli/commands/save.command.js +0 -42
- package/dist/commands/intuned-cli/commands/types.d.ts +0 -35
- package/dist/commands/intuned-cli/commands/types.js +0 -31
- package/dist/commands/intuned-cli/constants/index.d.ts +0 -17
- package/dist/commands/intuned-cli/constants/index.js +0 -25
- package/dist/commands/intuned-cli/controller/__test__/api.test.js +0 -397
- package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +0 -1059
- package/dist/commands/intuned-cli/controller/api.d.ts +0 -42
- package/dist/commands/intuned-cli/controller/api.js +0 -191
- package/dist/commands/intuned-cli/controller/authSession.d.ts +0 -209
- package/dist/commands/intuned-cli/controller/authSession.js +0 -424
- package/dist/commands/intuned-cli/controller/build.d.ts +0 -1
- package/dist/commands/intuned-cli/controller/build.js +0 -36
- package/dist/commands/intuned-cli/controller/deploy.d.ts +0 -5
- package/dist/commands/intuned-cli/controller/deploy.js +0 -276
- package/dist/commands/intuned-cli/controller/index.d.ts +0 -1
- package/dist/commands/intuned-cli/controller/index.js +0 -46
- package/dist/commands/intuned-cli/controller/save.d.ts +0 -17
- package/dist/commands/intuned-cli/controller/save.js +0 -351
- package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +0 -114
- package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +0 -40
- package/dist/commands/intuned-cli/helpers/api.d.ts +0 -3
- package/dist/commands/intuned-cli/helpers/api.js +0 -19
- package/dist/commands/intuned-cli/helpers/auth.d.ts +0 -46
- package/dist/commands/intuned-cli/helpers/auth.js +0 -144
- package/dist/commands/intuned-cli/helpers/backend.d.ts +0 -8
- package/dist/commands/intuned-cli/helpers/backend.js +0 -27
- package/dist/commands/intuned-cli/helpers/browser.d.ts +0 -15
- package/dist/commands/intuned-cli/helpers/browser.js +0 -64
- package/dist/commands/intuned-cli/helpers/context.d.ts +0 -3
- package/dist/commands/intuned-cli/helpers/context.js +0 -33
- package/dist/commands/intuned-cli/helpers/errors.d.ts +0 -16
- package/dist/commands/intuned-cli/helpers/errors.js +0 -44
- package/dist/commands/intuned-cli/helpers/index.d.ts +0 -12
- package/dist/commands/intuned-cli/helpers/index.js +0 -137
- package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +0 -39
- package/dist/commands/intuned-cli/helpers/intunedJson.js +0 -20
- package/dist/commands/intuned-cli/helpers/proxy.d.ts +0 -5
- package/dist/commands/intuned-cli/helpers/proxy.js +0 -23
- package/dist/commands/intuned-cli/helpers/terminal.d.ts +0 -5
- package/dist/commands/intuned-cli/helpers/terminal.js +0 -13
- package/dist/commands/intuned-cli/helpers/timeout.d.ts +0 -1
- package/dist/commands/intuned-cli/helpers/timeout.js +0 -23
- package/dist/commands/intuned-cli/helpers/traces.d.ts +0 -2
- package/dist/commands/intuned-cli/helpers/traces.js +0 -32
- package/dist/commands/intuned-cli/helpers/validation.d.ts +0 -2
- package/dist/commands/intuned-cli/helpers/validation.js +0 -14
- package/dist/commands/intuned-cli/helpers/wrapper.d.ts +0 -2
- package/dist/commands/intuned-cli/helpers/wrapper.js +0 -66
- package/dist/commands/intuned-cli/index.d.ts +0 -1
- package/dist/commands/intuned-cli/index.js +0 -16
- package/dist/commands/intuned-cli/main.d.ts +0 -1
- package/dist/commands/intuned-cli/main.js +0 -23
- package/dist/commands/intuned-cli/types.d.ts +0 -41
- package/dist/commands/intuned-cli/types.js +0 -12
- package/dist/commands/ts-check.d.ts +0 -2
- package/dist/commands/ts-check.js +0 -56
- package/dist/common/Logger/Logger/index.d.ts +0 -12
- package/dist/common/Logger/Logger/index.js +0 -60
- package/dist/common/Logger/Logger/types.d.ts +0 -8
- package/dist/common/Logger/Logger/types.js +0 -5
- package/dist/common/Logger/index.d.ts +0 -12
- package/dist/common/Logger/index.js +0 -60
- package/dist/common/Logger/types.d.ts +0 -8
- package/dist/common/Logger/types.js +0 -5
- package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +0 -1
- package/dist/common/backendFunctions/getAuthSessionParameters.js +0 -38
- package/dist/common/extension/extensionsHelpers.d.ts +0 -11
- package/dist/common/extension/extensionsHelpers.js +0 -147
- package/dist/common/extension/intunedExtensionServer.d.ts +0 -24
- package/dist/common/extension/intunedExtensionServer.js +0 -178
- package/dist/common/extension/types.d.ts +0 -212
- package/dist/common/extension/types.js +0 -51
- package/dist/common/formatZodError.d.ts +0 -2
- package/dist/common/intunedJson.d.ts +0 -229
- package/dist/common/intunedJson.js +0 -133
- package/dist/common/launchBrowser.d.ts +0 -31
- package/dist/common/launchBrowser.js +0 -207
- package/dist/common/playwrightContext.d.ts +0 -31
- package/dist/common/playwrightContext.js +0 -144
- package/dist/common/runApi/errors.d.ts +0 -72
- package/dist/common/runApi/errors.js +0 -169
- package/dist/common/runApi/importUsingImportFunction.d.ts +0 -9
- package/dist/common/runApi/importUsingImportFunction.js +0 -46
- package/dist/common/runApi/types.d.ts +0 -830
- package/dist/common/runApi/types.js +0 -73
- package/dist/common/setupContextHook.d.ts +0 -17
- package/dist/common/setupContextHook.js +0 -22
- package/dist/runtime/RunError.d.ts +0 -5
- package/dist/runtime/RunError.js +0 -19
- package/dist/runtime/attemptStore.d.ts +0 -2
- package/dist/runtime/attemptStore.js +0 -23
- package/dist/runtime/captcha.d.ts +0 -15
- package/dist/runtime/captcha.js +0 -191
- package/dist/runtime/captcha.test.js +0 -821
- package/dist/runtime/downloadDirectory.d.ts +0 -1
- package/dist/runtime/downloadDirectory.js +0 -19
- package/dist/runtime/enums.d.js +0 -5
- package/dist/runtime/enums.d.ts +0 -11
- package/dist/runtime/enums.js +0 -18
- package/dist/runtime/executionHelpers.test.js +0 -52
- package/dist/runtime/export.d.js +0 -5
- package/dist/runtime/export.d.ts +0 -284
- package/dist/runtime/extendPayload.d.ts +0 -2
- package/dist/runtime/extendPayload.js +0 -21
- package/dist/runtime/extendTimeout.d.ts +0 -1
- package/dist/runtime/extendTimeout.js +0 -23
- package/dist/runtime/getAiGatewayConfig.d.ts +0 -10
- package/dist/runtime/getAiGatewayConfig.js +0 -16
- package/dist/runtime/getAuthSessionParameters.d.ts +0 -1
- package/dist/runtime/getAuthSessionParameters.js +0 -20
- package/dist/runtime/persistentStore.d.ts +0 -2
- package/dist/runtime/persistentStore.js +0 -37
- package/dist/runtime/persistentStore.test.js +0 -101
- package/dist/runtime/runInfo.d.ts +0 -2
- package/dist/runtime/runInfo.js +0 -21
- package/template.tsconfig.json +0 -11
- package/tsconfig.eslint.json +0 -5
- package/tsconfig.json +0 -25
- package/typedoc.json +0 -49
- /package/dist/common/assets/{browser_scripts.js → assets/browser_scripts.js} +0 -0
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
export declare const captchaTypeSchema: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
3
|
-
export type CaptchaType = z.infer<typeof captchaTypeSchema>;
|
|
4
|
-
export declare const captchaStatusSchema: z.ZodEnum<["attached", "solving", "solved", "error", "detached"]>;
|
|
5
|
-
export type CaptchaStatus = z.infer<typeof captchaStatusSchema>;
|
|
6
|
-
export declare const captchaErrorCodeSchema: z.ZodEnum<["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]>;
|
|
7
|
-
export type CaptchaErrorCode = z.infer<typeof captchaErrorCodeSchema>;
|
|
8
|
-
export declare const captchaErrorSchema: z.ZodObject<{
|
|
9
|
-
code: z.ZodEnum<["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]>;
|
|
10
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
13
|
-
error?: unknown;
|
|
14
|
-
}, {
|
|
15
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
16
|
-
error?: unknown;
|
|
17
|
-
}>;
|
|
18
|
-
export type CaptchaError = z.infer<typeof captchaErrorSchema>;
|
|
19
|
-
declare const captchaBaseSchema: z.ZodObject<{
|
|
20
|
-
id: z.ZodString;
|
|
21
|
-
tabId: z.ZodNumber;
|
|
22
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
23
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
24
|
-
}, "strip", z.ZodTypeAny, {
|
|
25
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
26
|
-
id: string;
|
|
27
|
-
tabId: number;
|
|
28
|
-
retryCount?: number | undefined;
|
|
29
|
-
}, {
|
|
30
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
31
|
-
id: string;
|
|
32
|
-
tabId: number;
|
|
33
|
-
retryCount?: number | undefined;
|
|
34
|
-
}>;
|
|
35
|
-
export type CaptchaBase = z.infer<typeof captchaBaseSchema>;
|
|
36
|
-
declare const captchaNonErrorSchema: z.ZodObject<{
|
|
37
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
38
|
-
id: z.ZodString;
|
|
39
|
-
tabId: z.ZodNumber;
|
|
40
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
41
|
-
status: z.ZodEnum<["attached", "solving", "solved", "detached"]>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
44
|
-
status: "attached" | "solving" | "solved" | "detached";
|
|
45
|
-
id: string;
|
|
46
|
-
tabId: number;
|
|
47
|
-
retryCount?: number | undefined;
|
|
48
|
-
}, {
|
|
49
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
50
|
-
status: "attached" | "solving" | "solved" | "detached";
|
|
51
|
-
id: string;
|
|
52
|
-
tabId: number;
|
|
53
|
-
retryCount?: number | undefined;
|
|
54
|
-
}>;
|
|
55
|
-
export type CaptchaNonError = z.infer<typeof captchaNonErrorSchema>;
|
|
56
|
-
declare const captchaErrorStatusSchema: z.ZodObject<{
|
|
57
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
58
|
-
id: z.ZodString;
|
|
59
|
-
tabId: z.ZodNumber;
|
|
60
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
status: z.ZodLiteral<"error">;
|
|
62
|
-
error: z.ZodObject<{
|
|
63
|
-
code: z.ZodEnum<["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]>;
|
|
64
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
65
|
-
}, "strip", z.ZodTypeAny, {
|
|
66
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
67
|
-
error?: unknown;
|
|
68
|
-
}, {
|
|
69
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
70
|
-
error?: unknown;
|
|
71
|
-
}>;
|
|
72
|
-
}, "strip", z.ZodTypeAny, {
|
|
73
|
-
error: {
|
|
74
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
75
|
-
error?: unknown;
|
|
76
|
-
};
|
|
77
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
78
|
-
status: "error";
|
|
79
|
-
id: string;
|
|
80
|
-
tabId: number;
|
|
81
|
-
retryCount?: number | undefined;
|
|
82
|
-
}, {
|
|
83
|
-
error: {
|
|
84
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
85
|
-
error?: unknown;
|
|
86
|
-
};
|
|
87
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
88
|
-
status: "error";
|
|
89
|
-
id: string;
|
|
90
|
-
tabId: number;
|
|
91
|
-
retryCount?: number | undefined;
|
|
92
|
-
}>;
|
|
93
|
-
export type CaptchaErrorStatus = z.infer<typeof captchaErrorStatusSchema>;
|
|
94
|
-
export declare const captchaSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
95
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
96
|
-
id: z.ZodString;
|
|
97
|
-
tabId: z.ZodNumber;
|
|
98
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
99
|
-
status: z.ZodLiteral<"attached">;
|
|
100
|
-
}, "strip", z.ZodTypeAny, {
|
|
101
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
102
|
-
status: "attached";
|
|
103
|
-
id: string;
|
|
104
|
-
tabId: number;
|
|
105
|
-
retryCount?: number | undefined;
|
|
106
|
-
}, {
|
|
107
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
108
|
-
status: "attached";
|
|
109
|
-
id: string;
|
|
110
|
-
tabId: number;
|
|
111
|
-
retryCount?: number | undefined;
|
|
112
|
-
}>, z.ZodObject<{
|
|
113
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
114
|
-
id: z.ZodString;
|
|
115
|
-
tabId: z.ZodNumber;
|
|
116
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
117
|
-
status: z.ZodLiteral<"solving">;
|
|
118
|
-
}, "strip", z.ZodTypeAny, {
|
|
119
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
120
|
-
status: "solving";
|
|
121
|
-
id: string;
|
|
122
|
-
tabId: number;
|
|
123
|
-
retryCount?: number | undefined;
|
|
124
|
-
}, {
|
|
125
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
126
|
-
status: "solving";
|
|
127
|
-
id: string;
|
|
128
|
-
tabId: number;
|
|
129
|
-
retryCount?: number | undefined;
|
|
130
|
-
}>, z.ZodObject<{
|
|
131
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
132
|
-
id: z.ZodString;
|
|
133
|
-
tabId: z.ZodNumber;
|
|
134
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
135
|
-
status: z.ZodLiteral<"solved">;
|
|
136
|
-
}, "strip", z.ZodTypeAny, {
|
|
137
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
138
|
-
status: "solved";
|
|
139
|
-
id: string;
|
|
140
|
-
tabId: number;
|
|
141
|
-
retryCount?: number | undefined;
|
|
142
|
-
}, {
|
|
143
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
144
|
-
status: "solved";
|
|
145
|
-
id: string;
|
|
146
|
-
tabId: number;
|
|
147
|
-
retryCount?: number | undefined;
|
|
148
|
-
}>, z.ZodObject<{
|
|
149
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
150
|
-
id: z.ZodString;
|
|
151
|
-
tabId: z.ZodNumber;
|
|
152
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
153
|
-
status: z.ZodLiteral<"detached">;
|
|
154
|
-
}, "strip", z.ZodTypeAny, {
|
|
155
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
156
|
-
status: "detached";
|
|
157
|
-
id: string;
|
|
158
|
-
tabId: number;
|
|
159
|
-
retryCount?: number | undefined;
|
|
160
|
-
}, {
|
|
161
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
162
|
-
status: "detached";
|
|
163
|
-
id: string;
|
|
164
|
-
tabId: number;
|
|
165
|
-
retryCount?: number | undefined;
|
|
166
|
-
}>, z.ZodObject<{
|
|
167
|
-
type: z.ZodEnum<["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]>;
|
|
168
|
-
id: z.ZodString;
|
|
169
|
-
tabId: z.ZodNumber;
|
|
170
|
-
retryCount: z.ZodOptional<z.ZodNumber>;
|
|
171
|
-
status: z.ZodLiteral<"error">;
|
|
172
|
-
error: z.ZodObject<{
|
|
173
|
-
code: z.ZodEnum<["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]>;
|
|
174
|
-
error: z.ZodOptional<z.ZodUnknown>;
|
|
175
|
-
}, "strip", z.ZodTypeAny, {
|
|
176
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
177
|
-
error?: unknown;
|
|
178
|
-
}, {
|
|
179
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
180
|
-
error?: unknown;
|
|
181
|
-
}>;
|
|
182
|
-
}, "strip", z.ZodTypeAny, {
|
|
183
|
-
error: {
|
|
184
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
185
|
-
error?: unknown;
|
|
186
|
-
};
|
|
187
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
188
|
-
status: "error";
|
|
189
|
-
id: string;
|
|
190
|
-
tabId: number;
|
|
191
|
-
retryCount?: number | undefined;
|
|
192
|
-
}, {
|
|
193
|
-
error: {
|
|
194
|
-
code: "HIT_LIMIT" | "MAX_RETRIES" | "UNEXPECTED_SERVER_RESPONSE" | "UNEXPECTED_ERROR";
|
|
195
|
-
error?: unknown;
|
|
196
|
-
};
|
|
197
|
-
type: "aws" | "cloudflare" | "customcaptcha" | "funcaptcha" | "geetest" | "hcaptcha" | "lemincaptcha" | "recaptcha" | "textcaptcha";
|
|
198
|
-
status: "error";
|
|
199
|
-
id: string;
|
|
200
|
-
tabId: number;
|
|
201
|
-
retryCount?: number | undefined;
|
|
202
|
-
}>]>;
|
|
203
|
-
export type Captcha = z.infer<typeof captchaSchema>;
|
|
204
|
-
export type CaptchaCallback = (captcha: Captcha) => Promise<void> | void;
|
|
205
|
-
export declare class CaptchaSolveError extends Error {
|
|
206
|
-
error: CaptchaError;
|
|
207
|
-
constructor(message: string, error: CaptchaError);
|
|
208
|
-
}
|
|
209
|
-
export declare class TimeoutError extends Error {
|
|
210
|
-
constructor(message: string);
|
|
211
|
-
}
|
|
212
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.captchaTypeSchema = exports.captchaStatusSchema = exports.captchaSchema = exports.captchaErrorSchema = exports.captchaErrorCodeSchema = exports.TimeoutError = exports.CaptchaSolveError = void 0;
|
|
7
|
-
var _zod = require("zod");
|
|
8
|
-
const captchaTypeSchema = exports.captchaTypeSchema = _zod.z.enum(["aws", "cloudflare", "customcaptcha", "funcaptcha", "geetest", "hcaptcha", "lemincaptcha", "recaptcha", "textcaptcha"]);
|
|
9
|
-
const captchaStatusSchema = exports.captchaStatusSchema = _zod.z.enum(["attached", "solving", "solved", "error", "detached"]);
|
|
10
|
-
const captchaErrorCodeSchema = exports.captchaErrorCodeSchema = _zod.z.enum(["HIT_LIMIT", "MAX_RETRIES", "UNEXPECTED_SERVER_RESPONSE", "UNEXPECTED_ERROR"]);
|
|
11
|
-
const captchaErrorSchema = exports.captchaErrorSchema = _zod.z.object({
|
|
12
|
-
code: captchaErrorCodeSchema,
|
|
13
|
-
error: _zod.z.unknown().optional()
|
|
14
|
-
});
|
|
15
|
-
const captchaBaseSchema = _zod.z.object({
|
|
16
|
-
id: _zod.z.string().min(1),
|
|
17
|
-
tabId: _zod.z.number().int().positive(),
|
|
18
|
-
type: captchaTypeSchema,
|
|
19
|
-
retryCount: _zod.z.number().int().nonnegative().optional()
|
|
20
|
-
});
|
|
21
|
-
const captchaNonErrorSchema = captchaBaseSchema.extend({
|
|
22
|
-
status: captchaStatusSchema.exclude(["error"])
|
|
23
|
-
});
|
|
24
|
-
const captchaErrorStatusSchema = captchaBaseSchema.extend({
|
|
25
|
-
status: _zod.z.literal("error"),
|
|
26
|
-
error: captchaErrorSchema
|
|
27
|
-
});
|
|
28
|
-
const captchaSchema = exports.captchaSchema = _zod.z.discriminatedUnion("status", [captchaBaseSchema.extend({
|
|
29
|
-
status: _zod.z.literal("attached")
|
|
30
|
-
}), captchaBaseSchema.extend({
|
|
31
|
-
status: _zod.z.literal("solving")
|
|
32
|
-
}), captchaBaseSchema.extend({
|
|
33
|
-
status: _zod.z.literal("solved")
|
|
34
|
-
}), captchaBaseSchema.extend({
|
|
35
|
-
status: _zod.z.literal("detached")
|
|
36
|
-
}), captchaErrorStatusSchema]);
|
|
37
|
-
class CaptchaSolveError extends Error {
|
|
38
|
-
constructor(message, error) {
|
|
39
|
-
super(message);
|
|
40
|
-
this.error = error;
|
|
41
|
-
this.name = "CaptchaSolveError";
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
exports.CaptchaSolveError = CaptchaSolveError;
|
|
45
|
-
class TimeoutError extends Error {
|
|
46
|
-
constructor(message) {
|
|
47
|
-
super(message);
|
|
48
|
-
this.name = "TimeoutError";
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
exports.TimeoutError = TimeoutError;
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import { type Err, type Ok } from "neverthrow";
|
|
3
|
-
export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
|
|
4
|
-
projectName: z.ZodOptional<z.ZodString>;
|
|
5
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
6
|
-
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
7
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
8
|
-
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
9
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
12
|
-
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
13
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
14
|
-
}, {
|
|
15
|
-
defaultJobInput?: unknown;
|
|
16
|
-
defaultRunPlaygroundInput?: unknown;
|
|
17
|
-
testAuthSessionInput?: unknown;
|
|
18
|
-
}>>>;
|
|
19
|
-
stealthMode: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
20
|
-
enabled: z.ZodBoolean;
|
|
21
|
-
}, "strip", z.ZodTypeAny, {
|
|
22
|
-
enabled: boolean;
|
|
23
|
-
}, {
|
|
24
|
-
enabled: boolean;
|
|
25
|
-
}>>>;
|
|
26
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
27
|
-
projectName: z.ZodOptional<z.ZodString>;
|
|
28
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
29
|
-
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
30
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
31
|
-
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
32
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
33
|
-
}, "strip", z.ZodTypeAny, {
|
|
34
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
35
|
-
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
36
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
37
|
-
}, {
|
|
38
|
-
defaultJobInput?: unknown;
|
|
39
|
-
defaultRunPlaygroundInput?: unknown;
|
|
40
|
-
testAuthSessionInput?: unknown;
|
|
41
|
-
}>>>;
|
|
42
|
-
stealthMode: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
43
|
-
enabled: z.ZodBoolean;
|
|
44
|
-
}, "strip", z.ZodTypeAny, {
|
|
45
|
-
enabled: boolean;
|
|
46
|
-
}, {
|
|
47
|
-
enabled: boolean;
|
|
48
|
-
}>>>;
|
|
49
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
50
|
-
projectName: z.ZodOptional<z.ZodString>;
|
|
51
|
-
workspaceId: z.ZodOptional<z.ZodString>;
|
|
52
|
-
metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
53
|
-
defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
54
|
-
defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
55
|
-
testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
56
|
-
}, "strip", z.ZodTypeAny, {
|
|
57
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
58
|
-
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
59
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
60
|
-
}, {
|
|
61
|
-
defaultJobInput?: unknown;
|
|
62
|
-
defaultRunPlaygroundInput?: unknown;
|
|
63
|
-
testAuthSessionInput?: unknown;
|
|
64
|
-
}>>>;
|
|
65
|
-
stealthMode: z.ZodCatch<z.ZodOptional<z.ZodObject<{
|
|
66
|
-
enabled: z.ZodBoolean;
|
|
67
|
-
}, "strip", z.ZodTypeAny, {
|
|
68
|
-
enabled: boolean;
|
|
69
|
-
}, {
|
|
70
|
-
enabled: boolean;
|
|
71
|
-
}>>>;
|
|
72
|
-
}, z.ZodTypeAny, "passthrough">>, z.ZodUnion<[z.ZodObject<{
|
|
73
|
-
authSessions: z.ZodObject<{
|
|
74
|
-
enabled: z.ZodLiteral<false>;
|
|
75
|
-
}, "strip", z.ZodTypeAny, {
|
|
76
|
-
enabled: false;
|
|
77
|
-
}, {
|
|
78
|
-
enabled: false;
|
|
79
|
-
}>;
|
|
80
|
-
apiAccess: z.ZodObject<{
|
|
81
|
-
enabled: z.ZodLiteral<false>;
|
|
82
|
-
}, "strip", z.ZodTypeAny, {
|
|
83
|
-
enabled: false;
|
|
84
|
-
}, {
|
|
85
|
-
enabled: false;
|
|
86
|
-
}>;
|
|
87
|
-
}, "strip", z.ZodTypeAny, {
|
|
88
|
-
authSessions: {
|
|
89
|
-
enabled: false;
|
|
90
|
-
};
|
|
91
|
-
apiAccess: {
|
|
92
|
-
enabled: false;
|
|
93
|
-
};
|
|
94
|
-
}, {
|
|
95
|
-
authSessions: {
|
|
96
|
-
enabled: false;
|
|
97
|
-
};
|
|
98
|
-
apiAccess: {
|
|
99
|
-
enabled: false;
|
|
100
|
-
};
|
|
101
|
-
}>, z.ZodObject<{
|
|
102
|
-
authSessions: z.ZodUnion<[z.ZodObject<{
|
|
103
|
-
enabled: z.ZodLiteral<false>;
|
|
104
|
-
}, "strip", z.ZodTypeAny, {
|
|
105
|
-
enabled: false;
|
|
106
|
-
}, {
|
|
107
|
-
enabled: false;
|
|
108
|
-
}>, z.ZodObject<{
|
|
109
|
-
enabled: z.ZodLiteral<true>;
|
|
110
|
-
type: z.ZodEnum<["MANUAL", "API"]>;
|
|
111
|
-
startUrl: z.ZodOptional<z.ZodString>;
|
|
112
|
-
finishUrl: z.ZodOptional<z.ZodString>;
|
|
113
|
-
}, "strip", z.ZodTypeAny, {
|
|
114
|
-
type: "API" | "MANUAL";
|
|
115
|
-
enabled: true;
|
|
116
|
-
startUrl?: string | undefined;
|
|
117
|
-
finishUrl?: string | undefined;
|
|
118
|
-
}, {
|
|
119
|
-
type: "API" | "MANUAL";
|
|
120
|
-
enabled: true;
|
|
121
|
-
startUrl?: string | undefined;
|
|
122
|
-
finishUrl?: string | undefined;
|
|
123
|
-
}>]>;
|
|
124
|
-
apiAccess: z.ZodObject<{
|
|
125
|
-
enabled: z.ZodLiteral<true>;
|
|
126
|
-
}, "strip", z.ZodTypeAny, {
|
|
127
|
-
enabled: true;
|
|
128
|
-
}, {
|
|
129
|
-
enabled: true;
|
|
130
|
-
}>;
|
|
131
|
-
}, "strip", z.ZodTypeAny, {
|
|
132
|
-
authSessions: {
|
|
133
|
-
enabled: false;
|
|
134
|
-
} | {
|
|
135
|
-
type: "API" | "MANUAL";
|
|
136
|
-
enabled: true;
|
|
137
|
-
startUrl?: string | undefined;
|
|
138
|
-
finishUrl?: string | undefined;
|
|
139
|
-
};
|
|
140
|
-
apiAccess: {
|
|
141
|
-
enabled: true;
|
|
142
|
-
};
|
|
143
|
-
}, {
|
|
144
|
-
authSessions: {
|
|
145
|
-
enabled: false;
|
|
146
|
-
} | {
|
|
147
|
-
type: "API" | "MANUAL";
|
|
148
|
-
enabled: true;
|
|
149
|
-
startUrl?: string | undefined;
|
|
150
|
-
finishUrl?: string | undefined;
|
|
151
|
-
};
|
|
152
|
-
apiAccess: {
|
|
153
|
-
enabled: true;
|
|
154
|
-
};
|
|
155
|
-
}>]>>;
|
|
156
|
-
export type IntunedJson = z.infer<typeof intunedJsonSchema>;
|
|
157
|
-
export declare const intunedSettingsFileNames: readonly ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
|
|
158
|
-
export declare function loadIntunedJson(): Promise<Err<never, string> | Ok<{
|
|
159
|
-
projectName?: string | undefined;
|
|
160
|
-
workspaceId?: string | undefined;
|
|
161
|
-
metadata?: {
|
|
162
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
163
|
-
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
164
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
165
|
-
} | undefined;
|
|
166
|
-
stealthMode?: {
|
|
167
|
-
enabled: boolean;
|
|
168
|
-
} | undefined;
|
|
169
|
-
} & {
|
|
170
|
-
[k: string]: unknown;
|
|
171
|
-
} & ({
|
|
172
|
-
authSessions: {
|
|
173
|
-
enabled: false;
|
|
174
|
-
};
|
|
175
|
-
apiAccess: {
|
|
176
|
-
enabled: false;
|
|
177
|
-
};
|
|
178
|
-
} | {
|
|
179
|
-
authSessions: {
|
|
180
|
-
enabled: false;
|
|
181
|
-
} | {
|
|
182
|
-
type: "API" | "MANUAL";
|
|
183
|
-
enabled: true;
|
|
184
|
-
startUrl?: string | undefined;
|
|
185
|
-
finishUrl?: string | undefined;
|
|
186
|
-
};
|
|
187
|
-
apiAccess: {
|
|
188
|
-
enabled: true;
|
|
189
|
-
};
|
|
190
|
-
}), never>>;
|
|
191
|
-
export declare function getIntunedSettingsFile(): Promise<Ok<{
|
|
192
|
-
name: typeof intunedSettingsFileNames[number];
|
|
193
|
-
path: string;
|
|
194
|
-
parse: (content: string) => any;
|
|
195
|
-
}, never> | Err<never, string>>;
|
|
196
|
-
export declare function getIntunedSettingsFileName(): Promise<Err<never, string> | Ok<"Intuned.json" | "Intuned.jsonc" | "Intuned.yaml" | "Intuned.yml" | "Intuned.toml", never>>;
|
|
197
|
-
export declare function loadIntunedJsonSync(): Err<never, string> | Ok<{
|
|
198
|
-
projectName?: string | undefined;
|
|
199
|
-
workspaceId?: string | undefined;
|
|
200
|
-
metadata?: {
|
|
201
|
-
defaultJobInput?: Record<string, any> | undefined;
|
|
202
|
-
defaultRunPlaygroundInput?: Record<string, any> | undefined;
|
|
203
|
-
testAuthSessionInput?: Record<string, any> | undefined;
|
|
204
|
-
} | undefined;
|
|
205
|
-
stealthMode?: {
|
|
206
|
-
enabled: boolean;
|
|
207
|
-
} | undefined;
|
|
208
|
-
} & {
|
|
209
|
-
[k: string]: unknown;
|
|
210
|
-
} & ({
|
|
211
|
-
authSessions: {
|
|
212
|
-
enabled: false;
|
|
213
|
-
};
|
|
214
|
-
apiAccess: {
|
|
215
|
-
enabled: false;
|
|
216
|
-
};
|
|
217
|
-
} | {
|
|
218
|
-
authSessions: {
|
|
219
|
-
enabled: false;
|
|
220
|
-
} | {
|
|
221
|
-
type: "API" | "MANUAL";
|
|
222
|
-
enabled: true;
|
|
223
|
-
startUrl?: string | undefined;
|
|
224
|
-
finishUrl?: string | undefined;
|
|
225
|
-
};
|
|
226
|
-
apiAccess: {
|
|
227
|
-
enabled: true;
|
|
228
|
-
};
|
|
229
|
-
}), never>;
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getIntunedSettingsFile = getIntunedSettingsFile;
|
|
7
|
-
exports.getIntunedSettingsFileName = getIntunedSettingsFileName;
|
|
8
|
-
exports.intunedSettingsFileNames = exports.intunedJsonSchema = void 0;
|
|
9
|
-
exports.loadIntunedJson = loadIntunedJson;
|
|
10
|
-
exports.loadIntunedJsonSync = loadIntunedJsonSync;
|
|
11
|
-
var _path = _interopRequireDefault(require("path"));
|
|
12
|
-
var fs = _interopRequireWildcard(require("fs-extra"));
|
|
13
|
-
var _zod = require("zod");
|
|
14
|
-
var JSONC = _interopRequireWildcard(require("jsonc-parser"));
|
|
15
|
-
var YAML = _interopRequireWildcard(require("yaml"));
|
|
16
|
-
var TOML = _interopRequireWildcard(require("smol-toml"));
|
|
17
|
-
var _neverthrow = require("neverthrow");
|
|
18
|
-
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); }
|
|
19
|
-
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; }
|
|
20
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
-
const playwright = undefined;
|
|
22
|
-
const intunedJsonSchema = exports.intunedJsonSchema = _zod.z.object({
|
|
23
|
-
projectName: _zod.z.string().optional(),
|
|
24
|
-
workspaceId: _zod.z.string().optional(),
|
|
25
|
-
metadata: _zod.z.object({
|
|
26
|
-
defaultJobInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
|
|
27
|
-
defaultRunPlaygroundInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
|
|
28
|
-
testAuthSessionInput: _zod.z.record(_zod.z.any()).optional().catch(undefined)
|
|
29
|
-
}).optional().catch(undefined),
|
|
30
|
-
stealthMode: _zod.z.object({
|
|
31
|
-
enabled: _zod.z.boolean()
|
|
32
|
-
}).optional().catch(undefined)
|
|
33
|
-
}).passthrough().and(_zod.z.union([_zod.z.object({
|
|
34
|
-
authSessions: _zod.z.object({
|
|
35
|
-
enabled: _zod.z.literal(false)
|
|
36
|
-
}),
|
|
37
|
-
apiAccess: _zod.z.object({
|
|
38
|
-
enabled: _zod.z.literal(false)
|
|
39
|
-
})
|
|
40
|
-
}), _zod.z.object({
|
|
41
|
-
authSessions: _zod.z.union([_zod.z.object({
|
|
42
|
-
enabled: _zod.z.literal(false)
|
|
43
|
-
}), _zod.z.object({
|
|
44
|
-
enabled: _zod.z.literal(true),
|
|
45
|
-
type: _zod.z.enum(["MANUAL", "API"]),
|
|
46
|
-
startUrl: _zod.z.string().optional(),
|
|
47
|
-
finishUrl: _zod.z.string().optional()
|
|
48
|
-
})]),
|
|
49
|
-
apiAccess: _zod.z.object({
|
|
50
|
-
enabled: _zod.z.literal(true)
|
|
51
|
-
})
|
|
52
|
-
})]));
|
|
53
|
-
const intunedSettingsFileNames = exports.intunedSettingsFileNames = ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
|
|
54
|
-
async function loadIntunedJson() {
|
|
55
|
-
const settingsFileResult = await getIntunedSettingsFile();
|
|
56
|
-
if (!settingsFileResult.isOk()) {
|
|
57
|
-
return settingsFileResult;
|
|
58
|
-
}
|
|
59
|
-
const settingsFile = settingsFileResult.value;
|
|
60
|
-
const intunedJsonContent = await fs.readFile(settingsFile.path, "utf-8");
|
|
61
|
-
let intunedJson;
|
|
62
|
-
try {
|
|
63
|
-
intunedJson = settingsFile.parse(intunedJsonContent);
|
|
64
|
-
} catch (e) {
|
|
65
|
-
return (0, _neverthrow.err)(`Failed to parse ${settingsFile.name}: ${e.message}`);
|
|
66
|
-
}
|
|
67
|
-
const parseResult = intunedJsonSchema.safeParse(intunedJson);
|
|
68
|
-
if (!parseResult.success) {
|
|
69
|
-
const formattedError = parseResult.error.errors.map(e => `- ${e.path.join(".")}: ${e.message}`).join("\n");
|
|
70
|
-
return (0, _neverthrow.err)(`${settingsFile.name} is not valid:\n${formattedError}\nPlease fix the errors and try again.`);
|
|
71
|
-
}
|
|
72
|
-
return (0, _neverthrow.ok)(parseResult.data);
|
|
73
|
-
}
|
|
74
|
-
const intunedSettingsParsers = {
|
|
75
|
-
"Intuned.json": JSON.parse,
|
|
76
|
-
"Intuned.jsonc": JSONC.parse,
|
|
77
|
-
"Intuned.yaml": YAML.parse,
|
|
78
|
-
"Intuned.yml": YAML.parse,
|
|
79
|
-
"Intuned.toml": TOML.parse
|
|
80
|
-
};
|
|
81
|
-
async function getIntunedSettingsFile() {
|
|
82
|
-
for (const fileName of intunedSettingsFileNames) {
|
|
83
|
-
const filePath = _path.default.join(process.cwd(), fileName);
|
|
84
|
-
if (await fs.exists(filePath)) {
|
|
85
|
-
return (0, _neverthrow.ok)({
|
|
86
|
-
name: fileName,
|
|
87
|
-
path: filePath,
|
|
88
|
-
parse: intunedSettingsParsers[fileName]
|
|
89
|
-
});
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
return (0, _neverthrow.err)("No Intuned settings file found.");
|
|
93
|
-
}
|
|
94
|
-
async function getIntunedSettingsFileName() {
|
|
95
|
-
const settingsFileResult = await getIntunedSettingsFile();
|
|
96
|
-
if (!settingsFileResult.isOk()) {
|
|
97
|
-
return settingsFileResult;
|
|
98
|
-
}
|
|
99
|
-
return (0, _neverthrow.ok)(settingsFileResult.value.name);
|
|
100
|
-
}
|
|
101
|
-
function loadIntunedJsonSync() {
|
|
102
|
-
const settingsFileResult = getIntunedSettingsFileSync();
|
|
103
|
-
if (!settingsFileResult.isOk()) {
|
|
104
|
-
return settingsFileResult;
|
|
105
|
-
}
|
|
106
|
-
const settingsFile = settingsFileResult.value;
|
|
107
|
-
const intunedJsonContent = fs.readFileSync(settingsFile.path, "utf-8");
|
|
108
|
-
let intunedJson;
|
|
109
|
-
try {
|
|
110
|
-
intunedJson = settingsFile.parse(intunedJsonContent);
|
|
111
|
-
} catch (e) {
|
|
112
|
-
return (0, _neverthrow.err)(`Failed to parse ${settingsFile.name}: ${e.message}`);
|
|
113
|
-
}
|
|
114
|
-
const parseResult = intunedJsonSchema.safeParse(intunedJson);
|
|
115
|
-
if (!parseResult.success) {
|
|
116
|
-
const formattedError = parseResult.error.errors.map(e => `- ${e.path.join(".")}: ${e.message}`).join("\n");
|
|
117
|
-
return (0, _neverthrow.err)(`${settingsFile.name} is not valid:\n${formattedError}\nPlease fix the errors and try again.`);
|
|
118
|
-
}
|
|
119
|
-
return (0, _neverthrow.ok)(parseResult.data);
|
|
120
|
-
}
|
|
121
|
-
function getIntunedSettingsFileSync() {
|
|
122
|
-
for (const fileName of intunedSettingsFileNames) {
|
|
123
|
-
const filePath = _path.default.join(process.cwd(), fileName);
|
|
124
|
-
if (fs.existsSync(filePath)) {
|
|
125
|
-
return (0, _neverthrow.ok)({
|
|
126
|
-
name: fileName,
|
|
127
|
-
path: filePath,
|
|
128
|
-
parse: intunedSettingsParsers[fileName]
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
return (0, _neverthrow.err)("No Intuned settings file found.");
|
|
133
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import * as playwright from "playwright";
|
|
2
|
-
export interface Proxy {
|
|
3
|
-
server: string;
|
|
4
|
-
username: string;
|
|
5
|
-
password: string;
|
|
6
|
-
}
|
|
7
|
-
export type LaunchBrowserResult = {
|
|
8
|
-
page: playwright.Page;
|
|
9
|
-
context: playwright.BrowserContext;
|
|
10
|
-
};
|
|
11
|
-
export type LaunchChromiumStandaloneOptions = {
|
|
12
|
-
proxy?: Proxy;
|
|
13
|
-
headless: boolean;
|
|
14
|
-
downloadsPath?: string;
|
|
15
|
-
cdpPort?: number;
|
|
16
|
-
appModeInitialUrl?: string;
|
|
17
|
-
executablePath?: string;
|
|
18
|
-
};
|
|
19
|
-
export type LaunchChromiumCdpOptions = {
|
|
20
|
-
cdpAddress: string;
|
|
21
|
-
};
|
|
22
|
-
export declare function launchChromium(options: LaunchChromiumStandaloneOptions): Promise<LaunchBrowserResult>;
|
|
23
|
-
export declare function launchChromium(options: LaunchChromiumCdpOptions): Promise<LaunchBrowserResult>;
|
|
24
|
-
export declare function getBrowserExecutablePath(): Promise<string | undefined>;
|
|
25
|
-
export declare function launchBrowser(options: Omit<LaunchChromiumStandaloneOptions, "executablePath"> | LaunchChromiumCdpOptions): Promise<LaunchBrowserResult>;
|
|
26
|
-
export declare function getLocalCdpAddress(port: number): string;
|
|
27
|
-
export declare function getHeadlessUserAgent({ executablePath, args, ignoreDefaultArgs, }: {
|
|
28
|
-
executablePath?: string;
|
|
29
|
-
args?: string[];
|
|
30
|
-
ignoreDefaultArgs?: string[];
|
|
31
|
-
}): Promise<string | undefined>;
|