@intuned/runtime-dev 0.1.0-test.18 → 0.1.0-test.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/Intuned.json +1 -1
- package/WebTemplate/api.ts +92 -90
- package/WebTemplate/controllers/authSessions/create.ts +2 -2
- package/WebTemplate/controllers/authSessions/store.ts +1 -1
- package/WebTemplate/controllers/runApi/helpers.ts +7 -11
- package/WebTemplate/index.playwright.ts +42 -32
- package/WebTemplate/jobs.ts +2 -13
- package/WebTemplate/utils.ts +1 -53
- package/api/test2.ts +5 -7
- package/auth-sessions/check.ts +1 -3
- package/auth-sessions/create.ts +10 -10
- package/bin/intuned-api-run +1 -1
- package/bin/intuned-auth-session-check +1 -1
- package/bin/intuned-auth-session-create +1 -1
- package/bin/intuned-auth-session-load +1 -1
- package/bin/intuned-auth-session-refresh +1 -1
- package/bin/intuned-browser-save-state +1 -1
- package/bin/intuned-browser-start +1 -1
- package/bin/intuned-build +1 -1
- package/bin/intuned-ts-check +1 -1
- package/dist/commands/api/run.js +2 -6
- package/dist/commands/auth-sessions/run-check.js +1 -3
- package/dist/commands/auth-sessions/run-create.js +2 -4
- package/dist/commands/build.js +4 -7
- package/dist/commands/common/browserUtils.js +1 -1
- package/dist/commands/common/getDefaultExportFromFile.d.ts +1 -0
- package/dist/commands/common/{tsNodeImport.js → getDefaultExportFromFile.js} +4 -3
- package/dist/commands/common/getFirstLineNumber.test.js +2 -2
- package/dist/commands/common/utils/settings.js +1 -1
- package/dist/commands/common/utils/webTemplate.js +2 -2
- package/dist/commands/interface/run.js +119 -143
- package/dist/commands/ts-check.js +2 -2
- package/dist/common/Logger/Logger/index.d.ts +1 -1
- package/dist/common/Logger/index.d.ts +1 -1
- package/dist/common/getPlaywrightConstructs.d.ts +1 -1
- package/dist/common/getPlaywrightConstructs.js +3 -3
- package/dist/common/runApi/errors.d.ts +1 -1
- package/dist/common/runApi/index.d.ts +4 -4
- package/dist/common/runApi/index.js +68 -27
- package/dist/common/runApi/types.d.ts +6 -20
- package/dist/common/runApi/types.js +1 -5
- package/dist/index.d.ts +4 -4
- package/dist/index.js +12 -12
- package/dist/runtime/RunError.d.ts +1 -1
- package/dist/runtime/executionHelpers.test.js +2 -2
- package/dist/runtime/export.d.ts +1 -1
- package/dist/runtime/extendPayload.d.ts +1 -1
- package/dist/runtime/extendPayload.js +1 -1
- package/dist/runtime/index.d.ts +7 -7
- package/dist/runtime/index.js +6 -6
- package/dist/runtime/runInfo.d.ts +1 -1
- package/dist/runtime/runInfo.js +1 -1
- package/package.json +5 -5
- package/tsconfig.json +1 -1
- package/dist/commands/common/tsNodeImport.d.ts +0 -1
- package/preserve-dynamic-imports.js +0 -16
|
@@ -18,7 +18,7 @@ var fs = _fsExtra;
|
|
|
18
18
|
var _jwtTokenManager = require("../jwtTokenManager");
|
|
19
19
|
var _contextStorageStateHelpers = require("../contextStorageStateHelpers");
|
|
20
20
|
var _neverthrow = require("neverthrow");
|
|
21
|
-
var _errors = require("./errors
|
|
21
|
+
var _errors = require("./errors");
|
|
22
22
|
Object.keys(_errors).forEach(function (key) {
|
|
23
23
|
if (key === "default" || key === "__esModule") return;
|
|
24
24
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -32,7 +32,7 @@ Object.keys(_errors).forEach(function (key) {
|
|
|
32
32
|
});
|
|
33
33
|
var _constants = require("../constants");
|
|
34
34
|
var _getPlaywrightConstructs = require("../getPlaywrightConstructs");
|
|
35
|
-
var _types = require("./types
|
|
35
|
+
var _types = require("./types");
|
|
36
36
|
Object.keys(_types).forEach(function (key) {
|
|
37
37
|
if (key === "default" || key === "__esModule") return;
|
|
38
38
|
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
@@ -128,7 +128,9 @@ async function* runApiGenerator({
|
|
|
128
128
|
var _getExecutionContext;
|
|
129
129
|
if (auth !== null && auth !== void 0 && auth.runCheck) {
|
|
130
130
|
if (!auth.session) {
|
|
131
|
-
return (0, _neverthrow.err)(
|
|
131
|
+
return (0, _neverthrow.err)({
|
|
132
|
+
code: "AuthRequiredError"
|
|
133
|
+
});
|
|
132
134
|
}
|
|
133
135
|
console.log("Running auth check");
|
|
134
136
|
const authCheckResult = await checkAuthSessionWithRetries(page, context, 2);
|
|
@@ -140,17 +142,20 @@ async function* runApiGenerator({
|
|
|
140
142
|
return authCheckResult;
|
|
141
143
|
}
|
|
142
144
|
if (!authCheckResult.value) {
|
|
143
|
-
return (0, _neverthrow.err)(
|
|
145
|
+
return (0, _neverthrow.err)({
|
|
146
|
+
code: "AuthCheckFailedError"
|
|
147
|
+
});
|
|
144
148
|
}
|
|
145
149
|
}
|
|
150
|
+
console.log("Running function", automationFunction.name);
|
|
146
151
|
const args = [...(automationFunction.params ? [automationFunction.params] : []), page, context];
|
|
147
|
-
const
|
|
148
|
-
if (
|
|
149
|
-
return
|
|
152
|
+
const importResult = await importFunction(automationFunction.name);
|
|
153
|
+
if (importResult.isErr()) {
|
|
154
|
+
return importResult;
|
|
150
155
|
}
|
|
151
156
|
let result;
|
|
152
|
-
if (
|
|
153
|
-
const generator =
|
|
157
|
+
if (importResult.value.type === "async-generator") {
|
|
158
|
+
const generator = importResult.value.generator(...args);
|
|
154
159
|
let next = undefined;
|
|
155
160
|
while (true) {
|
|
156
161
|
const generatorResult = await generator.next(...(next ? [next] : []));
|
|
@@ -162,7 +167,7 @@ async function* runApiGenerator({
|
|
|
162
167
|
break;
|
|
163
168
|
}
|
|
164
169
|
} else {
|
|
165
|
-
result = await
|
|
170
|
+
result = await importResult.value.func(...args);
|
|
166
171
|
}
|
|
167
172
|
return (0, _neverthrow.ok)({
|
|
168
173
|
result,
|
|
@@ -212,7 +217,7 @@ async function checkAuthSessionWithRetries(page, context, retries = 3) {
|
|
|
212
217
|
}
|
|
213
218
|
let tryNumber = 0;
|
|
214
219
|
console.log("Checking auth session with retries", `${_constants.AUTH_SESSIONS_FOLDER_NAME}/check`);
|
|
215
|
-
const importResult = await
|
|
220
|
+
const importResult = await importFunction(`${_constants.AUTH_SESSIONS_FOLDER_NAME}/check`);
|
|
216
221
|
if (importResult.isErr()) {
|
|
217
222
|
return (0, _neverthrow.err)(importResult.error);
|
|
218
223
|
}
|
|
@@ -227,21 +232,57 @@ async function checkAuthSessionWithRetries(page, context, retries = 3) {
|
|
|
227
232
|
}
|
|
228
233
|
return (0, _neverthrow.ok)(false);
|
|
229
234
|
}
|
|
230
|
-
async function
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
235
|
+
async function importFunction(path) {
|
|
236
|
+
const functionNameParts = path.split("/");
|
|
237
|
+
const functionNameDepth = functionNameParts.length;
|
|
238
|
+
try {
|
|
239
|
+
let imported = undefined;
|
|
240
|
+
switch (functionNameDepth) {
|
|
241
|
+
case 1:
|
|
242
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}.ts`);
|
|
243
|
+
break;
|
|
244
|
+
case 2:
|
|
245
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}/${functionNameParts[1]}.ts`);
|
|
246
|
+
break;
|
|
247
|
+
case 3:
|
|
248
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}.ts`);
|
|
249
|
+
break;
|
|
250
|
+
case 4:
|
|
251
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}/${functionNameParts[3]}.ts`);
|
|
252
|
+
break;
|
|
253
|
+
case 5:
|
|
254
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}/${functionNameParts[3]}/${functionNameParts[4]}.ts`);
|
|
255
|
+
break;
|
|
256
|
+
case 6:
|
|
257
|
+
imported = await (specifier => new Promise(r => r(specifier)).then(s => _interopRequireWildcard(require(s))))(`${functionNameParts[0]}/${functionNameParts[1]}/${functionNameParts[2]}/${functionNameParts[3]}/${functionNameParts[4]}/${functionNameParts[5]}.ts`);
|
|
258
|
+
break;
|
|
259
|
+
default:
|
|
260
|
+
return (0, _neverthrow.err)(new _errors.MaxLevelsExceededError(5));
|
|
261
|
+
}
|
|
262
|
+
if (!imported || !imported.default || !imported.default.constructor) {
|
|
263
|
+
return (0, _neverthrow.err)(new _errors.InvalidApiError("API file path does not have a default export"));
|
|
264
|
+
}
|
|
265
|
+
if (imported.default.constructor.name === "AsyncGeneratorFunction") {
|
|
266
|
+
return (0, _neverthrow.ok)({
|
|
267
|
+
type: "async-generator",
|
|
268
|
+
generator: imported.default
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
if (imported.default.constructor.name === "AsyncFunction") {
|
|
272
|
+
return (0, _neverthrow.ok)({
|
|
273
|
+
type: "async",
|
|
274
|
+
func: imported.default
|
|
275
|
+
});
|
|
276
|
+
}
|
|
277
|
+
return (0, _neverthrow.err)(new _errors.InvalidApiError("API file path does not have a default async function/generator export"));
|
|
278
|
+
} catch (error) {
|
|
279
|
+
if (error.message.includes("Unknown variable dynamic import")) {
|
|
280
|
+
return (0, _neverthrow.err)(new _errors.ApiNotFoundError(path));
|
|
281
|
+
}
|
|
282
|
+
if ((error === null || error === void 0 ? void 0 : error.code) === "ERR_MODULE_NOT_FOUND") {
|
|
283
|
+
console.log("API not found", error);
|
|
284
|
+
return (0, _neverthrow.err)(new _errors.ApiNotFoundError(path));
|
|
285
|
+
}
|
|
286
|
+
throw error;
|
|
245
287
|
}
|
|
246
|
-
return (0, _neverthrow.err)(new _errors.InvalidApiError("API file path does not have a default async function/generator export"));
|
|
247
288
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { IntunedStorageState } from "../contextStorageStateHelpers";
|
|
2
2
|
import type { Payload } from "../../runtime/export";
|
|
3
3
|
import type { Result } from "neverthrow";
|
|
4
|
-
import type { RunAutomationError } from "./errors
|
|
4
|
+
import type { RunAutomationError } from "./errors";
|
|
5
5
|
import z from "zod";
|
|
6
6
|
export interface PayloadToAppend {
|
|
7
7
|
apiName: string;
|
|
@@ -127,23 +127,13 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
127
127
|
export declare const runApiParametersSchema: z.ZodObject<{
|
|
128
128
|
functionsToken: z.ZodOptional<z.ZodString>;
|
|
129
129
|
automationFunction: z.ZodObject<{
|
|
130
|
-
|
|
131
|
-
default: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodUnknown>;
|
|
132
|
-
}, "strip", z.ZodTypeAny, {
|
|
133
|
-
default: (...args: unknown[]) => unknown;
|
|
134
|
-
}, {
|
|
135
|
-
default: (...args: unknown[]) => unknown;
|
|
136
|
-
}>;
|
|
130
|
+
name: z.ZodString;
|
|
137
131
|
params: z.ZodOptional<z.ZodAny>;
|
|
138
132
|
}, "strip", z.ZodTypeAny, {
|
|
139
|
-
|
|
140
|
-
default: (...args: unknown[]) => unknown;
|
|
141
|
-
};
|
|
133
|
+
name: string;
|
|
142
134
|
params?: any;
|
|
143
135
|
}, {
|
|
144
|
-
|
|
145
|
-
default: (...args: unknown[]) => unknown;
|
|
146
|
-
};
|
|
136
|
+
name: string;
|
|
147
137
|
params?: any;
|
|
148
138
|
}>;
|
|
149
139
|
tracing: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"enabled", [z.ZodObject<{
|
|
@@ -370,9 +360,7 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
370
360
|
retrieveSession: z.ZodDefault<z.ZodBoolean>;
|
|
371
361
|
}, "strip", z.ZodTypeAny, {
|
|
372
362
|
automationFunction: {
|
|
373
|
-
|
|
374
|
-
default: (...args: unknown[]) => unknown;
|
|
375
|
-
};
|
|
363
|
+
name: string;
|
|
376
364
|
params?: any;
|
|
377
365
|
};
|
|
378
366
|
tracing: {
|
|
@@ -428,9 +416,7 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
428
416
|
} | undefined;
|
|
429
417
|
}, {
|
|
430
418
|
automationFunction: {
|
|
431
|
-
|
|
432
|
-
default: (...args: unknown[]) => unknown;
|
|
433
|
-
};
|
|
419
|
+
name: string;
|
|
434
420
|
params?: any;
|
|
435
421
|
};
|
|
436
422
|
functionsToken?: string | undefined;
|
|
@@ -16,11 +16,7 @@ const runApiSessionSchema = exports.runApiSessionSchema = _zod.default.discrimin
|
|
|
16
16
|
const runApiParametersSchema = exports.runApiParametersSchema = _zod.default.object({
|
|
17
17
|
functionsToken: _zod.default.string().optional(),
|
|
18
18
|
automationFunction: _zod.default.object({
|
|
19
|
-
|
|
20
|
-
default: _zod.default.function()
|
|
21
|
-
}, {
|
|
22
|
-
required_error: "API handler must have a default export function"
|
|
23
|
-
}),
|
|
19
|
+
name: _zod.default.string(),
|
|
24
20
|
params: _zod.default.any().optional()
|
|
25
21
|
}),
|
|
26
22
|
tracing: _zod.default.discriminatedUnion("enabled", [_zod.default.object({
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { extendPayload, extendTimeout, runInfo, RunError, requestMultipleChoice, requestOTP, } from "./runtime
|
|
2
|
-
export { runWithContext, getExecutionContext, } from "./common/asyncLocalStorage
|
|
3
|
-
export { getDownloadDirectoryPath } from "./runtime/downloadDirectory
|
|
4
|
-
export { getProductionPlaywrightConstructs } from "./common/getPlaywrightConstructs
|
|
1
|
+
export { extendPayload, extendTimeout, runInfo, RunError, requestMultipleChoice, requestOTP, } from "./runtime";
|
|
2
|
+
export { runWithContext, getExecutionContext, } from "./common/asyncLocalStorage";
|
|
3
|
+
export { getDownloadDirectoryPath } from "./runtime/downloadDirectory";
|
|
4
|
+
export { getProductionPlaywrightConstructs } from "./common/getPlaywrightConstructs";
|
package/dist/index.js
CHANGED
|
@@ -6,19 +6,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
Object.defineProperty(exports, "RunError", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _runtime.RunError;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "extendPayload", {
|
|
13
13
|
enumerable: true,
|
|
14
14
|
get: function () {
|
|
15
|
-
return
|
|
15
|
+
return _runtime.extendPayload;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "extendTimeout", {
|
|
19
19
|
enumerable: true,
|
|
20
20
|
get: function () {
|
|
21
|
-
return
|
|
21
|
+
return _runtime.extendTimeout;
|
|
22
22
|
}
|
|
23
23
|
});
|
|
24
24
|
Object.defineProperty(exports, "getDownloadDirectoryPath", {
|
|
@@ -30,7 +30,7 @@ Object.defineProperty(exports, "getDownloadDirectoryPath", {
|
|
|
30
30
|
Object.defineProperty(exports, "getExecutionContext", {
|
|
31
31
|
enumerable: true,
|
|
32
32
|
get: function () {
|
|
33
|
-
return
|
|
33
|
+
return _asyncLocalStorage.getExecutionContext;
|
|
34
34
|
}
|
|
35
35
|
});
|
|
36
36
|
Object.defineProperty(exports, "getProductionPlaywrightConstructs", {
|
|
@@ -42,28 +42,28 @@ Object.defineProperty(exports, "getProductionPlaywrightConstructs", {
|
|
|
42
42
|
Object.defineProperty(exports, "requestMultipleChoice", {
|
|
43
43
|
enumerable: true,
|
|
44
44
|
get: function () {
|
|
45
|
-
return
|
|
45
|
+
return _runtime.requestMultipleChoice;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
48
|
Object.defineProperty(exports, "requestOTP", {
|
|
49
49
|
enumerable: true,
|
|
50
50
|
get: function () {
|
|
51
|
-
return
|
|
51
|
+
return _runtime.requestOTP;
|
|
52
52
|
}
|
|
53
53
|
});
|
|
54
54
|
Object.defineProperty(exports, "runInfo", {
|
|
55
55
|
enumerable: true,
|
|
56
56
|
get: function () {
|
|
57
|
-
return
|
|
57
|
+
return _runtime.runInfo;
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
Object.defineProperty(exports, "runWithContext", {
|
|
61
61
|
enumerable: true,
|
|
62
62
|
get: function () {
|
|
63
|
-
return
|
|
63
|
+
return _asyncLocalStorage.runWithContext;
|
|
64
64
|
}
|
|
65
65
|
});
|
|
66
|
-
var
|
|
67
|
-
var
|
|
68
|
-
var _downloadDirectory = require("./runtime/downloadDirectory
|
|
69
|
-
var _getPlaywrightConstructs = require("./common/getPlaywrightConstructs
|
|
66
|
+
var _runtime = require("./runtime");
|
|
67
|
+
var _asyncLocalStorage = require("./common/asyncLocalStorage");
|
|
68
|
+
var _downloadDirectory = require("./runtime/downloadDirectory");
|
|
69
|
+
var _getPlaywrightConstructs = require("./common/getPlaywrightConstructs");
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
var _vitest = require("vitest");
|
|
4
4
|
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
5
|
-
var _index = require("./index
|
|
6
|
-
var _enums = require("./enums
|
|
5
|
+
var _index = require("./index");
|
|
6
|
+
var _enums = require("./enums");
|
|
7
7
|
(0, _vitest.describe)("Execution Helpers", () => {
|
|
8
8
|
(0, _vitest.it)("should be able to get execution info", () => {
|
|
9
9
|
(0, _asyncLocalStorage.runWithContext)({
|
package/dist/runtime/export.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { Payload } from "./export
|
|
1
|
+
import { Payload } from "./export";
|
|
2
2
|
export declare function extendPayload(payload: Payload | Payload[]): void;
|
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.extendPayload = extendPayload;
|
|
7
7
|
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
8
|
-
var _extendTimeout = require("./extendTimeout
|
|
8
|
+
var _extendTimeout = require("./extendTimeout");
|
|
9
9
|
function extendPayload(payload) {
|
|
10
10
|
const context = (0, _asyncLocalStorage.getExecutionContext)();
|
|
11
11
|
if (!context) {
|
package/dist/runtime/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
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 type { RequestMoreInfoDetails } from "./requestMoreInfo
|
|
7
|
-
export { getDownloadDirectoryPath } from "./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 type { RequestMoreInfoDetails } from "./requestMoreInfo";
|
|
7
|
+
export { getDownloadDirectoryPath } from "./downloadDirectory";
|
package/dist/runtime/index.js
CHANGED
|
@@ -45,9 +45,9 @@ Object.defineProperty(exports, "runInfo", {
|
|
|
45
45
|
return _runInfo.runInfo;
|
|
46
46
|
}
|
|
47
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
|
|
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,2 +1,2 @@
|
|
|
1
|
-
import { RunInfo } from "./export
|
|
1
|
+
import { RunInfo } from "./export";
|
|
2
2
|
export declare function runInfo(): RunInfo;
|
package/dist/runtime/runInfo.js
CHANGED
|
@@ -5,7 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.runInfo = runInfo;
|
|
7
7
|
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
8
|
-
var _enums = require("./enums
|
|
8
|
+
var _enums = require("./enums");
|
|
9
9
|
function runInfo() {
|
|
10
10
|
const context = (0, _asyncLocalStorage.getExecutionContext)();
|
|
11
11
|
if (!context) {
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "0.1.0-test.
|
|
3
|
+
"version": "0.1.0-test.2",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
7
|
-
"./runtime": "./dist/runtime/index.js",
|
|
7
|
+
"./dist/runtime": "./dist/runtime/index.js",
|
|
8
8
|
"./dist/common/runApi": "./dist/common/runApi/index.js",
|
|
9
9
|
"./dist/common/settingsSchema": "./dist/common/settingsSchema.js",
|
|
10
10
|
"./dist/common/contextStorageStateHelpers": "./dist/common/contextStorageStateHelpers.js",
|
|
@@ -12,7 +12,8 @@
|
|
|
12
12
|
"./dist/common/jwtTokenManager": "./dist/common/jwtTokenManager.js",
|
|
13
13
|
"./dist/common/asyncLocalStorage": "./dist/common/asyncLocalStorage/index.js",
|
|
14
14
|
"./dist/common/cleanEnvironmentVariables": "./dist/common/cleanEnvironmentVariables.js",
|
|
15
|
-
"./dist/common/constants": "./dist/common/constants.js"
|
|
15
|
+
"./dist/common/constants": "./dist/common/constants.js",
|
|
16
|
+
"./dist/commands/interface/run": "./dist/commands/interface/run.js"
|
|
16
17
|
},
|
|
17
18
|
"types": "./dist/index.d.ts",
|
|
18
19
|
"author": "Intuned Team",
|
|
@@ -50,7 +51,6 @@
|
|
|
50
51
|
"intuned-ts-check": "./bin/intuned-ts-check"
|
|
51
52
|
},
|
|
52
53
|
"dependencies": {
|
|
53
|
-
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
54
54
|
"@intuned/playwright": "^1.44.1-4",
|
|
55
55
|
"@intuned/playwright-core": "^1.44.1-4",
|
|
56
56
|
"@rollup/plugin-commonjs": "^25.0.2",
|
|
@@ -65,7 +65,6 @@
|
|
|
65
65
|
"@types/node": "^20.4.1",
|
|
66
66
|
"applicationinsights": "^2.9.2",
|
|
67
67
|
"async-retry": "^1.3.3",
|
|
68
|
-
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
69
68
|
"chalk": "^4.1.2",
|
|
70
69
|
"commander": "^11.0.0",
|
|
71
70
|
"cross-fetch": "^4.0.0",
|
|
@@ -90,6 +89,7 @@
|
|
|
90
89
|
"source-map": "^0.7.4",
|
|
91
90
|
"stack-utils": "^2.0.6",
|
|
92
91
|
"ts-morph": "^21.0.1",
|
|
92
|
+
"ts-node": "^10.9.1",
|
|
93
93
|
"tslib": "^2.6.0",
|
|
94
94
|
"typescript": "^5.1.6",
|
|
95
95
|
"wait-on": "^7.2.0",
|
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function tsNodeImport(apiFilePath: string): Promise<any>;
|
|
@@ -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
|
-
};
|