@griffin-app/griffin-ts 0.1.5 → 0.1.7
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/builder.d.ts.map +1 -1
- package/dist/builder.js.map +1 -1
- package/dist/schema-exports.d.ts +1 -1
- package/dist/schema-exports.d.ts.map +1 -1
- package/dist/schema-exports.js +1 -1
- package/dist/schema-exports.js.map +1 -1
- package/dist/schema.d.ts +156 -106
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +15 -24
- package/dist/schema.js.map +1 -1
- package/dist/sequential-builder.d.ts.map +1 -1
- package/dist/sequential-builder.js +1 -1
- package/dist/sequential-builder.js.map +1 -1
- package/dist/shared.d.ts +2 -6
- package/dist/shared.d.ts.map +1 -1
- package/dist/shared.js +5 -21
- package/dist/shared.js.map +1 -1
- package/package.json +1 -1
- package/src/builder.ts +4 -1
- package/src/schema-exports.ts +0 -1
- package/src/schema.ts +17 -30
- package/src/sequential-builder.ts +11 -2
- package/src/shared.ts +9 -24
package/dist/builder.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,IAAI,EAEJ,SAAS,EAGT,QAAQ,EAER,IAAI,EACJ,UAAU,EAEV,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,KAAK,GAAG,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,IAAI,EAEJ,SAAS,EAGT,QAAQ,EAER,IAAI,EACJ,UAAU,EAEV,aAAa,EACd,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,KAAK,GAA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.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,cAAc,EAEd,QAAQ,EAGR,iBAAiB,GAElB,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,cAAc,EAEd,QAAQ,EAGR,iBAAiB,GAElB,MAAM,aAAa,CAAC;AAkGrB;;;GAGG;AACH,MAAM,eAAe;IAST;IAJF,KAAK,GAAW,EAAE,CAAC;IACnB,KAAK,GAAW,EAAE,CAAC;IAE3B,YACU,MAIP;QAJO,WAAM,GAAN,MAAM,CAIb;IACA,CAAC;IAEJ,OAAO,CACL,IAAU,EACV,IAAmB;QAEnB,yDAAyD;QACzD,4FAA4F;QAC5F,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,EAAE,EAAE,IAAI,EAAqB,CAAC,CAAC;QAC1D,qDAAqD;QACrD,OAAO,IAAoE,CAAC;IAC9E,CAAC;IAED,OAAO,CAIL,IAAU,EACV,EAAM;QAMN,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QAC9B,+EAA+E;QAC/E,OAAO,IAIN,CAAC;IACJ,CAAC;IAED,IAAI,KAAK;QACP,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,MAAM,CAAC;QACnD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QACzB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC;QAEzB,MAAM,OAAO,GAAG,GAAY,EAAE;YAC5B,OAAO;gBACL,IAAI;gBACJ,OAAO,EAAE,iBAAiB;gBAC1B,SAAS;gBACT,SAAS;gBACT,KAAK;gBACL,KAAK;aACN,CAAC;QACJ,CA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UAA2B;IACnD,OAAO;QACL,IAAI,EAAE,QAAQ,CAAC,SAAS;QACxB,UAAU,EAAE,UAAU,CAAC,GAAG,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;YACzC,aAAa,EAAE,cAAc,CAAC,IAAI;YAClC,GAAG,SAAS;SACb,CAAC,CAAC;KACJ,CAAC;AACJ,CAAC"}
|
package/dist/schema-exports.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
* TypeBox schemas and enums for griffin test plans.
|
|
3
3
|
* Import from "griffin/schema" to access validation schemas.
|
|
4
4
|
*/
|
|
5
|
-
export { SecretRefDataSchema, SecretRefSchema, SecretOrStringSchema, ResponseFormatSchema, HttpMethodSchema, EndpointSchema, FrequencySchema, WaitSchema, JSONPathSchema, XMLPathSchema, TextPathSchema, UnaryPredicateSchema, BinaryPredicateOperatorSchema, BinaryPredicateSchema, JSONAssertionSchema, XMLAssertionSchema, TextAssertionSchema, AssertionSchema, AssertionsSchema,
|
|
5
|
+
export { SecretRefDataSchema, SecretRefSchema, SecretOrStringSchema, ResponseFormatSchema, HttpMethodSchema, EndpointSchema, FrequencySchema, WaitSchema, JSONPathSchema, XMLPathSchema, TextPathSchema, UnaryPredicateSchema, BinaryPredicateOperatorSchema, BinaryPredicateSchema, JSONAssertionSchema, XMLAssertionSchema, TextAssertionSchema, AssertionSchema, AssertionsSchema, NodeSchema, EdgeSchema, TestPlanV1Schema, FrequencyUnit, ResponseFormat, HttpMethod, NodeType, UnaryPredicate, BinaryPredicateOperator, TEST_PLAN_VERSION, } from "./schema.js";
|
|
6
6
|
//# sourceMappingURL=schema-exports.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-exports.d.ts","sourceRoot":"","sources":["../src/schema-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"schema-exports.d.ts","sourceRoot":"","sources":["../src/schema-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAEL,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,gBAAgB,EAGhB,aAAa,EACb,cAAc,EACd,UAAU,EACV,QAAQ,EACR,cAAc,EACd,uBAAuB,EAGvB,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
package/dist/schema-exports.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
export {
|
|
6
6
|
// Schema values
|
|
7
|
-
SecretRefDataSchema, SecretRefSchema, SecretOrStringSchema, ResponseFormatSchema, HttpMethodSchema, EndpointSchema, FrequencySchema, WaitSchema, JSONPathSchema, XMLPathSchema, TextPathSchema, UnaryPredicateSchema, BinaryPredicateOperatorSchema, BinaryPredicateSchema, JSONAssertionSchema, XMLAssertionSchema, TextAssertionSchema, AssertionSchema, AssertionsSchema,
|
|
7
|
+
SecretRefDataSchema, SecretRefSchema, SecretOrStringSchema, ResponseFormatSchema, HttpMethodSchema, EndpointSchema, FrequencySchema, WaitSchema, JSONPathSchema, XMLPathSchema, TextPathSchema, UnaryPredicateSchema, BinaryPredicateOperatorSchema, BinaryPredicateSchema, JSONAssertionSchema, XMLAssertionSchema, TextAssertionSchema, AssertionSchema, AssertionsSchema, NodeSchema, EdgeSchema, TestPlanV1Schema,
|
|
8
8
|
// Enums (runtime values)
|
|
9
9
|
FrequencyUnit, ResponseFormat, HttpMethod, NodeType, UnaryPredicate, BinaryPredicateOperator,
|
|
10
10
|
// Constants
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-exports.js","sourceRoot":"","sources":["../src/schema-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AACL,gBAAgB;AAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,
|
|
1
|
+
{"version":3,"file":"schema-exports.js","sourceRoot":"","sources":["../src/schema-exports.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO;AACL,gBAAgB;AAChB,mBAAmB,EACnB,eAAe,EACf,oBAAoB,EACpB,oBAAoB,EACpB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,UAAU,EACV,cAAc,EACd,aAAa,EACb,cAAc,EACd,oBAAoB,EACpB,6BAA6B,EAC7B,qBAAqB,EACrB,mBAAmB,EACnB,kBAAkB,EAClB,mBAAmB,EACnB,eAAe,EACf,gBAAgB,EAChB,UAAU,EACV,UAAU,EACV,gBAAgB;AAEhB,yBAAyB;AACzB,aAAa,EACb,cAAc,EACd,UAAU,EACV,QAAQ,EACR,cAAc,EACd,uBAAuB;AAEvB,YAAY;AACZ,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
package/dist/schema.d.ts
CHANGED
|
@@ -48,8 +48,8 @@ export declare enum NodeType {
|
|
|
48
48
|
WAIT = "WAIT",
|
|
49
49
|
ASSERTION = "ASSERTION"
|
|
50
50
|
}
|
|
51
|
-
export declare const ResponseFormatSchema: Type.
|
|
52
|
-
export declare const HttpMethodSchema: Type.
|
|
51
|
+
export declare const ResponseFormatSchema: Type.TUnsafe<ResponseFormat>;
|
|
52
|
+
export declare const HttpMethodSchema: Type.TUnsafe<HttpMethod>;
|
|
53
53
|
export declare const VariableRefSchema: Type.TObject<{
|
|
54
54
|
$variable: Type.TObject<{
|
|
55
55
|
key: Type.TString;
|
|
@@ -60,7 +60,7 @@ export type VariableRef = Static<typeof VariableRefSchema>;
|
|
|
60
60
|
export declare const EndpointSchema: Type.TObject<{
|
|
61
61
|
id: Type.TString;
|
|
62
62
|
type: Type.TLiteral<NodeType.ENDPOINT>;
|
|
63
|
-
method: Type.
|
|
63
|
+
method: Type.TUnsafe<HttpMethod>;
|
|
64
64
|
path: Type.TUnion<[Type.TString, Type.TObject<{
|
|
65
65
|
$variable: Type.TObject<{
|
|
66
66
|
key: Type.TString;
|
|
@@ -82,7 +82,7 @@ export declare const EndpointSchema: Type.TObject<{
|
|
|
82
82
|
}>;
|
|
83
83
|
}>]>>>;
|
|
84
84
|
body: Type.TOptional<Type.TAny>;
|
|
85
|
-
response_format: Type.
|
|
85
|
+
response_format: Type.TUnsafe<ResponseFormat>;
|
|
86
86
|
}>;
|
|
87
87
|
export type Endpoint = Static<typeof EndpointSchema>;
|
|
88
88
|
export declare const FrequencySchema: Type.TObject<{
|
|
@@ -196,61 +196,86 @@ export declare const AssertionsSchema: Type.TObject<{
|
|
|
196
196
|
}>]>]>>;
|
|
197
197
|
}>;
|
|
198
198
|
export type Assertions = Static<typeof AssertionsSchema>;
|
|
199
|
-
export declare const
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
199
|
+
export declare const NodeSchema: Type.TUnion<[Type.TUnsafe<{
|
|
200
|
+
body?: any;
|
|
201
|
+
headers?: import("typebox").StaticRecord<[], "Encode", {}, {
|
|
202
|
+
id: Type.TString;
|
|
203
|
+
type: Type.TLiteral<NodeType.ENDPOINT>;
|
|
204
|
+
method: Type.TUnsafe<HttpMethod>;
|
|
205
|
+
path: Type.TUnion<[Type.TString, Type.TObject<{
|
|
206
|
+
$variable: Type.TObject<{
|
|
207
|
+
key: Type.TString;
|
|
208
|
+
template: Type.TOptional<Type.TString>;
|
|
209
|
+
}>;
|
|
210
|
+
}>]>;
|
|
211
|
+
base: Type.TUnion<[Type.TString, Type.TObject<{
|
|
212
|
+
$variable: Type.TObject<{
|
|
213
|
+
key: Type.TString;
|
|
214
|
+
template: Type.TOptional<Type.TString>;
|
|
215
|
+
}>;
|
|
216
|
+
}>]>;
|
|
217
|
+
headers: Type.TOptional<Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TObject<{
|
|
218
|
+
$secret: Type.TObject<{
|
|
219
|
+
provider: Type.TString;
|
|
220
|
+
ref: Type.TString;
|
|
221
|
+
version: Type.TOptional<Type.TString>;
|
|
222
|
+
field: Type.TOptional<Type.TString>;
|
|
223
|
+
}>;
|
|
224
|
+
}>]>>>;
|
|
225
|
+
body: Type.TOptional<Type.TAny>;
|
|
226
|
+
response_format: Type.TUnsafe<ResponseFormat>;
|
|
227
|
+
}, "^.*$", Type.TUnion<[Type.TString, Type.TObject<{
|
|
217
228
|
$secret: Type.TObject<{
|
|
218
229
|
provider: Type.TString;
|
|
219
230
|
ref: Type.TString;
|
|
220
231
|
version: Type.TOptional<Type.TString>;
|
|
221
232
|
field: Type.TOptional<Type.TString>;
|
|
222
233
|
}>;
|
|
223
|
-
}>]
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
234
|
+
}>]>> | undefined;
|
|
235
|
+
type: NodeType.ENDPOINT;
|
|
236
|
+
id: string;
|
|
237
|
+
method: HttpMethod;
|
|
238
|
+
path: string | {
|
|
239
|
+
$variable: {
|
|
240
|
+
template?: string | undefined;
|
|
241
|
+
key: string;
|
|
242
|
+
};
|
|
243
|
+
};
|
|
244
|
+
base: string | {
|
|
245
|
+
$variable: {
|
|
246
|
+
template?: string | undefined;
|
|
247
|
+
key: string;
|
|
248
|
+
};
|
|
249
|
+
};
|
|
250
|
+
response_format: ResponseFormat;
|
|
251
|
+
}>, Type.TUnsafe<{
|
|
252
|
+
type: NodeType.WAIT;
|
|
253
|
+
id: string;
|
|
254
|
+
duration_ms: number;
|
|
255
|
+
}>, Type.TUnsafe<{
|
|
256
|
+
type: NodeType.ASSERTION;
|
|
257
|
+
id: string;
|
|
258
|
+
assertions: (({
|
|
259
|
+
assertionType: ResponseFormat.JSON;
|
|
260
|
+
} & {
|
|
261
|
+
path: string[];
|
|
262
|
+
nodeId: string;
|
|
263
|
+
accessor: "body" | "headers" | "status";
|
|
264
|
+
predicate: UnaryPredicate | {
|
|
265
|
+
expected: any;
|
|
266
|
+
operator: BinaryPredicateOperator;
|
|
267
|
+
};
|
|
268
|
+
}) | ({
|
|
269
|
+
assertionType: ResponseFormat.XML;
|
|
270
|
+
} & {
|
|
271
|
+
expected: any;
|
|
272
|
+
path: string[];
|
|
273
|
+
}) | ({
|
|
274
|
+
assertionType: ResponseFormat.TEXT;
|
|
275
|
+
} & {
|
|
276
|
+
expected: any;
|
|
277
|
+
path: string;
|
|
278
|
+
}))[];
|
|
254
279
|
}>]>;
|
|
255
280
|
export declare const EdgeSchema: Type.TObject<{
|
|
256
281
|
from: Type.TString;
|
|
@@ -259,7 +284,6 @@ export declare const EdgeSchema: Type.TObject<{
|
|
|
259
284
|
export type Node = Static<typeof NodeSchema>;
|
|
260
285
|
export type Edge = Static<typeof EdgeSchema>;
|
|
261
286
|
export declare const TestPlanV1Schema: Type.TObject<{
|
|
262
|
-
organization: Type.TString;
|
|
263
287
|
project: Type.TString;
|
|
264
288
|
locations: Type.TOptional<Type.TArray<Type.TString>>;
|
|
265
289
|
id: Type.TReadonly<Type.TString>;
|
|
@@ -270,64 +294,90 @@ export declare const TestPlanV1Schema: Type.TObject<{
|
|
|
270
294
|
unit: Type.TUnion<[Type.TLiteral<FrequencyUnit.MINUTE>, Type.TLiteral<FrequencyUnit.HOUR>, Type.TLiteral<FrequencyUnit.DAY>]>;
|
|
271
295
|
}>;
|
|
272
296
|
environment: Type.TString;
|
|
273
|
-
nodes: Type.TArray<Type.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
297
|
+
nodes: Type.TArray<Type.TUnsafe<{
|
|
298
|
+
body?: any;
|
|
299
|
+
headers?: import("typebox").StaticRecord<[], "Encode", {}, {
|
|
300
|
+
id: Type.TString;
|
|
301
|
+
type: Type.TLiteral<NodeType.ENDPOINT>;
|
|
302
|
+
method: Type.TUnsafe<HttpMethod>;
|
|
303
|
+
path: Type.TUnion<[Type.TString, Type.TObject<{
|
|
304
|
+
$variable: Type.TObject<{
|
|
305
|
+
key: Type.TString;
|
|
306
|
+
template: Type.TOptional<Type.TString>;
|
|
307
|
+
}>;
|
|
308
|
+
}>]>;
|
|
309
|
+
base: Type.TUnion<[Type.TString, Type.TObject<{
|
|
310
|
+
$variable: Type.TObject<{
|
|
311
|
+
key: Type.TString;
|
|
312
|
+
template: Type.TOptional<Type.TString>;
|
|
313
|
+
}>;
|
|
314
|
+
}>]>;
|
|
315
|
+
headers: Type.TOptional<Type.TRecord<"^.*$", Type.TUnion<[Type.TString, Type.TObject<{
|
|
316
|
+
$secret: Type.TObject<{
|
|
317
|
+
provider: Type.TString;
|
|
318
|
+
ref: Type.TString;
|
|
319
|
+
version: Type.TOptional<Type.TString>;
|
|
320
|
+
field: Type.TOptional<Type.TString>;
|
|
321
|
+
}>;
|
|
322
|
+
}>]>>>;
|
|
323
|
+
body: Type.TOptional<Type.TAny>;
|
|
324
|
+
response_format: Type.TUnsafe<ResponseFormat>;
|
|
325
|
+
}, "^.*$", Type.TUnion<[Type.TString, Type.TObject<{
|
|
290
326
|
$secret: Type.TObject<{
|
|
291
327
|
provider: Type.TString;
|
|
292
328
|
ref: Type.TString;
|
|
293
329
|
version: Type.TOptional<Type.TString>;
|
|
294
330
|
field: Type.TOptional<Type.TString>;
|
|
295
331
|
}>;
|
|
296
|
-
}>]
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
332
|
+
}>]>> | undefined;
|
|
333
|
+
type: NodeType.ENDPOINT;
|
|
334
|
+
id: string;
|
|
335
|
+
method: HttpMethod;
|
|
336
|
+
path: string | {
|
|
337
|
+
$variable: {
|
|
338
|
+
template?: string | undefined;
|
|
339
|
+
key: string;
|
|
340
|
+
};
|
|
341
|
+
};
|
|
342
|
+
base: string | {
|
|
343
|
+
$variable: {
|
|
344
|
+
template?: string | undefined;
|
|
345
|
+
key: string;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
response_format: ResponseFormat;
|
|
349
|
+
} | {
|
|
350
|
+
type: NodeType.WAIT;
|
|
351
|
+
id: string;
|
|
352
|
+
duration_ms: number;
|
|
353
|
+
} | {
|
|
354
|
+
type: NodeType.ASSERTION;
|
|
355
|
+
id: string;
|
|
356
|
+
assertions: (({
|
|
357
|
+
assertionType: ResponseFormat.JSON;
|
|
358
|
+
} & {
|
|
359
|
+
path: string[];
|
|
360
|
+
nodeId: string;
|
|
361
|
+
accessor: "body" | "headers" | "status";
|
|
362
|
+
predicate: UnaryPredicate | {
|
|
363
|
+
expected: any;
|
|
364
|
+
operator: BinaryPredicateOperator;
|
|
365
|
+
};
|
|
366
|
+
}) | ({
|
|
367
|
+
assertionType: ResponseFormat.XML;
|
|
368
|
+
} & {
|
|
369
|
+
expected: any;
|
|
370
|
+
path: string[];
|
|
371
|
+
}) | ({
|
|
372
|
+
assertionType: ResponseFormat.TEXT;
|
|
373
|
+
} & {
|
|
374
|
+
expected: any;
|
|
375
|
+
path: string;
|
|
376
|
+
}))[];
|
|
377
|
+
}>>;
|
|
378
|
+
edges: Type.TArray<Type.TUnsafe<{
|
|
379
|
+
from: string;
|
|
380
|
+
to: string;
|
|
331
381
|
}>>;
|
|
332
382
|
}>;
|
|
333
383
|
export type TestPlanV1 = Static<typeof TestPlanV1Schema>;
|
package/dist/schema.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,KAAK,MAAM,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,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M,UAAU,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC;AAEzD,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGtB,CAAC;AAEF,eAAO,MAAM,UAAU;;;EAMtB,CAAC;AACF,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAC7C,MAAM,MAAM,IAAI,GAAG,MAAM,CAAC,OAAO,UAAU,CAAC,CAAC;AAE7C,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAe5B,CAAC;AACF,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,gBAAgB,CAAC,CAAC"}
|
package/dist/schema.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Type } from "typebox";
|
|
2
|
+
import { StringEnum, Ref } from "./shared.js";
|
|
2
3
|
export const TEST_PLAN_VERSION = "1.0";
|
|
3
4
|
// Secret reference schema for values that may contain secrets
|
|
4
5
|
export const SecretRefDataSchema = Type.Object({
|
|
@@ -45,21 +46,17 @@ export var NodeType;
|
|
|
45
46
|
NodeType["WAIT"] = "WAIT";
|
|
46
47
|
NodeType["ASSERTION"] = "ASSERTION";
|
|
47
48
|
})(NodeType || (NodeType = {}));
|
|
48
|
-
export const ResponseFormatSchema =
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
Type.Literal(HttpMethod.HEAD),
|
|
60
|
-
Type.Literal(HttpMethod.OPTIONS),
|
|
61
|
-
Type.Literal(HttpMethod.CONNECT),
|
|
62
|
-
Type.Literal(HttpMethod.TRACE),
|
|
49
|
+
export const ResponseFormatSchema = StringEnum([ResponseFormat.JSON, ResponseFormat.XML, ResponseFormat.TEXT], { $id: "ResponseFormat" });
|
|
50
|
+
export const HttpMethodSchema = StringEnum([
|
|
51
|
+
HttpMethod.GET,
|
|
52
|
+
HttpMethod.POST,
|
|
53
|
+
HttpMethod.PUT,
|
|
54
|
+
HttpMethod.DELETE,
|
|
55
|
+
HttpMethod.PATCH,
|
|
56
|
+
HttpMethod.HEAD,
|
|
57
|
+
HttpMethod.OPTIONS,
|
|
58
|
+
HttpMethod.CONNECT,
|
|
59
|
+
HttpMethod.TRACE,
|
|
63
60
|
], { $id: "HttpMethod" });
|
|
64
61
|
export const VariableRefSchema = Type.Object({
|
|
65
62
|
$variable: Type.Object({
|
|
@@ -186,18 +183,12 @@ export const AssertionsSchema = Type.Object({
|
|
|
186
183
|
type: Type.Literal(NodeType.ASSERTION),
|
|
187
184
|
assertions: Type.Array(AssertionSchema),
|
|
188
185
|
}, { $id: "Assertions" });
|
|
189
|
-
export const
|
|
190
|
-
Type.Literal(NodeType.ENDPOINT),
|
|
191
|
-
Type.Literal(NodeType.WAIT),
|
|
192
|
-
Type.Literal(NodeType.ASSERTION),
|
|
193
|
-
], { $id: "NodeType" });
|
|
194
|
-
export const NodeSchema = Type.Union([EndpointSchema, WaitSchema, AssertionsSchema], { $id: "Node" });
|
|
186
|
+
export const NodeSchema = Type.Union([Ref(EndpointSchema), Ref(WaitSchema), Ref(AssertionsSchema)], { $id: "Node" });
|
|
195
187
|
export const EdgeSchema = Type.Object({
|
|
196
188
|
from: Type.String(),
|
|
197
189
|
to: Type.String(),
|
|
198
190
|
}, { $id: "Edge" });
|
|
199
191
|
export const TestPlanV1Schema = Type.Object({
|
|
200
|
-
organization: Type.String(),
|
|
201
192
|
project: Type.String(),
|
|
202
193
|
locations: Type.Optional(Type.Array(Type.String())),
|
|
203
194
|
id: Type.Readonly(Type.String()),
|
|
@@ -205,8 +196,8 @@ export const TestPlanV1Schema = Type.Object({
|
|
|
205
196
|
version: Type.Literal("1.0"),
|
|
206
197
|
frequency: FrequencySchema,
|
|
207
198
|
environment: Type.String({ default: "default" }),
|
|
208
|
-
nodes: Type.Array(NodeSchema),
|
|
209
|
-
edges: Type.Array(EdgeSchema),
|
|
199
|
+
nodes: Type.Array(Ref(NodeSchema)),
|
|
200
|
+
edges: Type.Array(Ref(EdgeSchema)),
|
|
210
201
|
}, {
|
|
211
202
|
$id: "TestPlanV1",
|
|
212
203
|
});
|
package/dist/schema.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAe,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,GAAG,EAAE,MAAM,aAAa,CAAC;AAE9C,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEvC,8DAA8D;AAC9D,MAAM,CAAC,MAAM,mBAAmB,GAAG,IAAI,CAAC,MAAM,CAAC;IAC7C,QAAQ,EAAE,IAAI,CAAC,MAAM,EAAE;IACvB,GAAG,EAAE,IAAI,CAAC,MAAM,EAAE;IAClB,OAAO,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;IACrC,KAAK,EAAE,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC;CACpC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,mBAAmB;CAC7B,CAAC,CAAC;AAEH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,oBAAoB,GAAG,IAAI,CAAC,KAAK,CAAC;IAC7C,IAAI,CAAC,MAAM,EAAE;IACb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I,CAAC,MAAM,EAAE;IACnB,OAAO,EAAE,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC;IAC5B,SAAS,EAAE,eAAe;IAC1B,WAAW,EAAE,IAAI,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,CAAC;IAChD,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IAClC,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;CACnC,EACD;IACE,GAAG,EAAE,YAAY;CAClB,CACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential-builder.d.ts","sourceRoot":"","sources":["../src/sequential-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,
|
|
1
|
+
{"version":3,"file":"sequential-builder.d.ts","sourceRoot":"","sources":["../src/sequential-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAIL,SAAS,EACT,UAAU,EACX,MAAM,aAAa,CAAC;AACrB,OAAO,EAEL,KAAK,mBAAmB,EACxB,KAAK,UAAU,EAChB,MAAM,iBAAiB,CAAC;AAEzB,KAAK,OAAO,GAAG,IAAI,CACjB,UAAU,EACV,IAAI,GAAG,aAAa,GAAG,cAAc,GAAG,SAAS,CAClD,CAAC;AAEF;;GAEG;AACH,MAAM,MAAM,iBAAiB,CAAC,SAAS,SAAS,MAAM,IAAI,CACxD,KAAK,EAAE,UAAU,CAAC,SAAS,CAAC,KACzB,mBAAmB,EAAE,CAAC;AAE3B;;;;;;GAMG;AACH,MAAM,WAAW,qBAAqB,CAAC,SAAS,SAAS,MAAM,GAAG,KAAK;IACrE;;;;;;;;;;;;;;;;OAgBG;IACH,OAAO,CAAC,IAAI,SAAS,MAAM,EACzB,IAAI,EAAE,IAAI,EACV,MAAM,EAAE,cAAc,GACrB,qBAAqB,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAE3C;;;;;;;;;;;;;OAaG;IACH,IAAI,CAAC,IAAI,SAAS,MAAM,EACtB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,YAAY,GACrB,qBAAqB,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IAE3C;;;;;;;;;;;;;;;;;OAiBG;IACH,MAAM,CACJ,QAAQ,EAAE,iBAAiB,CAAC,SAAS,CAAC,GACrC,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAEpC;;;;;OAKG;IACH,KAAK,IAAI,OAAO,CAAC;CAClB;AAqGD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB,GAAG,qBAAqB,CAExB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Endpoint, Wait, Assertion, } from "./builder.js";
|
|
2
2
|
import { START, END } from "./constants.js";
|
|
3
|
-
import { TEST_PLAN_VERSION } from "./schema.js";
|
|
3
|
+
import { TEST_PLAN_VERSION, } from "./schema.js";
|
|
4
4
|
import { createStateProxy, } from "./assertions.js";
|
|
5
5
|
/**
|
|
6
6
|
* Internal implementation class for SequentialTestBuilder.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sequential-builder.js","sourceRoot":"","sources":["../src/sequential-builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,QAAQ,EACR,IAAI,EACJ,SAAS,GAGV,MAAM,cAAc,CAAC;AACtB,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,gBAAgB,CAAC;AAC5C,OAAO,
|
|
1
|
+
{"version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BACtB,EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;aACzB,CAAC,CAAC;QACL,CAAC;QAED,2BAA2B;QAC3B,KAAK,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,EAAE,GAAG,EAAE,CAAC,CAAC;QAEpE,OAAO;YACL,IAAI;YACJ,OAAO,EAAE,iBAAiB;YAC1B,SAAS;YACT,SAAS;YACT,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,KAAK;SACN,CAAC;IACJ,CAAC;CACF;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2CG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAIjC;IACC,OAAO,IAAI,yBAAyB,CAAC,MAAM,CAAC,CAAC;AAC/C,CAAC"}
|
package/dist/shared.d.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import { TSchema, TSchemaOptions, TUnsafe, Static
|
|
1
|
+
import { TSchema, TSchemaOptions, TUnsafe, Static } from "typebox";
|
|
2
2
|
export declare function Ref<T extends TSchema>(t: T, options?: TSchemaOptions): TUnsafe<Static<T>>;
|
|
3
|
-
export declare
|
|
4
|
-
oneOf: Types;
|
|
5
|
-
constructor(oneOf: Types);
|
|
6
|
-
}
|
|
7
|
-
export declare function UnionOneOf(oneOf: TSchema[]): TUnionOneOf;
|
|
3
|
+
export declare const StringEnum: <T extends string[]>(values: [...T], options?: TSchemaOptions) => TUnsafe<T[number]>;
|
|
8
4
|
//# sourceMappingURL=shared.d.ts.map
|
package/dist/shared.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,OAAO,EACP,MAAM,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,cAAc,EACd,OAAO,EACP,MAAM,EAGP,MAAM,SAAS,CAAC;AAIjB,wBAAgB,GAAG,CAAC,CAAC,SAAS,OAAO,EACnC,CAAC,EAAE,CAAC,EACJ,OAAO,GAAE,cAAmB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAMpB;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,EAC3C,QAAQ,CAAC,GAAG,CAAC,CAAC,EACd,UAAS,cAAmB,uBAM1B,CAAC"}
|
package/dist/shared.js
CHANGED
|
@@ -6,25 +6,9 @@ export function Ref(t, options = {}) {
|
|
|
6
6
|
}
|
|
7
7
|
return Unsafe({ ...t, $ref: id, $id: undefined, ...options });
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
export function UnionOneOf(oneOf) {
|
|
17
|
-
return new TUnionOneOf(oneOf);
|
|
18
|
-
}
|
|
19
|
-
//export interface TUnionOneOf<Types extends TSchema[] = TSchema[]> extends TSchema {
|
|
20
|
-
// '~kind': 'UnionOneOf'
|
|
21
|
-
// //static: { [K in keyof Types]: Static<Types[K]> }[number]
|
|
22
|
-
// oneOf: Types
|
|
23
|
-
//}
|
|
24
|
-
//
|
|
25
|
-
//export function UnionOneOf<Types extends TSchema[]>(oneOf: [...Types], options: TSchemaOptions = {}) {
|
|
26
|
-
// return { ...options, ["~kind"]: 'UnionOneOf', oneOf } as TUnionOneOf<Types>
|
|
27
|
-
//
|
|
28
|
-
// ///return Memory.Create({ '~kind': 'UnionOneOf' }, { oneOf }, options) as never
|
|
29
|
-
//}
|
|
9
|
+
export const StringEnum = (values, options = {}) => Type.Unsafe({
|
|
10
|
+
type: "string",
|
|
11
|
+
enum: values,
|
|
12
|
+
...options,
|
|
13
|
+
});
|
|
30
14
|
//# sourceMappingURL=shared.js.map
|
package/dist/shared.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,EACN,IAAI,GACL,MAAM,SAAS,CAAC;AAIjB,MAAM,UAAU,GAAG,CACjB,CAAI,EACJ,UAA0B,EAAE;IAE5B,MAAM,EAAE,GAAI,CAAmD,CAAC,GAAG,CAAC;IACpE,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAY,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,
|
|
1
|
+
{"version":3,"file":"shared.js","sourceRoot":"","sources":["../src/shared.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,EACN,IAAI,GACL,MAAM,SAAS,CAAC;AAIjB,MAAM,UAAU,GAAG,CACjB,CAAI,EACJ,UAA0B,EAAE;IAE5B,MAAM,EAAE,GAAI,CAAmD,CAAC,GAAG,CAAC;IACpE,IAAI,CAAC,EAAE,EAAE,CAAC;QACR,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAC1C,CAAC;IACD,OAAO,MAAM,CAAY,EAAE,GAAG,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,CAAC,MAAM,UAAU,GAAG,CACxB,MAAc,EACd,UAA0B,EAAE,EAC5B,EAAE,CACF,IAAI,CAAC,MAAM,CAAY;IACrB,IAAI,EAAE,QAAQ;IACd,IAAI,EAAE,MAAM;IACZ,GAAG,OAAO;CACX,CAAC,CAAC"}
|
package/package.json
CHANGED
package/src/builder.ts
CHANGED
|
@@ -14,7 +14,10 @@ import {
|
|
|
14
14
|
} from "./schema.js";
|
|
15
15
|
import { type START as StartType, type END as EndType } from "./constants.js";
|
|
16
16
|
|
|
17
|
-
type RawPlan = Omit<
|
|
17
|
+
type RawPlan = Omit<
|
|
18
|
+
TestPlanV1,
|
|
19
|
+
"id" | "environment" | "organization" | "project"
|
|
20
|
+
>;
|
|
18
21
|
|
|
19
22
|
/**
|
|
20
23
|
* A node definition without the id field.
|
package/src/schema-exports.ts
CHANGED
package/src/schema.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { Type, type Static
|
|
1
|
+
import { Type, type Static } from "typebox";
|
|
2
|
+
import { StringEnum, Ref } from "./shared.js";
|
|
2
3
|
|
|
3
4
|
export const TEST_PLAN_VERSION = "1.0";
|
|
4
5
|
|
|
@@ -48,26 +49,22 @@ export enum NodeType {
|
|
|
48
49
|
WAIT = "WAIT",
|
|
49
50
|
ASSERTION = "ASSERTION",
|
|
50
51
|
}
|
|
51
|
-
export const ResponseFormatSchema =
|
|
52
|
-
[
|
|
53
|
-
Type.Literal(ResponseFormat.JSON),
|
|
54
|
-
Type.Literal(ResponseFormat.XML),
|
|
55
|
-
Type.Literal(ResponseFormat.TEXT),
|
|
56
|
-
],
|
|
52
|
+
export const ResponseFormatSchema = StringEnum(
|
|
53
|
+
[ResponseFormat.JSON, ResponseFormat.XML, ResponseFormat.TEXT],
|
|
57
54
|
{ $id: "ResponseFormat" },
|
|
58
55
|
);
|
|
59
56
|
|
|
60
|
-
export const HttpMethodSchema =
|
|
57
|
+
export const HttpMethodSchema = StringEnum(
|
|
61
58
|
[
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
59
|
+
HttpMethod.GET,
|
|
60
|
+
HttpMethod.POST,
|
|
61
|
+
HttpMethod.PUT,
|
|
62
|
+
HttpMethod.DELETE,
|
|
63
|
+
HttpMethod.PATCH,
|
|
64
|
+
HttpMethod.HEAD,
|
|
65
|
+
HttpMethod.OPTIONS,
|
|
66
|
+
HttpMethod.CONNECT,
|
|
67
|
+
HttpMethod.TRACE,
|
|
71
68
|
],
|
|
72
69
|
{ $id: "HttpMethod" },
|
|
73
70
|
);
|
|
@@ -247,17 +244,8 @@ export const AssertionsSchema = Type.Object(
|
|
|
247
244
|
);
|
|
248
245
|
export type Assertions = Static<typeof AssertionsSchema>;
|
|
249
246
|
|
|
250
|
-
export const NodeTypeSchema = Type.Union(
|
|
251
|
-
[
|
|
252
|
-
Type.Literal(NodeType.ENDPOINT),
|
|
253
|
-
Type.Literal(NodeType.WAIT),
|
|
254
|
-
Type.Literal(NodeType.ASSERTION),
|
|
255
|
-
],
|
|
256
|
-
{ $id: "NodeType" },
|
|
257
|
-
);
|
|
258
|
-
|
|
259
247
|
export const NodeSchema = Type.Union(
|
|
260
|
-
[EndpointSchema, WaitSchema, AssertionsSchema],
|
|
248
|
+
[Ref(EndpointSchema), Ref(WaitSchema), Ref(AssertionsSchema)],
|
|
261
249
|
{ $id: "Node" },
|
|
262
250
|
);
|
|
263
251
|
|
|
@@ -273,7 +261,6 @@ export type Edge = Static<typeof EdgeSchema>;
|
|
|
273
261
|
|
|
274
262
|
export const TestPlanV1Schema = Type.Object(
|
|
275
263
|
{
|
|
276
|
-
organization: Type.String(),
|
|
277
264
|
project: Type.String(),
|
|
278
265
|
locations: Type.Optional(Type.Array(Type.String())),
|
|
279
266
|
id: Type.Readonly(Type.String()),
|
|
@@ -281,8 +268,8 @@ export const TestPlanV1Schema = Type.Object(
|
|
|
281
268
|
version: Type.Literal("1.0"),
|
|
282
269
|
frequency: FrequencySchema,
|
|
283
270
|
environment: Type.String({ default: "default" }),
|
|
284
|
-
nodes: Type.Array(NodeSchema),
|
|
285
|
-
edges: Type.Array(EdgeSchema),
|
|
271
|
+
nodes: Type.Array(Ref(NodeSchema)),
|
|
272
|
+
edges: Type.Array(Ref(EdgeSchema)),
|
|
286
273
|
},
|
|
287
274
|
{
|
|
288
275
|
$id: "TestPlanV1",
|
|
@@ -6,14 +6,23 @@ import {
|
|
|
6
6
|
type WaitDuration,
|
|
7
7
|
} from "./builder.js";
|
|
8
8
|
import { START, END } from "./constants.js";
|
|
9
|
-
import {
|
|
9
|
+
import {
|
|
10
|
+
TEST_PLAN_VERSION,
|
|
11
|
+
Edge,
|
|
12
|
+
Node,
|
|
13
|
+
Frequency,
|
|
14
|
+
TestPlanV1,
|
|
15
|
+
} from "./schema.js";
|
|
10
16
|
import {
|
|
11
17
|
createStateProxy,
|
|
12
18
|
type SerializedAssertion,
|
|
13
19
|
type StateProxy,
|
|
14
20
|
} from "./assertions.js";
|
|
15
21
|
|
|
16
|
-
type RawPlan = Omit<
|
|
22
|
+
type RawPlan = Omit<
|
|
23
|
+
TestPlanV1,
|
|
24
|
+
"id" | "environment" | "organization" | "project"
|
|
25
|
+
>;
|
|
17
26
|
|
|
18
27
|
/**
|
|
19
28
|
* Callback type for building assertions with type-safe state access
|
package/src/shared.ts
CHANGED
|
@@ -20,27 +20,12 @@ export function Ref<T extends TSchema>(
|
|
|
20
20
|
return Unsafe<Static<T>>({ ...t, $ref: id, $id: undefined, ...options });
|
|
21
21
|
}
|
|
22
22
|
|
|
23
|
-
export
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
export function UnionOneOf(oneOf: TSchema[]): TUnionOneOf {
|
|
33
|
-
return new TUnionOneOf(oneOf);
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
//export interface TUnionOneOf<Types extends TSchema[] = TSchema[]> extends TSchema {
|
|
37
|
-
// '~kind': 'UnionOneOf'
|
|
38
|
-
// //static: { [K in keyof Types]: Static<Types[K]> }[number]
|
|
39
|
-
// oneOf: Types
|
|
40
|
-
//}
|
|
41
|
-
//
|
|
42
|
-
//export function UnionOneOf<Types extends TSchema[]>(oneOf: [...Types], options: TSchemaOptions = {}) {
|
|
43
|
-
// return { ...options, ["~kind"]: 'UnionOneOf', oneOf } as TUnionOneOf<Types>
|
|
44
|
-
//
|
|
45
|
-
// ///return Memory.Create({ '~kind': 'UnionOneOf' }, { oneOf }, options) as never
|
|
46
|
-
//}
|
|
23
|
+
export const StringEnum = <T extends string[]>(
|
|
24
|
+
values: [...T],
|
|
25
|
+
options: TSchemaOptions = {},
|
|
26
|
+
) =>
|
|
27
|
+
Type.Unsafe<T[number]>({
|
|
28
|
+
type: "string",
|
|
29
|
+
enum: values,
|
|
30
|
+
...options,
|
|
31
|
+
});
|