@intuned/runtime-dev 0.1.0-test.15 → 0.1.0-test.17

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.
Files changed (61) hide show
  1. package/.babelrc +1 -2
  2. package/WebTemplate/api.ts +90 -92
  3. package/WebTemplate/controllers/authSessions/create.ts +2 -2
  4. package/WebTemplate/controllers/authSessions/store.ts +1 -1
  5. package/WebTemplate/controllers/runApi/helpers.ts +14 -12
  6. package/WebTemplate/index.playwright.ts +32 -42
  7. package/WebTemplate/jobs.ts +13 -2
  8. package/WebTemplate/utils.ts +53 -1
  9. package/api/test2.ts +6 -1
  10. package/auth-sessions/check.ts +3 -1
  11. package/auth-sessions/create.ts +10 -10
  12. package/dist/commands/api/run.js +41 -29
  13. package/dist/commands/auth-sessions/load.js +13 -11
  14. package/dist/commands/auth-sessions/run-check.js +21 -14
  15. package/dist/commands/auth-sessions/run-create.js +32 -25
  16. package/dist/commands/browser/save-state.js +10 -7
  17. package/dist/commands/browser/start-browser.js +10 -7
  18. package/dist/commands/build.js +30 -27
  19. package/dist/commands/common/browserUtils.js +28 -15
  20. package/dist/commands/common/getFirstLineNumber.js +20 -13
  21. package/dist/commands/common/getFirstLineNumber.test.js +52 -48
  22. package/dist/commands/common/sendMessageToClient.js +9 -2
  23. package/dist/commands/common/tsNodeImport.d.ts +1 -0
  24. package/dist/commands/common/tsNodeImport.js +18 -0
  25. package/dist/commands/common/utils/fileUtils.js +16 -6
  26. package/dist/commands/common/utils/settings.js +13 -7
  27. package/dist/commands/common/utils/unixSocket.js +9 -2
  28. package/dist/commands/common/utils/webTemplate.js +17 -9
  29. package/dist/commands/interface/run.js +163 -134
  30. package/dist/commands/ts-check.js +13 -10
  31. package/dist/common/Logger/Logger/index.js +16 -9
  32. package/dist/common/Logger/Logger/types.js +5 -1
  33. package/dist/common/Logger/index.js +16 -9
  34. package/dist/common/Logger/types.js +5 -1
  35. package/dist/common/asyncLocalStorage/index.js +12 -4
  36. package/dist/common/cleanEnvironmentVariables.js +7 -1
  37. package/dist/common/constants.js +7 -1
  38. package/dist/common/contextStorageStateHelpers.js +9 -2
  39. package/dist/common/getPlaywrightConstructs.js +39 -29
  40. package/dist/common/jwtTokenManager.js +18 -8
  41. package/dist/common/runApi/errors.js +42 -24
  42. package/dist/common/runApi/index.js +97 -103
  43. package/dist/common/runApi/types.d.ts +19 -5
  44. package/dist/common/runApi/types.js +42 -31
  45. package/dist/common/settingsSchema.js +10 -2
  46. package/dist/common/telemetry.js +12 -3
  47. package/dist/index.js +69 -4
  48. package/dist/runtime/RunError.js +8 -1
  49. package/dist/runtime/downloadDirectory.js +11 -5
  50. package/dist/runtime/enums.d.js +5 -1
  51. package/dist/runtime/enums.js +8 -2
  52. package/dist/runtime/executionHelpers.test.js +22 -20
  53. package/dist/runtime/export.d.js +5 -1
  54. package/dist/runtime/extendPayload.js +11 -5
  55. package/dist/runtime/extendTimeout.js +9 -3
  56. package/dist/runtime/index.js +53 -6
  57. package/dist/runtime/requestMoreInfo.js +9 -2
  58. package/dist/runtime/runInfo.js +11 -5
  59. package/package.json +3 -5
  60. package/dist/commands/common/getDefaultExportFromFile.d.ts +0 -0
  61. package/dist/commands/common/getDefaultExportFromFile.js +0 -0
@@ -127,13 +127,23 @@ 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
- name: z.ZodString;
130
+ module: z.ZodObject<{
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
+ }>;
131
137
  params: z.ZodOptional<z.ZodAny>;
132
138
  }, "strip", z.ZodTypeAny, {
133
- name: string;
139
+ module: {
140
+ default: (...args: unknown[]) => unknown;
141
+ };
134
142
  params?: any;
135
143
  }, {
136
- name: string;
144
+ module: {
145
+ default: (...args: unknown[]) => unknown;
146
+ };
137
147
  params?: any;
138
148
  }>;
139
149
  tracing: z.ZodDefault<z.ZodOptional<z.ZodDiscriminatedUnion<"enabled", [z.ZodObject<{
@@ -360,7 +370,9 @@ export declare const runApiParametersSchema: z.ZodObject<{
360
370
  retrieveSession: z.ZodDefault<z.ZodBoolean>;
361
371
  }, "strip", z.ZodTypeAny, {
362
372
  automationFunction: {
363
- name: string;
373
+ module: {
374
+ default: (...args: unknown[]) => unknown;
375
+ };
364
376
  params?: any;
365
377
  };
366
378
  tracing: {
@@ -416,7 +428,9 @@ export declare const runApiParametersSchema: z.ZodObject<{
416
428
  } | undefined;
417
429
  }, {
418
430
  automationFunction: {
419
- name: string;
431
+ module: {
432
+ default: (...args: unknown[]) => unknown;
433
+ };
420
434
  params?: any;
421
435
  };
422
436
  functionsToken?: string | undefined;
@@ -1,43 +1,54 @@
1
- import z from "zod";
2
- export const runApiSessionSchema = z.discriminatedUnion("type", [z.object({
3
- type: z.literal("file"),
4
- path: z.string()
5
- }), z.object({
6
- type: z.literal("state"),
7
- state: z.custom(v => v)
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runApiSessionSchema = exports.runApiParametersSchema = void 0;
7
+ var _zod = _interopRequireDefault(require("zod"));
8
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
+ const runApiSessionSchema = exports.runApiSessionSchema = _zod.default.discriminatedUnion("type", [_zod.default.object({
10
+ type: _zod.default.literal("file"),
11
+ path: _zod.default.string()
12
+ }), _zod.default.object({
13
+ type: _zod.default.literal("state"),
14
+ state: _zod.default.custom(v => v)
8
15
  })]);
9
- export const runApiParametersSchema = z.object({
10
- functionsToken: z.string().optional(),
11
- automationFunction: z.object({
12
- name: z.string(),
13
- params: z.any().optional()
16
+ const runApiParametersSchema = exports.runApiParametersSchema = _zod.default.object({
17
+ functionsToken: _zod.default.string().optional(),
18
+ automationFunction: _zod.default.object({
19
+ module: _zod.default.object({
20
+ default: _zod.default.function()
21
+ }, {
22
+ required_error: "API handler must have a default export function"
23
+ }),
24
+ params: _zod.default.any().optional()
14
25
  }),
15
- tracing: z.discriminatedUnion("enabled", [z.object({
16
- enabled: z.literal(false)
17
- }), z.object({
18
- enabled: z.literal(true),
19
- filePath: z.string()
26
+ tracing: _zod.default.discriminatedUnion("enabled", [_zod.default.object({
27
+ enabled: _zod.default.literal(false)
28
+ }), _zod.default.object({
29
+ enabled: _zod.default.literal(true),
30
+ filePath: _zod.default.string()
20
31
  })]).optional().default({
21
32
  enabled: false
22
33
  }),
23
- auth: z.object({
34
+ auth: _zod.default.object({
24
35
  session: runApiSessionSchema,
25
- runCheck: z.boolean().default(false)
36
+ runCheck: _zod.default.boolean().default(false)
26
37
  }).optional(),
27
- runOptions: z.discriminatedUnion("environment", [z.object({
28
- environment: z.literal("deployed"),
29
- headless: z.boolean().default(true),
30
- proxy: z.object({
31
- server: z.string(),
32
- username: z.string(),
33
- password: z.string()
38
+ runOptions: _zod.default.discriminatedUnion("environment", [_zod.default.object({
39
+ environment: _zod.default.literal("deployed"),
40
+ headless: _zod.default.boolean().default(true),
41
+ proxy: _zod.default.object({
42
+ server: _zod.default.string(),
43
+ username: _zod.default.string(),
44
+ password: _zod.default.string()
34
45
  }).optional()
35
- }), z.object({
36
- environment: z.literal("ide"),
37
- cdpAddress: z.string(),
38
- mode: z.union([z.literal("vanilla"), z.literal("playwright"), z.literal("playwright-standalone"), z.literal("playwright-headless")])
46
+ }), _zod.default.object({
47
+ environment: _zod.default.literal("ide"),
48
+ cdpAddress: _zod.default.string(),
49
+ mode: _zod.default.union([_zod.default.literal("vanilla"), _zod.default.literal("playwright"), _zod.default.literal("playwright-standalone"), _zod.default.literal("playwright-headless")])
39
50
  })]).default({
40
51
  environment: "deployed"
41
52
  }),
42
- retrieveSession: z.boolean().default(false)
53
+ retrieveSession: _zod.default.boolean().default(false)
43
54
  });
@@ -1,9 +1,17 @@
1
- import * as z from "zod";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.settingsSchema = void 0;
7
+ var z = _interopRequireWildcard(require("zod"));
8
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
2
10
  const authSessionsSchema = z.object({
3
11
  enabled: z.boolean()
4
12
  }).optional().default({
5
13
  enabled: false
6
14
  });
7
- export const settingsSchema = z.object({
15
+ const settingsSchema = exports.settingsSchema = z.object({
8
16
  authSessions: authSessionsSchema
9
17
  });
@@ -1,10 +1,19 @@
1
- import * as appInsights from "applicationinsights";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getTelemetryClient = getTelemetryClient;
7
+ exports.initializeAppInsights = initializeAppInsights;
8
+ var appInsights = _interopRequireWildcard(require("applicationinsights"));
9
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
10
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
2
11
  function gracefulShutdown() {
3
12
  console.log("Shutting down, so flushing app insights.");
4
13
  appInsights.defaultClient.flush();
5
14
  process.exit();
6
15
  }
7
- export function initializeAppInsights() {
16
+ function initializeAppInsights() {
8
17
  const appInsightsConnectionString = process.env.APPINSIGHTS_CONNECTION_STRING;
9
18
  if (appInsightsConnectionString) {
10
19
  console.log("Initializing app insights.");
@@ -18,6 +27,6 @@ export function initializeAppInsights() {
18
27
  appInsights.start();
19
28
  }
20
29
  }
21
- export function getTelemetryClient() {
30
+ function getTelemetryClient() {
22
31
  return appInsights.defaultClient;
23
32
  }
package/dist/index.js CHANGED
@@ -1,4 +1,69 @@
1
- export { extendPayload, extendTimeout, runInfo, RunError, requestMultipleChoice, requestOTP } from "./runtime/index.js";
2
- export { runWithContext, getExecutionContext } from "./common/asyncLocalStorage/index.js";
3
- export { getDownloadDirectoryPath } from "./runtime/downloadDirectory.js";
4
- export { getProductionPlaywrightConstructs } from "./common/getPlaywrightConstructs.js";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "RunError", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _index.RunError;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "extendPayload", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _index.extendPayload;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "extendTimeout", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _index.extendTimeout;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "getDownloadDirectoryPath", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _downloadDirectory.getDownloadDirectoryPath;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "getExecutionContext", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _index2.getExecutionContext;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "getProductionPlaywrightConstructs", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _getPlaywrightConstructs.getProductionPlaywrightConstructs;
40
+ }
41
+ });
42
+ Object.defineProperty(exports, "requestMultipleChoice", {
43
+ enumerable: true,
44
+ get: function () {
45
+ return _index.requestMultipleChoice;
46
+ }
47
+ });
48
+ Object.defineProperty(exports, "requestOTP", {
49
+ enumerable: true,
50
+ get: function () {
51
+ return _index.requestOTP;
52
+ }
53
+ });
54
+ Object.defineProperty(exports, "runInfo", {
55
+ enumerable: true,
56
+ get: function () {
57
+ return _index.runInfo;
58
+ }
59
+ });
60
+ Object.defineProperty(exports, "runWithContext", {
61
+ enumerable: true,
62
+ get: function () {
63
+ return _index2.runWithContext;
64
+ }
65
+ });
66
+ var _index = require("./runtime/index.js");
67
+ var _index2 = require("./common/asyncLocalStorage/index.js");
68
+ var _downloadDirectory = require("./runtime/downloadDirectory.js");
69
+ var _getPlaywrightConstructs = require("./common/getPlaywrightConstructs.js");
@@ -1,4 +1,10 @@
1
- export class RunError extends Error {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RunError = void 0;
7
+ class RunError extends Error {
2
8
  constructor(message, options) {
3
9
  super(message);
4
10
  this.message = message;
@@ -9,4 +15,5 @@ export class RunError extends Error {
9
15
  Object.setPrototypeOf(this, RunError.prototype);
10
16
  }
11
17
  }
18
+ exports.RunError = RunError;
12
19
  new RunError("", {});
@@ -1,12 +1,18 @@
1
- import { getExecutionContext } from "..";
2
- import { ensureDirSync } from "fs-extra";
3
- export function getDownloadDirectoryPath() {
4
- const context = getExecutionContext();
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getDownloadDirectoryPath = getDownloadDirectoryPath;
7
+ var _ = require("..");
8
+ var _fsExtra = require("fs-extra");
9
+ function getDownloadDirectoryPath() {
10
+ const context = (0, _.getExecutionContext)();
5
11
  if (!context) {
6
12
  throw new Error("ExecutionContext not found");
7
13
  }
8
14
  const path = `/tmp/downloads/${context.runId}`;
9
- ensureDirSync(path, {
15
+ (0, _fsExtra.ensureDirSync)(path, {
10
16
  mode: 0o2775
11
17
  });
12
18
  return path;
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,9 +1,15 @@
1
- export let RunEnvironment = function (RunEnvironment) {
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RunType = exports.RunEnvironment = void 0;
7
+ let RunEnvironment = exports.RunEnvironment = function (RunEnvironment) {
2
8
  RunEnvironment["IDE"] = "IDE";
3
9
  RunEnvironment["DEPLOYED"] = "DEPLOYED";
4
10
  return RunEnvironment;
5
11
  }({});
6
- export let RunType = function (RunType) {
12
+ let RunType = exports.RunType = function (RunType) {
7
13
  RunType["SYNC"] = "SYNC";
8
14
  RunType["ASYNC"] = "ASYNC";
9
15
  RunType["JOB"] = "JOB";
@@ -1,51 +1,53 @@
1
- import { describe, expect, it } from "vitest";
2
- import { getExecutionContext, runWithContext } from "../common/asyncLocalStorage";
3
- import { extendPayload, runInfo } from "./index.js";
4
- import { RunEnvironment } from "./enums.js";
5
- describe("Execution Helpers", () => {
6
- it("should be able to get execution info", () => {
7
- runWithContext({
8
- runEnvironment: RunEnvironment.IDE,
1
+ "use strict";
2
+
3
+ var _vitest = require("vitest");
4
+ var _asyncLocalStorage = require("../common/asyncLocalStorage");
5
+ var _index = require("./index.js");
6
+ var _enums = require("./enums.js");
7
+ (0, _vitest.describe)("Execution Helpers", () => {
8
+ (0, _vitest.it)("should be able to get execution info", () => {
9
+ (0, _asyncLocalStorage.runWithContext)({
10
+ runEnvironment: _enums.RunEnvironment.IDE,
9
11
  runId: "test-run-id",
10
12
  extendedPayloads: []
11
13
  }, () => {
12
- expect(runInfo().runId).toEqual("test-run-id");
14
+ (0, _vitest.expect)((0, _index.runInfo)().runId).toEqual("test-run-id");
13
15
  });
14
16
  });
15
- it("should be able to mutate extendedPayloads and get the accmulated value at the end ", () => {
17
+ (0, _vitest.it)("should be able to mutate extendedPayloads and get the accmulated value at the end ", () => {
16
18
  const context = {
17
19
  extendedPayloads: [],
18
20
  runId: "test-run-id"
19
21
  };
20
- runWithContext({
21
- runEnvironment: RunEnvironment.IDE,
22
+ (0, _asyncLocalStorage.runWithContext)({
23
+ runEnvironment: _enums.RunEnvironment.IDE,
22
24
  runId: "test-run-id",
23
25
  extendedPayloads: []
24
26
  }, () => {
25
27
  var _getExecutionContext, _getExecutionContext2;
26
- expect((_getExecutionContext = getExecutionContext()) === null || _getExecutionContext === void 0 ? void 0 : _getExecutionContext.extendedPayloads).toEqual([]);
27
- extendPayload({
28
+ (0, _vitest.expect)((_getExecutionContext = (0, _asyncLocalStorage.getExecutionContext)()) === null || _getExecutionContext === void 0 ? void 0 : _getExecutionContext.extendedPayloads).toEqual([]);
29
+ (0, _index.extendPayload)({
28
30
  api: "test-api",
29
31
  parameters: {}
30
32
  });
31
- expect((_getExecutionContext2 = getExecutionContext()) === null || _getExecutionContext2 === void 0 ? void 0 : _getExecutionContext2.extendedPayloads).toEqual([{
33
+ (0, _vitest.expect)((_getExecutionContext2 = (0, _asyncLocalStorage.getExecutionContext)()) === null || _getExecutionContext2 === void 0 ? void 0 : _getExecutionContext2.extendedPayloads).toEqual([{
32
34
  api: "test-api",
33
35
  parameters: {}
34
36
  }]);
35
- extendPayload({
37
+ (0, _index.extendPayload)({
36
38
  api: "test-api",
37
39
  parameters: {}
38
40
  });
39
- extendPayload({
41
+ (0, _index.extendPayload)({
40
42
  api: "test-api",
41
43
  parameters: {}
42
44
  });
43
- extendPayload({
45
+ (0, _index.extendPayload)({
44
46
  api: "test-api",
45
47
  parameters: {}
46
48
  });
47
- const context = getExecutionContext();
48
- expect(context === null || context === void 0 ? void 0 : context.extendedPayloads).toHaveLength(4);
49
+ const context = (0, _asyncLocalStorage.getExecutionContext)();
50
+ (0, _vitest.expect)(context === null || context === void 0 ? void 0 : context.extendedPayloads).toHaveLength(4);
49
51
  });
50
52
  });
51
53
  });
@@ -1 +1,5 @@
1
- export {};
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
@@ -1,7 +1,13 @@
1
- import { getExecutionContext } from "../common/asyncLocalStorage";
2
- import { extendTimeout } from "./extendTimeout.js";
3
- export function extendPayload(payload) {
4
- const context = getExecutionContext();
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.extendPayload = extendPayload;
7
+ var _asyncLocalStorage = require("../common/asyncLocalStorage");
8
+ var _extendTimeout = require("./extendTimeout.js");
9
+ function extendPayload(payload) {
10
+ const context = (0, _asyncLocalStorage.getExecutionContext)();
5
11
  if (!context) {
6
12
  throw new Error("extendPayload failed due to an internal error.");
7
13
  }
@@ -11,5 +17,5 @@ export function extendPayload(payload) {
11
17
  return;
12
18
  }
13
19
  context === null || context === void 0 || context.extendedPayloads.push(...items);
14
- extendTimeout();
20
+ (0, _extendTimeout.extendTimeout)();
15
21
  }
@@ -1,7 +1,13 @@
1
- import { getExecutionContext } from "../common/asyncLocalStorage";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.extendTimeout = extendTimeout;
7
+ var _asyncLocalStorage = require("../common/asyncLocalStorage");
2
8
  const _DEBOUNCE_TIME = 60_000;
3
- export function extendTimeout() {
4
- const context = getExecutionContext();
9
+ function extendTimeout() {
10
+ const context = (0, _asyncLocalStorage.getExecutionContext)();
5
11
  if (!context) {
6
12
  throw new Error("extendTimeout failed due to an internal error.");
7
13
  }
@@ -1,6 +1,53 @@
1
- export { extendPayload } from "./extendPayload.js";
2
- export { extendTimeout } from "./extendTimeout.js";
3
- export { runInfo } from "./runInfo.js";
4
- export { RunError } from "./RunError.js";
5
- export { requestMultipleChoice, requestOTP } from "./requestMoreInfo.js";
6
- export { getDownloadDirectoryPath } from "./downloadDirectory.js";
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "RunError", {
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.js");
49
+ var _extendTimeout = require("./extendTimeout.js");
50
+ var _runInfo = require("./runInfo.js");
51
+ var _RunError = require("./RunError.js");
52
+ var _requestMoreInfo = require("./requestMoreInfo.js");
53
+ var _downloadDirectory = require("./downloadDirectory.js");
@@ -1,5 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.requestMultipleChoice = requestMultipleChoice;
7
+ exports.requestOTP = requestOTP;
1
8
  const REQUEST_MORE_INFO_KEY = Symbol("REQUEST_MORE_INFO");
2
- export function requestOTP(messageToUser) {
9
+ function requestOTP(messageToUser) {
3
10
  return {
4
11
  [REQUEST_MORE_INFO_KEY]: true,
5
12
  action: "request_more_info",
@@ -7,7 +14,7 @@ export function requestOTP(messageToUser) {
7
14
  requestType: "otp"
8
15
  };
9
16
  }
10
- export function requestMultipleChoice(messageToUser, choices) {
17
+ function requestMultipleChoice(messageToUser, choices) {
11
18
  return {
12
19
  [REQUEST_MORE_INFO_KEY]: true,
13
20
  action: "request_more_info",
@@ -1,10 +1,16 @@
1
- import { getExecutionContext } from "../common/asyncLocalStorage";
2
- import { RunEnvironment } from "./enums.js";
3
- export function runInfo() {
4
- const context = getExecutionContext();
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.runInfo = runInfo;
7
+ var _asyncLocalStorage = require("../common/asyncLocalStorage");
8
+ var _enums = require("./enums.js");
9
+ function runInfo() {
10
+ const context = (0, _asyncLocalStorage.getExecutionContext)();
5
11
  if (!context) {
6
12
  return {
7
- runEnvironment: RunEnvironment.IDE
13
+ runEnvironment: _enums.RunEnvironment.IDE
8
14
  };
9
15
  }
10
16
  const {
package/package.json CHANGED
@@ -1,11 +1,10 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "type": "module",
4
- "version": "0.1.0-test.15",
3
+ "version": "0.1.0-test.17",
5
4
  "description": "Intuned runtime",
6
5
  "exports": {
7
6
  ".": "./dist/index.js",
8
- "./dist/runtime": "./dist/runtime/index.js",
7
+ "./runtime": "./dist/runtime/index.js",
9
8
  "./dist/common/runApi": "./dist/common/runApi/index.js",
10
9
  "./dist/common/settingsSchema": "./dist/common/settingsSchema.js",
11
10
  "./dist/common/contextStorageStateHelpers": "./dist/common/contextStorageStateHelpers.js",
@@ -13,8 +12,7 @@
13
12
  "./dist/common/jwtTokenManager": "./dist/common/jwtTokenManager.js",
14
13
  "./dist/common/asyncLocalStorage": "./dist/common/asyncLocalStorage/index.js",
15
14
  "./dist/common/cleanEnvironmentVariables": "./dist/common/cleanEnvironmentVariables.js",
16
- "./dist/common/constants": "./dist/common/constants.js",
17
- "./dist/commands/interface/run": "./dist/commands/interface/run.js"
15
+ "./dist/common/constants": "./dist/common/constants.js"
18
16
  },
19
17
  "types": "./dist/index.d.ts",
20
18
  "author": "Intuned Team",
File without changes