@intuned/runtime-dev 0.1.0-test.9 → 1.0.0-udas.1
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 +0 -2
- package/InterfaceTemplate/index.playwright.ts +5 -0
- package/InterfaceTemplate/utils.ts +39 -0
- package/WebTemplate/api.ts +90 -92
- package/WebTemplate/controllers/async.ts +52 -48
- package/WebTemplate/controllers/authSessions/check.ts +4 -5
- package/WebTemplate/controllers/authSessions/create.ts +6 -8
- package/WebTemplate/controllers/authSessions/resumeOperation.ts +1 -1
- package/WebTemplate/controllers/runApi/helpers.ts +13 -8
- package/WebTemplate/index.playwright.ts +32 -42
- package/WebTemplate/jobs.ts +13 -2
- package/WebTemplate/utils.ts +48 -1
- package/api/test2.ts +6 -1
- package/auth-sessions/check.ts +3 -1
- package/auth-sessions/create.ts +10 -10
- package/bin/intuned-ts-check +1 -1
- package/dist/commands/api/run.js +7 -5
- package/dist/commands/auth-sessions/run-check.js +9 -3
- package/dist/commands/auth-sessions/run-create.js +11 -6
- package/dist/commands/build.js +17 -12
- package/dist/commands/common/tsNodeImport.d.ts +1 -0
- package/dist/commands/common/tsNodeImport.js +20 -0
- package/dist/commands/common/utils/settings.js +5 -5
- package/dist/commands/common/utils/template.d.ts +2 -0
- package/dist/commands/common/utils/{webTemplate.js → template.js} +7 -7
- package/dist/commands/interface/run.d.ts +1 -2
- package/dist/commands/interface/run.js +150 -110
- package/dist/commands/ts-check.js +9 -7
- package/dist/common/formatZodError.d.ts +2 -0
- package/dist/common/formatZodError.js +18 -0
- package/dist/common/getPlaywrightConstructs.js +6 -2
- package/dist/common/runApi/errors.d.ts +8 -3
- package/dist/common/runApi/errors.js +26 -3
- package/dist/common/runApi/index.d.ts +1 -1
- package/dist/common/runApi/index.js +37 -65
- package/dist/common/runApi/types.d.ts +287 -71
- package/dist/common/runApi/types.js +29 -5
- package/dist/runtime/executionHelpers.test.js +6 -6
- package/package.json +1 -1
- package/tsconfig.json +1 -2
- package/InterfaceTemplate/index.ts +0 -1
- package/dist/commands/common/getDefaultExportFromFile.d.ts +0 -1
- package/dist/commands/common/getDefaultExportFromFile.js +0 -17
- package/dist/commands/common/utils/webTemplate.d.ts +0 -1
- package/preserve-dynamic-imports.js +0 -16
- package/testing +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _vitest = require("vitest");
|
|
4
4
|
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
5
|
-
var
|
|
5
|
+
var _ = require(".");
|
|
6
6
|
var _enums = require("./enums");
|
|
7
7
|
(0, _vitest.describe)("Execution Helpers", () => {
|
|
8
8
|
(0, _vitest.it)("should be able to get execution info", () => {
|
|
@@ -11,7 +11,7 @@ var _enums = require("./enums");
|
|
|
11
11
|
runId: "test-run-id",
|
|
12
12
|
extendedPayloads: []
|
|
13
13
|
}, () => {
|
|
14
|
-
(0, _vitest.expect)((0,
|
|
14
|
+
(0, _vitest.expect)((0, _.runInfo)().runId).toEqual("test-run-id");
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
(0, _vitest.it)("should be able to mutate extendedPayloads and get the accmulated value at the end ", () => {
|
|
@@ -26,7 +26,7 @@ var _enums = require("./enums");
|
|
|
26
26
|
}, () => {
|
|
27
27
|
var _getExecutionContext, _getExecutionContext2;
|
|
28
28
|
(0, _vitest.expect)((_getExecutionContext = (0, _asyncLocalStorage.getExecutionContext)()) === null || _getExecutionContext === void 0 ? void 0 : _getExecutionContext.extendedPayloads).toEqual([]);
|
|
29
|
-
(0,
|
|
29
|
+
(0, _.extendPayload)({
|
|
30
30
|
api: "test-api",
|
|
31
31
|
parameters: {}
|
|
32
32
|
});
|
|
@@ -34,15 +34,15 @@ var _enums = require("./enums");
|
|
|
34
34
|
api: "test-api",
|
|
35
35
|
parameters: {}
|
|
36
36
|
}]);
|
|
37
|
-
(0,
|
|
37
|
+
(0, _.extendPayload)({
|
|
38
38
|
api: "test-api",
|
|
39
39
|
parameters: {}
|
|
40
40
|
});
|
|
41
|
-
(0,
|
|
41
|
+
(0, _.extendPayload)({
|
|
42
42
|
api: "test-api",
|
|
43
43
|
parameters: {}
|
|
44
44
|
});
|
|
45
|
-
(0,
|
|
45
|
+
(0, _.extendPayload)({
|
|
46
46
|
api: "test-api",
|
|
47
47
|
parameters: {}
|
|
48
48
|
});
|
package/package.json
CHANGED
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as _ from "@intuned/runtime/dist/commands/interface/run";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDefaultExportFromFile(apiFilePath: string): Promise<any>;
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.getDefaultExportFromFile = getDefaultExportFromFile;
|
|
7
|
-
async function getDefaultExportFromFile(apiFilePath) {
|
|
8
|
-
require("ts-node").register({
|
|
9
|
-
transpileOnly: true,
|
|
10
|
-
compilerOptions: {
|
|
11
|
-
lib: ["dom", "es2020"]
|
|
12
|
-
}
|
|
13
|
-
});
|
|
14
|
-
const imported = await Promise.resolve(require(apiFilePath));
|
|
15
|
-
const defaultExport = imported.default;
|
|
16
|
-
return defaultExport;
|
|
17
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const moveWebTemplateFiles: () => Promise<void>;
|
|
@@ -1,16 +0,0 @@
|
|
|
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
|
-
};
|
package/testing
DELETED
|
Binary file
|