@intuned/runtime-dev 0.0.1-split.0 → 0.0.1-split.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/WebTemplate/controllers/authSessions/create.ts +1 -1
- package/WebTemplate/controllers/runApi/helpers.ts +1 -3
- package/dist/commands/api/run.d.ts +6 -0
- package/dist/commands/api/run.js +135 -0
- package/dist/commands/auth-sessions/load.d.ts +2 -0
- package/dist/commands/auth-sessions/load.js +26 -0
- package/dist/commands/auth-sessions/run-check.d.ts +2 -0
- package/dist/commands/auth-sessions/run-check.js +42 -0
- package/dist/commands/auth-sessions/run-create.d.ts +2 -0
- package/dist/commands/auth-sessions/run-create.js +75 -0
- package/dist/commands/browser/save-state.d.ts +2 -0
- package/dist/commands/browser/save-state.js +17 -0
- package/dist/commands/browser/start-browser.d.ts +2 -0
- package/dist/commands/browser/start-browser.js +14 -0
- package/dist/commands/build.d.ts +2 -0
- package/dist/commands/build.js +80 -0
- package/dist/commands/common/browserUtils.d.ts +14 -0
- package/dist/commands/common/browserUtils.js +58 -0
- package/dist/commands/common/getDefaultExportFromFile.d.ts +1 -0
- package/dist/commands/common/getDefaultExportFromFile.js +19 -0
- package/dist/commands/common/getFirstLineNumber.d.ts +9 -0
- package/dist/commands/common/getFirstLineNumber.js +103 -0
- package/{src/commands/common/getFirstLineNumber.test.ts → dist/commands/common/getFirstLineNumber.test.js} +75 -121
- package/dist/commands/common/sendMessageToClient.d.ts +1 -0
- package/dist/commands/common/sendMessageToClient.js +10 -0
- package/dist/commands/common/utils/fileUtils.d.ts +6 -0
- package/dist/commands/common/utils/fileUtils.js +33 -0
- package/dist/commands/common/utils/settings.d.ts +2 -0
- package/dist/commands/common/utils/settings.js +28 -0
- package/dist/commands/common/utils/webTemplate.d.ts +1 -0
- package/dist/commands/common/utils/webTemplate.js +31 -0
- package/dist/commands/testing/saveVisibleHtml.d.ts +1 -0
- package/dist/commands/testing/saveVisibleHtml.js +24 -0
- package/dist/commands/ts-check.d.ts +2 -0
- package/dist/commands/ts-check.js +54 -0
- package/dist/common/Logger/Logger/index.d.ts +12 -0
- package/dist/common/Logger/Logger/index.js +60 -0
- package/{src/common/Logger/Logger/types.ts → dist/common/Logger/Logger/types.d.ts} +4 -5
- 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/{src/common/Logger/types.ts → dist/common/Logger/types.d.ts} +4 -5
- package/dist/common/Logger/types.js +5 -0
- package/dist/common/asyncLocalStorage/index.d.ts +16 -0
- package/dist/common/asyncLocalStorage/index.js +17 -0
- package/dist/common/cleanEnvironmentVariables.d.ts +1 -0
- package/dist/common/cleanEnvironmentVariables.js +16 -0
- package/dist/common/constants.d.ts +1 -0
- package/dist/common/constants.js +7 -0
- package/dist/common/contextStorageStateHelpers.d.ts +15 -0
- package/dist/common/contextStorageStateHelpers.js +48 -0
- package/dist/common/getPlaywrightConstructs.d.ts +28 -0
- package/dist/common/getPlaywrightConstructs.js +175 -0
- package/dist/common/jwtTokenManager.d.ts +16 -0
- package/dist/common/jwtTokenManager.js +81 -0
- package/dist/common/settingsSchema.d.ts +19 -0
- package/dist/common/settingsSchema.js +17 -0
- package/dist/common/telemetry.d.ts +3 -0
- package/dist/common/telemetry.js +32 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +69 -0
- package/dist/runtime/RunError.d.ts +5 -0
- package/dist/runtime/RunError.js +19 -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.js +18 -0
- package/dist/runtime/executionHelpers.test.js +53 -0
- package/dist/runtime/export.d.js +5 -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 +26 -0
- package/{src/runtime/index.ts → dist/runtime/index.d.ts} +1 -3
- package/dist/runtime/index.js +53 -0
- package/dist/runtime/requestMoreInfo.d.ts +17 -0
- package/dist/runtime/requestMoreInfo.js +25 -0
- package/dist/runtime/runInfo.d.ts +2 -0
- package/dist/runtime/runInfo.js +21 -0
- package/package.json +1 -1
- package/.vscode/extensions.json +0 -3
- package/.vscode/launch.json +0 -102
- package/.vscode/settings.json +0 -12
- package/playwright.config.ts +0 -48
- package/src/commands/api/run.ts +0 -225
- package/src/commands/auth-sessions/load.ts +0 -42
- package/src/commands/auth-sessions/run-check.ts +0 -70
- package/src/commands/auth-sessions/run-create.ts +0 -124
- package/src/commands/browser/save-state.ts +0 -22
- package/src/commands/browser/start-browser.ts +0 -17
- package/src/commands/build.ts +0 -125
- package/src/commands/common/browserUtils.ts +0 -80
- package/src/commands/common/getDefaultExportFromFile.ts +0 -13
- package/src/commands/common/getFirstLineNumber.ts +0 -146
- package/src/commands/common/sendMessageToClient.ts +0 -8
- package/src/commands/common/utils/fileUtils.ts +0 -25
- package/src/commands/common/utils/settings.ts +0 -23
- package/src/commands/common/utils/webTemplate.ts +0 -46
- package/src/commands/testing/saveVisibleHtml.ts +0 -29
- package/src/commands/ts-check.ts +0 -88
- package/src/common/Logger/Logger/index.ts +0 -64
- package/src/common/Logger/index.ts +0 -64
- package/src/common/asyncLocalStorage/index.ts +0 -29
- package/src/common/cleanEnvironmentVariables.ts +0 -13
- package/src/common/constants.ts +0 -1
- package/src/common/contextStorageStateHelpers.ts +0 -71
- package/src/common/getPlaywrightConstructs.ts +0 -283
- package/src/common/jwtTokenManager.ts +0 -111
- package/src/common/settingsSchema.ts +0 -16
- package/src/common/telemetry.ts +0 -49
- package/src/index.ts +0 -14
- package/src/runtime/RunError.ts +0 -16
- package/src/runtime/downloadDirectory.ts +0 -14
- package/src/runtime/enums.ts +0 -11
- package/src/runtime/executionHelpers.test.ts +0 -70
- package/src/runtime/extendPayload.ts +0 -22
- package/src/runtime/extendTimeout.ts +0 -32
- package/src/runtime/requestMoreInfo.ts +0 -40
- package/src/runtime/runInfo.ts +0 -19
- package/vite.config.ts +0 -17
- /package/{src → dist}/common/assets/browser_scripts.js +0 -0
- /package/{src → dist}/runtime/enums.d.ts +0 -0
- /package/{src → dist}/runtime/export.d.ts +0 -0
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { getExecutionContext } from "../common/asyncLocalStorage";
|
|
2
|
-
|
|
3
|
-
const _DEBOUNCE_TIME = 60_000;
|
|
4
|
-
|
|
5
|
-
export function extendTimeout() {
|
|
6
|
-
const context = getExecutionContext();
|
|
7
|
-
|
|
8
|
-
if (!context) {
|
|
9
|
-
throw new Error("extendTimeout failed due to an internal error.");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const { timeoutInfo } = context;
|
|
13
|
-
|
|
14
|
-
if (
|
|
15
|
-
!timeoutInfo ||
|
|
16
|
-
timeoutInfo.timeoutTimestamp === undefined ||
|
|
17
|
-
timeoutInfo.timeoutDuration === undefined ||
|
|
18
|
-
timeoutInfo.extendTimeoutCallback === undefined
|
|
19
|
-
) {
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
const newTimeoutStamp = Date.now() + timeoutInfo.timeoutDuration;
|
|
24
|
-
|
|
25
|
-
if (newTimeoutStamp - timeoutInfo.timeoutTimestamp < _DEBOUNCE_TIME) {
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
timeoutInfo.timeoutTimestamp = newTimeoutStamp;
|
|
30
|
-
|
|
31
|
-
void timeoutInfo.extendTimeoutCallback().catch(() => undefined);
|
|
32
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
interface RequestMoreInfoReturnTypeBase {
|
|
2
|
-
[REQUEST_MORE_INFO_KEY]: true;
|
|
3
|
-
action: "request_more_info";
|
|
4
|
-
}
|
|
5
|
-
|
|
6
|
-
interface RequestMultipleChoiceReturnType
|
|
7
|
-
extends RequestMoreInfoReturnTypeBase {
|
|
8
|
-
messageToUser: string;
|
|
9
|
-
choices: string[];
|
|
10
|
-
requestType: "multiple_choice";
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
interface RequestOtpReturnType extends RequestMoreInfoReturnTypeBase {
|
|
14
|
-
messageToUser: string;
|
|
15
|
-
requestType: "otp";
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const REQUEST_MORE_INFO_KEY: unique symbol = Symbol("REQUEST_MORE_INFO");
|
|
19
|
-
|
|
20
|
-
export function requestOTP(messageToUser: string): RequestOtpReturnType {
|
|
21
|
-
return {
|
|
22
|
-
[REQUEST_MORE_INFO_KEY]: true,
|
|
23
|
-
action: "request_more_info",
|
|
24
|
-
messageToUser,
|
|
25
|
-
requestType: "otp",
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
export function requestMultipleChoice(
|
|
30
|
-
messageToUser: string,
|
|
31
|
-
choices: string[]
|
|
32
|
-
): RequestMultipleChoiceReturnType {
|
|
33
|
-
return {
|
|
34
|
-
[REQUEST_MORE_INFO_KEY]: true,
|
|
35
|
-
action: "request_more_info",
|
|
36
|
-
messageToUser,
|
|
37
|
-
requestType: "multiple_choice",
|
|
38
|
-
choices,
|
|
39
|
-
};
|
|
40
|
-
}
|
package/src/runtime/runInfo.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getExecutionContext } from "../common/asyncLocalStorage";
|
|
2
|
-
import { RunInfo } from "./export";
|
|
3
|
-
import { RunType, RunEnvironment } from "./enums";
|
|
4
|
-
|
|
5
|
-
export function runInfo(): RunInfo {
|
|
6
|
-
const context = getExecutionContext();
|
|
7
|
-
|
|
8
|
-
if (!context) {
|
|
9
|
-
return {
|
|
10
|
-
runEnvironment: RunEnvironment.IDE,
|
|
11
|
-
// runType: RunType.SYNC,
|
|
12
|
-
};
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
//remove extendedPayloads from the user exposed data
|
|
16
|
-
const { extendedPayloads: _extendedPayloads, ...rest } = context;
|
|
17
|
-
|
|
18
|
-
return rest;
|
|
19
|
-
}
|
package/vite.config.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { defineConfig } from "vite";
|
|
2
|
-
import macros from "vite-plugin-babel-macros"
|
|
3
|
-
require('dotenv').config();
|
|
4
|
-
|
|
5
|
-
export default defineConfig({
|
|
6
|
-
test: {
|
|
7
|
-
reporters: ['verbose', "html"],
|
|
8
|
-
outputFile: { html: './reports/html/index.html' },
|
|
9
|
-
testTimeout: 30000,
|
|
10
|
-
env: {
|
|
11
|
-
RUN_ENVIRONMENT: "AUTHORING",
|
|
12
|
-
}
|
|
13
|
-
},
|
|
14
|
-
plugins: [
|
|
15
|
-
macros(),
|
|
16
|
-
],
|
|
17
|
-
});
|
|
File without changes
|
|
File without changes
|
|
File without changes
|