@intuned/runtime-dev 1.1.8-bot-detection → 1.2.0-cli.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 (104) hide show
  1. package/.babelrc +2 -2
  2. package/CHANGELOG.md +5 -1
  3. package/WebTemplate.zip +0 -0
  4. package/bin/intuned +2 -0
  5. package/dist/commands/api/run.js +8 -2
  6. package/dist/commands/auth-sessions/run-check.js +18 -4
  7. package/dist/commands/auth-sessions/run-create.js +2 -1
  8. package/dist/commands/cli-auth-sessions/create.js +1 -1
  9. package/dist/commands/cli-auth-sessions/utils.d.ts +1 -1
  10. package/dist/commands/cli-auth-sessions/utils.js +2 -3
  11. package/dist/commands/common/browserUtils.d.ts +1 -1
  12. package/dist/commands/common/browserUtils.js +1 -1
  13. package/dist/commands/common/getFirstLineNumber.js +2 -4
  14. package/dist/commands/deploy/utils.js +1 -2
  15. package/dist/commands/init/utils.js +1 -7
  16. package/dist/commands/interface/run.js +7 -6
  17. package/dist/commands/intuned-cli/commands/attempt.command.d.ts +1 -0
  18. package/dist/commands/intuned-cli/commands/attempt.command.js +8 -0
  19. package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +1 -0
  20. package/dist/commands/intuned-cli/commands/attempt_api.command.js +40 -0
  21. package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +1 -0
  22. package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +8 -0
  23. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +1 -0
  24. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +24 -0
  25. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +1 -0
  26. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +36 -0
  27. package/dist/commands/intuned-cli/commands/build.command.d.ts +1 -0
  28. package/dist/commands/intuned-cli/commands/build.command.js +12 -0
  29. package/dist/commands/intuned-cli/commands/command.d.ts +2 -0
  30. package/dist/commands/intuned-cli/commands/command.js +9 -0
  31. package/dist/commands/intuned-cli/commands/deploy.command.d.ts +1 -0
  32. package/dist/commands/intuned-cli/commands/deploy.command.js +47 -0
  33. package/dist/commands/intuned-cli/commands/helpers.d.ts +26 -0
  34. package/dist/commands/intuned-cli/commands/helpers.js +134 -0
  35. package/dist/commands/intuned-cli/commands/index.d.ts +15 -0
  36. package/dist/commands/intuned-cli/commands/index.js +170 -0
  37. package/dist/commands/intuned-cli/commands/init.command.d.ts +1 -0
  38. package/dist/commands/intuned-cli/commands/init.command.js +14 -0
  39. package/dist/commands/intuned-cli/commands/run.command.d.ts +1 -0
  40. package/dist/commands/intuned-cli/commands/run.command.js +8 -0
  41. package/dist/commands/intuned-cli/commands/run_api.command.d.ts +1 -0
  42. package/dist/commands/intuned-cli/commands/run_api.command.js +54 -0
  43. package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +21 -0
  44. package/dist/commands/intuned-cli/commands/run_authsession.command.js +13 -0
  45. package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +1 -0
  46. package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +39 -0
  47. package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +1 -0
  48. package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +39 -0
  49. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +1 -0
  50. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +37 -0
  51. package/dist/commands/intuned-cli/commands/types.d.ts +21 -0
  52. package/dist/commands/intuned-cli/commands/types.js +21 -0
  53. package/dist/commands/intuned-cli/controller/api.d.ts +19 -0
  54. package/dist/commands/intuned-cli/controller/api.js +182 -0
  55. package/dist/commands/intuned-cli/controller/authSession.d.ts +32 -0
  56. package/dist/commands/intuned-cli/controller/authSession.js +295 -0
  57. package/dist/commands/intuned-cli/controller/build.d.ts +1 -0
  58. package/dist/commands/intuned-cli/controller/build.js +36 -0
  59. package/dist/commands/intuned-cli/controller/deploy.d.ts +15 -0
  60. package/dist/commands/intuned-cli/controller/deploy.js +397 -0
  61. package/dist/commands/intuned-cli/controller/index.d.ts +1 -0
  62. package/dist/commands/intuned-cli/controller/index.js +45 -0
  63. package/dist/commands/intuned-cli/controller/init.d.ts +5 -0
  64. package/dist/commands/intuned-cli/controller/init.js +139 -0
  65. package/dist/commands/intuned-cli/index.d.ts +1 -0
  66. package/dist/commands/intuned-cli/index.js +16 -0
  67. package/dist/commands/intuned-cli/main.d.ts +1 -0
  68. package/dist/commands/intuned-cli/main.js +12 -0
  69. package/dist/commands/intuned-cli/terminal.d.ts +1 -0
  70. package/dist/commands/intuned-cli/terminal.js +12 -0
  71. package/dist/commands/run-api-cli/utils.js +6 -6
  72. package/dist/common/assets/browser_scripts.js +2509 -2143
  73. package/dist/common/asyncLocalStorage/index.d.ts +1 -2
  74. package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +1 -0
  75. package/dist/common/backendFunctions/getAuthSessionParameters.js +38 -0
  76. package/dist/common/cli/cliReadme.d.ts +1 -1
  77. package/dist/common/cli/cliReadme.js +14 -23
  78. package/dist/common/cli/constants.d.ts +4 -2
  79. package/dist/common/cli/constants.js +7 -3
  80. package/dist/common/cli/types.d.ts +2 -2
  81. package/dist/common/cli/utils.d.ts +5 -2
  82. package/dist/common/cli/utils.js +6 -2
  83. package/dist/common/constants.d.ts +1 -0
  84. package/dist/common/constants.js +2 -1
  85. package/dist/common/contextStorageStateHelpers.d.ts +1 -1
  86. package/dist/common/getPlaywrightConstructs.d.ts +1 -1
  87. package/dist/common/getPlaywrightConstructs.js +12 -12
  88. package/dist/common/jwtTokenManager.js +3 -5
  89. package/dist/common/runApi/errors.d.ts +1 -1
  90. package/dist/common/runApi/errors.js +5 -6
  91. package/dist/common/runApi/index.d.ts +4 -1
  92. package/dist/common/runApi/index.js +21 -21
  93. package/dist/index.d.ts +1 -1
  94. package/dist/index.js +6 -0
  95. package/dist/runtime/executionHelpers.test.js +3 -4
  96. package/dist/runtime/export.d.ts +16 -0
  97. package/dist/runtime/extendPayload.js +1 -1
  98. package/dist/runtime/extendTimeout.js +0 -7
  99. package/dist/runtime/getAuthSessionParameters.d.ts +1 -0
  100. package/dist/runtime/getAuthSessionParameters.js +20 -0
  101. package/dist/runtime/index.d.ts +1 -0
  102. package/dist/runtime/index.js +7 -0
  103. package/package.json +10 -7
  104. package/template.tsconfig.json +4 -7
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getAuthSessionParameters = getAuthSessionParameters;
7
+ var _asyncLocalStorage = require("../common/asyncLocalStorage");
8
+ async function getAuthSessionParameters() {
9
+ const context = (0, _asyncLocalStorage.getExecutionContext)();
10
+ if (!context) {
11
+ throw new Error("getAuthSessionParameters failed due to an internal error (context was not found).");
12
+ }
13
+ const {
14
+ getAuthSessionParameters
15
+ } = context;
16
+ if (!getAuthSessionParameters) {
17
+ throw new Error("getAuthSessionParameters failed due to an internal error (helper was not found on context).");
18
+ }
19
+ return await getAuthSessionParameters();
20
+ }
@@ -1,5 +1,6 @@
1
1
  export { extendPayload } from "./extendPayload";
2
2
  export { extendTimeout } from "./extendTimeout";
3
+ export { getAuthSessionParameters } from "./getAuthSessionParameters";
3
4
  export { runInfo } from "./runInfo";
4
5
  export { RunError } from "./RunError";
5
6
  export { requestMultipleChoice, requestOTP } from "./requestMoreInfo";
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "extendTimeout", {
21
21
  return _extendTimeout.extendTimeout;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "getAuthSessionParameters", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _getAuthSessionParameters.getAuthSessionParameters;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "getDownloadDirectoryPath", {
25
31
  enumerable: true,
26
32
  get: function () {
@@ -47,6 +53,7 @@ Object.defineProperty(exports, "runInfo", {
47
53
  });
48
54
  var _extendPayload = require("./extendPayload");
49
55
  var _extendTimeout = require("./extendTimeout");
56
+ var _getAuthSessionParameters = require("./getAuthSessionParameters");
50
57
  var _runInfo = require("./runInfo");
51
58
  var _RunError = require("./RunError");
52
59
  var _requestMoreInfo = require("./requestMoreInfo");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.1.8-bot-detection",
3
+ "version": "1.2.0-cli.1",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -29,6 +29,7 @@
29
29
  "intuned-auth-session-refresh": "vite-node ./src/commands/auth/run-refresh.ts",
30
30
  "intuned-auth-session-load": "vite-node ./src/commands/auth/load.ts",
31
31
  "intuned-ts-check": "yarn prepublishOnly && vite-node ./src/commands/ts-check.ts",
32
+ "intuned": "vite-node ./src/commands/intuned-cli/main.ts",
32
33
  "build": "rm -rf dist && tsc -p tsconfig.json && yarn copy-dts && babel src --out-dir dist --extensions '.ts' && cp -r ./src/common/assets dist/common/assets",
33
34
  "test": "vitest run",
34
35
  "test:watch": "vitest",
@@ -55,7 +56,8 @@
55
56
  "deploy": "./bin/deploy",
56
57
  "cli-build": "./bin/cli-build",
57
58
  "create-auth-session": "./bin/create-auth-session",
58
- "check-auth-session": "./bin/check-auth-session"
59
+ "check-auth-session": "./bin/check-auth-session",
60
+ "intuned": "./bin/intuned"
59
61
  },
60
62
  "dependencies": {
61
63
  "@babel/plugin-syntax-dynamic-import": "7.8.3",
@@ -69,9 +71,8 @@
69
71
  "@types/node": "20.4.1",
70
72
  "applicationinsights": "2.9.2",
71
73
  "babel-plugin-dynamic-import-node": "2.3.3",
72
- "boxen": "8.0.1",
73
74
  "chalk": "^4.1.2",
74
- "commander": "^11.0.0",
75
+ "commander": "14.0.0",
75
76
  "cross-fetch": "^4.0.0",
76
77
  "dotenv": "^16.3.1",
77
78
  "fs-extra": "^11.3.0",
@@ -83,12 +84,12 @@
83
84
  "minimatch": "10.0.1",
84
85
  "nanoid": "3",
85
86
  "neverthrow": "6.1.0",
86
- "patchright": "1.52.4",
87
87
  "playwright-extra": "4.3.6",
88
88
  "prettier": "2.8.0",
89
89
  "promptly": "3.2.0",
90
90
  "rollup": "3.26.2",
91
91
  "source-map": "0.7.4",
92
+ "terminal-kit": "^3.1.2",
92
93
  "ts-morph": "21.0.1",
93
94
  "ts-node": "10.9.1",
94
95
  "tslib": "2.6.0",
@@ -107,7 +108,9 @@
107
108
  "@ngneat/falso": "^7.2.0",
108
109
  "@types/jest": "^29.5.3",
109
110
  "@types/jsdom": "^21.1.1",
111
+ "@types/ms": "^2.1.0",
110
112
  "@types/promptly": "^3.0.4",
113
+ "@types/terminal-kit": "^2.5.7",
111
114
  "@types/wait-on": "^5.3.4",
112
115
  "@typescript-eslint/eslint-plugin": "^5.47.1",
113
116
  "@typescript-eslint/parser": "^7.5.0",
@@ -131,6 +134,6 @@
131
134
  "vitest": "^1.1.3"
132
135
  },
133
136
  "peerDependencies": {
134
- "@intuned/runtime": "*"
137
+ "playwright": "*"
135
138
  }
136
- }
139
+ }
@@ -1,14 +1,11 @@
1
1
  {
2
2
  "compilerOptions": {
3
- "module": "ESNext",
4
3
  "target": "ES2021",
5
- "lib": [
6
- "dom",
7
- "es2021"
8
- ],
4
+ "lib": ["dom", "es2021"],
9
5
  "resolveJsonModule": true,
10
6
  "esModuleInterop": true,
11
- "moduleResolution": "node",
7
+ "moduleResolution": "bundler",
8
+ "module": "esnext",
12
9
  "skipLibCheck": true
13
10
  }
14
- }
11
+ }