@skyramp/testbot-core 0.13.1 → 0.13.2-v3.478
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/dist/VERSION.json +1 -1
- package/dist/data-safety-worker.js +51 -51
- package/dist/main.js +569 -543
- package/dist/post.js +191 -167
- package/dist/runner-client.cjs +152 -130
- package/dist/runner-client.d.cts +86 -6
- package/dist/setup-failure.cjs +1 -0
- package/dist/setup-failure.d.cts +32 -0
- package/dist/shared-environment-test.cjs +7 -0
- package/dist/shared-environment-test.d.cts +372 -0
- package/package.json +8 -3
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
// Generated by dts-bundle-generator v9.5.1
|
|
2
|
+
|
|
3
|
+
import { z } from 'zod/v3';
|
|
4
|
+
|
|
5
|
+
declare enum SharedHttpUpdateMethod {
|
|
6
|
+
Patch = "PATCH",
|
|
7
|
+
Put = "PUT"
|
|
8
|
+
}
|
|
9
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
10
|
+
[key: string]: JsonValue;
|
|
11
|
+
};
|
|
12
|
+
declare const DeliveredSharedTestSpecSchema: z.ZodUnion<[
|
|
13
|
+
z.ZodObject<{
|
|
14
|
+
name: z.ZodString;
|
|
15
|
+
definition: z.ZodObject<{
|
|
16
|
+
environmentId: z.ZodString;
|
|
17
|
+
environmentAddress: z.ZodString;
|
|
18
|
+
targetId: z.ZodOptional<z.ZodString>;
|
|
19
|
+
appOrigin: z.ZodOptional<z.ZodString>;
|
|
20
|
+
offLimits: z.ZodArray<z.ZodString, "many">;
|
|
21
|
+
bearerTokenEnv: z.ZodOptional<z.ZodString>;
|
|
22
|
+
route: z.ZodObject<{
|
|
23
|
+
kind: z.ZodLiteral<"persistence">;
|
|
24
|
+
}, "strict", z.ZodTypeAny, {
|
|
25
|
+
kind: "persistence";
|
|
26
|
+
}, {
|
|
27
|
+
kind: "persistence";
|
|
28
|
+
}>;
|
|
29
|
+
}, "strict", z.ZodTypeAny, {
|
|
30
|
+
environmentId: string;
|
|
31
|
+
environmentAddress: string;
|
|
32
|
+
offLimits: string[];
|
|
33
|
+
route: {
|
|
34
|
+
kind: "persistence";
|
|
35
|
+
};
|
|
36
|
+
targetId?: string | undefined;
|
|
37
|
+
appOrigin?: string | undefined;
|
|
38
|
+
bearerTokenEnv?: string | undefined;
|
|
39
|
+
}, {
|
|
40
|
+
environmentId: string;
|
|
41
|
+
environmentAddress: string;
|
|
42
|
+
offLimits: string[];
|
|
43
|
+
route: {
|
|
44
|
+
kind: "persistence";
|
|
45
|
+
};
|
|
46
|
+
targetId?: string | undefined;
|
|
47
|
+
appOrigin?: string | undefined;
|
|
48
|
+
bearerTokenEnv?: string | undefined;
|
|
49
|
+
}>;
|
|
50
|
+
steps: z.ZodEffects<z.ZodArray<z.ZodDiscriminatedUnion<"op", [
|
|
51
|
+
z.ZodObject<{
|
|
52
|
+
op: z.ZodLiteral<"create">;
|
|
53
|
+
collection: z.ZodString;
|
|
54
|
+
body: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
|
|
55
|
+
uniqueField: z.ZodString;
|
|
56
|
+
expectedStatus: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
57
|
+
responseIdPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
58
|
+
responseUniqueFieldPath: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
+
as: z.ZodString;
|
|
60
|
+
}, "strict", z.ZodTypeAny, {
|
|
61
|
+
body: Record<string, JsonValue>;
|
|
62
|
+
op: "create";
|
|
63
|
+
collection: string;
|
|
64
|
+
uniqueField: string;
|
|
65
|
+
as: string;
|
|
66
|
+
responseIdPath?: string[] | undefined;
|
|
67
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
68
|
+
expectedStatus?: number | undefined;
|
|
69
|
+
}, {
|
|
70
|
+
body: Record<string, JsonValue>;
|
|
71
|
+
op: "create";
|
|
72
|
+
collection: string;
|
|
73
|
+
uniqueField: string;
|
|
74
|
+
as: string;
|
|
75
|
+
responseIdPath?: string[] | undefined;
|
|
76
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
77
|
+
expectedStatus?: number | undefined;
|
|
78
|
+
}>,
|
|
79
|
+
z.ZodObject<{
|
|
80
|
+
op: z.ZodLiteral<"read">;
|
|
81
|
+
resource: z.ZodString;
|
|
82
|
+
as: z.ZodString;
|
|
83
|
+
expectedStatus: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
84
|
+
query: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
85
|
+
}, "strict", z.ZodTypeAny, {
|
|
86
|
+
op: "read";
|
|
87
|
+
as: string;
|
|
88
|
+
resource: string;
|
|
89
|
+
query?: Record<string, string> | undefined;
|
|
90
|
+
expectedStatus?: number | undefined;
|
|
91
|
+
}, {
|
|
92
|
+
op: "read";
|
|
93
|
+
as: string;
|
|
94
|
+
resource: string;
|
|
95
|
+
query?: Record<string, string> | undefined;
|
|
96
|
+
expectedStatus?: number | undefined;
|
|
97
|
+
}>,
|
|
98
|
+
z.ZodObject<{
|
|
99
|
+
op: z.ZodLiteral<"update">;
|
|
100
|
+
resource: z.ZodString;
|
|
101
|
+
method: z.ZodOptional<z.ZodNativeEnum<typeof SharedHttpUpdateMethod>>;
|
|
102
|
+
expectedStatus: z.ZodOptional<z.ZodEffects<z.ZodNumber, number, number>>;
|
|
103
|
+
body: z.ZodRecord<z.ZodString, z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>>;
|
|
104
|
+
as: z.ZodString;
|
|
105
|
+
}, "strict", z.ZodTypeAny, {
|
|
106
|
+
body: Record<string, JsonValue>;
|
|
107
|
+
op: "update";
|
|
108
|
+
as: string;
|
|
109
|
+
resource: string;
|
|
110
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
111
|
+
expectedStatus?: number | undefined;
|
|
112
|
+
}, {
|
|
113
|
+
body: Record<string, JsonValue>;
|
|
114
|
+
op: "update";
|
|
115
|
+
as: string;
|
|
116
|
+
resource: string;
|
|
117
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
118
|
+
expectedStatus?: number | undefined;
|
|
119
|
+
}>,
|
|
120
|
+
z.ZodObject<{
|
|
121
|
+
op: z.ZodLiteral<"assert">;
|
|
122
|
+
resource: z.ZodString;
|
|
123
|
+
path: z.ZodArray<z.ZodString, "many">;
|
|
124
|
+
equals: z.ZodType<JsonValue, z.ZodTypeDef, JsonValue>;
|
|
125
|
+
}, "strict", z.ZodTypeAny, {
|
|
126
|
+
path: string[];
|
|
127
|
+
op: "assert";
|
|
128
|
+
resource: string;
|
|
129
|
+
equals: JsonValue;
|
|
130
|
+
}, {
|
|
131
|
+
path: string[];
|
|
132
|
+
op: "assert";
|
|
133
|
+
resource: string;
|
|
134
|
+
equals: JsonValue;
|
|
135
|
+
}>,
|
|
136
|
+
z.ZodObject<{
|
|
137
|
+
op: z.ZodLiteral<"assertStatus">;
|
|
138
|
+
resource: z.ZodString;
|
|
139
|
+
equals: z.ZodNumber;
|
|
140
|
+
}, "strict", z.ZodTypeAny, {
|
|
141
|
+
op: "assertStatus";
|
|
142
|
+
resource: string;
|
|
143
|
+
equals: number;
|
|
144
|
+
}, {
|
|
145
|
+
op: "assertStatus";
|
|
146
|
+
resource: string;
|
|
147
|
+
equals: number;
|
|
148
|
+
}>,
|
|
149
|
+
z.ZodObject<{
|
|
150
|
+
op: z.ZodLiteral<"assertHeader">;
|
|
151
|
+
resource: z.ZodString;
|
|
152
|
+
name: z.ZodString;
|
|
153
|
+
equals: z.ZodNullable<z.ZodString>;
|
|
154
|
+
}, "strict", z.ZodTypeAny, {
|
|
155
|
+
op: "assertHeader";
|
|
156
|
+
resource: string;
|
|
157
|
+
equals: string | null;
|
|
158
|
+
name: string;
|
|
159
|
+
}, {
|
|
160
|
+
op: "assertHeader";
|
|
161
|
+
resource: string;
|
|
162
|
+
equals: string | null;
|
|
163
|
+
name: string;
|
|
164
|
+
}>
|
|
165
|
+
]>, "many">, ({
|
|
166
|
+
body: Record<string, JsonValue>;
|
|
167
|
+
op: "create";
|
|
168
|
+
collection: string;
|
|
169
|
+
uniqueField: string;
|
|
170
|
+
as: string;
|
|
171
|
+
responseIdPath?: string[] | undefined;
|
|
172
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
173
|
+
expectedStatus?: number | undefined;
|
|
174
|
+
} | {
|
|
175
|
+
op: "read";
|
|
176
|
+
as: string;
|
|
177
|
+
resource: string;
|
|
178
|
+
query?: Record<string, string> | undefined;
|
|
179
|
+
expectedStatus?: number | undefined;
|
|
180
|
+
} | {
|
|
181
|
+
body: Record<string, JsonValue>;
|
|
182
|
+
op: "update";
|
|
183
|
+
as: string;
|
|
184
|
+
resource: string;
|
|
185
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
186
|
+
expectedStatus?: number | undefined;
|
|
187
|
+
} | {
|
|
188
|
+
path: string[];
|
|
189
|
+
op: "assert";
|
|
190
|
+
resource: string;
|
|
191
|
+
equals: JsonValue;
|
|
192
|
+
} | {
|
|
193
|
+
op: "assertStatus";
|
|
194
|
+
resource: string;
|
|
195
|
+
equals: number;
|
|
196
|
+
} | {
|
|
197
|
+
op: "assertHeader";
|
|
198
|
+
resource: string;
|
|
199
|
+
equals: string | null;
|
|
200
|
+
name: string;
|
|
201
|
+
})[], ({
|
|
202
|
+
body: Record<string, JsonValue>;
|
|
203
|
+
op: "create";
|
|
204
|
+
collection: string;
|
|
205
|
+
uniqueField: string;
|
|
206
|
+
as: string;
|
|
207
|
+
responseIdPath?: string[] | undefined;
|
|
208
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
209
|
+
expectedStatus?: number | undefined;
|
|
210
|
+
} | {
|
|
211
|
+
op: "read";
|
|
212
|
+
as: string;
|
|
213
|
+
resource: string;
|
|
214
|
+
query?: Record<string, string> | undefined;
|
|
215
|
+
expectedStatus?: number | undefined;
|
|
216
|
+
} | {
|
|
217
|
+
body: Record<string, JsonValue>;
|
|
218
|
+
op: "update";
|
|
219
|
+
as: string;
|
|
220
|
+
resource: string;
|
|
221
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
222
|
+
expectedStatus?: number | undefined;
|
|
223
|
+
} | {
|
|
224
|
+
path: string[];
|
|
225
|
+
op: "assert";
|
|
226
|
+
resource: string;
|
|
227
|
+
equals: JsonValue;
|
|
228
|
+
} | {
|
|
229
|
+
op: "assertStatus";
|
|
230
|
+
resource: string;
|
|
231
|
+
equals: number;
|
|
232
|
+
} | {
|
|
233
|
+
op: "assertHeader";
|
|
234
|
+
resource: string;
|
|
235
|
+
equals: string | null;
|
|
236
|
+
name: string;
|
|
237
|
+
})[]>;
|
|
238
|
+
}, "strict", z.ZodTypeAny, {
|
|
239
|
+
name: string;
|
|
240
|
+
steps: ({
|
|
241
|
+
body: Record<string, JsonValue>;
|
|
242
|
+
op: "create";
|
|
243
|
+
collection: string;
|
|
244
|
+
uniqueField: string;
|
|
245
|
+
as: string;
|
|
246
|
+
responseIdPath?: string[] | undefined;
|
|
247
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
248
|
+
expectedStatus?: number | undefined;
|
|
249
|
+
} | {
|
|
250
|
+
op: "read";
|
|
251
|
+
as: string;
|
|
252
|
+
resource: string;
|
|
253
|
+
query?: Record<string, string> | undefined;
|
|
254
|
+
expectedStatus?: number | undefined;
|
|
255
|
+
} | {
|
|
256
|
+
body: Record<string, JsonValue>;
|
|
257
|
+
op: "update";
|
|
258
|
+
as: string;
|
|
259
|
+
resource: string;
|
|
260
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
261
|
+
expectedStatus?: number | undefined;
|
|
262
|
+
} | {
|
|
263
|
+
path: string[];
|
|
264
|
+
op: "assert";
|
|
265
|
+
resource: string;
|
|
266
|
+
equals: JsonValue;
|
|
267
|
+
} | {
|
|
268
|
+
op: "assertStatus";
|
|
269
|
+
resource: string;
|
|
270
|
+
equals: number;
|
|
271
|
+
} | {
|
|
272
|
+
op: "assertHeader";
|
|
273
|
+
resource: string;
|
|
274
|
+
equals: string | null;
|
|
275
|
+
name: string;
|
|
276
|
+
})[];
|
|
277
|
+
definition: {
|
|
278
|
+
environmentId: string;
|
|
279
|
+
environmentAddress: string;
|
|
280
|
+
offLimits: string[];
|
|
281
|
+
route: {
|
|
282
|
+
kind: "persistence";
|
|
283
|
+
};
|
|
284
|
+
targetId?: string | undefined;
|
|
285
|
+
appOrigin?: string | undefined;
|
|
286
|
+
bearerTokenEnv?: string | undefined;
|
|
287
|
+
};
|
|
288
|
+
}, {
|
|
289
|
+
name: string;
|
|
290
|
+
steps: ({
|
|
291
|
+
body: Record<string, JsonValue>;
|
|
292
|
+
op: "create";
|
|
293
|
+
collection: string;
|
|
294
|
+
uniqueField: string;
|
|
295
|
+
as: string;
|
|
296
|
+
responseIdPath?: string[] | undefined;
|
|
297
|
+
responseUniqueFieldPath?: string[] | undefined;
|
|
298
|
+
expectedStatus?: number | undefined;
|
|
299
|
+
} | {
|
|
300
|
+
op: "read";
|
|
301
|
+
as: string;
|
|
302
|
+
resource: string;
|
|
303
|
+
query?: Record<string, string> | undefined;
|
|
304
|
+
expectedStatus?: number | undefined;
|
|
305
|
+
} | {
|
|
306
|
+
body: Record<string, JsonValue>;
|
|
307
|
+
op: "update";
|
|
308
|
+
as: string;
|
|
309
|
+
resource: string;
|
|
310
|
+
method?: SharedHttpUpdateMethod | undefined;
|
|
311
|
+
expectedStatus?: number | undefined;
|
|
312
|
+
} | {
|
|
313
|
+
path: string[];
|
|
314
|
+
op: "assert";
|
|
315
|
+
resource: string;
|
|
316
|
+
equals: JsonValue;
|
|
317
|
+
} | {
|
|
318
|
+
op: "assertStatus";
|
|
319
|
+
resource: string;
|
|
320
|
+
equals: number;
|
|
321
|
+
} | {
|
|
322
|
+
op: "assertHeader";
|
|
323
|
+
resource: string;
|
|
324
|
+
equals: string | null;
|
|
325
|
+
name: string;
|
|
326
|
+
})[];
|
|
327
|
+
definition: {
|
|
328
|
+
environmentId: string;
|
|
329
|
+
environmentAddress: string;
|
|
330
|
+
offLimits: string[];
|
|
331
|
+
route: {
|
|
332
|
+
kind: "persistence";
|
|
333
|
+
};
|
|
334
|
+
targetId?: string | undefined;
|
|
335
|
+
appOrigin?: string | undefined;
|
|
336
|
+
bearerTokenEnv?: string | undefined;
|
|
337
|
+
};
|
|
338
|
+
}>,
|
|
339
|
+
z.ZodObject<{
|
|
340
|
+
name: z.ZodString;
|
|
341
|
+
restriction: z.ZodString;
|
|
342
|
+
sourceAsset: z.ZodObject<{
|
|
343
|
+
path: z.ZodString;
|
|
344
|
+
sha256: z.ZodString;
|
|
345
|
+
}, "strict", z.ZodTypeAny, {
|
|
346
|
+
path: string;
|
|
347
|
+
sha256: string;
|
|
348
|
+
}, {
|
|
349
|
+
path: string;
|
|
350
|
+
sha256: string;
|
|
351
|
+
}>;
|
|
352
|
+
}, "strict", z.ZodTypeAny, {
|
|
353
|
+
name: string;
|
|
354
|
+
restriction: string;
|
|
355
|
+
sourceAsset: {
|
|
356
|
+
path: string;
|
|
357
|
+
sha256: string;
|
|
358
|
+
};
|
|
359
|
+
}, {
|
|
360
|
+
name: string;
|
|
361
|
+
restriction: string;
|
|
362
|
+
sourceAsset: {
|
|
363
|
+
path: string;
|
|
364
|
+
sha256: string;
|
|
365
|
+
};
|
|
366
|
+
}>
|
|
367
|
+
]>;
|
|
368
|
+
export type DeliveredSharedTestSpec = z.infer<typeof DeliveredSharedTestSpecSchema>;
|
|
369
|
+
export declare function renderDeliveredSharedTest(input: DeliveredSharedTestSpec): string;
|
|
370
|
+
export declare function sharedEnvironmentTest(input: DeliveredSharedTestSpec, entryFile: string): Promise<void>;
|
|
371
|
+
|
|
372
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@skyramp/testbot-core",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.2-v3.478",
|
|
4
4
|
"description": "Skyramp Testbot engine: AI-powered deterministic test generation, execution and maintenance",
|
|
5
5
|
"main": "dist/main.js",
|
|
6
6
|
"//files": "An explicit allowlist, never a glob. `dist/` is gitignored, so without this key npm's .gitignore fallback would publish a package with no engine in it; with a glob it would publish the sourcemaps, whose sourcesContent embeds every src/*.ts verbatim. dist/VERSION.json exists only in a release-engine.yml build.",
|
|
@@ -10,9 +10,13 @@
|
|
|
10
10
|
"dist/data-safety-worker.js",
|
|
11
11
|
"dist/runner-client.cjs",
|
|
12
12
|
"dist/runner-client.d.cts",
|
|
13
|
+
"dist/setup-failure.cjs",
|
|
14
|
+
"dist/setup-failure.d.cts",
|
|
13
15
|
"dist/VERSION.json",
|
|
14
16
|
"assets/skyramp-walk/walk.cjs",
|
|
15
|
-
"assets/skyramp-api/gen.cjs"
|
|
17
|
+
"assets/skyramp-api/gen.cjs",
|
|
18
|
+
"dist/shared-environment-test.cjs",
|
|
19
|
+
"dist/shared-environment-test.d.cts"
|
|
16
20
|
],
|
|
17
21
|
"engines": {
|
|
18
22
|
"node": ">=24"
|
|
@@ -22,7 +26,7 @@
|
|
|
22
26
|
"launcherContract": 1
|
|
23
27
|
},
|
|
24
28
|
"scripts": {
|
|
25
|
-
"build": "npm run build:data-safety-worker && esbuild src/index.ts --bundle --platform=node --target=node24 --outfile=dist/main.js --sourcemap --sources-content=false --format=cjs --minify --main-fields=module,main && esbuild src/post.ts --bundle --platform=node --target=node24 --outfile=dist/post.js --sourcemap --sources-content=false --format=cjs --minify --main-fields=module,main && esbuild src/staged/runner-client.ts --bundle --platform=node --target=node22 --outfile=dist/runner-client.cjs --format=cjs --minify --keep-names --main-fields=module,main && dts-bundle-generator --silent --project tsconfig.json --no-check --external-inlines zod -o dist/runner-client.d.cts src/staged/runner-client.ts",
|
|
29
|
+
"build": "npm run build:data-safety-worker && esbuild src/index.ts --bundle --platform=node --target=node24 --outfile=dist/main.js --sourcemap --sources-content=false --format=cjs --minify --main-fields=module,main && esbuild src/post.ts --bundle --platform=node --target=node24 --outfile=dist/post.js --sourcemap --sources-content=false --format=cjs --minify --main-fields=module,main && esbuild src/staged/runner-client.ts --bundle --platform=node --target=node22 --outfile=dist/runner-client.cjs --format=cjs --minify --keep-names --main-fields=module,main && dts-bundle-generator --silent --project tsconfig.json --no-check --external-inlines zod -o dist/runner-client.d.cts src/staged/runner-client.ts && esbuild src/shared-environment-test.ts --bundle --platform=node --target=node24 --outfile=dist/shared-environment-test.cjs --format=cjs --minify --main-fields=module,main && dts-bundle-generator --silent --project tsconfig.json --no-check -o dist/shared-environment-test.d.cts src/shared-environment-test.ts && npm run build:setup-failure",
|
|
26
30
|
"test": "vitest run",
|
|
27
31
|
"test:watch": "vitest",
|
|
28
32
|
"test:contract": "vitest run --config vitest.contract.config.ts",
|
|
@@ -34,6 +38,7 @@
|
|
|
34
38
|
"staged": "npm run build:staged && node dist/staged.js",
|
|
35
39
|
"check:cycles": "madge --circular --extensions ts --ts-config tsconfig.json --exclude '^\\.\\./' src/staged",
|
|
36
40
|
"lint:gate-prompts": "node scripts/lint-gate-prompts.mjs",
|
|
41
|
+
"build:setup-failure": "esbuild src/staged/contracts/setup-failure.ts --bundle --platform=neutral --target=es2022 --outfile=dist/setup-failure.cjs --format=cjs --minify --keep-names && dts-bundle-generator --silent --project tsconfig.json --no-check -o dist/setup-failure.d.cts src/staged/contracts/setup-failure.ts",
|
|
37
42
|
"build:data-safety-worker": "esbuild src/staged/contracts/data-safety-worker.ts --bundle --platform=node --target=node24 --outfile=dist/data-safety-worker.js --format=cjs --minify --main-fields=module,main"
|
|
38
43
|
},
|
|
39
44
|
"repository": {
|