@intuned/runtime-dev 1.1.6-bot-detection → 1.1.6-fiber.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc +2 -2
- package/dist/commands/api/run.js +8 -2
- package/dist/commands/auth-sessions/run-check.js +18 -4
- package/dist/commands/auth-sessions/run-create.js +2 -1
- package/dist/commands/cli-auth-sessions/create.js +1 -1
- package/dist/commands/cli-auth-sessions/utils.d.ts +1 -1
- package/dist/commands/cli-auth-sessions/utils.js +2 -3
- package/dist/commands/common/browserUtils.d.ts +1 -1
- package/dist/commands/common/browserUtils.js +1 -1
- package/dist/commands/common/getFirstLineNumber.js +2 -4
- package/dist/commands/deploy/utils.js +1 -2
- package/dist/commands/init/utils.js +1 -7
- package/dist/commands/interface/run.js +7 -6
- package/dist/commands/run-api-cli/utils.js +6 -6
- package/dist/common/assets/browser_scripts.js +2509 -2143
- package/dist/common/asyncLocalStorage/index.d.ts +1 -2
- package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +1 -0
- package/dist/common/backendFunctions/getAuthSessionParameters.js +38 -0
- package/dist/common/cli/constants.d.ts +1 -0
- package/dist/common/cli/constants.js +2 -1
- package/dist/common/cli/types.d.ts +1 -1
- package/dist/common/contextStorageStateHelpers.d.ts +1 -1
- package/dist/common/contextStorageStateHelpers.js +56 -0
- package/dist/common/getPlaywrightConstructs.d.ts +1 -1
- package/dist/common/getPlaywrightConstructs.js +12 -12
- package/dist/common/jwtTokenManager.js +3 -5
- package/dist/common/runApi/errors.d.ts +1 -1
- package/dist/common/runApi/errors.js +5 -6
- package/dist/common/runApi/index.d.ts +1 -1
- package/dist/common/runApi/index.js +22 -21
- package/dist/common/runApi/types.d.ts +16 -16
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -0
- package/dist/runtime/executionHelpers.test.js +3 -4
- package/dist/runtime/export.d.ts +16 -0
- package/dist/runtime/extendPayload.js +1 -1
- package/dist/runtime/extendTimeout.js +0 -7
- package/dist/runtime/getAuthSessionParameters.d.ts +1 -0
- package/dist/runtime/getAuthSessionParameters.js +20 -0
- package/dist/runtime/index.d.ts +1 -0
- package/dist/runtime/index.js +7 -0
- package/package.json +5 -6
- package/template.tsconfig.json +4 -7
package/dist/runtime/export.d.ts
CHANGED
|
@@ -99,6 +99,7 @@ export interface RunInfo {
|
|
|
99
99
|
jobRunId?: string;
|
|
100
100
|
queueId?: string;
|
|
101
101
|
proxy?: string;
|
|
102
|
+
authSessionId?: string;
|
|
102
103
|
}
|
|
103
104
|
|
|
104
105
|
/**
|
|
@@ -200,3 +201,18 @@ export declare function requestMultipleChoice(
|
|
|
200
201
|
* ```
|
|
201
202
|
*/
|
|
202
203
|
export declare function requestOTP(message: string): unknown;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Retrieves the parameters for the authentication session currently being used.
|
|
207
|
+
*
|
|
208
|
+
* @returns {AuthSessionParameters} An object containing the parameters for the current authentication session.
|
|
209
|
+
*
|
|
210
|
+
* @example
|
|
211
|
+
* ```typescript getAuthSessionParameters
|
|
212
|
+
* import { getAuthSessionParameters } from "@intuned/sdk/runtime"
|
|
213
|
+
*
|
|
214
|
+
* const authSessionParams = getAuthSessionParameters();
|
|
215
|
+
* console.log(authSessionParams);
|
|
216
|
+
* ```
|
|
217
|
+
*/
|
|
218
|
+
export declare function getAuthSessionParameters(): Promise<any>;
|
|
@@ -16,6 +16,6 @@ function extendPayload(payload) {
|
|
|
16
16
|
context.extendedPayloads = [...items];
|
|
17
17
|
return;
|
|
18
18
|
}
|
|
19
|
-
context
|
|
19
|
+
context?.extendedPayloads.push(...items);
|
|
20
20
|
(0, _extendTimeout.extendTimeout)();
|
|
21
21
|
}
|
|
@@ -17,13 +17,6 @@ function extendTimeout() {
|
|
|
17
17
|
if (!timeoutInfo) {
|
|
18
18
|
return;
|
|
19
19
|
}
|
|
20
|
-
if (timeoutInfo.timeoutTimestamp !== undefined && timeoutInfo.timeoutDuration !== undefined) {
|
|
21
|
-
const newTimeoutStamp = Date.now() + timeoutInfo.timeoutDuration;
|
|
22
|
-
if (newTimeoutStamp - timeoutInfo.timeoutTimestamp < _DEBOUNCE_TIME) {
|
|
23
|
-
return;
|
|
24
|
-
}
|
|
25
|
-
timeoutInfo.timeoutTimestamp = newTimeoutStamp;
|
|
26
|
-
}
|
|
27
20
|
if (timeoutInfo.extendTimeoutCallback !== undefined) {
|
|
28
21
|
void timeoutInfo.extendTimeoutCallback().catch(() => undefined);
|
|
29
22
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function getAuthSessionParameters(): Promise<any>;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getAuthSessionParameters = getAuthSessionParameters;
|
|
7
|
+
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
8
|
+
async function getAuthSessionParameters() {
|
|
9
|
+
const context = (0, _asyncLocalStorage.getExecutionContext)();
|
|
10
|
+
if (!context) {
|
|
11
|
+
throw new Error("getAuthSessionParameters failed due to an internal error (context was not found).");
|
|
12
|
+
}
|
|
13
|
+
const {
|
|
14
|
+
getAuthSessionParameters
|
|
15
|
+
} = context;
|
|
16
|
+
if (!getAuthSessionParameters) {
|
|
17
|
+
throw new Error("getAuthSessionParameters failed due to an internal error (helper was not found on context).");
|
|
18
|
+
}
|
|
19
|
+
return await getAuthSessionParameters();
|
|
20
|
+
}
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { extendPayload } from "./extendPayload";
|
|
2
2
|
export { extendTimeout } from "./extendTimeout";
|
|
3
|
+
export { getAuthSessionParameters } from "./getAuthSessionParameters";
|
|
3
4
|
export { runInfo } from "./runInfo";
|
|
4
5
|
export { RunError } from "./RunError";
|
|
5
6
|
export { requestMultipleChoice, requestOTP } from "./requestMoreInfo";
|
package/dist/runtime/index.js
CHANGED
|
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "extendTimeout", {
|
|
|
21
21
|
return _extendTimeout.extendTimeout;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
|
+
Object.defineProperty(exports, "getAuthSessionParameters", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _getAuthSessionParameters.getAuthSessionParameters;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
24
30
|
Object.defineProperty(exports, "getDownloadDirectoryPath", {
|
|
25
31
|
enumerable: true,
|
|
26
32
|
get: function () {
|
|
@@ -47,6 +53,7 @@ Object.defineProperty(exports, "runInfo", {
|
|
|
47
53
|
});
|
|
48
54
|
var _extendPayload = require("./extendPayload");
|
|
49
55
|
var _extendTimeout = require("./extendTimeout");
|
|
56
|
+
var _getAuthSessionParameters = require("./getAuthSessionParameters");
|
|
50
57
|
var _runInfo = require("./runInfo");
|
|
51
58
|
var _RunError = require("./RunError");
|
|
52
59
|
var _requestMoreInfo = require("./requestMoreInfo");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "1.1.6-
|
|
3
|
+
"version": "1.1.6-fiber.0",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -69,7 +69,6 @@
|
|
|
69
69
|
"@types/node": "20.4.1",
|
|
70
70
|
"applicationinsights": "2.9.2",
|
|
71
71
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
|
72
|
-
"boxen": "8.0.1",
|
|
73
72
|
"chalk": "^4.1.2",
|
|
74
73
|
"commander": "^11.0.0",
|
|
75
74
|
"cross-fetch": "^4.0.0",
|
|
@@ -83,7 +82,6 @@
|
|
|
83
82
|
"minimatch": "10.0.1",
|
|
84
83
|
"nanoid": "3",
|
|
85
84
|
"neverthrow": "6.1.0",
|
|
86
|
-
"patchright": "1.48.2",
|
|
87
85
|
"playwright-extra": "4.3.6",
|
|
88
86
|
"prettier": "2.8.0",
|
|
89
87
|
"promptly": "3.2.0",
|
|
@@ -131,6 +129,7 @@
|
|
|
131
129
|
"vitest": "^1.1.3"
|
|
132
130
|
},
|
|
133
131
|
"peerDependencies": {
|
|
134
|
-
"
|
|
135
|
-
}
|
|
136
|
-
|
|
132
|
+
"playwright": "*"
|
|
133
|
+
},
|
|
134
|
+
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
|
|
135
|
+
}
|
package/template.tsconfig.json
CHANGED
|
@@ -1,14 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"compilerOptions": {
|
|
3
|
-
"module": "ESNext",
|
|
4
3
|
"target": "ES2021",
|
|
5
|
-
"lib": [
|
|
6
|
-
"dom",
|
|
7
|
-
"es2021"
|
|
8
|
-
],
|
|
4
|
+
"lib": ["dom", "es2021"],
|
|
9
5
|
"resolveJsonModule": true,
|
|
10
6
|
"esModuleInterop": true,
|
|
11
|
-
"moduleResolution": "
|
|
7
|
+
"moduleResolution": "bundler",
|
|
8
|
+
"module": "esnext",
|
|
12
9
|
"skipLibCheck": true
|
|
13
10
|
}
|
|
14
|
-
}
|
|
11
|
+
}
|