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