@intuned/runtime-dev 1.3.9-dev9 → 1.3.11-deployment.0

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 (223) hide show
  1. package/InterfaceTemplate/index.playwright.ts +1 -1
  2. package/WebTemplate.zip +0 -0
  3. package/dist/commands/intuned-cli/commands/attempt_api.command.js +1 -1
  4. package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +1 -1
  5. package/dist/commands/intuned-cli/commands/run_api.command.js +1 -1
  6. package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +3 -0
  7. package/dist/commands/intuned-cli/commands/types.d.ts +4 -0
  8. package/dist/commands/intuned-cli/commands/types.js +5 -3
  9. package/dist/commands/intuned-cli/controller/api.d.ts +1 -1
  10. package/dist/commands/intuned-cli/controller/api.js +4 -2
  11. package/dist/commands/intuned-cli/controller/authSession.d.ts +2 -2
  12. package/dist/commands/intuned-cli/controller/authSession.js +8 -4
  13. package/dist/commands/intuned-cli/controller/deploy.d.ts +1 -0
  14. package/dist/commands/intuned-cli/controller/deploy.js +141 -6
  15. package/dist/commands/intuned-cli/controller/save.d.ts +4 -1
  16. package/dist/commands/intuned-cli/controller/save.js +8 -2
  17. package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +11 -0
  18. package/dist/commands/intuned-cli/helpers/backend.js +1 -1
  19. package/dist/commands/intuned-cli/helpers/browser.d.ts +2 -1
  20. package/dist/commands/intuned-cli/helpers/browser.js +8 -1
  21. package/dist/commands/intuned-cli/helpers/errors.d.ts +3 -0
  22. package/dist/commands/intuned-cli/helpers/errors.js +8 -1
  23. package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +113 -11
  24. package/dist/commands/intuned-cli/helpers/intunedJson.js +19 -3
  25. package/dist/commands/intuned-cli/helpers/wrapper.js +7 -1
  26. package/dist/commands/intuned-cli/main.js +1 -0
  27. package/package.json +6 -2
  28. package/package/dist/commands/api/run.d.ts +0 -6
  29. package/package/dist/commands/api/run.js +0 -123
  30. package/package/dist/commands/auth-sessions/load.d.ts +0 -2
  31. package/package/dist/commands/auth-sessions/load.js +0 -35
  32. package/package/dist/commands/auth-sessions/run-check.d.ts +0 -2
  33. package/package/dist/commands/auth-sessions/run-check.js +0 -74
  34. package/package/dist/commands/auth-sessions/run-create.d.ts +0 -2
  35. package/package/dist/commands/auth-sessions/run-create.js +0 -78
  36. package/package/dist/commands/browser/save-state.d.ts +0 -2
  37. package/package/dist/commands/browser/save-state.js +0 -17
  38. package/package/dist/commands/browser/start-browser.d.ts +0 -2
  39. package/package/dist/commands/browser/start-browser.js +0 -14
  40. package/package/dist/commands/build.d.ts +0 -1
  41. package/package/dist/commands/build.js +0 -84
  42. package/package/dist/commands/common/browserUtils.d.ts +0 -14
  43. package/package/dist/commands/common/browserUtils.js +0 -58
  44. package/package/dist/commands/common/getFirstLineNumber.d.ts +0 -9
  45. package/package/dist/commands/common/getFirstLineNumber.js +0 -101
  46. package/package/dist/commands/common/getFirstLineNumber.test.js +0 -228
  47. package/package/dist/commands/common/projectExclusions.d.ts +0 -2
  48. package/package/dist/commands/common/projectExclusions.js +0 -8
  49. package/package/dist/commands/common/sendMessageToClient.d.ts +0 -1
  50. package/package/dist/commands/common/sendMessageToClient.js +0 -10
  51. package/package/dist/commands/common/tsNodeImport.d.ts +0 -2
  52. package/package/dist/commands/common/tsNodeImport.js +0 -34
  53. package/package/dist/commands/common/utils/fileUtils.d.ts +0 -6
  54. package/package/dist/commands/common/utils/fileUtils.js +0 -33
  55. package/package/dist/commands/common/utils/settings.d.ts +0 -2
  56. package/package/dist/commands/common/utils/settings.js +0 -31
  57. package/package/dist/commands/common/utils/template.d.ts +0 -2
  58. package/package/dist/commands/common/utils/template.js +0 -31
  59. package/package/dist/commands/common/utils/unixSocket.d.ts +0 -9
  60. package/package/dist/commands/common/utils/unixSocket.js +0 -44
  61. package/package/dist/commands/interface/run.d.ts +0 -1
  62. package/package/dist/commands/interface/run.js +0 -216
  63. package/package/dist/commands/intuned-cli/commands/attempt.command.d.ts +0 -1
  64. package/package/dist/commands/intuned-cli/commands/attempt.command.js +0 -8
  65. package/package/dist/commands/intuned-cli/commands/attempt_api.command.d.ts +0 -1
  66. package/package/dist/commands/intuned-cli/commands/attempt_api.command.js +0 -30
  67. package/package/dist/commands/intuned-cli/commands/attempt_authsession.command.d.ts +0 -1
  68. package/package/dist/commands/intuned-cli/commands/attempt_authsession.command.js +0 -8
  69. package/package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.d.ts +0 -1
  70. package/package/dist/commands/intuned-cli/commands/attempt_authsession_check.command.js +0 -19
  71. package/package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.d.ts +0 -1
  72. package/package/dist/commands/intuned-cli/commands/attempt_authsession_create.command.js +0 -24
  73. package/package/dist/commands/intuned-cli/commands/authsession.command.d.ts +0 -1
  74. package/package/dist/commands/intuned-cli/commands/authsession.command.js +0 -8
  75. package/package/dist/commands/intuned-cli/commands/authsession_record.command.d.ts +0 -1
  76. package/package/dist/commands/intuned-cli/commands/authsession_record.command.js +0 -31
  77. package/package/dist/commands/intuned-cli/commands/build.command.d.ts +0 -1
  78. package/package/dist/commands/intuned-cli/commands/build.command.js +0 -12
  79. package/package/dist/commands/intuned-cli/commands/command.d.ts +0 -2
  80. package/package/dist/commands/intuned-cli/commands/command.js +0 -9
  81. package/package/dist/commands/intuned-cli/commands/deploy.command.d.ts +0 -1
  82. package/package/dist/commands/intuned-cli/commands/deploy.command.js +0 -38
  83. package/package/dist/commands/intuned-cli/commands/index.d.ts +0 -18
  84. package/package/dist/commands/intuned-cli/commands/index.js +0 -203
  85. package/package/dist/commands/intuned-cli/commands/init.command.d.ts +0 -1
  86. package/package/dist/commands/intuned-cli/commands/init.command.js +0 -13
  87. package/package/dist/commands/intuned-cli/commands/run.command.d.ts +0 -1
  88. package/package/dist/commands/intuned-cli/commands/run.command.js +0 -8
  89. package/package/dist/commands/intuned-cli/commands/run_api.command.d.ts +0 -1
  90. package/package/dist/commands/intuned-cli/commands/run_api.command.js +0 -46
  91. package/package/dist/commands/intuned-cli/commands/run_authsession.command.d.ts +0 -28
  92. package/package/dist/commands/intuned-cli/commands/run_authsession.command.js +0 -17
  93. package/package/dist/commands/intuned-cli/commands/run_authsession_create.command.d.ts +0 -1
  94. package/package/dist/commands/intuned-cli/commands/run_authsession_create.command.js +0 -35
  95. package/package/dist/commands/intuned-cli/commands/run_authsession_update.command.d.ts +0 -1
  96. package/package/dist/commands/intuned-cli/commands/run_authsession_update.command.js +0 -35
  97. package/package/dist/commands/intuned-cli/commands/run_authsession_validate.command.d.ts +0 -1
  98. package/package/dist/commands/intuned-cli/commands/run_authsession_validate.command.js +0 -33
  99. package/package/dist/commands/intuned-cli/commands/save.command.d.ts +0 -13
  100. package/package/dist/commands/intuned-cli/commands/save.command.js +0 -42
  101. package/package/dist/commands/intuned-cli/commands/types.d.ts +0 -31
  102. package/package/dist/commands/intuned-cli/commands/types.js +0 -29
  103. package/package/dist/commands/intuned-cli/constants/index.d.ts +0 -17
  104. package/package/dist/commands/intuned-cli/constants/index.js +0 -25
  105. package/package/dist/commands/intuned-cli/controller/__test__/api.test.js +0 -397
  106. package/package/dist/commands/intuned-cli/controller/__test__/authSession.test.js +0 -1059
  107. package/package/dist/commands/intuned-cli/controller/api.d.ts +0 -42
  108. package/package/dist/commands/intuned-cli/controller/api.js +0 -189
  109. package/package/dist/commands/intuned-cli/controller/authSession.d.ts +0 -209
  110. package/package/dist/commands/intuned-cli/controller/authSession.js +0 -420
  111. package/package/dist/commands/intuned-cli/controller/build.d.ts +0 -1
  112. package/package/dist/commands/intuned-cli/controller/build.js +0 -36
  113. package/package/dist/commands/intuned-cli/controller/deploy.d.ts +0 -4
  114. package/package/dist/commands/intuned-cli/controller/deploy.js +0 -139
  115. package/package/dist/commands/intuned-cli/controller/index.d.ts +0 -1
  116. package/package/dist/commands/intuned-cli/controller/index.js +0 -46
  117. package/package/dist/commands/intuned-cli/controller/save.d.ts +0 -14
  118. package/package/dist/commands/intuned-cli/controller/save.js +0 -345
  119. package/package/dist/commands/intuned-cli/helpers/__test__/browser.test.js +0 -103
  120. package/package/dist/commands/intuned-cli/helpers/__test__/tracing.test.js +0 -40
  121. package/package/dist/commands/intuned-cli/helpers/api.d.ts +0 -3
  122. package/package/dist/commands/intuned-cli/helpers/api.js +0 -19
  123. package/package/dist/commands/intuned-cli/helpers/auth.d.ts +0 -46
  124. package/package/dist/commands/intuned-cli/helpers/auth.js +0 -144
  125. package/package/dist/commands/intuned-cli/helpers/backend.d.ts +0 -8
  126. package/package/dist/commands/intuned-cli/helpers/backend.js +0 -27
  127. package/package/dist/commands/intuned-cli/helpers/browser.d.ts +0 -14
  128. package/package/dist/commands/intuned-cli/helpers/browser.js +0 -57
  129. package/package/dist/commands/intuned-cli/helpers/context.d.ts +0 -3
  130. package/package/dist/commands/intuned-cli/helpers/context.js +0 -33
  131. package/package/dist/commands/intuned-cli/helpers/errors.d.ts +0 -13
  132. package/package/dist/commands/intuned-cli/helpers/errors.js +0 -37
  133. package/package/dist/commands/intuned-cli/helpers/index.d.ts +0 -12
  134. package/package/dist/commands/intuned-cli/helpers/index.js +0 -137
  135. package/package/dist/commands/intuned-cli/helpers/intunedJson.d.ts +0 -69
  136. package/package/dist/commands/intuned-cli/helpers/intunedJson.js +0 -71
  137. package/package/dist/commands/intuned-cli/helpers/proxy.d.ts +0 -5
  138. package/package/dist/commands/intuned-cli/helpers/proxy.js +0 -23
  139. package/package/dist/commands/intuned-cli/helpers/terminal.d.ts +0 -5
  140. package/package/dist/commands/intuned-cli/helpers/terminal.js +0 -13
  141. package/package/dist/commands/intuned-cli/helpers/timeout.d.ts +0 -1
  142. package/package/dist/commands/intuned-cli/helpers/timeout.js +0 -23
  143. package/package/dist/commands/intuned-cli/helpers/traces.d.ts +0 -2
  144. package/package/dist/commands/intuned-cli/helpers/traces.js +0 -32
  145. package/package/dist/commands/intuned-cli/helpers/validation.d.ts +0 -2
  146. package/package/dist/commands/intuned-cli/helpers/validation.js +0 -14
  147. package/package/dist/commands/intuned-cli/helpers/wrapper.d.ts +0 -2
  148. package/package/dist/commands/intuned-cli/helpers/wrapper.js +0 -60
  149. package/package/dist/commands/intuned-cli/index.d.ts +0 -1
  150. package/package/dist/commands/intuned-cli/index.js +0 -16
  151. package/package/dist/commands/intuned-cli/main.d.ts +0 -1
  152. package/package/dist/commands/intuned-cli/main.js +0 -22
  153. package/package/dist/commands/intuned-cli/types.d.ts +0 -41
  154. package/package/dist/commands/intuned-cli/types.js +0 -12
  155. package/package/dist/commands/ts-check.d.ts +0 -2
  156. package/package/dist/commands/ts-check.js +0 -56
  157. package/package/dist/common/Logger/Logger/index.d.ts +0 -12
  158. package/package/dist/common/Logger/Logger/index.js +0 -60
  159. package/package/dist/common/Logger/Logger/types.d.ts +0 -8
  160. package/package/dist/common/Logger/Logger/types.js +0 -5
  161. package/package/dist/common/Logger/index.d.ts +0 -12
  162. package/package/dist/common/Logger/index.js +0 -60
  163. package/package/dist/common/Logger/types.d.ts +0 -8
  164. package/package/dist/common/Logger/types.js +0 -5
  165. package/package/dist/common/assets/browser_scripts.js +0 -2580
  166. package/package/dist/common/asyncLocalStorage/index.d.ts +0 -16
  167. package/package/dist/common/asyncLocalStorage/index.js +0 -17
  168. package/package/dist/common/backendFunctions/getAuthSessionParameters.d.ts +0 -1
  169. package/package/dist/common/backendFunctions/getAuthSessionParameters.js +0 -38
  170. package/package/dist/common/cleanEnvironmentVariables.d.ts +0 -1
  171. package/package/dist/common/cleanEnvironmentVariables.js +0 -16
  172. package/package/dist/common/constants.d.ts +0 -10
  173. package/package/dist/common/constants.js +0 -16
  174. package/package/dist/common/contextStorageStateHelpers.d.ts +0 -21
  175. package/package/dist/common/contextStorageStateHelpers.js +0 -81
  176. package/package/dist/common/extensionsHelpers.d.ts +0 -8
  177. package/package/dist/common/extensionsHelpers.js +0 -80
  178. package/package/dist/common/formatZodError.d.ts +0 -2
  179. package/package/dist/common/formatZodError.js +0 -18
  180. package/package/dist/common/jwtTokenManager.d.ts +0 -17
  181. package/package/dist/common/jwtTokenManager.js +0 -109
  182. package/package/dist/common/launchBrowser.d.ts +0 -25
  183. package/package/dist/common/launchBrowser.js +0 -172
  184. package/package/dist/common/playwrightContext.d.ts +0 -31
  185. package/package/dist/common/playwrightContext.js +0 -144
  186. package/package/dist/common/runApi/errors.d.ts +0 -72
  187. package/package/dist/common/runApi/errors.js +0 -169
  188. package/package/dist/common/runApi/importUsingImportFunction.d.ts +0 -9
  189. package/package/dist/common/runApi/importUsingImportFunction.js +0 -46
  190. package/package/dist/common/runApi/index.d.ts +0 -11
  191. package/package/dist/common/runApi/index.js +0 -199
  192. package/package/dist/common/runApi/types.d.ts +0 -830
  193. package/package/dist/common/runApi/types.js +0 -73
  194. package/package/dist/common/settingsSchema.d.ts +0 -518
  195. package/package/dist/common/settingsSchema.js +0 -57
  196. package/package/dist/common/setupContextHook.d.ts +0 -17
  197. package/package/dist/common/setupContextHook.js +0 -22
  198. package/package/dist/common/telemetry.d.ts +0 -3
  199. package/package/dist/common/telemetry.js +0 -32
  200. package/package/dist/index.d.ts +0 -4
  201. package/package/dist/index.js +0 -69
  202. package/package/dist/runtime/RunError.d.ts +0 -5
  203. package/package/dist/runtime/RunError.js +0 -19
  204. package/package/dist/runtime/attemptStore.d.ts +0 -2
  205. package/package/dist/runtime/attemptStore.js +0 -23
  206. package/package/dist/runtime/downloadDirectory.d.ts +0 -1
  207. package/package/dist/runtime/downloadDirectory.js +0 -19
  208. package/package/dist/runtime/enums.d.js +0 -5
  209. package/package/dist/runtime/enums.d.ts +0 -11
  210. package/package/dist/runtime/enums.js +0 -18
  211. package/package/dist/runtime/executionHelpers.test.js +0 -52
  212. package/package/dist/runtime/export.d.js +0 -5
  213. package/package/dist/runtime/export.d.ts +0 -228
  214. package/package/dist/runtime/extendPayload.d.ts +0 -2
  215. package/package/dist/runtime/extendPayload.js +0 -21
  216. package/package/dist/runtime/extendTimeout.d.ts +0 -1
  217. package/package/dist/runtime/extendTimeout.js +0 -23
  218. package/package/dist/runtime/getAuthSessionParameters.d.ts +0 -1
  219. package/package/dist/runtime/getAuthSessionParameters.js +0 -20
  220. package/package/dist/runtime/index.d.ts +0 -7
  221. package/package/dist/runtime/index.js +0 -54
  222. package/package/dist/runtime/runInfo.d.ts +0 -2
  223. package/package/dist/runtime/runInfo.js +0 -21
@@ -1,5 +1,82 @@
1
1
  import { z } from "zod";
2
- export declare const intunedJsonSchema: z.ZodObject<{
2
+ export declare const intunedJsonSchema: z.ZodIntersection<z.ZodObject<{
3
+ projectName: z.ZodOptional<z.ZodString>;
4
+ workspaceId: z.ZodOptional<z.ZodString>;
5
+ metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
6
+ defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
7
+ defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
8
+ testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
9
+ }, "strip", z.ZodTypeAny, {
10
+ defaultJobInput?: Record<string, any> | undefined;
11
+ defaultRunPlaygroundInput?: Record<string, any> | undefined;
12
+ testAuthSessionInput?: Record<string, any> | undefined;
13
+ }, {
14
+ defaultJobInput?: unknown;
15
+ defaultRunPlaygroundInput?: unknown;
16
+ testAuthSessionInput?: unknown;
17
+ }>>>;
18
+ }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
19
+ projectName: z.ZodOptional<z.ZodString>;
20
+ workspaceId: z.ZodOptional<z.ZodString>;
21
+ metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
22
+ defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
23
+ defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
24
+ testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
25
+ }, "strip", z.ZodTypeAny, {
26
+ defaultJobInput?: Record<string, any> | undefined;
27
+ defaultRunPlaygroundInput?: Record<string, any> | undefined;
28
+ testAuthSessionInput?: Record<string, any> | undefined;
29
+ }, {
30
+ defaultJobInput?: unknown;
31
+ defaultRunPlaygroundInput?: unknown;
32
+ testAuthSessionInput?: unknown;
33
+ }>>>;
34
+ }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
35
+ projectName: z.ZodOptional<z.ZodString>;
36
+ workspaceId: z.ZodOptional<z.ZodString>;
37
+ metadata: z.ZodCatch<z.ZodOptional<z.ZodObject<{
38
+ defaultJobInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
39
+ defaultRunPlaygroundInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
40
+ testAuthSessionInput: z.ZodCatch<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>>;
41
+ }, "strip", z.ZodTypeAny, {
42
+ defaultJobInput?: Record<string, any> | undefined;
43
+ defaultRunPlaygroundInput?: Record<string, any> | undefined;
44
+ testAuthSessionInput?: Record<string, any> | undefined;
45
+ }, {
46
+ defaultJobInput?: unknown;
47
+ defaultRunPlaygroundInput?: unknown;
48
+ testAuthSessionInput?: unknown;
49
+ }>>>;
50
+ }, z.ZodTypeAny, "passthrough">>, z.ZodUnion<[z.ZodObject<{
51
+ authSessions: z.ZodObject<{
52
+ enabled: z.ZodLiteral<false>;
53
+ }, "strip", z.ZodTypeAny, {
54
+ enabled: false;
55
+ }, {
56
+ enabled: false;
57
+ }>;
58
+ apiAccess: z.ZodObject<{
59
+ enabled: z.ZodLiteral<false>;
60
+ }, "strip", z.ZodTypeAny, {
61
+ enabled: false;
62
+ }, {
63
+ enabled: false;
64
+ }>;
65
+ }, "strip", z.ZodTypeAny, {
66
+ authSessions: {
67
+ enabled: false;
68
+ };
69
+ apiAccess: {
70
+ enabled: false;
71
+ };
72
+ }, {
73
+ authSessions: {
74
+ enabled: false;
75
+ };
76
+ apiAccess: {
77
+ enabled: false;
78
+ };
79
+ }>, z.ZodObject<{
3
80
  authSessions: z.ZodUnion<[z.ZodObject<{
4
81
  enabled: z.ZodLiteral<false>;
5
82
  }, "strip", z.ZodTypeAny, {
@@ -22,8 +99,13 @@ export declare const intunedJsonSchema: z.ZodObject<{
22
99
  startUrl?: string | undefined;
23
100
  finishUrl?: string | undefined;
24
101
  }>]>;
25
- projectName: z.ZodOptional<z.ZodString>;
26
- workspaceId: z.ZodOptional<z.ZodString>;
102
+ apiAccess: z.ZodObject<{
103
+ enabled: z.ZodLiteral<true>;
104
+ }, "strip", z.ZodTypeAny, {
105
+ enabled: true;
106
+ }, {
107
+ enabled: true;
108
+ }>;
27
109
  }, "strip", z.ZodTypeAny, {
28
110
  authSessions: {
29
111
  enabled: false;
@@ -33,8 +115,9 @@ export declare const intunedJsonSchema: z.ZodObject<{
33
115
  startUrl?: string | undefined;
34
116
  finishUrl?: string | undefined;
35
117
  };
36
- projectName?: string | undefined;
37
- workspaceId?: string | undefined;
118
+ apiAccess: {
119
+ enabled: true;
120
+ };
38
121
  }, {
39
122
  authSessions: {
40
123
  enabled: false;
@@ -44,12 +127,30 @@ export declare const intunedJsonSchema: z.ZodObject<{
44
127
  startUrl?: string | undefined;
45
128
  finishUrl?: string | undefined;
46
129
  };
47
- projectName?: string | undefined;
48
- workspaceId?: string | undefined;
49
- }>;
130
+ apiAccess: {
131
+ enabled: true;
132
+ };
133
+ }>]>>;
50
134
  export type IntunedJson = z.infer<typeof intunedJsonSchema>;
51
135
  export declare const intunedSettingsFileNames: readonly ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
52
136
  export declare function loadIntunedJson(): Promise<{
137
+ projectName?: string | undefined;
138
+ workspaceId?: string | undefined;
139
+ metadata?: {
140
+ defaultJobInput?: Record<string, any> | undefined;
141
+ defaultRunPlaygroundInput?: Record<string, any> | undefined;
142
+ testAuthSessionInput?: Record<string, any> | undefined;
143
+ } | undefined;
144
+ } & {
145
+ [k: string]: unknown;
146
+ } & ({
147
+ authSessions: {
148
+ enabled: false;
149
+ };
150
+ apiAccess: {
151
+ enabled: false;
152
+ };
153
+ } | {
53
154
  authSessions: {
54
155
  enabled: false;
55
156
  } | {
@@ -58,9 +159,10 @@ export declare function loadIntunedJson(): Promise<{
58
159
  startUrl?: string | undefined;
59
160
  finishUrl?: string | undefined;
60
161
  };
61
- projectName?: string | undefined;
62
- workspaceId?: string | undefined;
63
- }>;
162
+ apiAccess: {
163
+ enabled: true;
164
+ };
165
+ })>;
64
166
  export declare function getIntunedSettingsFile(): Promise<{
65
167
  name: typeof intunedSettingsFileNames[number];
66
168
  path: string;
@@ -18,6 +18,21 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
18
18
  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 && {}.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; }
19
19
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
20
20
  const intunedJsonSchema = exports.intunedJsonSchema = _zod.z.object({
21
+ projectName: _zod.z.string().optional(),
22
+ workspaceId: _zod.z.string().optional(),
23
+ metadata: _zod.z.object({
24
+ defaultJobInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
25
+ defaultRunPlaygroundInput: _zod.z.record(_zod.z.any()).optional().catch(undefined),
26
+ testAuthSessionInput: _zod.z.record(_zod.z.any()).optional().catch(undefined)
27
+ }).optional().catch(undefined)
28
+ }).passthrough().and(_zod.z.union([_zod.z.object({
29
+ authSessions: _zod.z.object({
30
+ enabled: _zod.z.literal(false)
31
+ }),
32
+ apiAccess: _zod.z.object({
33
+ enabled: _zod.z.literal(false)
34
+ })
35
+ }), _zod.z.object({
21
36
  authSessions: _zod.z.union([_zod.z.object({
22
37
  enabled: _zod.z.literal(false)
23
38
  }), _zod.z.object({
@@ -26,9 +41,10 @@ const intunedJsonSchema = exports.intunedJsonSchema = _zod.z.object({
26
41
  startUrl: _zod.z.string().optional(),
27
42
  finishUrl: _zod.z.string().optional()
28
43
  })]),
29
- projectName: _zod.z.string().optional(),
30
- workspaceId: _zod.z.string().optional()
31
- });
44
+ apiAccess: _zod.z.object({
45
+ enabled: _zod.z.literal(true)
46
+ })
47
+ })]));
32
48
  const intunedSettingsFileNames = exports.intunedSettingsFileNames = ["Intuned.json", "Intuned.jsonc", "Intuned.yaml", "Intuned.yml", "Intuned.toml"];
33
49
  async function loadIntunedJson() {
34
50
  const settingsFile = await getIntunedSettingsFile();
@@ -22,7 +22,8 @@ function cliCommandWrapper(argsSchema, optionsSchema, fn) {
22
22
  return (0, _validation.logInvalidInput)(parseResult);
23
23
  }
24
24
  const [_, parsedOptions] = parseResult.data;
25
- keepBrowserOpen = "keepBrowserOpen" in parsedOptions && parsedOptions.keepBrowserOpen === true;
25
+ const cdpUrl = "cdpUrl" in parsedOptions ? parsedOptions.cdpUrl : undefined;
26
+ keepBrowserOpen = !cdpUrl && "keepBrowserOpen" in parsedOptions && parsedOptions.keepBrowserOpen === true;
26
27
  if (keepBrowserOpen) {
27
28
  (0, _terminal.terminal)(`^+--keep-open is set, the CLI will not close the last browser after the command completes^:\n`);
28
29
  }
@@ -33,6 +34,11 @@ function cliCommandWrapper(argsSchema, optionsSchema, fn) {
33
34
  await (0, _browser.closeCliBrowser)();
34
35
  process.exit(0);
35
36
  } catch (error) {
37
+ if (error instanceof _errors.AbortedCLIError) {
38
+ (0, _terminal.terminal)(`\n^r^+Aborted.^:\n`);
39
+ await (0, _browser.closeCliBrowser)();
40
+ process.exit(1);
41
+ }
36
42
  if (error instanceof _errors.CLIError) {
37
43
  if (error.autoColor) {
38
44
  (0, _terminal.terminal)(`^r^+${error.message}^:\n`);
@@ -6,6 +6,7 @@ var _backend = require("./helpers/backend");
6
6
  var _commands = require("./commands");
7
7
  var _helpers = require("./helpers");
8
8
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ require("../../common/binStartupScript");
9
10
  _dotenv.default.config({
10
11
  path: `.env`
11
12
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@intuned/runtime-dev",
3
- "version": "1.3.9-dev9",
3
+ "version": "1.3.11-deployment.0",
4
4
  "description": "Intuned runtime",
5
5
  "exports": {
6
6
  ".": "./dist/index.js",
@@ -14,7 +14,8 @@
14
14
  "./dist/common/cleanEnvironmentVariables": "./dist/common/cleanEnvironmentVariables.js",
15
15
  "./dist/common/constants": "./dist/common/constants.js",
16
16
  "./dist/commands/interface/run": "./dist/commands/interface/run.js",
17
- "./dist/commands/intuned-run/intuned-run": "./dist/commands/intuned-run/intuned-run.js"
17
+ "./dist/commands/intuned-run/intuned-run": "./dist/commands/intuned-run/intuned-run.js",
18
+ "./dist/common/binStartupScript": "./dist/common/binStartupScript.js"
18
19
  },
19
20
  "types": "./dist/index.d.ts",
20
21
  "author": "Intuned Team",
@@ -82,10 +83,12 @@
82
83
  "portfinder": "^1.0.37",
83
84
  "prettier": "2.8.0",
84
85
  "promptly": "3.2.0",
86
+ "prompts": "^2.4.2",
85
87
  "rollup": "3.26.2",
86
88
  "smol-toml": "^1.4.2",
87
89
  "source-map": "0.7.4",
88
90
  "terminal-kit": "^3.1.2",
91
+ "terminal-link": "2.1.1",
89
92
  "ts-morph": "21.0.1",
90
93
  "ts-node": "10.9.1",
91
94
  "tslib": "2.6.0",
@@ -107,6 +110,7 @@
107
110
  "@types/jsdom": "^21.1.1",
108
111
  "@types/ms": "^2.1.0",
109
112
  "@types/promptly": "^3.0.4",
113
+ "@types/prompts": "^2.4.9",
110
114
  "@types/terminal-kit": "^2.5.7",
111
115
  "@types/wait-on": "^5.3.4",
112
116
  "@typescript-eslint/eslint-plugin": "^5.47.1",
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- export declare function executeCLI(apiName: string, mode: "vanilla" | "playwright" | "playwright-standalone" | "playwright-headless", inputData: object | null | undefined, options: {
3
- cdpAddress: string;
4
- authSessionPath: undefined | string;
5
- outputFileId: string | undefined;
6
- }): Promise<void>;
@@ -1,123 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- Object.defineProperty(exports, "__esModule", {
5
- value: true
6
- });
7
- exports.executeCLI = executeCLI;
8
- var _commander = require("commander");
9
- var fs = _interopRequireWildcard(require("fs-extra"));
10
- var _settings = require("../common/utils/settings");
11
- var _dotenv = _interopRequireDefault(require("dotenv"));
12
- var _asyncLocalStorage = require("../../common/asyncLocalStorage");
13
- var _enums = require("../../runtime/enums");
14
- var _cleanEnvironmentVariables = require("../../common/cleanEnvironmentVariables");
15
- var _Logger = require("../../common/Logger");
16
- var _nanoid = require("nanoid");
17
- var _chalk = _interopRequireDefault(require("chalk"));
18
- var _runApi = require("../../common/runApi");
19
- var _tsNodeImport = require("../common/tsNodeImport");
20
- var _isNil = _interopRequireDefault(require("lodash/isNil"));
21
- var _constants = require("../../common/constants");
22
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
23
- 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); }
24
- 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 && {}.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; }
25
- _dotenv.default.config({
26
- path: `.env`
27
- });
28
- async function executeCLI(apiName, mode, inputData, options) {
29
- (0, _cleanEnvironmentVariables.cleanEnvironmentVariables)();
30
- let authSessionPathToUse = null;
31
- const settings = await (0, _settings.getSettings)();
32
- if (settings.authSessions.enabled) {
33
- if (!options.authSessionPath) {
34
- throw new Error("Auth session is enabled but no auth session provided");
35
- }
36
- authSessionPathToUse = options.authSessionPath;
37
- } else {
38
- if (options.authSessionPath) {
39
- throw new Error("Auth session is not enabled but auth session provided. To use auth session please enable it in Intuned.json");
40
- }
41
- }
42
- const runApiResult = await (0, _runApi.runApi)({
43
- automationFunction: {
44
- name: `${_constants.API_FOLDER_NAME}/${apiName}`,
45
- params: inputData
46
- },
47
- auth: authSessionPathToUse ? {
48
- session: {
49
- type: "file",
50
- path: authSessionPathToUse
51
- }
52
- } : undefined,
53
- runOptions: {
54
- environment: "cdp",
55
- cdpAddress: options.cdpAddress
56
- },
57
- importFunction: _tsNodeImport.tsNodeImport
58
- });
59
- if (runApiResult.isErr()) {
60
- if (runApiResult.error instanceof _runApi.AutomationError) {
61
- throw runApiResult.error.error;
62
- }
63
- console.error(runApiResult.error);
64
- throw new Error("An error occurred while running the API");
65
- }
66
- const {
67
- result,
68
- extendedPayloads: payloadToAppend
69
- } = runApiResult.value;
70
- const isResponseObject = typeof result === "object" && result !== null;
71
- const hasMoreThank5Keys = isResponseObject && Object.keys(result).length > 5;
72
- const hasNestedObjects = isResponseObject && Object.values(result).some(value => typeof value === "object");
73
- const shouldWriteToFile = isResponseObject && (hasMoreThank5Keys || hasNestedObjects);
74
- const resultsDir = "/tmp/run-results";
75
- if (options.outputFileId && shouldWriteToFile) {
76
- _Logger.logger.info(_chalk.default.underline.bgBlue.white(`Click to Open: Results saved (Run: ${options.outputFileId})`));
77
- fs.ensureDirSync(resultsDir);
78
- const path = `${resultsDir}/${options.outputFileId}.json`;
79
- await fs.writeJson(path, {
80
- input: inputData,
81
- output: result
82
- }, {
83
- spaces: 2
84
- });
85
- } else {
86
- console.log("result:", result);
87
- }
88
- const hasPayloadToAppend = payloadToAppend && payloadToAppend.length > 0;
89
- if (hasPayloadToAppend && options.outputFileId) {
90
- _Logger.logger.info(_chalk.default.underline.bgBlue.white(`Click to Open: payloads to append (Run: ${options.outputFileId})`));
91
- fs.ensureDirSync(resultsDir);
92
- const path = `${resultsDir}/${options.outputFileId}-payloads-to-append.json`;
93
- await fs.writeJson(path, payloadToAppend, {
94
- spaces: 2
95
- });
96
- } else if (hasPayloadToAppend) {
97
- _Logger.logger.info("payload to append:", payloadToAppend);
98
- _Logger.logger.info("This will only take an effect if this API run was part of a job.");
99
- }
100
- }
101
- _commander.program.description("run the user function in the cli for testing purposes").option("-i, --input [file]", "input json file").option("-j, --json [json]", "input json string").option("--cdpAddress <cdpAddress>", "CDP address", "http://localhost:9222").option("--authSessionPath <authSession>", "auth session to use when executing the api").option("--outputFileId <outputFileId>", "the output file id to save the result in").option("--proxy <proxy>", "proxy to use").option("--authSessionParameters <authSessionParameters>", "parameters used to create the used auth session").argument("[apiName]", "name of the api", "default").allowUnknownOption().addArgument(new _commander.Argument("<mode>", "mode of execution").choices(["vanilla", "playwright", "playwright-standalone", "playwright-headless"]).default("playwright-standalone").argOptional()).action(async (apiName, mode, options) => {
102
- let inputData = null;
103
- if (options.input) {
104
- inputData = await fs.readJSON(options.input);
105
- } else if (options.json) {
106
- inputData = JSON.parse(options.json);
107
- } else {
108
- inputData = {};
109
- }
110
- let authSessionParametersJson = undefined;
111
- if (!(0, _isNil.default)(options?.authSessionParameters)) {
112
- authSessionParametersJson = JSON.parse(options.authSessionParameters);
113
- }
114
- await (0, _asyncLocalStorage.runWithContext)({
115
- runEnvironment: _enums.RunEnvironment.IDE,
116
- extendedPayloads: [],
117
- runId: (0, _nanoid.nanoid)(),
118
- proxy: options.proxy,
119
- getAuthSessionParameters: authSessionParametersJson !== undefined ? async () => authSessionParametersJson : undefined
120
- }, () => executeCLI(apiName, mode, inputData, options));
121
- process.exit(0);
122
- });
123
- _commander.program.parse(process.argv);
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- var _commander = require("commander");
5
- var _playwrightContext = require("../../common/playwrightContext");
6
- var _settings = require("../common/utils/settings");
7
- var _dotenv = _interopRequireDefault(require("dotenv"));
8
- var _neverthrow = require("neverthrow");
9
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
10
- _dotenv.default.config({
11
- path: `.env`
12
- });
13
- _commander.program.description("load auth session to browser").option("--cdpAddress <cdpAddress>", "CDP address", "http://localhost:9222").option("--authSessionPath <authSession>", "auth session to use when executing the api").allowUnknownOption().action(async ({
14
- cdpAddress,
15
- authSessionPath
16
- }) => {
17
- const setting = await (0, _settings.getSettings)();
18
- if (!setting.authSessions.enabled) {
19
- throw new Error("Auth session is not enabled");
20
- }
21
- await (0, _playwrightContext.withPlaywrightContext)({
22
- cdpAddress
23
- }, async context => {
24
- await (0, _playwrightContext.loadSessionToContext)({
25
- context,
26
- session: {
27
- type: "file",
28
- path: authSessionPath
29
- }
30
- });
31
- return (0, _neverthrow.ok)({});
32
- });
33
- process.exit(0);
34
- });
35
- _commander.program.parse(process.argv);
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,74 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- var _commander = require("commander");
5
- var fs = _interopRequireWildcard(require("fs-extra"));
6
- var _fileUtils = require("../common/utils/fileUtils");
7
- var _settings = require("../common/utils/settings");
8
- var _dotenv = _interopRequireDefault(require("dotenv"));
9
- var _constants = require("../../common/constants");
10
- var _runApi = require("../../common/runApi");
11
- var _tsNodeImport = require("../common/tsNodeImport");
12
- var _enums = require("../../runtime/enums");
13
- var _nanoid = require("nanoid");
14
- var _asyncLocalStorage = require("../../common/asyncLocalStorage");
15
- var _isNil = _interopRequireDefault(require("lodash/isNil"));
16
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
17
- 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); }
18
- 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 && {}.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; }
19
- _dotenv.default.config({
20
- path: `.env`
21
- });
22
- _commander.program.description("run auth session check").option("--cdpAddress <cdpAddress>", "CDP address", "http://localhost:9222").option("--authSessionPath <authSession>", "auth session to use when executing the check").option("--authSessionParameters <authSessionParameters>", "parameters used to create the used auth session").allowUnknownOption().addArgument(new _commander.Argument("<mode>", "mode of execution").choices(["vanilla", "playwright", "playwright-standalone"]).default("playwright-standalone").argOptional()).action(async (mode, {
23
- cdpAddress,
24
- authSessionPath,
25
- authSessionParameters
26
- }) => {
27
- const setting = await (0, _settings.getSettings)();
28
- if (!setting.authSessions.enabled) {
29
- throw new Error("auth session is not enabled");
30
- }
31
- const checkFilePath = (0, _fileUtils.getFullPathInProject)(_constants.AUTH_SESSIONS_FOLDER_NAME, "check");
32
- if (!fs.exists(checkFilePath)) {
33
- throw new Error("auth session check file not found");
34
- }
35
- let authSessionParametersJson = undefined;
36
- if (!(0, _isNil.default)(authSessionParameters)) {
37
- authSessionParametersJson = JSON.parse(authSessionParameters);
38
- }
39
- const runApiResult = await (0, _asyncLocalStorage.runWithContext)({
40
- runEnvironment: _enums.RunEnvironment.IDE,
41
- extendedPayloads: [],
42
- runId: (0, _nanoid.nanoid)(),
43
- getAuthSessionParameters: authSessionParametersJson !== undefined ? async () => authSessionParametersJson : undefined
44
- }, async () => await (0, _runApi.runApi)({
45
- automationFunction: {
46
- name: `${_constants.AUTH_SESSIONS_FOLDER_NAME}/check`
47
- },
48
- runOptions: {
49
- environment: "cdp",
50
- cdpAddress
51
- },
52
- auth: {
53
- session: {
54
- type: "file",
55
- path: authSessionPath
56
- }
57
- },
58
- importFunction: _tsNodeImport.tsNodeImport
59
- }));
60
- if (runApiResult.isErr()) {
61
- if (runApiResult.error instanceof _runApi.AutomationError) {
62
- throw runApiResult.error.error;
63
- }
64
- console.error(runApiResult.error);
65
- throw new Error("Error running auth session check");
66
- }
67
- const result = runApiResult.value.result;
68
- console.log("check result", result);
69
- if (!result) {
70
- throw new Error("auth session check failed");
71
- }
72
- process.exit(0);
73
- });
74
- _commander.program.parse(process.argv);
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,78 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- var _commander = require("commander");
5
- var fs = _interopRequireWildcard(require("fs-extra"));
6
- var _fileUtils = require("../common/utils/fileUtils");
7
- var _settings = require("../common/utils/settings");
8
- var _dotenv = _interopRequireDefault(require("dotenv"));
9
- var _constants = require("../../common/constants");
10
- var _runApi = require("../../common/runApi");
11
- var _asyncLocalStorage = require("../../common/asyncLocalStorage");
12
- var _nanoid = require("nanoid");
13
- var _enums = require("../../runtime/enums");
14
- var _tsNodeImport = require("../common/tsNodeImport");
15
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
- 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); }
17
- 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 && {}.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; }
18
- _dotenv.default.config({
19
- path: `.env`
20
- });
21
- _commander.program.description("run auth session create").option("--cdpAddress <cdpAddress>", "CDP address", "http://localhost:9222").option("-i, --input [file]", "input json file").option("-j, --json [json]", "input json string").option("--authSessionPath <authSession>", "auth session to use when executing the api").option("--pathToSave <pathToSave>", "path to save the auth session, if not provided, will discard the auth session").allowUnknownOption().addArgument(new _commander.Argument("<mode>", "mode of execution").choices(["vanilla", "playwright", "playwright-standalone"]).default("playwright-standalone").argOptional()).action(async (mode, {
22
- cdpAddress,
23
- pathToSave,
24
- input,
25
- json
26
- }) => {
27
- let inputData = null;
28
- if (input) {
29
- inputData = await fs.readJSON(input);
30
- } else if (json) {
31
- inputData = JSON.parse(json);
32
- } else {
33
- inputData = {};
34
- }
35
- const setting = await (0, _settings.getSettings)();
36
- if (!setting.authSessions.enabled) {
37
- throw new Error("auth sessions feature is not enabled");
38
- }
39
- const createFilePath = (0, _fileUtils.getFullPathInProject)(_constants.AUTH_SESSIONS_FOLDER_NAME, "create.ts");
40
- if (!fs.exists(createFilePath)) {
41
- throw new Error("auth session create file not found");
42
- }
43
- async function runCreate() {
44
- const result = await (0, _runApi.runApi)({
45
- automationFunction: {
46
- name: `${_constants.AUTH_SESSIONS_FOLDER_NAME}/create`,
47
- params: inputData
48
- },
49
- runOptions: {
50
- environment: "cdp",
51
- cdpAddress
52
- },
53
- retrieveSession: true,
54
- importFunction: _tsNodeImport.tsNodeImport
55
- });
56
- if (result.isErr()) {
57
- if (result.error instanceof _runApi.AutomationError) {
58
- throw result.error.error;
59
- }
60
- console.error(result.error);
61
- throw new Error("Error while running create");
62
- }
63
- const fullState = result.value.session;
64
- if (pathToSave) {
65
- const fullPath = (0, _fileUtils.getFullPathInProject)(pathToSave);
66
- fs.ensureFileSync(fullPath);
67
- await fs.writeJSON(fullPath, fullState);
68
- }
69
- }
70
- await (0, _asyncLocalStorage.runWithContext)({
71
- runEnvironment: _enums.RunEnvironment.IDE,
72
- extendedPayloads: [],
73
- runId: (0, _nanoid.nanoid)(),
74
- getAuthSessionParameters: async () => inputData
75
- }, runCreate);
76
- process.exit(0);
77
- });
78
- _commander.program.parse(process.argv);
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,17 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- var _commander = require("commander");
5
- var _browserUtils = require("../common/browserUtils");
6
- var _dotenv = _interopRequireDefault(require("dotenv"));
7
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
- _dotenv.default.config({
9
- path: `.env`
10
- });
11
- _commander.program.description("save browser state to file storage.json").option("-p, --path [file]", "path for file", "./localSessions/default.json").allowUnknownOption().action(async ({
12
- path
13
- }) => {
14
- await (0, _browserUtils.saveSessionFromOpenedBrowser)(path);
15
- process.exit(0);
16
- });
17
- _commander.program.parse(process.argv);
@@ -1,2 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env node
2
- "use strict";
3
-
4
- var _commander = require("commander");
5
- var _browserUtils = require("../common/browserUtils");
6
- var _dotenv = _interopRequireDefault(require("dotenv"));
7
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
8
- _dotenv.default.config({
9
- path: `.env`
10
- });
11
- _commander.program.description("start browser testing purposes").allowUnknownOption().action(async () => {
12
- await (0, _browserUtils.startOrRestartBrowser)();
13
- });
14
- _commander.program.parse(process.argv);
@@ -1 +0,0 @@
1
- export {};