@griffin-app/griffin-ts 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ASSERTIONS_QUICK_REF.md +161 -0
- package/README.md +297 -0
- package/dist/assertions.d.ts +136 -0
- package/dist/assertions.d.ts.map +1 -0
- package/dist/assertions.js +230 -0
- package/dist/assertions.js.map +1 -0
- package/dist/builder.d.ts +168 -0
- package/dist/builder.d.ts.map +1 -0
- package/dist/builder.js +165 -0
- package/dist/builder.js.map +1 -0
- package/dist/constants.d.ts +5 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +6 -0
- package/dist/constants.js.map +1 -0
- package/dist/example-sequential.d.ts +11 -0
- package/dist/example-sequential.d.ts.map +1 -0
- package/dist/example-sequential.js +160 -0
- package/dist/example-sequential.js.map +1 -0
- package/dist/example.d.ts +9 -0
- package/dist/example.d.ts.map +1 -0
- package/dist/example.js +36 -0
- package/dist/example.js.map +1 -0
- package/dist/frequency.d.ts +15 -0
- package/dist/frequency.d.ts.map +1 -0
- package/dist/frequency.js +34 -0
- package/dist/frequency.js.map +1 -0
- package/dist/http-methods.d.ts +6 -0
- package/dist/http-methods.d.ts.map +1 -0
- package/dist/http-methods.js +9 -0
- package/dist/http-methods.js.map +1 -0
- package/dist/index.d.ts +24 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +62 -0
- package/dist/index.js.map +1 -0
- package/dist/response-formats.d.ts +4 -0
- package/dist/response-formats.d.ts.map +1 -0
- package/dist/response-formats.js +7 -0
- package/dist/response-formats.js.map +1 -0
- package/dist/schema-exports.d.ts +6 -0
- package/dist/schema-exports.d.ts.map +1 -0
- package/dist/schema-exports.js +43 -0
- package/dist/schema-exports.js.map +1 -0
- package/dist/schema.d.ts +311 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +214 -0
- package/dist/schema.js.map +1 -0
- package/dist/secrets.d.ts +56 -0
- package/dist/secrets.d.ts.map +1 -0
- package/dist/secrets.js +74 -0
- package/dist/secrets.js.map +1 -0
- package/dist/sequential-builder.d.ts +127 -0
- package/dist/sequential-builder.d.ts.map +1 -0
- package/dist/sequential-builder.js +128 -0
- package/dist/sequential-builder.js.map +1 -0
- package/dist/shared.d.ts +8 -0
- package/dist/shared.d.ts.map +1 -0
- package/dist/shared.js +36 -0
- package/dist/shared.js.map +1 -0
- package/dist/target.d.ts +33 -0
- package/dist/target.d.ts.map +1 -0
- package/dist/target.js +53 -0
- package/dist/target.js.map +1 -0
- package/dist/type-exports.d.ts +6 -0
- package/dist/type-exports.d.ts.map +1 -0
- package/dist/type-exports.js +7 -0
- package/dist/type-exports.js.map +1 -0
- package/dist/wait.d.ts +9 -0
- package/dist/wait.d.ts.map +1 -0
- package/dist/wait.js +8 -0
- package/dist/wait.js.map +1 -0
- package/package.json +43 -0
- package/src/assertions.ts +327 -0
- package/src/builder.ts +336 -0
- package/src/constants.ts +5 -0
- package/src/example-sequential.ts +191 -0
- package/src/example.ts +55 -0
- package/src/frequency.ts +38 -0
- package/src/http-methods.ts +5 -0
- package/src/index.ts +70 -0
- package/src/response-formats.ts +3 -0
- package/src/schema-exports.ts +43 -0
- package/src/schema.ts +289 -0
- package/src/secrets.ts +112 -0
- package/src/sequential-builder.ts +254 -0
- package/src/shared.ts +46 -0
- package/src/target.ts +55 -0
- package/src/type-exports.ts +20 -0
- package/src/wait.ts +4 -0
- package/tsconfig.json +20 -0
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Example usage of the Sequential Test Builder
|
|
4
|
+
*
|
|
5
|
+
* This demonstrates the simplified createTestBuilder API for straightforward
|
|
6
|
+
* linear test flows. Use this when you don't need complex branching.
|
|
7
|
+
*
|
|
8
|
+
* For more complex graphs with parallel execution or conditional flows,
|
|
9
|
+
* see example.ts which uses createGraphBuilder.
|
|
10
|
+
*/
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
const index_1 = require("./index");
|
|
13
|
+
// ============================================================================
|
|
14
|
+
// Example 1: Simple health check with new assertion API
|
|
15
|
+
// ============================================================================
|
|
16
|
+
const healthCheck = (0, index_1.createTestBuilder)({
|
|
17
|
+
name: "health-check",
|
|
18
|
+
frequency: index_1.Frequency.every(1).minute(),
|
|
19
|
+
})
|
|
20
|
+
.request("health", {
|
|
21
|
+
method: index_1.GET,
|
|
22
|
+
base: (0, index_1.target)("api-service"),
|
|
23
|
+
response_format: index_1.Json,
|
|
24
|
+
path: "/health",
|
|
25
|
+
})
|
|
26
|
+
.assert((state) => [
|
|
27
|
+
(0, index_1.Assert)(state["health"].status).equals(200),
|
|
28
|
+
(0, index_1.Assert)(state["health"].body["status"]).equals("ok"),
|
|
29
|
+
(0, index_1.Assert)(state["health"].headers["content-type"]).contains("application/json"),
|
|
30
|
+
])
|
|
31
|
+
.build();
|
|
32
|
+
console.log("Health Check Plan:");
|
|
33
|
+
console.log(JSON.stringify(healthCheck, null, 2));
|
|
34
|
+
// ============================================================================
|
|
35
|
+
// Example 2: Complex sequential flow with rich assertions
|
|
36
|
+
// ============================================================================
|
|
37
|
+
const userJourney = (0, index_1.createTestBuilder)({
|
|
38
|
+
name: "create-and-verify-user",
|
|
39
|
+
frequency: index_1.Frequency.every(5).minute(),
|
|
40
|
+
})
|
|
41
|
+
.request("create_user", {
|
|
42
|
+
method: index_1.POST,
|
|
43
|
+
base: (0, index_1.target)("api-service"),
|
|
44
|
+
response_format: index_1.Json,
|
|
45
|
+
path: "/api/v1/users",
|
|
46
|
+
body: {
|
|
47
|
+
name: "Test User",
|
|
48
|
+
email: "test@example.com",
|
|
49
|
+
},
|
|
50
|
+
})
|
|
51
|
+
.assert((state) => [
|
|
52
|
+
// Status code assertions
|
|
53
|
+
(0, index_1.Assert)(state["create_user"].status).equals(201),
|
|
54
|
+
// Body assertions with JSONPath
|
|
55
|
+
(0, index_1.Assert)(state["create_user"].body["data"]["id"]).not.isNull(),
|
|
56
|
+
(0, index_1.Assert)(state["create_user"].body["data"]["name"]).equals("Test User"),
|
|
57
|
+
(0, index_1.Assert)(state["create_user"].body["data"]["email"]).equals("test@example.com"),
|
|
58
|
+
(0, index_1.Assert)(state["create_user"].body["data"]["created_at"]).isDefined(),
|
|
59
|
+
// Header assertions
|
|
60
|
+
(0, index_1.Assert)(state["create_user"].headers["content-type"]).contains("application/json"),
|
|
61
|
+
(0, index_1.Assert)(state["create_user"].headers["location"]).startsWith("/api/v1/users/"),
|
|
62
|
+
])
|
|
63
|
+
.wait("pause", index_1.WaitDuration.seconds(2))
|
|
64
|
+
.request("get_user", {
|
|
65
|
+
method: index_1.GET,
|
|
66
|
+
base: (0, index_1.target)("api-service"),
|
|
67
|
+
response_format: index_1.Json,
|
|
68
|
+
path: "/api/v1/users/test@example.com",
|
|
69
|
+
})
|
|
70
|
+
.assert((state) => [
|
|
71
|
+
(0, index_1.Assert)(state["get_user"].status).equals(200),
|
|
72
|
+
(0, index_1.Assert)(state["get_user"].body["data"]["name"]).equals("Test User"),
|
|
73
|
+
(0, index_1.Assert)(state["get_user"].body["data"]["active"]).isTrue(),
|
|
74
|
+
(0, index_1.Assert)(state["get_user"].body["data"]["deleted"]).not.isTrue(),
|
|
75
|
+
])
|
|
76
|
+
.build();
|
|
77
|
+
console.log("\nUser Journey Plan:");
|
|
78
|
+
console.log(JSON.stringify(userJourney, null, 2));
|
|
79
|
+
// ============================================================================
|
|
80
|
+
// Example 3: Advanced assertions with comparisons
|
|
81
|
+
// ============================================================================
|
|
82
|
+
const performanceCheck = (0, index_1.createTestBuilder)({
|
|
83
|
+
name: "performance-check",
|
|
84
|
+
frequency: index_1.Frequency.every(10).minute(),
|
|
85
|
+
})
|
|
86
|
+
.request("api_call", {
|
|
87
|
+
method: index_1.GET,
|
|
88
|
+
base: (0, index_1.target)("api-service"),
|
|
89
|
+
response_format: index_1.Json,
|
|
90
|
+
path: "/api/v1/metrics",
|
|
91
|
+
})
|
|
92
|
+
.assert((state) => [
|
|
93
|
+
// Numeric comparisons
|
|
94
|
+
(0, index_1.Assert)(state["api_call"].body["response_time_ms"]).lessThan(500),
|
|
95
|
+
(0, index_1.Assert)(state["api_call"].body["error_rate"]).lessThanOrEqual(0.01),
|
|
96
|
+
(0, index_1.Assert)(state["api_call"].body["success_count"]).greaterThan(0),
|
|
97
|
+
(0, index_1.Assert)(state["api_call"].body["memory_usage_mb"]).lessThan(1024),
|
|
98
|
+
// String assertions
|
|
99
|
+
(0, index_1.Assert)(state["api_call"].body["version"]).startsWith("v2."),
|
|
100
|
+
(0, index_1.Assert)(state["api_call"].body["deployment"]).not.equals(""),
|
|
101
|
+
(0, index_1.Assert)(state["api_call"].body["environment"]).contains("prod"),
|
|
102
|
+
// Array/collection assertions
|
|
103
|
+
(0, index_1.Assert)(state["api_call"].body["endpoints"]).not.isEmpty(),
|
|
104
|
+
])
|
|
105
|
+
.build();
|
|
106
|
+
console.log("\nPerformance Check Plan:");
|
|
107
|
+
console.log(JSON.stringify(performanceCheck, null, 2));
|
|
108
|
+
// ============================================================================
|
|
109
|
+
// Example 4: Multi-step API test with state dependencies
|
|
110
|
+
// ============================================================================
|
|
111
|
+
const orderWorkflow = (0, index_1.createTestBuilder)({
|
|
112
|
+
name: "order-workflow",
|
|
113
|
+
frequency: index_1.Frequency.every(30).minute(),
|
|
114
|
+
})
|
|
115
|
+
.request("create_order", {
|
|
116
|
+
method: index_1.POST,
|
|
117
|
+
base: (0, index_1.target)("api-service"),
|
|
118
|
+
response_format: index_1.Json,
|
|
119
|
+
path: "/api/v1/orders",
|
|
120
|
+
body: {
|
|
121
|
+
items: [{ product_id: "ABC123", quantity: 2 }],
|
|
122
|
+
customer_email: "customer@example.com",
|
|
123
|
+
},
|
|
124
|
+
})
|
|
125
|
+
.assert((state) => [
|
|
126
|
+
(0, index_1.Assert)(state["create_order"].status).equals(201),
|
|
127
|
+
(0, index_1.Assert)(state["create_order"].body["order_id"]).isDefined(),
|
|
128
|
+
(0, index_1.Assert)(state["create_order"].body["status"]).equals("pending"),
|
|
129
|
+
(0, index_1.Assert)(state["create_order"].body["total"]).greaterThan(0),
|
|
130
|
+
])
|
|
131
|
+
.request("confirm_order", {
|
|
132
|
+
method: index_1.POST,
|
|
133
|
+
base: (0, index_1.target)("api-service"),
|
|
134
|
+
response_format: index_1.Json,
|
|
135
|
+
path: "/api/v1/orders/confirm",
|
|
136
|
+
body: {
|
|
137
|
+
order_id: "${create_order.body.order_id}", // Future: template interpolation
|
|
138
|
+
},
|
|
139
|
+
})
|
|
140
|
+
.assert((state) => [
|
|
141
|
+
(0, index_1.Assert)(state["confirm_order"].status).equals(200),
|
|
142
|
+
(0, index_1.Assert)(state["confirm_order"].body["status"]).equals("confirmed"),
|
|
143
|
+
(0, index_1.Assert)(state["confirm_order"].body["confirmed_at"]).not.isNull(),
|
|
144
|
+
])
|
|
145
|
+
.wait("processing_time", index_1.WaitDuration.seconds(5))
|
|
146
|
+
.request("check_order", {
|
|
147
|
+
method: index_1.GET,
|
|
148
|
+
base: (0, index_1.target)("api-service"),
|
|
149
|
+
response_format: index_1.Json,
|
|
150
|
+
path: "/api/v1/orders/${create_order.body.order_id}",
|
|
151
|
+
})
|
|
152
|
+
.assert((state) => [
|
|
153
|
+
(0, index_1.Assert)(state["check_order"].status).equals(200),
|
|
154
|
+
(0, index_1.Assert)(state["check_order"].body["status"]).not.equals("pending"),
|
|
155
|
+
(0, index_1.Assert)(state["check_order"].body["processed"]).isTrue(),
|
|
156
|
+
])
|
|
157
|
+
.build();
|
|
158
|
+
console.log("\nOrder Workflow Plan:");
|
|
159
|
+
console.log(JSON.stringify(orderWorkflow, null, 2));
|
|
160
|
+
//# sourceMappingURL=example-sequential.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example-sequential.js","sourceRoot":"","sources":["../src/example-sequential.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;AAEH,mCASiB;AAEjB,+EAA+E;AAC/E,wDAAwD;AACxD,+EAA+E;AAE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,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IACjD,IAAA,cAAM,EAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,WAAW,CAAC;IACjE,IAAA,cAAM,EAAC,KAAK,CAAC,eAAe,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,EAAE;CACjE,CAAC;KACD,IAAI,CAAC,iBAAiB,EAAE,oBAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;KAChD,OAAO,CAAC,aAAa,EAAE;IACtB,MAAM,EAAE,WAAG;IACX,IAAI,EAAE,IAAA,cAAM,EAAC,aAAa,CAAC;IAC3B,eAAe,EAAE,YAAI;IACrB,IAAI,EAAE,8CAA8C;CACrD,CAAC;KACD,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC;IACjB,IAAA,cAAM,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC;IAC/C,IAAA,cAAM,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC;IACjE,IAAA,cAAM,EAAC,KAAK,CAAC,aAAa,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,EAAE;CACxD,CAAC;KACD,KAAK,EAAE,CAAC;AAEX,OAAO,CAAC,GAAG,CAAC,wBAAwB,CAAC,CAAC;AACtC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,aAAa,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Example usage of the griffin Test System DSL
|
|
3
|
+
*
|
|
4
|
+
* This file demonstrates how to create a test plan using the DSL.
|
|
5
|
+
* In practice, test files would be placed in __griffin__ subdirectories
|
|
6
|
+
* and discovered by the CLI tool.
|
|
7
|
+
*/
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=example.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG"}
|
package/dist/example.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Example usage of the griffin Test System DSL
|
|
4
|
+
*
|
|
5
|
+
* This file demonstrates how to create a test plan using the DSL.
|
|
6
|
+
* In practice, test files would be placed in __griffin__ subdirectories
|
|
7
|
+
* and discovered by the CLI tool.
|
|
8
|
+
*/
|
|
9
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
10
|
+
const index_1 = require("./index");
|
|
11
|
+
const plan = (0, index_1.createGraphBuilder)({
|
|
12
|
+
name: "foo-bar-check",
|
|
13
|
+
frequency: index_1.Frequency.every(1).minute(),
|
|
14
|
+
})
|
|
15
|
+
.addNode("create_foo", (0, index_1.Endpoint)({
|
|
16
|
+
method: index_1.POST,
|
|
17
|
+
base: (0, index_1.target)("api-service"),
|
|
18
|
+
response_format: index_1.Json,
|
|
19
|
+
path: "/api/v1/foo",
|
|
20
|
+
}))
|
|
21
|
+
.addNode("get_foo", (0, index_1.Endpoint)({
|
|
22
|
+
method: index_1.GET,
|
|
23
|
+
base: (0, index_1.target)("api-service"),
|
|
24
|
+
response_format: index_1.Json,
|
|
25
|
+
path: "/api/v1/foo",
|
|
26
|
+
}))
|
|
27
|
+
.addNode("first_wait", (0, index_1.Wait)(index_1.WaitDuration.minutes(1)))
|
|
28
|
+
// Note: Assertion nodes with the rich DSL are best used with the Sequential Builder
|
|
29
|
+
// For graph builder, assertions can be manually constructed with SerializedAssertion format
|
|
30
|
+
.addEdge(index_1.START, "create_foo")
|
|
31
|
+
.addEdge("create_foo", "get_foo")
|
|
32
|
+
.addEdge("get_foo", "first_wait")
|
|
33
|
+
.addEdge("first_wait", index_1.END)
|
|
34
|
+
.build();
|
|
35
|
+
console.log(JSON.stringify(plan, null, 2));
|
|
36
|
+
//# sourceMappingURL=example.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"example.js","sourceRoot":"","sources":["../src/example.ts"],"names":[],"mappings":";AAAA;;;;;;GAMG;;AAEH,mCAaiB;AAEjB,MAAM,IAAI,GAAG,IAAA,0BAAkB,EAAC;IAC9B,IAAI,EAAE,eAAe;IACrB,SAAS,EAAE,iBAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE;CACvC,CAAC;KACC,OAAO,CACN,YAAY,EACZ,IAAA,gBAAQ,EAAC;IACP,MAAM,EAAE,YAAI;IACZ,IAAI,EAAE,IAAA,cAAM,EAAC,aAAa,CAAC;IAC3B,eAAe,EAAE,YAAI;IACrB,IAAI,EAAE,aAAa;CACpB,CAAC,CACH;KACA,OAAO,CACN,SAAS,EACT,IAAA,gBAAQ,EAAC;IACP,MAAM,EAAE,WAAG;IACX,IAAI,EAAE,IAAA,cAAM,EAAC,aAAa,CAAC;IAC3B,eAAe,EAAE,YAAI;IACrB,IAAI,EAAE,aAAa;CACpB,CAAC,CACH;KACA,OAAO,CAAC,YAAY,EAAE,IAAA,YAAI,EAAC,oBAAY,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;IACrD,oFAAoF;IACpF,4FAA4F;KAC3F,OAAO,CAAC,aAAK,EAAE,YAAY,CAAC;KAC5B,OAAO,CAAC,YAAY,EAAE,SAAS,CAAC;KAChC,OAAO,CAAC,SAAS,EAAE,YAAY,CAAC;KAChC,OAAO,CAAC,YAAY,EAAE,WAAG,CAAC;KAC1B,KAAK,EAAE,CAAC;AAEX,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Frequency as FrequencyType } from "./schema";
|
|
2
|
+
export declare class FrequencyBuilder {
|
|
3
|
+
private value;
|
|
4
|
+
constructor(value: number);
|
|
5
|
+
minute(): FrequencyType;
|
|
6
|
+
minutes(): FrequencyType;
|
|
7
|
+
hour(): FrequencyType;
|
|
8
|
+
hours(): FrequencyType;
|
|
9
|
+
day(): FrequencyType;
|
|
10
|
+
days(): FrequencyType;
|
|
11
|
+
}
|
|
12
|
+
export declare const Frequency: {
|
|
13
|
+
every: (value: number) => FrequencyBuilder;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=frequency.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frequency.d.ts","sourceRoot":"","sources":["../src/frequency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,IAAI,aAAa,EAAiB,MAAM,UAAU,CAAC;AAErE,qBAAa,gBAAgB;IAC3B,OAAO,CAAC,KAAK,CAAS;gBAEV,KAAK,EAAE,MAAM;IAIzB,MAAM,IAAI,aAAa;IAIvB,OAAO,IAAI,aAAa;IAIxB,IAAI,IAAI,aAAa;IAIrB,KAAK,IAAI,aAAa;IAItB,GAAG,IAAI,aAAa;IAIpB,IAAI,IAAI,aAAa;CAGtB;AAGD,eAAO,MAAM,SAAS;mBACL,MAAM;CACtB,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Frequency = exports.FrequencyBuilder = void 0;
|
|
4
|
+
const schema_1 = require("./schema");
|
|
5
|
+
class FrequencyBuilder {
|
|
6
|
+
value;
|
|
7
|
+
constructor(value) {
|
|
8
|
+
this.value = value;
|
|
9
|
+
}
|
|
10
|
+
minute() {
|
|
11
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.MINUTE };
|
|
12
|
+
}
|
|
13
|
+
minutes() {
|
|
14
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.MINUTE };
|
|
15
|
+
}
|
|
16
|
+
hour() {
|
|
17
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.HOUR };
|
|
18
|
+
}
|
|
19
|
+
hours() {
|
|
20
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.HOUR };
|
|
21
|
+
}
|
|
22
|
+
day() {
|
|
23
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.DAY };
|
|
24
|
+
}
|
|
25
|
+
days() {
|
|
26
|
+
return { every: this.value, unit: schema_1.FrequencyUnit.DAY };
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.FrequencyBuilder = FrequencyBuilder;
|
|
30
|
+
// Export builder as Frequency for convenience
|
|
31
|
+
exports.Frequency = {
|
|
32
|
+
every: (value) => new FrequencyBuilder(value),
|
|
33
|
+
};
|
|
34
|
+
//# sourceMappingURL=frequency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"frequency.js","sourceRoot":"","sources":["../src/frequency.ts"],"names":[],"mappings":";;;AAAA,qCAAqE;AAErE,MAAa,gBAAgB;IACnB,KAAK,CAAS;IAEtB,YAAY,KAAa;QACvB,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,MAAM;QACJ,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,MAAM,EAAE,CAAC;IAC3D,CAAC;IAED,OAAO;QACL,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,MAAM,EAAE,CAAC;IAC3D,CAAC;IAED,IAAI;QACF,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;IAED,KAAK;QACH,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,IAAI,EAAE,CAAC;IACzD,CAAC;IAED,GAAG;QACD,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IAED,IAAI;QACF,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,sBAAa,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;CACF;AA9BD,4CA8BC;AAED,8CAA8C;AACjC,QAAA,SAAS,GAAG;IACvB,KAAK,EAAE,CAAC,KAAa,EAAE,EAAE,CAAC,IAAI,gBAAgB,CAAC,KAAK,CAAC;CACtD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-methods.d.ts","sourceRoot":"","sources":["../src/http-methods.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,GAAG,EAAG,KAAc,CAAC;AAClC,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,GAAG,EAAG,KAAc,CAAC;AAClC,eAAO,MAAM,MAAM,EAAG,QAAiB,CAAC;AACxC,eAAO,MAAM,KAAK,EAAG,OAAgB,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PATCH = exports.DELETE = exports.PUT = exports.POST = exports.GET = void 0;
|
|
4
|
+
exports.GET = "GET";
|
|
5
|
+
exports.POST = "POST";
|
|
6
|
+
exports.PUT = "PUT";
|
|
7
|
+
exports.DELETE = "DELETE";
|
|
8
|
+
exports.PATCH = "PATCH";
|
|
9
|
+
//# sourceMappingURL=http-methods.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http-methods.js","sourceRoot":"","sources":["../src/http-methods.ts"],"names":[],"mappings":";;;AAAa,QAAA,GAAG,GAAG,KAAc,CAAC;AACrB,QAAA,IAAI,GAAG,MAAe,CAAC;AACvB,QAAA,GAAG,GAAG,KAAc,CAAC;AACrB,QAAA,MAAM,GAAG,QAAiB,CAAC;AAC3B,QAAA,KAAK,GAAG,OAAgB,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Griffin DSL - Top-level exports for building API tests.
|
|
3
|
+
*
|
|
4
|
+
* Import schema values from "griffin/schema"
|
|
5
|
+
* Import schema-derived types from "griffin/types"
|
|
6
|
+
*/
|
|
7
|
+
export { createGraphBuilder } from "./builder";
|
|
8
|
+
export type { TestBuilder } from "./builder";
|
|
9
|
+
export { createTestBuilder } from "./sequential-builder";
|
|
10
|
+
export type { SequentialTestBuilder, AssertionCallback, } from "./sequential-builder";
|
|
11
|
+
export { Endpoint, Wait, Assertion } from "./builder";
|
|
12
|
+
export type { EndpointConfig, WaitDuration as WaitDurationType, } from "./builder";
|
|
13
|
+
export { Frequency } from "./frequency";
|
|
14
|
+
export { WaitDuration } from "./wait";
|
|
15
|
+
export { target, isTargetRef } from "./target";
|
|
16
|
+
export { secret, isSecretRef } from "./secrets";
|
|
17
|
+
export type { SecretRefData, SecretOptions } from "./secrets";
|
|
18
|
+
export { START, END } from "./constants";
|
|
19
|
+
export type { START as StartType, END as EndType } from "./constants";
|
|
20
|
+
export { GET, POST, PUT, DELETE, PATCH } from "./http-methods";
|
|
21
|
+
export { Json, Xml, Text } from "./response-formats";
|
|
22
|
+
export { Assert, AssertBuilder, UnaryPredicate, BinaryPredicateOperator, createStateProxy, } from "./assertions";
|
|
23
|
+
export type { SerializedAssertion, PathDescriptor, BinaryPredicate, StateProxy, NodeResultProxy, NestedProxy, } from "./assertions";
|
|
24
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAMH,OAAO,EAA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
/**
|
|
3
|
+
* Griffin DSL - Top-level exports for building API tests.
|
|
4
|
+
*
|
|
5
|
+
* Import schema values from "griffin/schema"
|
|
6
|
+
* Import schema-derived types from "griffin/types"
|
|
7
|
+
*/
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.createStateProxy = exports.BinaryPredicateOperator = exports.UnaryPredicate = exports.AssertBuilder = exports.Assert = exports.Text = exports.Xml = exports.Json = exports.PATCH = exports.DELETE = exports.PUT = exports.POST = exports.GET = exports.END = exports.START = exports.isSecretRef = exports.secret = exports.isTargetRef = exports.target = exports.WaitDuration = exports.Frequency = exports.Assertion = exports.Wait = exports.Endpoint = exports.createTestBuilder = exports.createGraphBuilder = void 0;
|
|
10
|
+
// ============================================================================
|
|
11
|
+
// DSL Builders
|
|
12
|
+
// ============================================================================
|
|
13
|
+
var builder_1 = require("./builder");
|
|
14
|
+
Object.defineProperty(exports, "createGraphBuilder", { enumerable: true, get: function () { return builder_1.createGraphBuilder; } });
|
|
15
|
+
var sequential_builder_1 = require("./sequential-builder");
|
|
16
|
+
Object.defineProperty(exports, "createTestBuilder", { enumerable: true, get: function () { return sequential_builder_1.createTestBuilder; } });
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// DSL Node Factories
|
|
19
|
+
// ============================================================================
|
|
20
|
+
var builder_2 = require("./builder");
|
|
21
|
+
Object.defineProperty(exports, "Endpoint", { enumerable: true, get: function () { return builder_2.Endpoint; } });
|
|
22
|
+
Object.defineProperty(exports, "Wait", { enumerable: true, get: function () { return builder_2.Wait; } });
|
|
23
|
+
Object.defineProperty(exports, "Assertion", { enumerable: true, get: function () { return builder_2.Assertion; } });
|
|
24
|
+
// ============================================================================
|
|
25
|
+
// DSL Helpers
|
|
26
|
+
// ============================================================================
|
|
27
|
+
var frequency_1 = require("./frequency");
|
|
28
|
+
Object.defineProperty(exports, "Frequency", { enumerable: true, get: function () { return frequency_1.Frequency; } });
|
|
29
|
+
var wait_1 = require("./wait");
|
|
30
|
+
Object.defineProperty(exports, "WaitDuration", { enumerable: true, get: function () { return wait_1.WaitDuration; } });
|
|
31
|
+
var target_1 = require("./target");
|
|
32
|
+
Object.defineProperty(exports, "target", { enumerable: true, get: function () { return target_1.target; } });
|
|
33
|
+
Object.defineProperty(exports, "isTargetRef", { enumerable: true, get: function () { return target_1.isTargetRef; } });
|
|
34
|
+
var secrets_1 = require("./secrets");
|
|
35
|
+
Object.defineProperty(exports, "secret", { enumerable: true, get: function () { return secrets_1.secret; } });
|
|
36
|
+
Object.defineProperty(exports, "isSecretRef", { enumerable: true, get: function () { return secrets_1.isSecretRef; } });
|
|
37
|
+
// ============================================================================
|
|
38
|
+
// DSL Constants
|
|
39
|
+
// ============================================================================
|
|
40
|
+
var constants_1 = require("./constants");
|
|
41
|
+
Object.defineProperty(exports, "START", { enumerable: true, get: function () { return constants_1.START; } });
|
|
42
|
+
Object.defineProperty(exports, "END", { enumerable: true, get: function () { return constants_1.END; } });
|
|
43
|
+
var http_methods_1 = require("./http-methods");
|
|
44
|
+
Object.defineProperty(exports, "GET", { enumerable: true, get: function () { return http_methods_1.GET; } });
|
|
45
|
+
Object.defineProperty(exports, "POST", { enumerable: true, get: function () { return http_methods_1.POST; } });
|
|
46
|
+
Object.defineProperty(exports, "PUT", { enumerable: true, get: function () { return http_methods_1.PUT; } });
|
|
47
|
+
Object.defineProperty(exports, "DELETE", { enumerable: true, get: function () { return http_methods_1.DELETE; } });
|
|
48
|
+
Object.defineProperty(exports, "PATCH", { enumerable: true, get: function () { return http_methods_1.PATCH; } });
|
|
49
|
+
var response_formats_1 = require("./response-formats");
|
|
50
|
+
Object.defineProperty(exports, "Json", { enumerable: true, get: function () { return response_formats_1.Json; } });
|
|
51
|
+
Object.defineProperty(exports, "Xml", { enumerable: true, get: function () { return response_formats_1.Xml; } });
|
|
52
|
+
Object.defineProperty(exports, "Text", { enumerable: true, get: function () { return response_formats_1.Text; } });
|
|
53
|
+
// ============================================================================
|
|
54
|
+
// Assertion DSL
|
|
55
|
+
// ============================================================================
|
|
56
|
+
var assertions_1 = require("./assertions");
|
|
57
|
+
Object.defineProperty(exports, "Assert", { enumerable: true, get: function () { return assertions_1.Assert; } });
|
|
58
|
+
Object.defineProperty(exports, "AssertBuilder", { enumerable: true, get: function () { return assertions_1.AssertBuilder; } });
|
|
59
|
+
Object.defineProperty(exports, "UnaryPredicate", { enumerable: true, get: function () { return assertions_1.UnaryPredicate; } });
|
|
60
|
+
Object.defineProperty(exports, "BinaryPredicateOperator", { enumerable: true, get: function () { return assertions_1.BinaryPredicateOperator; } });
|
|
61
|
+
Object.defineProperty(exports, "createStateProxy", { enumerable: true, get: function () { return assertions_1.createStateProxy; } });
|
|
62
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEH,+EAA+E;AAC/E,eAAe;AACf,+EAA+E;AAE/E,qCAA+C;AAAtC,6GAAA,kBAAkB,OAAA;AAG3B,2DAAyD;AAAhD,uHAAA,iBAAiB,OAAA;AAM1B,+EAA+E;AAC/E,qBAAqB;AACrB,+EAA+E;AAE/E,qCAAsD;AAA7C,mGAAA,QAAQ,OAAA;AAAE,+FAAA,IAAI,OAAA;AAAE,oGAAA,SAAS,OAAA;AAMlC,+EAA+E;AAC/E,cAAc;AACd,+EAA+E;AAE/E,yCAAwC;AAA/B,sGAAA,SAAS,OAAA;AAClB,+BAAsC;AAA7B,oGAAA,YAAY,OAAA;AACrB,mCAA+C;AAAtC,gGAAA,MAAM,OAAA;AAAE,qGAAA,WAAW,OAAA;AAC5B,qCAAgD;AAAvC,iGAAA,MAAM,OAAA;AAAE,sGAAA,WAAW,OAAA;AAG5B,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,yCAAyC;AAAhC,kGAAA,KAAK,OAAA;AAAE,gGAAA,GAAG,OAAA;AAGnB,+CAA+D;AAAtD,mGAAA,GAAG,OAAA;AAAE,oGAAA,IAAI,OAAA;AAAE,mGAAA,GAAG,OAAA;AAAE,sGAAA,MAAM,OAAA;AAAE,qGAAA,KAAK,OAAA;AACtC,uDAAqD;AAA5C,wGAAA,IAAI,OAAA;AAAE,uGAAA,GAAG,OAAA;AAAE,wGAAA,IAAI,OAAA;AAExB,+EAA+E;AAC/E,gBAAgB;AAChB,+EAA+E;AAE/E,2CAMsB;AALpB,oGAAA,MAAM,OAAA;AACN,2GAAA,aAAa,OAAA;AACb,4GAAA,cAAc,OAAA;AACd,qHAAA,uBAAuB,OAAA;AACvB,8GAAA,gBAAgB,OAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-formats.d.ts","sourceRoot":"","sources":["../src/response-formats.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC;AACpC,eAAO,MAAM,GAAG,EAAG,KAAc,CAAC;AAClC,eAAO,MAAM,IAAI,EAAG,MAAe,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response-formats.js","sourceRoot":"","sources":["../src/response-formats.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG,MAAe,CAAC;AACvB,QAAA,GAAG,GAAG,KAAc,CAAC;AACrB,QAAA,IAAI,GAAG,MAAe,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TypeBox schemas and enums for griffin test plans.
|
|
3
|
+
* Import from "griffin/schema" to access validation schemas.
|
|
4
|
+
*/
|
|
5
|
+
export { SecretRefDataSchema, SecretRefSchema, SecretOrStringSchema, ResponseFormatSchema, HttpMethodSchema, TargetRefSchema, EndpointSchema, FrequencySchema, WaitSchema, JSONPathSchema, XMLPathSchema, TextPathSchema, UnaryPredicateSchema, BinaryPredicateOperatorSchema, BinaryPredicateSchema, JSONAssertionSchema, XMLAssertionSchema, TextAssertionSchema, AssertionSchema, AssertionsSchema, NodeTypeSchema, NodeSchema, EdgeSchema, TestPlanV1Schema, FrequencyUnit, ResponseFormat, HttpMethod, NodeType, UnaryPredicate, BinaryPredicateOperator, TEST_PLAN_VERSION, } from "./schema.js";
|
|
6
|
+
//# sourceMappingURL=schema-exports.d.ts.map
|
|
@@ -0,0 +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,eAAe,EACf,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,cAAc,EACd,UAAU,EACV,UAAU,EACV,gBAAgB,EAGhB,aAAa,EACb,cAAc,EACd,UAAU,EACV,QAAQ,EACR,cAAc,EACd,uBAAuB,EAGvB,iBAAiB,GAClB,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TypeBox schemas and enums for griffin test plans.
|
|
4
|
+
* Import from "griffin/schema" to access validation schemas.
|
|
5
|
+
*/
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.TEST_PLAN_VERSION = exports.BinaryPredicateOperator = exports.UnaryPredicate = exports.NodeType = exports.HttpMethod = exports.ResponseFormat = exports.FrequencyUnit = exports.TestPlanV1Schema = exports.EdgeSchema = exports.NodeSchema = exports.NodeTypeSchema = exports.AssertionsSchema = exports.AssertionSchema = exports.TextAssertionSchema = exports.XMLAssertionSchema = exports.JSONAssertionSchema = exports.BinaryPredicateSchema = exports.BinaryPredicateOperatorSchema = exports.UnaryPredicateSchema = exports.TextPathSchema = exports.XMLPathSchema = exports.JSONPathSchema = exports.WaitSchema = exports.FrequencySchema = exports.EndpointSchema = exports.TargetRefSchema = exports.HttpMethodSchema = exports.ResponseFormatSchema = exports.SecretOrStringSchema = exports.SecretRefSchema = exports.SecretRefDataSchema = void 0;
|
|
8
|
+
var schema_js_1 = require("./schema.js");
|
|
9
|
+
// Schema values
|
|
10
|
+
Object.defineProperty(exports, "SecretRefDataSchema", { enumerable: true, get: function () { return schema_js_1.SecretRefDataSchema; } });
|
|
11
|
+
Object.defineProperty(exports, "SecretRefSchema", { enumerable: true, get: function () { return schema_js_1.SecretRefSchema; } });
|
|
12
|
+
Object.defineProperty(exports, "SecretOrStringSchema", { enumerable: true, get: function () { return schema_js_1.SecretOrStringSchema; } });
|
|
13
|
+
Object.defineProperty(exports, "ResponseFormatSchema", { enumerable: true, get: function () { return schema_js_1.ResponseFormatSchema; } });
|
|
14
|
+
Object.defineProperty(exports, "HttpMethodSchema", { enumerable: true, get: function () { return schema_js_1.HttpMethodSchema; } });
|
|
15
|
+
Object.defineProperty(exports, "TargetRefSchema", { enumerable: true, get: function () { return schema_js_1.TargetRefSchema; } });
|
|
16
|
+
Object.defineProperty(exports, "EndpointSchema", { enumerable: true, get: function () { return schema_js_1.EndpointSchema; } });
|
|
17
|
+
Object.defineProperty(exports, "FrequencySchema", { enumerable: true, get: function () { return schema_js_1.FrequencySchema; } });
|
|
18
|
+
Object.defineProperty(exports, "WaitSchema", { enumerable: true, get: function () { return schema_js_1.WaitSchema; } });
|
|
19
|
+
Object.defineProperty(exports, "JSONPathSchema", { enumerable: true, get: function () { return schema_js_1.JSONPathSchema; } });
|
|
20
|
+
Object.defineProperty(exports, "XMLPathSchema", { enumerable: true, get: function () { return schema_js_1.XMLPathSchema; } });
|
|
21
|
+
Object.defineProperty(exports, "TextPathSchema", { enumerable: true, get: function () { return schema_js_1.TextPathSchema; } });
|
|
22
|
+
Object.defineProperty(exports, "UnaryPredicateSchema", { enumerable: true, get: function () { return schema_js_1.UnaryPredicateSchema; } });
|
|
23
|
+
Object.defineProperty(exports, "BinaryPredicateOperatorSchema", { enumerable: true, get: function () { return schema_js_1.BinaryPredicateOperatorSchema; } });
|
|
24
|
+
Object.defineProperty(exports, "BinaryPredicateSchema", { enumerable: true, get: function () { return schema_js_1.BinaryPredicateSchema; } });
|
|
25
|
+
Object.defineProperty(exports, "JSONAssertionSchema", { enumerable: true, get: function () { return schema_js_1.JSONAssertionSchema; } });
|
|
26
|
+
Object.defineProperty(exports, "XMLAssertionSchema", { enumerable: true, get: function () { return schema_js_1.XMLAssertionSchema; } });
|
|
27
|
+
Object.defineProperty(exports, "TextAssertionSchema", { enumerable: true, get: function () { return schema_js_1.TextAssertionSchema; } });
|
|
28
|
+
Object.defineProperty(exports, "AssertionSchema", { enumerable: true, get: function () { return schema_js_1.AssertionSchema; } });
|
|
29
|
+
Object.defineProperty(exports, "AssertionsSchema", { enumerable: true, get: function () { return schema_js_1.AssertionsSchema; } });
|
|
30
|
+
Object.defineProperty(exports, "NodeTypeSchema", { enumerable: true, get: function () { return schema_js_1.NodeTypeSchema; } });
|
|
31
|
+
Object.defineProperty(exports, "NodeSchema", { enumerable: true, get: function () { return schema_js_1.NodeSchema; } });
|
|
32
|
+
Object.defineProperty(exports, "EdgeSchema", { enumerable: true, get: function () { return schema_js_1.EdgeSchema; } });
|
|
33
|
+
Object.defineProperty(exports, "TestPlanV1Schema", { enumerable: true, get: function () { return schema_js_1.TestPlanV1Schema; } });
|
|
34
|
+
// Enums (runtime values)
|
|
35
|
+
Object.defineProperty(exports, "FrequencyUnit", { enumerable: true, get: function () { return schema_js_1.FrequencyUnit; } });
|
|
36
|
+
Object.defineProperty(exports, "ResponseFormat", { enumerable: true, get: function () { return schema_js_1.ResponseFormat; } });
|
|
37
|
+
Object.defineProperty(exports, "HttpMethod", { enumerable: true, get: function () { return schema_js_1.HttpMethod; } });
|
|
38
|
+
Object.defineProperty(exports, "NodeType", { enumerable: true, get: function () { return schema_js_1.NodeType; } });
|
|
39
|
+
Object.defineProperty(exports, "UnaryPredicate", { enumerable: true, get: function () { return schema_js_1.UnaryPredicate; } });
|
|
40
|
+
Object.defineProperty(exports, "BinaryPredicateOperator", { enumerable: true, get: function () { return schema_js_1.BinaryPredicateOperator; } });
|
|
41
|
+
// Constants
|
|
42
|
+
Object.defineProperty(exports, "TEST_PLAN_VERSION", { enumerable: true, get: function () { return schema_js_1.TEST_PLAN_VERSION; } });
|
|
43
|
+
//# sourceMappingURL=schema-exports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema-exports.js","sourceRoot":"","sources":["../src/schema-exports.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,yCAqCqB;AApCnB,gBAAgB;AAChB,gHAAA,mBAAmB,OAAA;AACnB,4GAAA,eAAe,OAAA;AACf,iHAAA,oBAAoB,OAAA;AACpB,iHAAA,oBAAoB,OAAA;AACpB,6GAAA,gBAAgB,OAAA;AAChB,4GAAA,eAAe,OAAA;AACf,2GAAA,cAAc,OAAA;AACd,4GAAA,eAAe,OAAA;AACf,uGAAA,UAAU,OAAA;AACV,2GAAA,cAAc,OAAA;AACd,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,iHAAA,oBAAoB,OAAA;AACpB,0HAAA,6BAA6B,OAAA;AAC7B,kHAAA,qBAAqB,OAAA;AACrB,gHAAA,mBAAmB,OAAA;AACnB,+GAAA,kBAAkB,OAAA;AAClB,gHAAA,mBAAmB,OAAA;AACnB,4GAAA,eAAe,OAAA;AACf,6GAAA,gBAAgB,OAAA;AAChB,2GAAA,cAAc,OAAA;AACd,uGAAA,UAAU,OAAA;AACV,uGAAA,UAAU,OAAA;AACV,6GAAA,gBAAgB,OAAA;AAEhB,yBAAyB;AACzB,0GAAA,aAAa,OAAA;AACb,2GAAA,cAAc,OAAA;AACd,uGAAA,UAAU,OAAA;AACV,qGAAA,QAAQ,OAAA;AACR,2GAAA,cAAc,OAAA;AACd,oHAAA,uBAAuB,OAAA;AAEvB,YAAY;AACZ,8GAAA,iBAAiB,OAAA"}
|