@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.
Files changed (46) hide show
  1. package/.babelrc +0 -2
  2. package/InterfaceTemplate/index.playwright.ts +5 -0
  3. package/InterfaceTemplate/utils.ts +39 -0
  4. package/WebTemplate/api.ts +90 -92
  5. package/WebTemplate/controllers/async.ts +52 -48
  6. package/WebTemplate/controllers/authSessions/check.ts +4 -5
  7. package/WebTemplate/controllers/authSessions/create.ts +6 -8
  8. package/WebTemplate/controllers/authSessions/resumeOperation.ts +1 -1
  9. package/WebTemplate/controllers/runApi/helpers.ts +13 -8
  10. package/WebTemplate/index.playwright.ts +32 -42
  11. package/WebTemplate/jobs.ts +13 -2
  12. package/WebTemplate/utils.ts +48 -1
  13. package/api/test2.ts +6 -1
  14. package/auth-sessions/check.ts +3 -1
  15. package/auth-sessions/create.ts +10 -10
  16. package/bin/intuned-ts-check +1 -1
  17. package/dist/commands/api/run.js +7 -5
  18. package/dist/commands/auth-sessions/run-check.js +9 -3
  19. package/dist/commands/auth-sessions/run-create.js +11 -6
  20. package/dist/commands/build.js +17 -12
  21. package/dist/commands/common/tsNodeImport.d.ts +1 -0
  22. package/dist/commands/common/tsNodeImport.js +20 -0
  23. package/dist/commands/common/utils/settings.js +5 -5
  24. package/dist/commands/common/utils/template.d.ts +2 -0
  25. package/dist/commands/common/utils/{webTemplate.js → template.js} +7 -7
  26. package/dist/commands/interface/run.d.ts +1 -2
  27. package/dist/commands/interface/run.js +150 -110
  28. package/dist/commands/ts-check.js +9 -7
  29. package/dist/common/formatZodError.d.ts +2 -0
  30. package/dist/common/formatZodError.js +18 -0
  31. package/dist/common/getPlaywrightConstructs.js +6 -2
  32. package/dist/common/runApi/errors.d.ts +8 -3
  33. package/dist/common/runApi/errors.js +26 -3
  34. package/dist/common/runApi/index.d.ts +1 -1
  35. package/dist/common/runApi/index.js +37 -65
  36. package/dist/common/runApi/types.d.ts +287 -71
  37. package/dist/common/runApi/types.js +29 -5
  38. package/dist/runtime/executionHelpers.test.js +6 -6
  39. package/package.json +1 -1
  40. package/tsconfig.json +1 -2
  41. package/InterfaceTemplate/index.ts +0 -1
  42. package/dist/commands/common/getDefaultExportFromFile.d.ts +0 -1
  43. package/dist/commands/common/getDefaultExportFromFile.js +0 -17
  44. package/dist/commands/common/utils/webTemplate.d.ts +0 -1
  45. package/preserve-dynamic-imports.js +0 -16
  46. 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 _index = require("./index");
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, _index.runInfo)().runId).toEqual("test-run-id");
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, _index.extendPayload)({
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, _index.extendPayload)({
37
+ (0, _.extendPayload)({
38
38
  api: "test-api",
39
39
  parameters: {}
40
40
  });
41
- (0, _index.extendPayload)({
41
+ (0, _.extendPayload)({
42
42
  api: "test-api",
43
43
  parameters: {}
44
44
  });
45
- (0, _index.extendPayload)({
45
+ (0, _.extendPayload)({
46
46
  api: "test-api",
47
47
  parameters: {}
48
48
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "0.1.0-test.9",
3
+ "version": "1.0.0-udas.1",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
package/tsconfig.json CHANGED
@@ -12,8 +12,7 @@
12
12
  "sourceMap": false,
13
13
  "declaration": true,
14
14
  "emitDeclarationOnly": false,
15
- "skipLibCheck": true,
16
- "baseUrl": "./"
15
+ "skipLibCheck": true
17
16
  },
18
17
  "include": [
19
18
  "src/**/*.ts",
@@ -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