@intuned/runtime-dev 0.1.0-test.1 → 0.1.0-test.11
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 +3 -1
- package/Intuned.json +1 -1
- package/api/test2.ts +1 -4
- package/dist/commands/api/run.js +27 -35
- package/dist/commands/auth-sessions/load.js +11 -13
- package/dist/commands/auth-sessions/run-check.js +14 -19
- package/dist/commands/auth-sessions/run-create.js +23 -28
- package/dist/commands/browser/save-state.js +7 -10
- package/dist/commands/browser/start-browser.js +7 -10
- package/dist/commands/build.js +25 -30
- package/dist/commands/common/browserUtils.js +15 -28
- package/dist/commands/common/getDefaultExportFromFile.js +2 -10
- package/dist/commands/common/getFirstLineNumber.js +13 -20
- package/dist/commands/common/getFirstLineNumber.test.js +46 -51
- package/dist/commands/common/sendMessageToClient.js +2 -9
- package/dist/commands/common/utils/fileUtils.js +6 -16
- package/dist/commands/common/utils/settings.js +7 -13
- package/dist/commands/common/utils/unixSocket.js +2 -9
- package/dist/commands/common/utils/webTemplate.js +7 -16
- package/dist/commands/interface/run.js +34 -39
- package/dist/commands/ts-check.js +8 -12
- package/dist/common/Logger/Logger/index.js +9 -16
- package/dist/common/Logger/Logger/types.js +1 -5
- package/dist/common/Logger/index.js +9 -16
- package/dist/common/Logger/types.js +1 -5
- package/dist/common/asyncLocalStorage/index.js +4 -12
- package/dist/common/cleanEnvironmentVariables.js +1 -7
- package/dist/common/constants.js +1 -7
- package/dist/common/contextStorageStateHelpers.js +2 -9
- package/dist/common/getPlaywrightConstructs.js +28 -39
- package/dist/common/jwtTokenManager.js +8 -18
- package/dist/common/runApi/errors.js +24 -42
- package/dist/common/runApi/index.js +53 -88
- package/dist/common/runApi/types.js +31 -38
- package/dist/common/settingsSchema.js +2 -10
- package/dist/common/telemetry.js +3 -12
- package/dist/index.js +4 -69
- package/dist/runtime/RunError.js +1 -8
- package/dist/runtime/downloadDirectory.js +5 -11
- package/dist/runtime/enums.d.js +1 -5
- package/dist/runtime/enums.js +2 -8
- package/dist/runtime/executionHelpers.test.js +20 -22
- package/dist/runtime/export.d.js +1 -5
- package/dist/runtime/extendPayload.js +5 -11
- package/dist/runtime/extendTimeout.js +3 -9
- package/dist/runtime/index.js +6 -53
- package/dist/runtime/requestMoreInfo.js +2 -9
- package/dist/runtime/runInfo.js +5 -11
- package/package.json +3 -1
- package/preserve-dynamic-imports.js +16 -0
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.extendPayload = extendPayload;
|
|
7
|
-
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
8
|
-
var _extendTimeout = require("./extendTimeout");
|
|
9
|
-
function extendPayload(payload) {
|
|
10
|
-
const context = (0, _asyncLocalStorage.getExecutionContext)();
|
|
1
|
+
import { getExecutionContext } from "../common/asyncLocalStorage";
|
|
2
|
+
import { extendTimeout } from "./extendTimeout";
|
|
3
|
+
export function extendPayload(payload) {
|
|
4
|
+
const context = getExecutionContext();
|
|
11
5
|
if (!context) {
|
|
12
6
|
throw new Error("extendPayload failed due to an internal error.");
|
|
13
7
|
}
|
|
@@ -17,5 +11,5 @@ function extendPayload(payload) {
|
|
|
17
11
|
return;
|
|
18
12
|
}
|
|
19
13
|
context === null || context === void 0 || context.extendedPayloads.push(...items);
|
|
20
|
-
|
|
14
|
+
extendTimeout();
|
|
21
15
|
}
|
|
@@ -1,13 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.extendTimeout = extendTimeout;
|
|
7
|
-
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
1
|
+
import { getExecutionContext } from "../common/asyncLocalStorage";
|
|
8
2
|
const _DEBOUNCE_TIME = 60_000;
|
|
9
|
-
function extendTimeout() {
|
|
10
|
-
const context =
|
|
3
|
+
export function extendTimeout() {
|
|
4
|
+
const context = getExecutionContext();
|
|
11
5
|
if (!context) {
|
|
12
6
|
throw new Error("extendTimeout failed due to an internal error.");
|
|
13
7
|
}
|
package/dist/runtime/index.js
CHANGED
|
@@ -1,53 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
enumerable: true,
|
|
8
|
-
get: function () {
|
|
9
|
-
return _RunError.RunError;
|
|
10
|
-
}
|
|
11
|
-
});
|
|
12
|
-
Object.defineProperty(exports, "extendPayload", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _extendPayload.extendPayload;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "extendTimeout", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _extendTimeout.extendTimeout;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
Object.defineProperty(exports, "getDownloadDirectoryPath", {
|
|
25
|
-
enumerable: true,
|
|
26
|
-
get: function () {
|
|
27
|
-
return _downloadDirectory.getDownloadDirectoryPath;
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
Object.defineProperty(exports, "requestMultipleChoice", {
|
|
31
|
-
enumerable: true,
|
|
32
|
-
get: function () {
|
|
33
|
-
return _requestMoreInfo.requestMultipleChoice;
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
Object.defineProperty(exports, "requestOTP", {
|
|
37
|
-
enumerable: true,
|
|
38
|
-
get: function () {
|
|
39
|
-
return _requestMoreInfo.requestOTP;
|
|
40
|
-
}
|
|
41
|
-
});
|
|
42
|
-
Object.defineProperty(exports, "runInfo", {
|
|
43
|
-
enumerable: true,
|
|
44
|
-
get: function () {
|
|
45
|
-
return _runInfo.runInfo;
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
var _extendPayload = require("./extendPayload");
|
|
49
|
-
var _extendTimeout = require("./extendTimeout");
|
|
50
|
-
var _runInfo = require("./runInfo");
|
|
51
|
-
var _RunError = require("./RunError");
|
|
52
|
-
var _requestMoreInfo = require("./requestMoreInfo");
|
|
53
|
-
var _downloadDirectory = require("./downloadDirectory");
|
|
1
|
+
export { extendPayload } from "./extendPayload";
|
|
2
|
+
export { extendTimeout } from "./extendTimeout";
|
|
3
|
+
export { runInfo } from "./runInfo";
|
|
4
|
+
export { RunError } from "./RunError";
|
|
5
|
+
export { requestMultipleChoice, requestOTP } from "./requestMoreInfo";
|
|
6
|
+
export { getDownloadDirectoryPath } from "./downloadDirectory";
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.requestMultipleChoice = requestMultipleChoice;
|
|
7
|
-
exports.requestOTP = requestOTP;
|
|
8
1
|
const REQUEST_MORE_INFO_KEY = Symbol("REQUEST_MORE_INFO");
|
|
9
|
-
function requestOTP(messageToUser) {
|
|
2
|
+
export function requestOTP(messageToUser) {
|
|
10
3
|
return {
|
|
11
4
|
[REQUEST_MORE_INFO_KEY]: true,
|
|
12
5
|
action: "request_more_info",
|
|
@@ -14,7 +7,7 @@ function requestOTP(messageToUser) {
|
|
|
14
7
|
requestType: "otp"
|
|
15
8
|
};
|
|
16
9
|
}
|
|
17
|
-
function requestMultipleChoice(messageToUser, choices) {
|
|
10
|
+
export function requestMultipleChoice(messageToUser, choices) {
|
|
18
11
|
return {
|
|
19
12
|
[REQUEST_MORE_INFO_KEY]: true,
|
|
20
13
|
action: "request_more_info",
|
package/dist/runtime/runInfo.js
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
});
|
|
6
|
-
exports.runInfo = runInfo;
|
|
7
|
-
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
8
|
-
var _enums = require("./enums");
|
|
9
|
-
function runInfo() {
|
|
10
|
-
const context = (0, _asyncLocalStorage.getExecutionContext)();
|
|
1
|
+
import { getExecutionContext } from "../common/asyncLocalStorage";
|
|
2
|
+
import { RunEnvironment } from "./enums";
|
|
3
|
+
export function runInfo() {
|
|
4
|
+
const context = getExecutionContext();
|
|
11
5
|
if (!context) {
|
|
12
6
|
return {
|
|
13
|
-
runEnvironment:
|
|
7
|
+
runEnvironment: RunEnvironment.IDE
|
|
14
8
|
};
|
|
15
9
|
}
|
|
16
10
|
const {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "0.1.0-test.
|
|
3
|
+
"version": "0.1.0-test.11",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"intuned-ts-check": "./bin/intuned-ts-check"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
54
55
|
"@intuned/playwright": "^1.44.1-4",
|
|
55
56
|
"@intuned/playwright-core": "^1.44.1-4",
|
|
56
57
|
"@rollup/plugin-commonjs": "^25.0.2",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"@types/node": "^20.4.1",
|
|
66
67
|
"applicationinsights": "^2.9.2",
|
|
67
68
|
"async-retry": "^1.3.3",
|
|
69
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
68
70
|
"chalk": "^4.1.2",
|
|
69
71
|
"commander": "^11.0.0",
|
|
70
72
|
"cross-fetch": "^4.0.0",
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module.exports = function ({ template }) {
|
|
2
|
+
return {
|
|
3
|
+
visitor: {
|
|
4
|
+
CallExpression(path) {
|
|
5
|
+
if (path.node.callee.type === "Import") {
|
|
6
|
+
const buildRequire = template(`Promise.resolve(require(ARGUMENT))`);
|
|
7
|
+
path.replaceWith(
|
|
8
|
+
buildRequire({
|
|
9
|
+
ARGUMENT: path.node.arguments[0],
|
|
10
|
+
})
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
};
|
|
16
|
+
};
|