@griffin-app/griffin-cli 1.0.19 → 1.0.21

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.
@@ -53,25 +53,20 @@ async function fetchNotificationIntegrations(sdk) {
53
53
  query: { category: "notifications", enabled: true },
54
54
  }), "Failed to fetch integrations");
55
55
  const list = result?.data?.data ?? [];
56
- return list
57
- .filter((i) => i.category === "notifications")
58
- .map((i) => ({
59
- id: i.id,
60
- name: i.name,
61
- provider: i.provider,
62
- }));
56
+ return list.filter((i) => i.category === "notifications");
63
57
  }
64
- function promptRoutingForProvider(provider) {
58
+ async function promptRoutingForProvider(provider) {
65
59
  switch (provider) {
66
60
  case "slack": {
67
61
  return terminal
68
62
  .input("Slack channel (e.g. #alerts)", "#alerts")
69
63
  .then((value) => ({
70
- provider: "slack",
64
+ channelType: "slack",
71
65
  channel: (value ?? "").trim() || "#alerts",
72
66
  }));
73
67
  }
74
- case "email": {
68
+ case "email":
69
+ case "resend":
75
70
  return terminal.input("To addresses (comma-separated)").then((value) => {
76
71
  const toAddresses = (value ?? "")
77
72
  .split(",")
@@ -81,11 +76,13 @@ function promptRoutingForProvider(provider) {
81
76
  terminal.error("At least one email address is required.");
82
77
  terminal.exit(1);
83
78
  }
84
- return { provider: "email", toAddresses };
79
+ return { channelType: "email", toAddresses };
85
80
  });
86
- }
81
+ case "webhook":
82
+ return { channelType: "webhook" };
87
83
  default:
88
- return Promise.resolve({ provider: "webhook" });
84
+ terminal.error(`Unsupported provider: ${provider}`);
85
+ throw new Error(`Unsupported provider: ${provider}`);
89
86
  }
90
87
  }
91
88
  /**
@@ -93,7 +90,7 @@ function promptRoutingForProvider(provider) {
93
90
  */
94
91
  function buildRoutingFromOptions(options) {
95
92
  if (options.channel !== undefined && options.channel !== "") {
96
- return { provider: "slack", channel: options.channel };
93
+ return { channelType: "slack", channel: options.channel };
97
94
  }
98
95
  if (options.toAddresses !== undefined && options.toAddresses !== "") {
99
96
  const toAddresses = options.toAddresses
@@ -101,10 +98,10 @@ function buildRoutingFromOptions(options) {
101
98
  .map((s) => s.trim())
102
99
  .filter(Boolean);
103
100
  if (toAddresses.length > 0) {
104
- return { provider: "email", toAddresses };
101
+ return { channelType: "email", toAddresses };
105
102
  }
106
103
  }
107
- return { provider: "webhook" };
104
+ return { channelType: "webhook" };
108
105
  }
109
106
  /**
110
107
  * Run interactive wizard: select integration, then prompt for provider-specific options (channel, to-addresses, or none).
@@ -7,7 +7,7 @@ import { Type } from "typebox";
7
7
  * This file only stores configuration (project, environments, runner connection).
8
8
  */
9
9
  const authUrl = "https://www.getgriffinapp.com/api/auth";
10
- const hubBaseUrl = "https://griffin-hub.fly.dev";
10
+ const hubBaseUrl = "https://hub.griff.services";
11
11
  export const EnvironmentConfigSchema = Type.Object({
12
12
  variables: Type.Optional(Type.Record(Type.String(), Type.String())),
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@griffin-app/griffin-cli",
3
- "version": "1.0.19",
3
+ "version": "1.0.21",
4
4
  "description": "CLI tool for running and managing griffin API tests",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -24,9 +24,9 @@
24
24
  "author": "",
25
25
  "license": "MIT",
26
26
  "dependencies": {
27
- "@griffin-app/griffin-hub-sdk": "1.0.18",
28
- "@griffin-app/griffin-plan-executor": "0.1.25",
29
- "@griffin-app/griffin-ts": "0.1.25",
27
+ "@griffin-app/griffin-hub-sdk": "1.0.22",
28
+ "@griffin-app/griffin-plan-executor": "0.1.26",
29
+ "@griffin-app/griffin-ts": "0.1.26",
30
30
  "better-auth": "^1.4.17",
31
31
  "cli-table3": "^0.6.5",
32
32
  "commander": "^12.1.0",