@intuned/runtime-dev 0.1.0-test.4 → 0.1.0-test.41
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.
- package/InterfaceTemplate/index.playwright.ts +5 -0
- package/InterfaceTemplate/utils.ts +257 -0
- package/Intuned.json +1 -1
- package/WebTemplate/api.ts +90 -92
- package/WebTemplate/controllers/async.ts +52 -48
- package/WebTemplate/controllers/authSessions/check.ts +3 -4
- package/WebTemplate/controllers/authSessions/create.ts +5 -7
- package/WebTemplate/controllers/authSessions/resumeOperation.ts +1 -1
- package/WebTemplate/controllers/runApi/helpers.ts +12 -7
- package/WebTemplate/index.playwright.ts +32 -42
- package/WebTemplate/jobs.ts +13 -2
- package/WebTemplate/utils.ts +48 -1
- package/api/test2.ts +7 -5
- package/auth-sessions/check.ts +3 -1
- package/auth-sessions/create.ts +10 -10
- package/bin/intuned-ts-check +1 -1
- package/dist/commands/api/run.js +6 -4
- package/dist/commands/auth-sessions/run-check.js +8 -2
- package/dist/commands/auth-sessions/run-create.js +10 -5
- package/dist/commands/build.js +16 -13
- package/dist/commands/common/tsNodeImport.d.ts +1 -0
- package/dist/commands/common/{getDefaultExportFromFile.js → tsNodeImport.js} +6 -5
- package/dist/commands/common/utils/settings.js +5 -5
- package/dist/commands/common/utils/template.d.ts +2 -0
- package/dist/commands/common/utils/{webTemplate.js → template.js} +7 -7
- package/dist/commands/interface/run.d.ts +1 -1
- package/dist/commands/interface/run.js +131 -106
- package/dist/commands/ts-check.js +9 -7
- package/dist/common/formatZodError.d.ts +2 -0
- package/dist/common/formatZodError.js +18 -0
- package/dist/common/getPlaywrightConstructs.js +5 -1
- package/dist/common/runApi/errors.d.ts +8 -3
- package/dist/common/runApi/errors.js +26 -3
- package/dist/common/runApi/index.d.ts +1 -1
- package/dist/common/runApi/index.js +33 -55
- package/dist/common/runApi/types.d.ts +277 -61
- package/dist/common/runApi/types.js +26 -2
- package/dist/runtime/executionHelpers.test.js +6 -6
- package/package.json +5 -3
- package/tsconfig.json +1 -2
- package/InterfaceTemplate/index.ts +0 -1
- package/dist/commands/common/getDefaultExportFromFile.d.ts +0 -1
- package/dist/commands/common/utils/webTemplate.d.ts +0 -1
- package/testing +0 -0
|
@@ -36,12 +36,91 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
36
36
|
path: string;
|
|
37
37
|
}>, z.ZodObject<{
|
|
38
38
|
type: z.ZodLiteral<"state">;
|
|
39
|
-
state: z.
|
|
40
|
-
cookies: {
|
|
39
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
40
|
+
cookies: z.ZodArray<z.ZodObject<{
|
|
41
|
+
name: z.ZodString;
|
|
42
|
+
value: z.ZodString;
|
|
43
|
+
domain: z.ZodString;
|
|
44
|
+
path: z.ZodString;
|
|
45
|
+
expires: z.ZodNumber;
|
|
46
|
+
httpOnly: z.ZodBoolean;
|
|
47
|
+
secure: z.ZodBoolean;
|
|
48
|
+
sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
|
|
49
|
+
}, "strip", z.ZodTypeAny, {
|
|
41
50
|
name: string;
|
|
42
51
|
value: string;
|
|
52
|
+
path: string;
|
|
43
53
|
domain: string;
|
|
54
|
+
expires: number;
|
|
55
|
+
httpOnly: boolean;
|
|
56
|
+
secure: boolean;
|
|
57
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
58
|
+
}, {
|
|
59
|
+
name: string;
|
|
60
|
+
value: string;
|
|
61
|
+
path: string;
|
|
62
|
+
domain: string;
|
|
63
|
+
expires: number;
|
|
64
|
+
httpOnly: boolean;
|
|
65
|
+
secure: boolean;
|
|
66
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
67
|
+
}>, "many">;
|
|
68
|
+
origins: z.ZodArray<z.ZodObject<{
|
|
69
|
+
origin: z.ZodString;
|
|
70
|
+
localStorage: z.ZodArray<z.ZodObject<{
|
|
71
|
+
name: z.ZodString;
|
|
72
|
+
value: z.ZodString;
|
|
73
|
+
}, "strip", z.ZodTypeAny, {
|
|
74
|
+
name: string;
|
|
75
|
+
value: string;
|
|
76
|
+
}, {
|
|
77
|
+
name: string;
|
|
78
|
+
value: string;
|
|
79
|
+
}>, "many">;
|
|
80
|
+
}, "strip", z.ZodTypeAny, {
|
|
81
|
+
origin: string;
|
|
82
|
+
localStorage: {
|
|
83
|
+
name: string;
|
|
84
|
+
value: string;
|
|
85
|
+
}[];
|
|
86
|
+
}, {
|
|
87
|
+
origin: string;
|
|
88
|
+
localStorage: {
|
|
89
|
+
name: string;
|
|
90
|
+
value: string;
|
|
91
|
+
}[];
|
|
92
|
+
}>, "many">;
|
|
93
|
+
sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
94
|
+
origin: z.ZodString;
|
|
95
|
+
sessionStorage: z.ZodArray<z.ZodObject<{
|
|
96
|
+
name: z.ZodString;
|
|
97
|
+
value: z.ZodString;
|
|
98
|
+
}, "strip", z.ZodTypeAny, {
|
|
99
|
+
name: string;
|
|
100
|
+
value: string;
|
|
101
|
+
}, {
|
|
102
|
+
name: string;
|
|
103
|
+
value: string;
|
|
104
|
+
}>, "many">;
|
|
105
|
+
}, "strip", z.ZodTypeAny, {
|
|
106
|
+
origin: string;
|
|
107
|
+
sessionStorage: {
|
|
108
|
+
name: string;
|
|
109
|
+
value: string;
|
|
110
|
+
}[];
|
|
111
|
+
}, {
|
|
112
|
+
origin: string;
|
|
113
|
+
sessionStorage: {
|
|
114
|
+
name: string;
|
|
115
|
+
value: string;
|
|
116
|
+
}[];
|
|
117
|
+
}>, "many">>;
|
|
118
|
+
}, "strip", z.ZodTypeAny, {
|
|
119
|
+
cookies: {
|
|
120
|
+
name: string;
|
|
121
|
+
value: string;
|
|
44
122
|
path: string;
|
|
123
|
+
domain: string;
|
|
45
124
|
expires: number;
|
|
46
125
|
httpOnly: boolean;
|
|
47
126
|
secure: boolean;
|
|
@@ -54,14 +133,19 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
54
133
|
value: string;
|
|
55
134
|
}[];
|
|
56
135
|
}[];
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
136
|
+
sessionStorage?: {
|
|
137
|
+
origin: string;
|
|
138
|
+
sessionStorage: {
|
|
139
|
+
name: string;
|
|
140
|
+
value: string;
|
|
141
|
+
}[];
|
|
142
|
+
}[] | undefined;
|
|
143
|
+
}, {
|
|
60
144
|
cookies: {
|
|
61
145
|
name: string;
|
|
62
146
|
value: string;
|
|
63
|
-
domain: string;
|
|
64
147
|
path: string;
|
|
148
|
+
domain: string;
|
|
65
149
|
expires: number;
|
|
66
150
|
httpOnly: boolean;
|
|
67
151
|
secure: boolean;
|
|
@@ -74,17 +158,22 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
74
158
|
value: string;
|
|
75
159
|
}[];
|
|
76
160
|
}[];
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
161
|
+
sessionStorage?: {
|
|
162
|
+
origin: string;
|
|
163
|
+
sessionStorage: {
|
|
164
|
+
name: string;
|
|
165
|
+
value: string;
|
|
166
|
+
}[];
|
|
167
|
+
}[] | undefined;
|
|
168
|
+
}>>>;
|
|
80
169
|
}, "strip", z.ZodTypeAny, {
|
|
81
170
|
type: "state";
|
|
82
|
-
state
|
|
171
|
+
state?: {
|
|
83
172
|
cookies: {
|
|
84
173
|
name: string;
|
|
85
174
|
value: string;
|
|
86
|
-
domain: string;
|
|
87
175
|
path: string;
|
|
176
|
+
domain: string;
|
|
88
177
|
expires: number;
|
|
89
178
|
httpOnly: boolean;
|
|
90
179
|
secure: boolean;
|
|
@@ -97,17 +186,22 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
97
186
|
value: string;
|
|
98
187
|
}[];
|
|
99
188
|
}[];
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
189
|
+
sessionStorage?: {
|
|
190
|
+
origin: string;
|
|
191
|
+
sessionStorage: {
|
|
192
|
+
name: string;
|
|
193
|
+
value: string;
|
|
194
|
+
}[];
|
|
195
|
+
}[] | undefined;
|
|
196
|
+
} | null | undefined;
|
|
103
197
|
}, {
|
|
104
198
|
type: "state";
|
|
105
|
-
state
|
|
199
|
+
state?: {
|
|
106
200
|
cookies: {
|
|
107
201
|
name: string;
|
|
108
202
|
value: string;
|
|
109
|
-
domain: string;
|
|
110
203
|
path: string;
|
|
204
|
+
domain: string;
|
|
111
205
|
expires: number;
|
|
112
206
|
httpOnly: boolean;
|
|
113
207
|
secure: boolean;
|
|
@@ -120,12 +214,16 @@ export declare const runApiSessionSchema: z.ZodDiscriminatedUnion<"type", [z.Zod
|
|
|
120
214
|
value: string;
|
|
121
215
|
}[];
|
|
122
216
|
}[];
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
217
|
+
sessionStorage?: {
|
|
218
|
+
origin: string;
|
|
219
|
+
sessionStorage: {
|
|
220
|
+
name: string;
|
|
221
|
+
value: string;
|
|
222
|
+
}[];
|
|
223
|
+
}[] | undefined;
|
|
224
|
+
} | null | undefined;
|
|
126
225
|
}>]>;
|
|
127
226
|
export declare const runApiParametersSchema: z.ZodObject<{
|
|
128
|
-
functionsToken: z.ZodOptional<z.ZodString>;
|
|
129
227
|
automationFunction: z.ZodObject<{
|
|
130
228
|
name: z.ZodString;
|
|
131
229
|
params: z.ZodOptional<z.ZodAny>;
|
|
@@ -164,12 +262,91 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
164
262
|
path: string;
|
|
165
263
|
}>, z.ZodObject<{
|
|
166
264
|
type: z.ZodLiteral<"state">;
|
|
167
|
-
state: z.
|
|
168
|
-
cookies: {
|
|
265
|
+
state: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
266
|
+
cookies: z.ZodArray<z.ZodObject<{
|
|
267
|
+
name: z.ZodString;
|
|
268
|
+
value: z.ZodString;
|
|
269
|
+
domain: z.ZodString;
|
|
270
|
+
path: z.ZodString;
|
|
271
|
+
expires: z.ZodNumber;
|
|
272
|
+
httpOnly: z.ZodBoolean;
|
|
273
|
+
secure: z.ZodBoolean;
|
|
274
|
+
sameSite: z.ZodEnum<["Strict", "Lax", "None"]>;
|
|
275
|
+
}, "strip", z.ZodTypeAny, {
|
|
276
|
+
name: string;
|
|
277
|
+
value: string;
|
|
278
|
+
path: string;
|
|
279
|
+
domain: string;
|
|
280
|
+
expires: number;
|
|
281
|
+
httpOnly: boolean;
|
|
282
|
+
secure: boolean;
|
|
283
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
284
|
+
}, {
|
|
169
285
|
name: string;
|
|
170
286
|
value: string;
|
|
287
|
+
path: string;
|
|
171
288
|
domain: string;
|
|
289
|
+
expires: number;
|
|
290
|
+
httpOnly: boolean;
|
|
291
|
+
secure: boolean;
|
|
292
|
+
sameSite: "Strict" | "Lax" | "None";
|
|
293
|
+
}>, "many">;
|
|
294
|
+
origins: z.ZodArray<z.ZodObject<{
|
|
295
|
+
origin: z.ZodString;
|
|
296
|
+
localStorage: z.ZodArray<z.ZodObject<{
|
|
297
|
+
name: z.ZodString;
|
|
298
|
+
value: z.ZodString;
|
|
299
|
+
}, "strip", z.ZodTypeAny, {
|
|
300
|
+
name: string;
|
|
301
|
+
value: string;
|
|
302
|
+
}, {
|
|
303
|
+
name: string;
|
|
304
|
+
value: string;
|
|
305
|
+
}>, "many">;
|
|
306
|
+
}, "strip", z.ZodTypeAny, {
|
|
307
|
+
origin: string;
|
|
308
|
+
localStorage: {
|
|
309
|
+
name: string;
|
|
310
|
+
value: string;
|
|
311
|
+
}[];
|
|
312
|
+
}, {
|
|
313
|
+
origin: string;
|
|
314
|
+
localStorage: {
|
|
315
|
+
name: string;
|
|
316
|
+
value: string;
|
|
317
|
+
}[];
|
|
318
|
+
}>, "many">;
|
|
319
|
+
sessionStorage: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
320
|
+
origin: z.ZodString;
|
|
321
|
+
sessionStorage: z.ZodArray<z.ZodObject<{
|
|
322
|
+
name: z.ZodString;
|
|
323
|
+
value: z.ZodString;
|
|
324
|
+
}, "strip", z.ZodTypeAny, {
|
|
325
|
+
name: string;
|
|
326
|
+
value: string;
|
|
327
|
+
}, {
|
|
328
|
+
name: string;
|
|
329
|
+
value: string;
|
|
330
|
+
}>, "many">;
|
|
331
|
+
}, "strip", z.ZodTypeAny, {
|
|
332
|
+
origin: string;
|
|
333
|
+
sessionStorage: {
|
|
334
|
+
name: string;
|
|
335
|
+
value: string;
|
|
336
|
+
}[];
|
|
337
|
+
}, {
|
|
338
|
+
origin: string;
|
|
339
|
+
sessionStorage: {
|
|
340
|
+
name: string;
|
|
341
|
+
value: string;
|
|
342
|
+
}[];
|
|
343
|
+
}>, "many">>;
|
|
344
|
+
}, "strip", z.ZodTypeAny, {
|
|
345
|
+
cookies: {
|
|
346
|
+
name: string;
|
|
347
|
+
value: string;
|
|
172
348
|
path: string;
|
|
349
|
+
domain: string;
|
|
173
350
|
expires: number;
|
|
174
351
|
httpOnly: boolean;
|
|
175
352
|
secure: boolean;
|
|
@@ -182,14 +359,19 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
182
359
|
value: string;
|
|
183
360
|
}[];
|
|
184
361
|
}[];
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
362
|
+
sessionStorage?: {
|
|
363
|
+
origin: string;
|
|
364
|
+
sessionStorage: {
|
|
365
|
+
name: string;
|
|
366
|
+
value: string;
|
|
367
|
+
}[];
|
|
368
|
+
}[] | undefined;
|
|
369
|
+
}, {
|
|
188
370
|
cookies: {
|
|
189
371
|
name: string;
|
|
190
372
|
value: string;
|
|
191
|
-
domain: string;
|
|
192
373
|
path: string;
|
|
374
|
+
domain: string;
|
|
193
375
|
expires: number;
|
|
194
376
|
httpOnly: boolean;
|
|
195
377
|
secure: boolean;
|
|
@@ -202,17 +384,22 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
202
384
|
value: string;
|
|
203
385
|
}[];
|
|
204
386
|
}[];
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
387
|
+
sessionStorage?: {
|
|
388
|
+
origin: string;
|
|
389
|
+
sessionStorage: {
|
|
390
|
+
name: string;
|
|
391
|
+
value: string;
|
|
392
|
+
}[];
|
|
393
|
+
}[] | undefined;
|
|
394
|
+
}>>>;
|
|
208
395
|
}, "strip", z.ZodTypeAny, {
|
|
209
396
|
type: "state";
|
|
210
|
-
state
|
|
397
|
+
state?: {
|
|
211
398
|
cookies: {
|
|
212
399
|
name: string;
|
|
213
400
|
value: string;
|
|
214
|
-
domain: string;
|
|
215
401
|
path: string;
|
|
402
|
+
domain: string;
|
|
216
403
|
expires: number;
|
|
217
404
|
httpOnly: boolean;
|
|
218
405
|
secure: boolean;
|
|
@@ -225,17 +412,22 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
225
412
|
value: string;
|
|
226
413
|
}[];
|
|
227
414
|
}[];
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
415
|
+
sessionStorage?: {
|
|
416
|
+
origin: string;
|
|
417
|
+
sessionStorage: {
|
|
418
|
+
name: string;
|
|
419
|
+
value: string;
|
|
420
|
+
}[];
|
|
421
|
+
}[] | undefined;
|
|
422
|
+
} | null | undefined;
|
|
231
423
|
}, {
|
|
232
424
|
type: "state";
|
|
233
|
-
state
|
|
425
|
+
state?: {
|
|
234
426
|
cookies: {
|
|
235
427
|
name: string;
|
|
236
428
|
value: string;
|
|
237
|
-
domain: string;
|
|
238
429
|
path: string;
|
|
430
|
+
domain: string;
|
|
239
431
|
expires: number;
|
|
240
432
|
httpOnly: boolean;
|
|
241
433
|
secure: boolean;
|
|
@@ -248,9 +440,14 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
248
440
|
value: string;
|
|
249
441
|
}[];
|
|
250
442
|
}[];
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
443
|
+
sessionStorage?: {
|
|
444
|
+
origin: string;
|
|
445
|
+
sessionStorage: {
|
|
446
|
+
name: string;
|
|
447
|
+
value: string;
|
|
448
|
+
}[];
|
|
449
|
+
}[] | undefined;
|
|
450
|
+
} | null | undefined;
|
|
254
451
|
}>]>;
|
|
255
452
|
runCheck: z.ZodDefault<z.ZodBoolean>;
|
|
256
453
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -259,12 +456,12 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
259
456
|
path: string;
|
|
260
457
|
} | {
|
|
261
458
|
type: "state";
|
|
262
|
-
state
|
|
459
|
+
state?: {
|
|
263
460
|
cookies: {
|
|
264
461
|
name: string;
|
|
265
462
|
value: string;
|
|
266
|
-
domain: string;
|
|
267
463
|
path: string;
|
|
464
|
+
domain: string;
|
|
268
465
|
expires: number;
|
|
269
466
|
httpOnly: boolean;
|
|
270
467
|
secure: boolean;
|
|
@@ -277,9 +474,14 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
277
474
|
value: string;
|
|
278
475
|
}[];
|
|
279
476
|
}[];
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
477
|
+
sessionStorage?: {
|
|
478
|
+
origin: string;
|
|
479
|
+
sessionStorage: {
|
|
480
|
+
name: string;
|
|
481
|
+
value: string;
|
|
482
|
+
}[];
|
|
483
|
+
}[] | undefined;
|
|
484
|
+
} | null | undefined;
|
|
283
485
|
};
|
|
284
486
|
runCheck: boolean;
|
|
285
487
|
}, {
|
|
@@ -288,12 +490,12 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
288
490
|
path: string;
|
|
289
491
|
} | {
|
|
290
492
|
type: "state";
|
|
291
|
-
state
|
|
493
|
+
state?: {
|
|
292
494
|
cookies: {
|
|
293
495
|
name: string;
|
|
294
496
|
value: string;
|
|
295
|
-
domain: string;
|
|
296
497
|
path: string;
|
|
498
|
+
domain: string;
|
|
297
499
|
expires: number;
|
|
298
500
|
httpOnly: boolean;
|
|
299
501
|
secure: boolean;
|
|
@@ -306,9 +508,14 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
306
508
|
value: string;
|
|
307
509
|
}[];
|
|
308
510
|
}[];
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
511
|
+
sessionStorage?: {
|
|
512
|
+
origin: string;
|
|
513
|
+
sessionStorage: {
|
|
514
|
+
name: string;
|
|
515
|
+
value: string;
|
|
516
|
+
}[];
|
|
517
|
+
}[] | undefined;
|
|
518
|
+
} | null | undefined;
|
|
312
519
|
};
|
|
313
520
|
runCheck?: boolean | undefined;
|
|
314
521
|
}>>;
|
|
@@ -383,19 +590,18 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
383
590
|
cdpAddress: string;
|
|
384
591
|
};
|
|
385
592
|
retrieveSession: boolean;
|
|
386
|
-
functionsToken?: string | undefined;
|
|
387
593
|
auth?: {
|
|
388
594
|
session: {
|
|
389
595
|
type: "file";
|
|
390
596
|
path: string;
|
|
391
597
|
} | {
|
|
392
598
|
type: "state";
|
|
393
|
-
state
|
|
599
|
+
state?: {
|
|
394
600
|
cookies: {
|
|
395
601
|
name: string;
|
|
396
602
|
value: string;
|
|
397
|
-
domain: string;
|
|
398
603
|
path: string;
|
|
604
|
+
domain: string;
|
|
399
605
|
expires: number;
|
|
400
606
|
httpOnly: boolean;
|
|
401
607
|
secure: boolean;
|
|
@@ -408,9 +614,14 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
408
614
|
value: string;
|
|
409
615
|
}[];
|
|
410
616
|
}[];
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
617
|
+
sessionStorage?: {
|
|
618
|
+
origin: string;
|
|
619
|
+
sessionStorage: {
|
|
620
|
+
name: string;
|
|
621
|
+
value: string;
|
|
622
|
+
}[];
|
|
623
|
+
}[] | undefined;
|
|
624
|
+
} | null | undefined;
|
|
414
625
|
};
|
|
415
626
|
runCheck: boolean;
|
|
416
627
|
} | undefined;
|
|
@@ -419,7 +630,6 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
419
630
|
name: string;
|
|
420
631
|
params?: any;
|
|
421
632
|
};
|
|
422
|
-
functionsToken?: string | undefined;
|
|
423
633
|
tracing?: {
|
|
424
634
|
enabled: false;
|
|
425
635
|
} | {
|
|
@@ -432,12 +642,12 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
432
642
|
path: string;
|
|
433
643
|
} | {
|
|
434
644
|
type: "state";
|
|
435
|
-
state
|
|
645
|
+
state?: {
|
|
436
646
|
cookies: {
|
|
437
647
|
name: string;
|
|
438
648
|
value: string;
|
|
439
|
-
domain: string;
|
|
440
649
|
path: string;
|
|
650
|
+
domain: string;
|
|
441
651
|
expires: number;
|
|
442
652
|
httpOnly: boolean;
|
|
443
653
|
secure: boolean;
|
|
@@ -450,9 +660,14 @@ export declare const runApiParametersSchema: z.ZodObject<{
|
|
|
450
660
|
value: string;
|
|
451
661
|
}[];
|
|
452
662
|
}[];
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
663
|
+
sessionStorage?: {
|
|
664
|
+
origin: string;
|
|
665
|
+
sessionStorage: {
|
|
666
|
+
name: string;
|
|
667
|
+
value: string;
|
|
668
|
+
}[];
|
|
669
|
+
}[] | undefined;
|
|
670
|
+
} | null | undefined;
|
|
456
671
|
};
|
|
457
672
|
runCheck?: boolean | undefined;
|
|
458
673
|
} | undefined;
|
|
@@ -475,6 +690,7 @@ export type RunApiSession = z.infer<typeof runApiSessionSchema>;
|
|
|
475
690
|
export type RunApiParameters = z.input<typeof runApiParametersSchema>;
|
|
476
691
|
export type ExtendedRunApiParameters = RunApiParameters & {
|
|
477
692
|
abortSignal?: AbortSignal;
|
|
693
|
+
importFunction?: (name: string) => Promise<any> | undefined;
|
|
478
694
|
};
|
|
479
695
|
export type RunApiResultOk<R = any> = {
|
|
480
696
|
result: R;
|
|
@@ -11,10 +11,34 @@ const runApiSessionSchema = exports.runApiSessionSchema = _zod.default.discrimin
|
|
|
11
11
|
path: _zod.default.string()
|
|
12
12
|
}), _zod.default.object({
|
|
13
13
|
type: _zod.default.literal("state"),
|
|
14
|
-
state: _zod.default.
|
|
14
|
+
state: _zod.default.object({
|
|
15
|
+
cookies: _zod.default.array(_zod.default.object({
|
|
16
|
+
name: _zod.default.string(),
|
|
17
|
+
value: _zod.default.string(),
|
|
18
|
+
domain: _zod.default.string(),
|
|
19
|
+
path: _zod.default.string(),
|
|
20
|
+
expires: _zod.default.number(),
|
|
21
|
+
httpOnly: _zod.default.boolean(),
|
|
22
|
+
secure: _zod.default.boolean(),
|
|
23
|
+
sameSite: _zod.default.enum(["Strict", "Lax", "None"])
|
|
24
|
+
})),
|
|
25
|
+
origins: _zod.default.array(_zod.default.object({
|
|
26
|
+
origin: _zod.default.string(),
|
|
27
|
+
localStorage: _zod.default.array(_zod.default.object({
|
|
28
|
+
name: _zod.default.string(),
|
|
29
|
+
value: _zod.default.string()
|
|
30
|
+
}))
|
|
31
|
+
})),
|
|
32
|
+
sessionStorage: _zod.default.array(_zod.default.object({
|
|
33
|
+
origin: _zod.default.string(),
|
|
34
|
+
sessionStorage: _zod.default.array(_zod.default.object({
|
|
35
|
+
name: _zod.default.string(),
|
|
36
|
+
value: _zod.default.string()
|
|
37
|
+
}))
|
|
38
|
+
})).optional()
|
|
39
|
+
}).nullable().optional()
|
|
15
40
|
})]);
|
|
16
41
|
const runApiParametersSchema = exports.runApiParametersSchema = _zod.default.object({
|
|
17
|
-
functionsToken: _zod.default.string().optional(),
|
|
18
42
|
automationFunction: _zod.default.object({
|
|
19
43
|
name: _zod.default.string(),
|
|
20
44
|
params: _zod.default.any().optional()
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var _vitest = require("vitest");
|
|
4
4
|
var _asyncLocalStorage = require("../common/asyncLocalStorage");
|
|
5
|
-
var
|
|
5
|
+
var _ = require(".");
|
|
6
6
|
var _enums = require("./enums");
|
|
7
7
|
(0, _vitest.describe)("Execution Helpers", () => {
|
|
8
8
|
(0, _vitest.it)("should be able to get execution info", () => {
|
|
@@ -11,7 +11,7 @@ var _enums = require("./enums");
|
|
|
11
11
|
runId: "test-run-id",
|
|
12
12
|
extendedPayloads: []
|
|
13
13
|
}, () => {
|
|
14
|
-
(0, _vitest.expect)((0,
|
|
14
|
+
(0, _vitest.expect)((0, _.runInfo)().runId).toEqual("test-run-id");
|
|
15
15
|
});
|
|
16
16
|
});
|
|
17
17
|
(0, _vitest.it)("should be able to mutate extendedPayloads and get the accmulated value at the end ", () => {
|
|
@@ -26,7 +26,7 @@ var _enums = require("./enums");
|
|
|
26
26
|
}, () => {
|
|
27
27
|
var _getExecutionContext, _getExecutionContext2;
|
|
28
28
|
(0, _vitest.expect)((_getExecutionContext = (0, _asyncLocalStorage.getExecutionContext)()) === null || _getExecutionContext === void 0 ? void 0 : _getExecutionContext.extendedPayloads).toEqual([]);
|
|
29
|
-
(0,
|
|
29
|
+
(0, _.extendPayload)({
|
|
30
30
|
api: "test-api",
|
|
31
31
|
parameters: {}
|
|
32
32
|
});
|
|
@@ -34,15 +34,15 @@ var _enums = require("./enums");
|
|
|
34
34
|
api: "test-api",
|
|
35
35
|
parameters: {}
|
|
36
36
|
}]);
|
|
37
|
-
(0,
|
|
37
|
+
(0, _.extendPayload)({
|
|
38
38
|
api: "test-api",
|
|
39
39
|
parameters: {}
|
|
40
40
|
});
|
|
41
|
-
(0,
|
|
41
|
+
(0, _.extendPayload)({
|
|
42
42
|
api: "test-api",
|
|
43
43
|
parameters: {}
|
|
44
44
|
});
|
|
45
|
-
(0,
|
|
45
|
+
(0, _.extendPayload)({
|
|
46
46
|
api: "test-api",
|
|
47
47
|
parameters: {}
|
|
48
48
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@intuned/runtime-dev",
|
|
3
|
-
"version": "0.1.0-test.
|
|
3
|
+
"version": "0.1.0-test.41",
|
|
4
4
|
"description": "Intuned runtime",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dist/index.js",
|
|
@@ -51,6 +51,7 @@
|
|
|
51
51
|
"intuned-ts-check": "./bin/intuned-ts-check"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
+
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
54
55
|
"@intuned/playwright": "^1.44.1-4",
|
|
55
56
|
"@intuned/playwright-core": "^1.44.1-4",
|
|
56
57
|
"@rollup/plugin-commonjs": "^25.0.2",
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"@types/node": "^20.4.1",
|
|
66
67
|
"applicationinsights": "^2.9.2",
|
|
67
68
|
"async-retry": "^1.3.3",
|
|
69
|
+
"babel-plugin-dynamic-import-node": "^2.3.3",
|
|
68
70
|
"chalk": "^4.1.2",
|
|
69
71
|
"commander": "^11.0.0",
|
|
70
72
|
"cross-fetch": "^4.0.0",
|
|
@@ -89,12 +91,12 @@
|
|
|
89
91
|
"source-map": "^0.7.4",
|
|
90
92
|
"stack-utils": "^2.0.6",
|
|
91
93
|
"ts-morph": "^21.0.1",
|
|
92
|
-
"ts-node": "^10.9.1",
|
|
93
94
|
"tslib": "^2.6.0",
|
|
94
95
|
"typescript": "^5.1.6",
|
|
95
96
|
"wait-on": "^7.2.0",
|
|
96
97
|
"zod": "^3.21.4",
|
|
97
|
-
"zod-validation-error": "^3.0.3"
|
|
98
|
+
"zod-validation-error": "^3.0.3",
|
|
99
|
+
"ts-node": "^10.9.1"
|
|
98
100
|
},
|
|
99
101
|
"devDependencies": {
|
|
100
102
|
"@babel/cli": "^7.23.4",
|
package/tsconfig.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import * as _ from "@intuned/runtime/dist/commands/interface/run";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function getDefaultExportFromFile(apiFilePath: string): Promise<any>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const moveWebTemplateFiles: () => Promise<void>;
|
package/testing
DELETED
|
Binary file
|