@griffin-app/griffin-ts 0.1.13 → 0.1.15

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.
Files changed (62) hide show
  1. package/README.md +18 -18
  2. package/dist/builder.d.ts +7 -7
  3. package/dist/builder.d.ts.map +1 -1
  4. package/dist/builder.js +5 -5
  5. package/dist/builder.js.map +1 -1
  6. package/dist/builder.test.js +63 -76
  7. package/dist/builder.test.js.map +1 -1
  8. package/dist/example-sequential.js +4 -4
  9. package/dist/example-sequential.js.map +1 -1
  10. package/dist/example.d.ts +1 -1
  11. package/dist/example.js +3 -3
  12. package/dist/example.js.map +1 -1
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.d.ts.map +1 -1
  15. package/dist/index.js +2 -2
  16. package/dist/index.js.map +1 -1
  17. package/dist/migrations.d.ts +16 -16
  18. package/dist/migrations.d.ts.map +1 -1
  19. package/dist/migrations.js +21 -21
  20. package/dist/migrations.js.map +1 -1
  21. package/dist/migrations.test.js +35 -35
  22. package/dist/migrations.test.js.map +1 -1
  23. package/dist/schema-exports.d.ts +3 -3
  24. package/dist/schema-exports.d.ts.map +1 -1
  25. package/dist/schema-exports.js +4 -4
  26. package/dist/schema-exports.js.map +1 -1
  27. package/dist/schema.d.ts +10 -30
  28. package/dist/schema.d.ts.map +1 -1
  29. package/dist/schema.js +11 -12
  30. package/dist/schema.js.map +1 -1
  31. package/dist/secrets.d.ts +4 -9
  32. package/dist/secrets.d.ts.map +1 -1
  33. package/dist/secrets.js +12 -23
  34. package/dist/secrets.js.map +1 -1
  35. package/dist/secrets.test.js +56 -119
  36. package/dist/secrets.test.js.map +1 -1
  37. package/dist/sequential-builder.d.ts +5 -5
  38. package/dist/sequential-builder.d.ts.map +1 -1
  39. package/dist/sequential-builder.js +5 -5
  40. package/dist/sequential-builder.js.map +1 -1
  41. package/dist/sequential-builder.test.js +69 -75
  42. package/dist/sequential-builder.test.js.map +1 -1
  43. package/dist/type-exports.d.ts +1 -1
  44. package/dist/type-exports.d.ts.map +1 -1
  45. package/dist/variable.d.ts +2 -2
  46. package/dist/variable.js +1 -1
  47. package/package.json +1 -1
  48. package/src/builder.test.ts +63 -76
  49. package/src/builder.ts +10 -10
  50. package/src/example-sequential.ts +4 -4
  51. package/src/example.ts +3 -3
  52. package/src/index.ts +6 -6
  53. package/src/migrations.test.ts +36 -36
  54. package/src/migrations.ts +24 -24
  55. package/src/schema-exports.ts +11 -11
  56. package/src/schema.ts +16 -17
  57. package/src/secrets.test.ts +62 -141
  58. package/src/secrets.ts +13 -33
  59. package/src/sequential-builder.test.ts +69 -75
  60. package/src/sequential-builder.ts +10 -10
  61. package/src/type-exports.ts +1 -1
  62. package/src/variable.ts +2 -2
package/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # griffin Test System
2
2
 
3
- The griffin Test System provides a TypeScript DSL for defining API tests. Tests are written in TypeScript and output JSON test plans that can be executed by the plan executor.
3
+ The griffin Test System provides a TypeScript DSL for defining API tests. Tests are written in TypeScript and output JSON test monitors that can be executed by the monitor executor.
4
4
 
5
5
  ## Features
6
6
 
7
7
  - TypeScript DSL for defining API checks
8
- - Chainable API for building test plans
8
+ - Chainable API for building test monitors
9
9
  - Support for endpoints, waits, assertions, and edges
10
- - Outputs JSON test plans for execution
10
+ - Outputs JSON test monitors for execution
11
11
 
12
12
  ## Installation
13
13
 
@@ -24,7 +24,7 @@ npm run build
24
24
 
25
25
  ## Usage
26
26
 
27
- Create test files in `__griffin__` directories. When executed, they output JSON test plans.
27
+ Create test files in `__griffin__` directories. When executed, they output JSON test monitors.
28
28
 
29
29
  griffin provides two builder APIs:
30
30
 
@@ -38,7 +38,7 @@ The sequential builder automatically connects steps in order - no need to manage
38
38
  ```typescript
39
39
  import { GET, createTestBuilder, JSON, Frequency, Assert } from "griffin-ts";
40
40
 
41
- const plan = createTestBuilder({
41
+ const monitor = createTestBuilder({
42
42
  name: "health-check",
43
43
  endpoint_host: "https://api.example.com",
44
44
  })
@@ -53,7 +53,7 @@ const plan = createTestBuilder({
53
53
  ])
54
54
  .build({ frequency: Frequency.every(1).minute() });
55
55
 
56
- export default plan;
56
+ export default monitor;
57
57
  ```
58
58
 
59
59
  #### Sequential Example with Waits and Assertions
@@ -69,7 +69,7 @@ import {
69
69
  Assert,
70
70
  } from "griffin-ts";
71
71
 
72
- const plan = createTestBuilder({
72
+ const monitor = createTestBuilder({
73
73
  name: "create-and-verify-user",
74
74
  endpoint_host: "https://api.example.com",
75
75
  })
@@ -96,7 +96,7 @@ const plan = createTestBuilder({
96
96
  ])
97
97
  .build({ frequency: Frequency.every(5).minute() });
98
98
 
99
- export default plan;
99
+ export default monitor;
100
100
  ```
101
101
 
102
102
  ### Graph Builder (For Complex Workflows)
@@ -116,7 +116,7 @@ import {
116
116
  Assert,
117
117
  } from "griffin-ts";
118
118
 
119
- const plan = createGraphBuilder({
119
+ const monitor = createGraphBuilder({
120
120
  name: "foo-bar-check",
121
121
  endpoint_host: "https://api.example.com",
122
122
  })
@@ -144,12 +144,12 @@ const plan = createGraphBuilder({
144
144
  .addEdge("check_response", END)
145
145
  .build({ frequency: Frequency.every(1).minute() });
146
146
 
147
- export default plan;
147
+ export default monitor;
148
148
  ```
149
149
 
150
150
  ### Using Secrets
151
151
 
152
- griffin supports secure secret management for API keys, tokens, and other credentials. Secrets are referenced in your test plans and resolved at runtime by the configured secret providers.
152
+ griffin supports secure secret management for API keys, tokens, and other credentials. Secrets are referenced in your test monitors and resolved at runtime by the configured secret providers.
153
153
 
154
154
  #### With Sequential Builder
155
155
 
@@ -163,7 +163,7 @@ import {
163
163
  Assert,
164
164
  } from "griffin-ts";
165
165
 
166
- const plan = createTestBuilder({
166
+ const monitor = createTestBuilder({
167
167
  name: "authenticated-check",
168
168
  endpoint_host: "https://api.example.com",
169
169
  })
@@ -187,7 +187,7 @@ const plan = createTestBuilder({
187
187
  .assert((state) => [Assert(state["protected"].status).equals(200)])
188
188
  .build({ frequency: Frequency.every(5).minute() });
189
189
 
190
- export default plan;
190
+ export default monitor;
191
191
  ```
192
192
 
193
193
  #### With Graph Builder
@@ -204,7 +204,7 @@ import {
204
204
  Assert,
205
205
  } from "griffin-ts";
206
206
 
207
- const plan = createGraphBuilder({
207
+ const monitor = createGraphBuilder({
208
208
  name: "authenticated-check",
209
209
  endpoint_host: "https://api.example.com",
210
210
  })
@@ -225,7 +225,7 @@ const plan = createGraphBuilder({
225
225
  .addEdge("verify", END)
226
226
  .build({ frequency: Frequency.every(5).minute() });
227
227
 
228
- export default plan;
228
+ export default monitor;
229
229
  ```
230
230
 
231
231
  #### Secret Providers
@@ -261,7 +261,7 @@ See the [griffin-runner CONFIG.md](../griffin-runner/CONFIG.md) for configuratio
261
261
  - **`.endpoint(id, config)`**: Add an HTTP endpoint request with a unique identifier
262
262
  - **`.wait(duration)`**: Add a delay (use `Wait.seconds(n)`, `Wait.minutes(n)`, or `Wait.milliseconds(n)`)
263
263
  - **`.assert(fn)`**: Add assertions using a function that receives the state proxy and returns an array of assertions
264
- - **`.build(options)`**: Generate the final test plan with frequency configuration
264
+ - **`.build(options)`**: Generate the final test monitor with frequency configuration
265
265
 
266
266
  #### Graph Builder Methods
267
267
 
@@ -269,7 +269,7 @@ See the [griffin-runner CONFIG.md](../griffin-runner/CONFIG.md) for configuratio
269
269
  - **`.addWait(id, duration)`**: Add a wait node to the graph
270
270
  - **`.addAssertion(id, fn)`**: Add an assertion node using a function that receives the state proxy
271
271
  - **`.addEdge(from, to)`**: Connect two nodes (use `START` and `END` constants for entry/exit)
272
- - **`.build(options)`**: Generate the final test plan (validates all nodes are connected)
272
+ - **`.build(options)`**: Generate the final test monitor (validates all nodes are connected)
273
273
 
274
274
  #### Assertions
275
275
 
@@ -302,7 +302,7 @@ See [ASSERTIONS_QUICK_REF.md](./ASSERTIONS_QUICK_REF.md) for the complete assert
302
302
 
303
303
  ## Output
304
304
 
305
- The test system outputs a JSON test plan to stdout when `plan.create()` is called. This JSON is consumed by the plan executor. Example output:
305
+ The test system outputs a JSON test monitor to stdout when `monitor.create()` is called. This JSON is consumed by the monitor executor. Example output:
306
306
 
307
307
  ```json
308
308
  {
package/dist/builder.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { Assertion, PlanDSL, NodeDSL, Frequency, HttpRequestDSL, Wait, Assertions } from "./schema.js";
1
+ import { Assertion, MonitorDSL, NodeDSL, Frequency, HttpRequestDSL, Wait, Assertions } from "./schema.js";
2
2
  import { type START as StartType, type END as EndType } from "./constants.js";
3
3
  /**
4
4
  * A node definition without the id field.
@@ -6,7 +6,7 @@ import { type START as StartType, type END as EndType } from "./constants.js";
6
6
  */
7
7
  export type NodeWithoutId = Omit<NodeDSL, "id">;
8
8
  /**
9
- * TestBuilder provides a type-safe DSL for constructing test plans with compile-time graph validation.
9
+ * TestBuilder provides a type-safe DSL for constructing test monitors with compile-time graph validation.
10
10
  *
11
11
  * Type parameters track the state of the graph during construction:
12
12
  * @template NodeName - Union of all registered node names
@@ -49,7 +49,7 @@ export interface TestBuilder<NodeName extends string = never, HasOutput extends
49
49
  */
50
50
  addEdge<From extends StartType | Exclude<NodeName, HasOutput>, To extends EndType | Exclude<NodeName, From>>(from: From, to: To): TestBuilder<NodeName, From extends StartType ? HasOutput : HasOutput | From, To extends EndType ? HasInput : HasInput | To>;
51
51
  /**
52
- * Builds the final test plan.
52
+ * Builds the final test monitor.
53
53
  *
54
54
  * This method is only callable when all graph constraints are satisfied:
55
55
  * - All nodes must have at least one outgoing edge
@@ -57,7 +57,7 @@ export interface TestBuilder<NodeName extends string = never, HasOutput extends
57
57
  *
58
58
  * If constraints aren't met, the return type becomes `never`, causing a compile error.
59
59
  */
60
- build: [Exclude<NodeName, HasOutput>] extends [never] ? [Exclude<NodeName, HasInput>] extends [never] ? () => PlanDSL : {
60
+ build: [Exclude<NodeName, HasOutput>] extends [never] ? [Exclude<NodeName, HasInput>] extends [never] ? () => MonitorDSL : {
61
61
  error: "Some nodes have no incoming edges";
62
62
  unconnected: Exclude<NodeName, HasInput>;
63
63
  } : {
@@ -66,9 +66,9 @@ export interface TestBuilder<NodeName extends string = never, HasOutput extends
66
66
  };
67
67
  }
68
68
  /**
69
- * Creates a new test builder for constructing a test plan.
69
+ * Creates a new test builder for constructing a test monitor.
70
70
  *
71
- * @param config - Configuration for the test plan
71
+ * @param config - Configuration for the test monitor
72
72
  * @param config.name - Name of the test
73
73
  * @param config.frequency - frequency for scheduled execution
74
74
  * @param config.locations - Optional array of location identifiers where this test should run
@@ -76,7 +76,7 @@ export interface TestBuilder<NodeName extends string = never, HasOutput extends
76
76
  *
77
77
  * @example
78
78
  * ```typescript
79
- * const plan = createGraphBuilder({
79
+ * const monitor = createGraphBuilder({
80
80
  * name: "health-check",
81
81
  * frequency: Frequency.every(5).minute(),
82
82
  * locations: ["us-east-1", "eu-west-1"]
@@ -1 +1 @@
1
- {"version":3,"file":"builder.d.ts","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,SAAS,EACT,OAAO,EACP,OAAO,EAEP,SAAS,EAGT,cAAc,EAEd,IAAI,EACJ,UAAU,EAEX,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,KAAK,KAAK,IAAI,SAAS,EAAE,KAAK,GAAG,IAAI,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9E;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,IAAI,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;AAEhD;;;;;;;GAOG;AACH,MAAM,WAAW,WAAW,CAC1B,QAAQ,SAAS,MAAM,GAAG,KAAK,EAC/B,SAAS,SAAS,MAAM,GAAG,KAAK,EAChC,QAAQ,SAAS,MAAM,GAAG,KAAK;IAE/B;;;;;;;;;;;OAWG;IACH,OAAO,CAAC,IAAI,SAAS,MAAM,EACzB,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,aAAa,GAClB,WAAW,CAAC,QAAQ,GAAG,IAAI,EAAE,SAAS,EAAE,QAAQ,CAAC,CAAC;IAErD;;;;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W,CAEd;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,MAAM,EACF,KAAK,GACL,MAAM,GACN,KAAK,GACL,QAAQ,GACR,OAAO,GACP,MAAM,GACN,SAAS,GACT,SAAS,GACT,OAAO,CAAC;IACZ,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,IAAI,EAAE,MAAM,GAAG,cAAc,CAAC,MAAM,CAAC,CAAC;IACtC,eAAe,EAAE,MAAM,GAAG,KAAK,GAAG,MAAM,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,IAAI,CAAC,EAAE,GAAG,CAAC;CACZ;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,WAAW,CACzB,MAAM,EAAE,iBAAiB,GACxB,IAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAY5B;AAED;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,GAAG;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,CAAC;AAkB9E;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,IAAI,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,CAK7D;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,SAAS,CAAC,UAAU,EAAE,SAAS,EAAE,GAAG,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,CAKzE"}
package/dist/builder.js CHANGED
@@ -1,4 +1,4 @@
1
- import { NodeType, CURRENT_PLAN_VERSION, } from "./schema.js";
1
+ import { NodeType, CURRENT_MONITOR_VERSION, } from "./schema.js";
2
2
  /**
3
3
  * Internal implementation class for TestBuilder.
4
4
  * Uses explicit type assertions at method boundaries to maintain phantom type tracking.
@@ -29,7 +29,7 @@ class TestBuilderImpl {
29
29
  const buildFn = () => {
30
30
  return {
31
31
  name,
32
- version: CURRENT_PLAN_VERSION,
32
+ version: CURRENT_MONITOR_VERSION,
33
33
  frequency,
34
34
  locations,
35
35
  nodes,
@@ -42,9 +42,9 @@ class TestBuilderImpl {
42
42
  }
43
43
  }
44
44
  /**
45
- * Creates a new test builder for constructing a test plan.
45
+ * Creates a new test builder for constructing a test monitor.
46
46
  *
47
- * @param config - Configuration for the test plan
47
+ * @param config - Configuration for the test monitor
48
48
  * @param config.name - Name of the test
49
49
  * @param config.frequency - frequency for scheduled execution
50
50
  * @param config.locations - Optional array of location identifiers where this test should run
@@ -52,7 +52,7 @@ class TestBuilderImpl {
52
52
  *
53
53
  * @example
54
54
  * ```typescript
55
- * const plan = createGraphBuilder({
55
+ * const monitor = createGraphBuilder({
56
56
  * name: "health-check",
57
57
  * frequency: Frequency.every(5).minute(),
58
58
  * locations: ["us-east-1", "eu-west-1"]
@@ -1 +1 @@
1
- {"version":3,"file":"builder.js","sourceRoot":"","sources":["../src/builder.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,QAAQ,EAGR,oBAAoB,GACrB,MAAM,aAAa,CAAC;AA6FrB;;;GAGG;AACH,MAAM,eAAe;IAST;IAJF,KAAK,GAAc,EAAE,CAAC;IACtB,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,EAAwB,CAAC,CAAC;QAC7D,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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