@intuned/runtime 1.3.18-interface.7 → 1.3.18

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 (299) hide show
  1. package/.babelrc +27 -0
  2. package/.claude/settings.local.json +7 -0
  3. package/.eslintignore +10 -0
  4. package/.eslintrc.js +39 -0
  5. package/InterfaceTemplate/__utils.ts +63 -0
  6. package/InterfaceTemplate/index.playwright.ts +6 -0
  7. package/dist/commands/api/run.d.ts +6 -0
  8. package/dist/commands/api/run.js +119 -0
  9. package/dist/commands/auth-sessions/load.d.ts +2 -0
  10. package/dist/commands/auth-sessions/load.js +35 -0
  11. package/dist/commands/auth-sessions/run-check.d.ts +2 -0
  12. package/dist/commands/auth-sessions/run-check.js +74 -0
  13. package/dist/commands/auth-sessions/run-create.d.ts +2 -0
  14. package/dist/commands/auth-sessions/run-create.js +78 -0
  15. package/dist/commands/browser/save-state.d.ts +2 -0
  16. package/dist/commands/browser/save-state.js +17 -0
  17. package/dist/commands/browser/start-browser.d.ts +2 -0
  18. package/dist/commands/browser/start-browser.js +14 -0
  19. package/dist/commands/build.d.ts +1 -0
  20. package/dist/commands/build.js +83 -0
  21. package/dist/commands/common/browserUtils.d.ts +14 -0
  22. package/dist/commands/common/browserUtils.js +57 -0
  23. package/dist/commands/common/getFirstLineNumber.d.ts +9 -0
  24. package/dist/commands/common/getFirstLineNumber.js +101 -0
  25. package/dist/commands/common/getFirstLineNumber.test.js +227 -0
  26. package/dist/commands/common/projectExclusions.d.ts +2 -0
  27. package/dist/commands/common/projectExclusions.js +8 -0
  28. package/dist/commands/common/sendMessageToClient.d.ts +1 -0
  29. package/dist/commands/common/sendMessageToClient.js +10 -0
  30. package/dist/commands/common/tsNodeImport.d.ts +2 -0
  31. package/dist/commands/common/tsNodeImport.js +42 -0
  32. package/dist/commands/common/utils/fileUtils.d.ts +6 -0
  33. package/dist/commands/common/utils/fileUtils.js +32 -0
  34. package/dist/commands/common/utils/interfaceClient.d.ts +31 -0
  35. package/dist/commands/common/utils/interfaceClient.js +98 -0
  36. package/dist/commands/common/utils/settings.d.ts +2 -0
  37. package/dist/commands/common/utils/settings.js +31 -0
  38. package/dist/commands/common/utils/template.d.ts +2 -0
  39. package/dist/commands/common/utils/template.js +30 -0
  40. package/dist/commands/get-headless-user-agent.d.ts +1 -0
  41. package/dist/commands/get-headless-user-agent.js +18 -0
  42. package/dist/commands/interface/run.d.ts +1 -3
  43. package/dist/commands/interface/run.js +139 -2047
  44. package/dist/commands/intuned-cli/commands/attempt.command.d.ts +1 -0
  45. package/dist/commands/intuned-cli/commands/attempt.command.js +8 -0
  46. package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +1 -0
  47. package/dist/commands/intuned-cli/commands/attempt_api.command.js +30 -0
  48. package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +1 -0
  49. package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +8 -0
  50. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +1 -0
  51. package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +19 -0
  52. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +1 -0
  53. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +24 -0
  54. package/dist/commands/intuned-cli/commands/authsession.command.d.ts +1 -0
  55. package/dist/commands/intuned-cli/commands/authsession.command.js +8 -0
  56. package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +1 -0
  57. package/dist/commands/intuned-cli/commands/authsession_record.command.js +32 -0
  58. package/dist/commands/intuned-cli/commands/authsession_scaffold.command.d.ts +1 -0
  59. package/dist/commands/intuned-cli/commands/authsession_scaffold.command.js +16 -0
  60. package/dist/commands/intuned-cli/commands/build.command.d.ts +1 -0
  61. package/dist/commands/intuned-cli/commands/build.command.js +12 -0
  62. package/dist/commands/intuned-cli/commands/command.d.ts +2 -0
  63. package/dist/commands/intuned-cli/commands/command.js +9 -0
  64. package/dist/commands/intuned-cli/commands/deploy.command.d.ts +1 -0
  65. package/dist/commands/intuned-cli/commands/deploy.command.js +42 -0
  66. package/dist/commands/intuned-cli/commands/index.d.ts +18 -0
  67. package/dist/commands/intuned-cli/commands/index.js +203 -0
  68. package/dist/commands/intuned-cli/commands/provision.command.d.ts +13 -0
  69. package/dist/commands/intuned-cli/commands/provision.command.js +50 -0
  70. package/dist/commands/intuned-cli/commands/run.command.d.ts +1 -0
  71. package/dist/commands/intuned-cli/commands/run.command.js +8 -0
  72. package/dist/commands/intuned-cli/commands/run_api.command.d.ts +1 -0
  73. package/dist/commands/intuned-cli/commands/run_api.command.js +46 -0
  74. package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +35 -0
  75. package/dist/commands/intuned-cli/commands/run_authsession.command.js +17 -0
  76. package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +1 -0
  77. package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +35 -0
  78. package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +1 -0
  79. package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +35 -0
  80. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +1 -0
  81. package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +33 -0
  82. package/dist/commands/intuned-cli/commands/types.d.ts +39 -0
  83. package/dist/commands/intuned-cli/commands/types.js +33 -0
  84. package/dist/commands/intuned-cli/constants/index.d.ts +17 -0
  85. package/dist/commands/intuned-cli/constants/index.js +25 -0
  86. package/dist/commands/intuned-cli/controller/__test__/api.test.js +399 -0
  87. package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +1061 -0
  88. package/dist/commands/intuned-cli/controller/api.d.ts +42 -0
  89. package/dist/commands/intuned-cli/controller/api.js +194 -0
  90. package/dist/commands/intuned-cli/controller/authSession.d.ts +209 -0
  91. package/dist/commands/intuned-cli/controller/authSession.js +425 -0
  92. package/dist/commands/intuned-cli/controller/build.d.ts +1 -0
  93. package/dist/commands/intuned-cli/controller/build.js +35 -0
  94. package/dist/commands/intuned-cli/controller/deploy.d.ts +5 -0
  95. package/dist/commands/intuned-cli/controller/deploy.js +317 -0
  96. package/dist/commands/intuned-cli/controller/index.d.ts +1 -0
  97. package/dist/commands/intuned-cli/controller/index.js +45 -0
  98. package/dist/commands/intuned-cli/controller/provision.d.ts +21 -0
  99. package/dist/commands/intuned-cli/controller/provision.js +299 -0
  100. package/dist/commands/intuned-cli/controller/scaffold.d.ts +1 -0
  101. package/dist/commands/intuned-cli/controller/scaffold.js +77 -0
  102. package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +152 -0
  103. package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +41 -0
  104. package/dist/commands/intuned-cli/helpers/api.d.ts +3 -0
  105. package/dist/commands/intuned-cli/helpers/api.js +16 -0
  106. package/dist/commands/intuned-cli/helpers/auth.d.ts +46 -0
  107. package/dist/commands/intuned-cli/helpers/auth.js +147 -0
  108. package/dist/commands/intuned-cli/helpers/backend.d.ts +8 -0
  109. package/dist/commands/intuned-cli/helpers/backend.js +35 -0
  110. package/dist/commands/intuned-cli/helpers/browser.d.ts +14 -0
  111. package/dist/commands/intuned-cli/helpers/browser.js +93 -0
  112. package/dist/commands/intuned-cli/helpers/context.d.ts +3 -0
  113. package/dist/commands/intuned-cli/helpers/context.js +33 -0
  114. package/dist/commands/intuned-cli/helpers/errors.d.ts +16 -0
  115. package/dist/commands/intuned-cli/helpers/errors.js +44 -0
  116. package/dist/commands/intuned-cli/helpers/index.d.ts +12 -0
  117. package/dist/commands/intuned-cli/helpers/index.js +137 -0
  118. package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +39 -0
  119. package/dist/commands/intuned-cli/helpers/intunedJson.js +20 -0
  120. package/dist/commands/intuned-cli/helpers/prompts.d.ts +3 -0
  121. package/dist/commands/intuned-cli/helpers/prompts.js +71 -0
  122. package/dist/commands/intuned-cli/helpers/proxy.d.ts +5 -0
  123. package/dist/commands/intuned-cli/helpers/proxy.js +23 -0
  124. package/dist/commands/intuned-cli/helpers/terminal.d.ts +5 -0
  125. package/dist/commands/intuned-cli/helpers/terminal.js +13 -0
  126. package/dist/commands/intuned-cli/helpers/timeout.d.ts +1 -0
  127. package/dist/commands/intuned-cli/helpers/timeout.js +23 -0
  128. package/dist/commands/intuned-cli/helpers/traces.d.ts +2 -0
  129. package/dist/commands/intuned-cli/helpers/traces.js +32 -0
  130. package/dist/commands/intuned-cli/helpers/validation.d.ts +2 -0
  131. package/dist/commands/intuned-cli/helpers/validation.js +14 -0
  132. package/dist/commands/intuned-cli/helpers/wrapper.d.ts +2 -0
  133. package/dist/commands/intuned-cli/helpers/wrapper.js +76 -0
  134. package/dist/commands/intuned-cli/index.d.ts +1 -0
  135. package/dist/commands/intuned-cli/index.js +16 -0
  136. package/dist/commands/intuned-cli/main.d.ts +1 -0
  137. package/dist/commands/intuned-cli/main.js +35 -0
  138. package/dist/commands/intuned-cli/types.d.ts +70 -0
  139. package/dist/commands/intuned-cli/types.js +22 -0
  140. package/dist/commands/ts-check.d.ts +2 -0
  141. package/dist/commands/ts-check.js +55 -0
  142. package/dist/common/Logger/Logger/index.d.ts +12 -0
  143. package/dist/common/Logger/Logger/index.js +60 -0
  144. package/dist/common/Logger/Logger/types.d.ts +8 -0
  145. package/dist/common/Logger/Logger/types.js +5 -0
  146. package/dist/common/Logger/index.d.ts +12 -0
  147. package/dist/common/Logger/index.js +60 -0
  148. package/dist/common/Logger/types.d.ts +8 -0
  149. package/dist/common/Logger/types.js +5 -0
  150. package/dist/common/asyncLocalStorage/index.d.ts +8 -9
  151. package/dist/common/asyncLocalStorage/index.js +9 -34
  152. package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +1 -0
  153. package/dist/common/backendFunctions/getAuthSessionParameters.js +38 -0
  154. package/dist/common/binStartupScript.d.ts +1 -2
  155. package/dist/common/binStartupScript.js +10 -127
  156. package/dist/common/browserTabs.d.ts +72 -0
  157. package/dist/common/browserTabs.js +74 -0
  158. package/dist/common/cleanEnvironmentVariables.d.ts +1 -3
  159. package/dist/common/cleanEnvironmentVariables.js +7 -30
  160. package/dist/common/constants.d.ts +11 -13
  161. package/dist/common/constants.js +15 -58
  162. package/dist/common/contextStorageStateHelpers.d.ts +6 -8
  163. package/dist/common/contextStorageStateHelpers.js +22 -47
  164. package/dist/common/extension/extensionsHelpers.d.ts +11 -0
  165. package/dist/common/extension/extensionsHelpers.js +147 -0
  166. package/dist/common/extension/intunedExtensionServer.d.ts +24 -0
  167. package/dist/common/extension/intunedExtensionServer.js +178 -0
  168. package/dist/common/extension/types.d.ts +219 -0
  169. package/dist/common/extension/types.js +51 -0
  170. package/dist/common/formatZodError.d.ts +2 -0
  171. package/dist/{chunk-NDMVGENG.mjs → common/formatZodError.js} +9 -9
  172. package/dist/common/intunedJson.d.ts +229 -0
  173. package/dist/common/intunedJson.js +132 -0
  174. package/dist/common/jwtTokenManager.d.ts +4 -6
  175. package/dist/common/jwtTokenManager.js +40 -108
  176. package/dist/common/launchBrowser.d.ts +34 -0
  177. package/dist/common/launchBrowser.js +247 -0
  178. package/dist/common/playwrightContext.d.ts +29 -0
  179. package/dist/common/playwrightContext.js +148 -0
  180. package/dist/common/runApi/importUsingImportFunction.d.ts +7 -0
  181. package/dist/common/runApi/importUsingImportFunction.js +46 -0
  182. package/dist/common/runApi/index.d.ts +6 -9
  183. package/dist/common/runApi/index.js +73 -1782
  184. package/dist/common/settingsSchema.d.ts +6 -9
  185. package/dist/common/settingsSchema.js +18 -54
  186. package/dist/common/setupContextHook.d.ts +16 -0
  187. package/dist/common/setupContextHook.js +22 -0
  188. package/dist/common/telemetry.d.ts +3 -6
  189. package/dist/common/telemetry.js +8 -41
  190. package/dist/index.d.ts +4 -6
  191. package/dist/index.js +92 -784
  192. package/dist/runtime/RunError.d.ts +5 -0
  193. package/dist/runtime/RunError.js +19 -0
  194. package/dist/runtime/attemptStore.d.ts +2 -0
  195. package/dist/runtime/attemptStore.js +23 -0
  196. package/dist/runtime/captcha.d.ts +15 -0
  197. package/dist/runtime/captcha.js +191 -0
  198. package/dist/runtime/captcha.test.js +821 -0
  199. package/dist/runtime/downloadDirectory.d.ts +1 -0
  200. package/dist/runtime/downloadDirectory.js +19 -0
  201. package/dist/runtime/enums.d.js +5 -0
  202. package/dist/runtime/enums.d.ts +11 -0
  203. package/dist/runtime/enums.js +18 -0
  204. package/dist/runtime/executionHelpers.test.js +52 -0
  205. package/dist/runtime/export.d.js +5 -0
  206. package/dist/runtime/export.d.ts +284 -0
  207. package/dist/runtime/extendPayload.d.ts +2 -0
  208. package/dist/runtime/extendPayload.js +21 -0
  209. package/dist/runtime/extendTimeout.d.ts +1 -0
  210. package/dist/runtime/extendTimeout.js +23 -0
  211. package/dist/runtime/getAiGatewayConfig.d.ts +10 -0
  212. package/dist/runtime/getAiGatewayConfig.js +16 -0
  213. package/dist/runtime/getAuthSessionParameters.d.ts +1 -0
  214. package/dist/runtime/getAuthSessionParameters.js +20 -0
  215. package/dist/runtime/index.d.ts +10 -168
  216. package/dist/runtime/index.js +88 -779
  217. package/dist/runtime/persistentStore.d.ts +2 -0
  218. package/dist/runtime/persistentStore.js +37 -0
  219. package/dist/runtime/persistentStore.test.js +101 -0
  220. package/dist/runtime/runInfo.d.ts +2 -0
  221. package/dist/runtime/runInfo.js +21 -0
  222. package/dist/vendor/runtime-interface.d.ts +1 -0
  223. package/dist/vendor/runtime-interface.js +479 -0
  224. package/package.json +20 -68
  225. package/template.tsconfig.json +11 -0
  226. package/tsconfig.eslint.json +5 -0
  227. package/tsconfig.json +25 -0
  228. package/tsup.config.ts +12 -0
  229. package/typedoc.json +49 -0
  230. package/dist/chunk-6ZRJOUQS.mjs +0 -16
  231. package/dist/chunk-6ZRJOUQS.mjs.map +0 -1
  232. package/dist/chunk-7YL2JUTE.mjs +0 -146
  233. package/dist/chunk-7YL2JUTE.mjs.map +0 -1
  234. package/dist/chunk-B3T6RXPC.mjs +0 -794
  235. package/dist/chunk-B3T6RXPC.mjs.map +0 -1
  236. package/dist/chunk-FGV5T6SI.mjs +0 -27
  237. package/dist/chunk-FGV5T6SI.mjs.map +0 -1
  238. package/dist/chunk-G4PO5RIV.mjs +0 -85
  239. package/dist/chunk-G4PO5RIV.mjs.map +0 -1
  240. package/dist/chunk-LZOMFHX3.mjs +0 -38
  241. package/dist/chunk-LZOMFHX3.mjs.map +0 -1
  242. package/dist/chunk-NDMVGENG.mjs.map +0 -1
  243. package/dist/chunk-W4UX6G4X.mjs +0 -17
  244. package/dist/chunk-W4UX6G4X.mjs.map +0 -1
  245. package/dist/chunk-XC75QGFG.mjs +0 -1106
  246. package/dist/chunk-XC75QGFG.mjs.map +0 -1
  247. package/dist/chunk-XOAZ2MGA.mjs +0 -59
  248. package/dist/chunk-XOAZ2MGA.mjs.map +0 -1
  249. package/dist/commands/interface/run.d.mts +0 -3
  250. package/dist/commands/interface/run.js.map +0 -1
  251. package/dist/commands/interface/run.mjs +0 -255
  252. package/dist/commands/interface/run.mjs.map +0 -1
  253. package/dist/common/asyncLocalStorage/index.d.mts +0 -17
  254. package/dist/common/asyncLocalStorage/index.js.map +0 -1
  255. package/dist/common/asyncLocalStorage/index.mjs +0 -12
  256. package/dist/common/asyncLocalStorage/index.mjs.map +0 -1
  257. package/dist/common/binStartupScript.d.mts +0 -2
  258. package/dist/common/binStartupScript.js.map +0 -1
  259. package/dist/common/binStartupScript.mjs +0 -135
  260. package/dist/common/binStartupScript.mjs.map +0 -1
  261. package/dist/common/cleanEnvironmentVariables.d.mts +0 -3
  262. package/dist/common/cleanEnvironmentVariables.js.map +0 -1
  263. package/dist/common/cleanEnvironmentVariables.mjs +0 -8
  264. package/dist/common/cleanEnvironmentVariables.mjs.map +0 -1
  265. package/dist/common/constants.d.mts +0 -13
  266. package/dist/common/constants.js.map +0 -1
  267. package/dist/common/constants.mjs +0 -28
  268. package/dist/common/constants.mjs.map +0 -1
  269. package/dist/common/contextStorageStateHelpers.d.mts +0 -24
  270. package/dist/common/contextStorageStateHelpers.js.map +0 -1
  271. package/dist/common/contextStorageStateHelpers.mjs +0 -10
  272. package/dist/common/contextStorageStateHelpers.mjs.map +0 -1
  273. package/dist/common/jwtTokenManager.d.mts +0 -19
  274. package/dist/common/jwtTokenManager.js.map +0 -1
  275. package/dist/common/jwtTokenManager.mjs +0 -11
  276. package/dist/common/jwtTokenManager.mjs.map +0 -1
  277. package/dist/common/runApi/index.d.mts +0 -11
  278. package/dist/common/runApi/index.js.map +0 -1
  279. package/dist/common/runApi/index.mjs +0 -18
  280. package/dist/common/runApi/index.mjs.map +0 -1
  281. package/dist/common/settingsSchema.d.mts +0 -540
  282. package/dist/common/settingsSchema.js.map +0 -1
  283. package/dist/common/settingsSchema.mjs +0 -10
  284. package/dist/common/settingsSchema.mjs.map +0 -1
  285. package/dist/common/telemetry.d.mts +0 -6
  286. package/dist/common/telemetry.js.map +0 -1
  287. package/dist/common/telemetry.mjs +0 -31
  288. package/dist/common/telemetry.mjs.map +0 -1
  289. package/dist/export.d-BAUMB-lG.d.mts +0 -140
  290. package/dist/export.d-BAUMB-lG.d.ts +0 -140
  291. package/dist/index.d.mts +0 -6
  292. package/dist/index.js.map +0 -1
  293. package/dist/index.mjs +0 -47
  294. package/dist/index.mjs.map +0 -1
  295. package/dist/runtime/index.d.mts +0 -168
  296. package/dist/runtime/index.js.map +0 -1
  297. package/dist/runtime/index.mjs +0 -42
  298. package/dist/runtime/index.mjs.map +0 -1
  299. /package/dist/common/assets/{assets/browser_scripts.js → browser_scripts.js} +0 -0
package/package.json CHANGED
@@ -1,77 +1,28 @@
1
1
  {
2
2
  "name": "@intuned/runtime",
3
- "version": "1.3.18-interface.7",
3
+ "version": "1.3.18",
4
4
  "description": "Intuned runtime",
5
5
  "packageManager": "yarn@4.12.0",
6
- "main": "./dist/index.cjs",
7
- "module": "./dist/index.js",
6
+ "main": "./dist/index.js",
8
7
  "types": "./dist/index.d.ts",
8
+ "private": false,
9
9
  "exports": {
10
- ".": {
11
- "types": "./dist/index.d.ts",
12
- "import": "./dist/index.js",
13
- "require": "./dist/index.cjs"
14
- },
15
- "./dist/runtime": {
16
- "types": "./dist/runtime/index.d.ts",
17
- "import": "./dist/runtime/index.js",
18
- "require": "./dist/runtime/index.cjs"
19
- },
20
- "./dist/common/runApi": {
21
- "types": "./dist/common/runApi/index.d.ts",
22
- "import": "./dist/common/runApi/index.js",
23
- "require": "./dist/common/runApi/index.cjs"
24
- },
25
- "./dist/common/settingsSchema": {
26
- "types": "./dist/common/settingsSchema.d.ts",
27
- "import": "./dist/common/settingsSchema.js",
28
- "require": "./dist/common/settingsSchema.cjs"
29
- },
30
- "./dist/common/contextStorageStateHelpers": {
31
- "types": "./dist/common/contextStorageStateHelpers.d.ts",
32
- "import": "./dist/common/contextStorageStateHelpers.js",
33
- "require": "./dist/common/contextStorageStateHelpers.cjs"
34
- },
35
- "./dist/common/telemetry": {
36
- "types": "./dist/common/telemetry.d.ts",
37
- "import": "./dist/common/telemetry.js",
38
- "require": "./dist/common/telemetry.cjs"
39
- },
40
- "./dist/common/jwtTokenManager": {
41
- "types": "./dist/common/jwtTokenManager.d.ts",
42
- "import": "./dist/common/jwtTokenManager.js",
43
- "require": "./dist/common/jwtTokenManager.cjs"
44
- },
45
- "./dist/common/asyncLocalStorage": {
46
- "types": "./dist/common/asyncLocalStorage/index.d.ts",
47
- "import": "./dist/common/asyncLocalStorage/index.js",
48
- "require": "./dist/common/asyncLocalStorage/index.cjs"
49
- },
50
- "./dist/common/cleanEnvironmentVariables": {
51
- "types": "./dist/common/cleanEnvironmentVariables.d.ts",
52
- "import": "./dist/common/cleanEnvironmentVariables.js",
53
- "require": "./dist/common/cleanEnvironmentVariables.cjs"
54
- },
55
- "./dist/common/constants": {
56
- "types": "./dist/common/constants.d.ts",
57
- "import": "./dist/common/constants.js",
58
- "require": "./dist/common/constants.cjs"
59
- },
60
- "./dist/commands/interface/run": {
61
- "types": "./dist/commands/interface/run.d.ts",
62
- "import": "./dist/commands/interface/run.js",
63
- "require": "./dist/commands/interface/run.cjs"
64
- },
65
- "./dist/common/binStartupScript": {
66
- "types": "./dist/common/binStartupScript.d.ts",
67
- "import": "./dist/common/binStartupScript.js",
68
- "require": "./dist/common/binStartupScript.cjs"
69
- }
10
+ ".": "./dist/index.js",
11
+ "./dist/runtime": "./dist/runtime/index.js",
12
+ "./dist/common/runApi": "./dist/common/runApi/index.js",
13
+ "./dist/common/settingsSchema": "./dist/common/settingsSchema.js",
14
+ "./dist/common/contextStorageStateHelpers": "./dist/common/contextStorageStateHelpers.js",
15
+ "./dist/common/telemetry": "./dist/common/telemetry.js",
16
+ "./dist/common/jwtTokenManager": "./dist/common/jwtTokenManager.js",
17
+ "./dist/common/asyncLocalStorage": "./dist/common/asyncLocalStorage/index.js",
18
+ "./dist/common/cleanEnvironmentVariables": "./dist/common/cleanEnvironmentVariables.js",
19
+ "./dist/common/constants": "./dist/common/constants.js",
20
+ "./dist/commands/interface/run": "./dist/commands/interface/run.js",
21
+ "./interface": "./dist/commands/interface/index.js",
22
+ "./dist/commands/intuned-run/intuned-run": "./dist/commands/intuned-run/intuned-run.js",
23
+ "./dist/common/binStartupScript": "./dist/common/binStartupScript.js",
24
+ "./dist/commands/common/utils/interfaceClient": "./dist/commands/common/utils/interfaceClient.js"
70
25
  },
71
- "files": [
72
- "dist",
73
- "bin"
74
- ],
75
26
  "author": "Intuned Team",
76
27
  "license": "Elastic-2.0",
77
28
  "scripts": {
@@ -85,7 +36,7 @@
85
36
  "intuned-ts-check": "yarn prepublishOnly && vite-node ./src/commands/ts-check.ts",
86
37
  "intuned": "vite-node ./src/commands/intuned-cli/main.ts",
87
38
  "intuned-get-headless-user-agent": "vite-node ./src/commands/get-headless-user-agent.ts",
88
- "build": "tsup && cp -r ./src/common/assets dist/common/assets",
39
+ "build": "rm -rf dist && tsc -p tsconfig.json && yarn copy-dts && babel src --out-dir dist --extensions '.ts' && tsup && cp -r ./src/common/assets dist/common/assets",
89
40
  "test": "vitest run",
90
41
  "test:watch": "vitest",
91
42
  "e2e": "yarn playwright test --config ./playwright.config.ts",
@@ -174,6 +125,7 @@
174
125
  "@typescript-eslint/parser": "^7.5.0",
175
126
  "@vitest/ui": "^1.1.3",
176
127
  "babel-plugin-macros": "^3.1.0",
128
+ "babel-plugin-module-resolver": "^5.0.2",
177
129
  "babel-preset-minify": "^0.5.2",
178
130
  "copyfiles": "^2.4.1",
179
131
  "dts-bundle-generator": "^8.0.1",
@@ -0,0 +1,11 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2021",
4
+ "lib": ["dom", "es2021"],
5
+ "resolveJsonModule": true,
6
+ "esModuleInterop": true,
7
+ "moduleResolution": "bundler",
8
+ "module": "esnext",
9
+ "skipLibCheck": true
10
+ }
11
+ }
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "include": ["**/*.ts", "**/*.d.ts"],
4
+ "exclude": ["node_modules"]
5
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,25 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "es2021",
4
+ "module": "esnext",
5
+ "esModuleInterop": true,
6
+ "moduleResolution": "bundler",
7
+ "resolveJsonModule": true,
8
+ "outDir": "./dist",
9
+ "strict": false,
10
+ "strictNullChecks": true,
11
+ "rootDir": "./src",
12
+ "sourceMap": false,
13
+ "declaration": true,
14
+ "emitDeclarationOnly": false,
15
+ "skipLibCheck": true,
16
+ "types": ["vitest/globals"]
17
+ },
18
+ "include": [
19
+ "src/**/*.ts",
20
+ "src/**/*.d.ts",
21
+ "types-package/noEmpty.ts",
22
+ "src/assets/**/*"
23
+ ],
24
+ "exclude": ["node_modules", "**/*.test.ts", "**/__tests__/*"]
25
+ }
package/tsup.config.ts ADDED
@@ -0,0 +1,12 @@
1
+ import { defineConfig } from "tsup";
2
+
3
+ // bundle workspace dependencies
4
+ export default defineConfig({
5
+ entry: ["src/vendor/runtime-interface.ts"],
6
+ format: ["cjs"],
7
+ dts: true,
8
+ outDir: "dist/vendor",
9
+ clean: false, // Don't clean - babel handles dist cleanup
10
+ sourcemap: false,
11
+ target: "node20",
12
+ });
package/typedoc.json ADDED
@@ -0,0 +1,49 @@
1
+ {
2
+ // base config
3
+ "out": "docs/content",
4
+ "tsconfig": "./types-package/tsconfig.json",
5
+ "entryPoints": ["./types-package/ai-extractors/index.d.ts"],
6
+
7
+ // specific inclusions and exclusions
8
+ // "excludeProtected": true,
9
+ // "excludeNotDocumented": true,
10
+
11
+ "exclude": [
12
+ "./src.ts/_admin/**/*",
13
+ "./src.ts/_tests/**/*",
14
+ "./src.ts/testcases/**/*"
15
+ ],
16
+
17
+ // plugins
18
+ "plugin": [
19
+ // "./plugins/reorderSections.mjs",
20
+ "typedoc-plugin-remove-references", // remove additional references that clutter documentation
21
+ "typedoc-plugin-markdown", // generate markdown files
22
+ "typedoc-plugin-frontmatter", // add frontmatter to markdown files, prereq for the below custom plugin
23
+ "./docs/plugins/typedoc-plugin-mintlify-frontmatter.mjs", // formats frontmatter to match mintlify
24
+ "./docs/plugins/typedoc-plugin-navigation-output.mjs" // formats navigation to match mintlify
25
+ ],
26
+
27
+ // formatting + mintlify compatibility
28
+ "fileExtension": ".mdx", // use mdx files for mintlfiy compatibility
29
+ "entryFileName": "index.mdx", // rename entry from "README.md" to "index.mdx"
30
+ "hidePageHeader": true, // hide page header, conflicts with mintlify
31
+ "hidePageTitle": true, // hide page title, conflicts with mintlify
32
+ "hideBreadcrumbs": true, // hide breadcrumbs, conflicts with mintlify
33
+ "useCodeBlocks": true, // makes API definitions more readable
34
+
35
+ "expandObjects": false,
36
+ // "parametersFormat": "table", // readability
37
+ // "propertiesFormat": "table", // readability
38
+ "navigation": {
39
+ "includeCategories": true,
40
+ "includeGroups": false
41
+ },
42
+ "disableSources": true,
43
+ "hideParameterTypesInTitle": false,
44
+ // "membersWithOwnFile": ["Class", "Enum", "Interface", "Function"],
45
+ // "hideParameterTypesInTitle": true,
46
+ "readme": "none",
47
+ "githubPages": false,
48
+ "excludeExternals": true
49
+ }
@@ -1,16 +0,0 @@
1
- // src/common/cleanEnvironmentVariables.ts
2
- function cleanEnvironmentVariables() {
3
- Object.keys(process.env).filter((i) => {
4
- if (i.toLocaleLowerCase().startsWith("npm")) {
5
- return true;
6
- }
7
- if (i.toLocaleLowerCase().startsWith("fly") && i !== "FLY_ALLOC_ID") {
8
- return true;
9
- }
10
- }).forEach((i) => delete process.env[i]);
11
- }
12
-
13
- export {
14
- cleanEnvironmentVariables
15
- };
16
- //# sourceMappingURL=chunk-6ZRJOUQS.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/common/cleanEnvironmentVariables.ts"],"sourcesContent":["export function cleanEnvironmentVariables() {\n Object.keys(process.env)\n .filter((i) => {\n if (i.toLocaleLowerCase().startsWith(\"npm\")) {\n return true;\n }\n\n if (i.toLocaleLowerCase().startsWith(\"fly\") && i !== \"FLY_ALLOC_ID\") {\n return true;\n }\n })\n .forEach((i) => delete process.env[i]);\n}\n"],"mappings":";AAAO,SAAS,4BAA4B;AAC1C,SAAO,KAAK,QAAQ,GAAG,EACpB,OAAO,CAAC,MAAM;AACb,QAAI,EAAE,kBAAkB,EAAE,WAAW,KAAK,GAAG;AAC3C,aAAO;AAAA,IACT;AAEA,QAAI,EAAE,kBAAkB,EAAE,WAAW,KAAK,KAAK,MAAM,gBAAgB;AACnE,aAAO;AAAA,IACT;AAAA,EACF,CAAC,EACA,QAAQ,CAAC,MAAM,OAAO,QAAQ,IAAI,CAAC,CAAC;AACzC;","names":[]}
@@ -1,146 +0,0 @@
1
- import {
2
- API_KEY_ENV_VAR_KEY,
3
- API_KEY_HEADER_NAME,
4
- AUTH_TOKEN_ENV_VAR_KEY,
5
- CLI_ENV_VAR_KEY,
6
- PROJECT_ID_ENV_VAR_KEY,
7
- WORKSPACE_ID_ENV_VAR_KEY
8
- } from "./chunk-FGV5T6SI.mjs";
9
-
10
- // src/common/jwtTokenManager.ts
11
- import fetch from "cross-fetch";
12
- import * as jwt from "jsonwebtoken";
13
- import { err, ResultAsync } from "neverthrow";
14
- var JwtTokenManager = class {
15
- constructor(refreshTokenPath) {
16
- this.refreshTokenPath = refreshTokenPath;
17
- this._token = void 0;
18
- }
19
- get token() {
20
- return this._token;
21
- }
22
- // When the token is set, the schedule for renewal is issued automatically
23
- // This is currently being set it two places:
24
- // 1. Whenever the runner starts, initializes it from the environment variable (set whenever the api is run from the authoring IDE)
25
- // 2. Whenever a published api is called to run (/api/run/*), it is set to the token received in the run request.
26
- set token(newToken) {
27
- if (this._token != newToken) {
28
- this._token = newToken;
29
- void this.scheduleTokenRefresh();
30
- }
31
- }
32
- get timeToRefresh() {
33
- if (!this._token) return;
34
- const payload = jwt.decode(this._token);
35
- if (!payload || typeof payload == "string") return;
36
- const expiry = payload.expiry;
37
- if (!expiry || typeof expiry !== "number") return;
38
- const timeWindow = 60 * 1e3;
39
- const timeToRefresh = expiry - Date.now() - timeWindow;
40
- return Math.max(timeToRefresh, timeWindow);
41
- }
42
- async scheduleTokenRefresh() {
43
- if (process.env.RUN_ENVIRONMENT?.toLowerCase() !== "authoring") return;
44
- const timeToRefresh = this.timeToRefresh;
45
- if (timeToRefresh === void 0) return;
46
- if (this.tokenRefreshTimeout) clearTimeout(this.tokenRefreshTimeout);
47
- this.tokenRefreshTimeout = setTimeout(async () => {
48
- const result = await this.refreshToken();
49
- if (result && result.isErr()) {
50
- console.error(`[Internal Error] ${result.error}`);
51
- return;
52
- }
53
- await this.scheduleTokenRefresh();
54
- }, timeToRefresh);
55
- }
56
- async refreshToken() {
57
- if (process.env.RUN_ENVIRONMENT?.toLowerCase() !== "authoring") return;
58
- const res = await this.fetchWithToken(
59
- `${this.backendFunctionsBaseUrl}/${this.refreshTokenPath}`,
60
- {
61
- method: "GET"
62
- }
63
- );
64
- if (res.status === 401) {
65
- return err("Unauthorized");
66
- }
67
- const jsonResult = await ResultAsync.fromPromise(
68
- res.json(),
69
- () => "not json"
70
- );
71
- if (jsonResult.isErr()) return;
72
- const newToken = jsonResult.value.token;
73
- if (newToken) this._token = newToken;
74
- }
75
- async fetchWithToken(...[input, init]) {
76
- const headers = new Headers(init?.headers);
77
- const apiKey = process.env[API_KEY_ENV_VAR_KEY];
78
- if (apiKey) {
79
- headers.set(API_KEY_HEADER_NAME, apiKey);
80
- }
81
- const token = process.env[AUTH_TOKEN_ENV_VAR_KEY];
82
- if (token) {
83
- headers.set("Authorization", `Bearer ${token}`);
84
- }
85
- if (this.token !== void 0) {
86
- headers.set("Authorization", `Bearer ${this.token}`);
87
- }
88
- const result = await fetch(input, {
89
- ...init,
90
- headers
91
- });
92
- if (result.status === 401 && process.env[CLI_ENV_VAR_KEY] === "true") {
93
- console.warn(
94
- "Unauthorized backend function call - make sure to provision your project to Intuned to set up the correct API credentials.\nRun 'intuned provision' or see https://docs.intunedhq.com/docs/05-references/cli#provision-project for more information."
95
- );
96
- }
97
- return result;
98
- }
99
- get backendFunctionsBaseUrl() {
100
- try {
101
- if (!process.env.FUNCTIONS_DOMAIN) {
102
- throw new Error(
103
- `Cannot call backend function - FUNCTIONS_DOMAIN not set`
104
- );
105
- }
106
- const domain = process.env.FUNCTIONS_DOMAIN;
107
- if (!process.env[WORKSPACE_ID_ENV_VAR_KEY]) {
108
- throw new Error(
109
- `Cannot call backend function - ${WORKSPACE_ID_ENV_VAR_KEY} not set`
110
- );
111
- }
112
- const workspaceId = process.env[WORKSPACE_ID_ENV_VAR_KEY];
113
- if (!process.env[PROJECT_ID_ENV_VAR_KEY] && !process.env.INTUNED_INTEGRATION_ID) {
114
- throw new Error(
115
- `Cannot call backend function - ${PROJECT_ID_ENV_VAR_KEY} or INTUNED_INTEGRATION_ID not set`
116
- );
117
- }
118
- const projectId = process.env.INTUNED_INTEGRATION_ID ?? process.env[PROJECT_ID_ENV_VAR_KEY];
119
- return `${domain}/api/${workspaceId}/functions/${projectId}`;
120
- } catch (e) {
121
- if (process.env[CLI_ENV_VAR_KEY] === "true") {
122
- throw new Error(
123
- `API credentials not set - make sure to provision your project to Intuned to set up the correct API credentials.
124
- Run 'intuned provision' or see https://docs.intunedhq.com/docs/05-references/cli#provision-project for more information.
125
- Original error: ${e.message}`
126
- );
127
- }
128
- }
129
- }
130
- };
131
- var backendFunctionsTokenManager = new JwtTokenManager(
132
- `refreshBackendFunctionsToken`
133
- );
134
- backendFunctionsTokenManager.token = process.env.INTUNED_AUTHORING_SESSION_BACKEND_FUNCTIONS_TOKEN;
135
- function callBackendFunctionWithToken(path, init) {
136
- return backendFunctionsTokenManager.fetchWithToken(
137
- `${backendFunctionsTokenManager.backendFunctionsBaseUrl}/${path}`,
138
- init
139
- );
140
- }
141
-
142
- export {
143
- backendFunctionsTokenManager,
144
- callBackendFunctionWithToken
145
- };
146
- //# sourceMappingURL=chunk-7YL2JUTE.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/common/jwtTokenManager.ts"],"sourcesContent":["import fetch from \"cross-fetch\";\nimport * as jwt from \"jsonwebtoken\";\nimport { err, ResultAsync } from \"neverthrow\";\nimport {\n API_KEY_ENV_VAR_KEY,\n API_KEY_HEADER_NAME,\n PROJECT_ID_ENV_VAR_KEY,\n CLI_ENV_VAR_KEY,\n WORKSPACE_ID_ENV_VAR_KEY,\n AUTH_TOKEN_ENV_VAR_KEY,\n} from \"./constants\";\n\n// Manages JWT token with renewal\nclass JwtTokenManager {\n private _token: string | undefined;\n private tokenRefreshTimeout: NodeJS.Timeout | undefined;\n private refreshTokenPath: string;\n\n constructor(refreshTokenPath: string) {\n this.refreshTokenPath = refreshTokenPath;\n this._token = undefined;\n }\n\n public get token() {\n return this._token;\n }\n\n // When the token is set, the schedule for renewal is issued automatically\n // This is currently being set it two places:\n // 1. Whenever the runner starts, initializes it from the environment variable (set whenever the api is run from the authoring IDE)\n // 2. Whenever a published api is called to run (/api/run/*), it is set to the token received in the run request.\n public set token(newToken: string | undefined) {\n if (this._token != newToken) {\n this._token = newToken;\n void this.scheduleTokenRefresh();\n }\n }\n\n private get timeToRefresh() {\n if (!this._token) return;\n\n const payload = jwt.decode(this._token);\n\n if (!payload || typeof payload == \"string\") return;\n\n const expiry = payload.expiry;\n if (!expiry || typeof expiry !== \"number\") return;\n\n const timeWindow = 60 * 1000; // 1 minute\n\n const timeToRefresh = expiry - Date.now() - timeWindow;\n return Math.max(timeToRefresh, timeWindow);\n }\n\n private async scheduleTokenRefresh() {\n if (process.env.RUN_ENVIRONMENT?.toLowerCase() !== \"authoring\") return;\n const timeToRefresh = this.timeToRefresh;\n if (timeToRefresh === undefined) return;\n\n if (this.tokenRefreshTimeout) clearTimeout(this.tokenRefreshTimeout);\n\n this.tokenRefreshTimeout = setTimeout(async () => {\n const result = await this.refreshToken();\n if (result && result.isErr()) {\n console.error(`[Internal Error] ${result.error}`);\n return;\n }\n await this.scheduleTokenRefresh();\n }, timeToRefresh);\n }\n\n private async refreshToken() {\n if (process.env.RUN_ENVIRONMENT?.toLowerCase() !== \"authoring\") return;\n const res = await this.fetchWithToken(\n `${this.backendFunctionsBaseUrl}/${this.refreshTokenPath}`,\n {\n method: \"GET\",\n }\n );\n\n if (res.status === 401) {\n return err(\"Unauthorized\");\n }\n\n const jsonResult = await ResultAsync.fromPromise(\n res.json(),\n () => \"not json\"\n );\n\n if (jsonResult.isErr()) return;\n\n const newToken = jsonResult.value.token;\n if (newToken) this._token = newToken;\n }\n\n public async fetchWithToken(...[input, init]: Parameters<typeof fetch>) {\n const headers = new Headers(init?.headers);\n const apiKey = process.env[API_KEY_ENV_VAR_KEY];\n if (apiKey) {\n headers.set(API_KEY_HEADER_NAME, apiKey);\n }\n const token = process.env[AUTH_TOKEN_ENV_VAR_KEY];\n if (token) {\n headers.set(\"Authorization\", `Bearer ${token}`);\n }\n if (this.token !== undefined) {\n headers.set(\"Authorization\", `Bearer ${this.token}`);\n }\n const result = await fetch(input, {\n ...init,\n headers,\n });\n if (result.status === 401 && process.env[CLI_ENV_VAR_KEY] === \"true\") {\n console.warn(\n \"Unauthorized backend function call - make sure to provision your project to Intuned to set up the correct API credentials.\\n\" +\n \"Run 'intuned provision' or see https://docs.intunedhq.com/docs/05-references/cli#provision-project for more information.\"\n );\n }\n return result;\n }\n\n get backendFunctionsBaseUrl() {\n try {\n if (!process.env.FUNCTIONS_DOMAIN) {\n throw new Error(\n `Cannot call backend function - FUNCTIONS_DOMAIN not set`\n );\n }\n const domain = process.env.FUNCTIONS_DOMAIN;\n if (!process.env[WORKSPACE_ID_ENV_VAR_KEY]) {\n throw new Error(\n `Cannot call backend function - ${WORKSPACE_ID_ENV_VAR_KEY} not set`\n );\n }\n const workspaceId = process.env[WORKSPACE_ID_ENV_VAR_KEY];\n if (\n !process.env[PROJECT_ID_ENV_VAR_KEY] &&\n !process.env.INTUNED_INTEGRATION_ID\n ) {\n throw new Error(\n `Cannot call backend function - ${PROJECT_ID_ENV_VAR_KEY} or INTUNED_INTEGRATION_ID not set`\n );\n }\n\n const projectId =\n process.env.INTUNED_INTEGRATION_ID ??\n process.env[PROJECT_ID_ENV_VAR_KEY];\n return `${domain}/api/${workspaceId}/functions/${projectId}`;\n } catch (e) {\n if (process.env[CLI_ENV_VAR_KEY] === \"true\") {\n throw new Error(\n `API credentials not set - make sure to provision your project to Intuned to set up the correct API credentials.\\n` +\n `Run 'intuned provision' or see https://docs.intunedhq.com/docs/05-references/cli#provision-project for more information.\\n` +\n `Original error: ${e.message}`\n );\n }\n }\n }\n}\n\nexport const backendFunctionsTokenManager = new JwtTokenManager(\n `refreshBackendFunctionsToken`\n);\nbackendFunctionsTokenManager.token =\n process.env.INTUNED_AUTHORING_SESSION_BACKEND_FUNCTIONS_TOKEN;\n\nexport function callBackendFunctionWithToken(\n path: string,\n init?: Parameters<typeof fetch>[1]\n) {\n return backendFunctionsTokenManager.fetchWithToken(\n `${backendFunctionsTokenManager.backendFunctionsBaseUrl}/${path}`,\n init\n );\n}\n"],"mappings":";;;;;;;;;;AAAA,OAAO,WAAW;AAClB,YAAY,SAAS;AACrB,SAAS,KAAK,mBAAmB;AAWjC,IAAM,kBAAN,MAAsB;AAAA,EAKpB,YAAY,kBAA0B;AACpC,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