@app-vitals/agent-admin 1.108.1 → 1.109.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.
@@ -7,7 +7,11 @@
7
7
  * resolved config as deps.
8
8
  */
9
9
 
10
- export const DEFAULT_SELF_SERVE_CONTACT_EMAIL = "dan@app-vitals.com";
10
+ /**
11
+ * @deprecated The contact address is no longer used; kept as an export so
12
+ * existing consumers keep compiling.
13
+ */
14
+ export const DEFAULT_SELF_SERVE_CONTACT_EMAIL = "";
11
15
 
12
16
  /** Structural env shape — accepts `process.env` or a plain test object. */
13
17
  type SelfServeEnv = Readonly<Record<string, string | undefined>>;
@@ -17,8 +21,8 @@ export interface SelfServeConfig {
17
21
  enabled: boolean;
18
22
  /** Default per-account agent quota (integer >= 0). */
19
23
  defaultMaxAgents: number;
20
- /** Contact address shown when a user needs more quota. */
21
- contactEmail: string;
24
+ /** @deprecated No longer set or read; kept optional for existing consumers. */
25
+ contactEmail?: string;
22
26
  }
23
27
 
24
28
  /**
@@ -44,9 +48,5 @@ export function parseSelfServeConfig(
44
48
  }
45
49
  }
46
50
 
47
- const contactEmail =
48
- env.SHIPWRIGHT_SELF_SERVE_CONTACT_EMAIL?.trim() ||
49
- DEFAULT_SELF_SERVE_CONTACT_EMAIL;
50
-
51
- return { enabled, defaultMaxAgents, contactEmail };
51
+ return { enabled, defaultMaxAgents };
52
52
  }
@@ -20,7 +20,6 @@ describe("parseSelfServeConfig", () => {
20
20
  expect(config).toEqual({
21
21
  enabled: false,
22
22
  defaultMaxAgents: 0,
23
- contactEmail: "dan@app-vitals.com",
24
23
  });
25
24
  expect(warnings).toEqual([]);
26
25
  });
@@ -64,16 +63,10 @@ describe("parseSelfServeConfig", () => {
64
63
  },
65
64
  );
66
65
 
67
- it("uses a custom contact email, trimmed", () => {
66
+ it("no longer reads a contact email", () => {
68
67
  expect(
69
- parse({ SHIPWRIGHT_SELF_SERVE_CONTACT_EMAIL: " ops@example.com " }).config
68
+ parse({ SHIPWRIGHT_SELF_SERVE_CONTACT_EMAIL: "ops@example.com" }).config
70
69
  .contactEmail,
71
- ).toBe("ops@example.com");
72
- });
73
-
74
- it("falls back to the default contact when blank", () => {
75
- expect(
76
- parse({ SHIPWRIGHT_SELF_SERVE_CONTACT_EMAIL: " " }).config.contactEmail,
77
- ).toBe("dan@app-vitals.com");
70
+ ).toBeUndefined();
78
71
  });
79
72
  });