@dxv-systems/mail-graph 0.0.0-stage → 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.
Files changed (52) hide show
  1. package/README.md +201 -3
  2. package/dist/auth.d.ts +41 -0
  3. package/dist/auth.js +184 -0
  4. package/dist/client.d.ts +18 -0
  5. package/dist/client.js +34 -0
  6. package/dist/errors.d.ts +25 -0
  7. package/dist/errors.js +35 -0
  8. package/dist/http.d.ts +44 -0
  9. package/dist/http.js +182 -0
  10. package/dist/index.d.ts +9 -0
  11. package/dist/index.js +14 -0
  12. package/dist/limiter.d.ts +7 -0
  13. package/dist/limiter.js +29 -0
  14. package/dist/links.d.ts +2 -0
  15. package/dist/links.js +25 -0
  16. package/dist/mailbox.d.ts +41 -0
  17. package/dist/mailbox.js +429 -0
  18. package/dist/setup/access.d.ts +20 -0
  19. package/dist/setup/access.js +71 -0
  20. package/dist/setup/address.d.ts +32 -0
  21. package/dist/setup/address.js +69 -0
  22. package/dist/setup/consent.d.ts +40 -0
  23. package/dist/setup/consent.js +78 -0
  24. package/dist/setup/constants.d.ts +2 -0
  25. package/dist/setup/constants.js +5 -0
  26. package/dist/setup/exchange-graph.d.ts +23 -0
  27. package/dist/setup/exchange-graph.js +119 -0
  28. package/dist/setup/exchange-script.d.ts +1 -0
  29. package/dist/setup/exchange-script.js +190 -0
  30. package/dist/setup/handlers.d.ts +30 -0
  31. package/dist/setup/handlers.js +571 -0
  32. package/dist/setup/index.d.ts +18 -0
  33. package/dist/setup/index.js +38 -0
  34. package/dist/setup/it-link.d.ts +17 -0
  35. package/dist/setup/it-link.js +17 -0
  36. package/dist/setup/messages.d.ts +22 -0
  37. package/dist/setup/messages.js +36 -0
  38. package/dist/setup/react.d.ts +8 -0
  39. package/dist/setup/react.js +451 -0
  40. package/dist/setup/script.d.ts +27 -0
  41. package/dist/setup/script.js +74 -0
  42. package/dist/setup/signing.d.ts +18 -0
  43. package/dist/setup/signing.js +56 -0
  44. package/dist/setup/tenant.d.ts +38 -0
  45. package/dist/setup/tenant.js +45 -0
  46. package/dist/setup/types.d.ts +76 -0
  47. package/dist/setup/types.js +2 -0
  48. package/dist/types.d.ts +98 -0
  49. package/dist/types.js +2 -0
  50. package/dist/util.d.ts +4 -0
  51. package/dist/util.js +17 -0
  52. package/package.json +70 -6
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ScriptInputInvalid = exports.EXECUTION_POLICY_TIP = exports.SCRIPT_FILE_NAME = void 0;
4
+ exports.exchangeGroupName = exchangeGroupName;
5
+ exports.buildExchangeScript = buildExchangeScript;
6
+ exports.psQuote = psQuote;
7
+ exports.buildScriptInvocation = buildScriptInvocation;
8
+ const address_1 = require("./address");
9
+ const exchange_script_1 = require("./exchange-script");
10
+ exports.SCRIPT_FILE_NAME = "dxv-helpdesk-koppelen.ps1";
11
+ exports.EXECUTION_POLICY_TIP = "Set-ExecutionPolicy -Scope Process Bypass";
12
+ function exchangeGroupName(appId) {
13
+ const guid = (0, address_1.normalizeGuid)(appId);
14
+ return guid ? `DXV Helpdesk ${guid.slice(0, 8)}` : "DXV Helpdesk";
15
+ }
16
+ function buildExchangeScript() {
17
+ return `${exchange_script_1.EXCHANGE_SCRIPT_LINES.join("\r\n")}\r\n`;
18
+ }
19
+ class ScriptInputInvalid extends Error {
20
+ constructor(code, value) {
21
+ super(`Invalid script input: ${code}${value === undefined ? "" : ` (${value})`}`);
22
+ this.code = code;
23
+ this.value = value;
24
+ this.name = "ScriptInputInvalid";
25
+ }
26
+ }
27
+ exports.ScriptInputInvalid = ScriptInputInvalid;
28
+ function psQuote(value) {
29
+ if (!/^[\x20-\x7e]*$/.test(value))
30
+ throw new ScriptInputInvalid("unsafe_value", value);
31
+ return `"${value.replace(/[`"$]/g, (c) => `\`${c}`)}"`;
32
+ }
33
+ function buildScriptInvocation(input) {
34
+ const appId = (0, address_1.normalizeGuid)(input.appId);
35
+ if (!appId)
36
+ throw new ScriptInputInvalid("invalid_app_id", input.appId);
37
+ const objectId = (0, address_1.normalizeGuid)(input.objectId);
38
+ if (!objectId)
39
+ throw new ScriptInputInvalid("invalid_object_id", input.objectId);
40
+ if (!Array.isArray(input.mailboxes) || input.mailboxes.length === 0)
41
+ throw new ScriptInputInvalid("no_mailboxes");
42
+ const mailboxes = input.mailboxes.map((raw) => {
43
+ const address = (0, address_1.normalizeMailbox)(raw);
44
+ if (!address)
45
+ throw new ScriptInputInvalid("invalid_mailbox", raw);
46
+ return address;
47
+ });
48
+ const checkMailbox = (0, address_1.normalizeMailbox)(input.checkMailbox);
49
+ if (!checkMailbox)
50
+ throw new ScriptInputInvalid("invalid_check_mailbox", input.checkMailbox);
51
+ const entries = [
52
+ ["AppId", psQuote(appId)],
53
+ ["ObjectId", psQuote(objectId)],
54
+ ["Mailboxes", mailboxes.map(psQuote).join(", ")],
55
+ ["CheckMailbox", psQuote(checkMailbox)],
56
+ ];
57
+ if (input.signIn.kind === "partner") {
58
+ const tenant = (0, address_1.normalizeDomain)(input.signIn.partnerTenant);
59
+ if (!tenant)
60
+ throw new ScriptInputInvalid("invalid_partner_tenant", input.signIn.partnerTenant);
61
+ entries.push(["PartnerTenant", psQuote(tenant)]);
62
+ }
63
+ else if (input.signIn.adminAccount !== undefined && input.signIn.adminAccount.trim() !== "") {
64
+ const account = (0, address_1.normalizeMailbox)(input.signIn.adminAccount);
65
+ if (!account)
66
+ throw new ScriptInputInvalid("invalid_admin_account", input.signIn.adminAccount);
67
+ entries.push(["AdminAccount", psQuote(account)]);
68
+ }
69
+ if (input.disableWam)
70
+ entries.push(["DisableWAM", "$true"]);
71
+ const width = Math.max(...entries.map(([key]) => key.length));
72
+ const body = entries.map(([key, value]) => ` ${key.padEnd(width)} = ${value}`).join("\n");
73
+ return `$p = @{\n${body}\n}; .\\${exports.SCRIPT_FILE_NAME} @p`;
74
+ }
@@ -0,0 +1,18 @@
1
+ export type SignedPurpose = "consent_state" | "it_link";
2
+ export type VerifyFailure = "malformed" | "bad_signature" | "wrong_purpose" | "expired";
3
+ export type VerifyResult<T> = {
4
+ ok: true;
5
+ claims: T & {
6
+ exp: number;
7
+ };
8
+ } | {
9
+ ok: false;
10
+ reason: VerifyFailure;
11
+ expiredClaims?: T & {
12
+ exp: number;
13
+ };
14
+ };
15
+ export declare function assertSecret(secret: string): void;
16
+ export declare function randomId(bytes?: number): string;
17
+ export declare function signToken(secret: string, purpose: SignedPurpose, claims: Record<string, unknown>, expiresAt: number): string;
18
+ export declare function verifyToken<T extends Record<string, unknown>>(secret: string, purpose: SignedPurpose, token: unknown, now: number): VerifyResult<T>;
@@ -0,0 +1,56 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.assertSecret = assertSecret;
4
+ exports.randomId = randomId;
5
+ exports.signToken = signToken;
6
+ exports.verifyToken = verifyToken;
7
+ const node_crypto_1 = require("node:crypto");
8
+ const VERSION = "v1";
9
+ function assertSecret(secret) {
10
+ if (typeof secret !== "string" || secret.length < 32) {
11
+ throw new Error("The M365 setup signing secret must be at least 32 characters.");
12
+ }
13
+ }
14
+ function randomId(bytes = 16) {
15
+ return (0, node_crypto_1.randomBytes)(bytes).toString("base64url");
16
+ }
17
+ function mac(secret, purpose, payload) {
18
+ return (0, node_crypto_1.createHmac)("sha256", secret).update(`${VERSION}.${purpose}.${payload}`).digest();
19
+ }
20
+ function signToken(secret, purpose, claims, expiresAt) {
21
+ assertSecret(secret);
22
+ const payload = Buffer.from(JSON.stringify({ ...claims, exp: Math.floor(expiresAt) }), "utf8").toString("base64url");
23
+ return `${VERSION}.${payload}.${mac(secret, purpose, payload).toString("base64url")}`;
24
+ }
25
+ function verifyToken(secret, purpose, token, now) {
26
+ assertSecret(secret);
27
+ if (typeof token !== "string" || token.length > 4096)
28
+ return { ok: false, reason: "malformed" };
29
+ const parts = token.split(".");
30
+ if (parts.length !== 3 || parts[0] !== VERSION || !parts[1] || !parts[2])
31
+ return { ok: false, reason: "malformed" };
32
+ const given = Buffer.from(parts[2], "base64url");
33
+ const expected = mac(secret, purpose, parts[1]);
34
+ if (given.length !== expected.length || !(0, node_crypto_1.timingSafeEqual)(given, expected)) {
35
+ for (const other of ["consent_state", "it_link"]) {
36
+ if (other !== purpose && given.length === expected.length && (0, node_crypto_1.timingSafeEqual)(given, mac(secret, other, parts[1]))) {
37
+ return { ok: false, reason: "wrong_purpose" };
38
+ }
39
+ }
40
+ return { ok: false, reason: "bad_signature" };
41
+ }
42
+ let claims;
43
+ try {
44
+ claims = JSON.parse(Buffer.from(parts[1], "base64url").toString("utf8"));
45
+ }
46
+ catch {
47
+ return { ok: false, reason: "malformed" };
48
+ }
49
+ if (!claims || typeof claims !== "object" || typeof claims.exp !== "number") {
50
+ return { ok: false, reason: "malformed" };
51
+ }
52
+ if (claims.exp <= now) {
53
+ return { ok: false, reason: "expired", expiredClaims: claims };
54
+ }
55
+ return { ok: true, claims: claims };
56
+ }
@@ -0,0 +1,38 @@
1
+ import type { FetchLike } from "../util";
2
+ export type DomainLookup = {
3
+ status: "found";
4
+ domain: string;
5
+ tenantId: string;
6
+ } | {
7
+ status: "not_m365";
8
+ domain: string;
9
+ } | {
10
+ status: "lookup_failed";
11
+ domain: string;
12
+ };
13
+ export interface TenantLookupOptions {
14
+ fetch?: FetchLike;
15
+ timeoutMs?: number;
16
+ }
17
+ export declare function lookupTenant(domain: string, options?: TenantLookupOptions): Promise<DomainLookup>;
18
+ export type TenantResolution = {
19
+ ok: true;
20
+ tenantId: string;
21
+ domains: string[];
22
+ } | {
23
+ ok: false;
24
+ code: "not_m365";
25
+ domains: string[];
26
+ } | {
27
+ ok: false;
28
+ code: "mixed_tenants";
29
+ tenants: Array<{
30
+ domain: string;
31
+ tenantId: string;
32
+ }>;
33
+ } | {
34
+ ok: false;
35
+ code: "lookup_failed";
36
+ domains: string[];
37
+ };
38
+ export declare function resolveMailboxTenant(addresses: string[], options?: TenantLookupOptions): Promise<TenantResolution>;
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.lookupTenant = lookupTenant;
4
+ exports.resolveMailboxTenant = resolveMailboxTenant;
5
+ const address_1 = require("./address");
6
+ const ISSUER = /^https:\/\/sts\.windows\.net\/([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})\/$/i;
7
+ async function lookupTenant(domain, options = {}) {
8
+ const fetchImpl = options.fetch ?? ((input, init) => fetch(input, init));
9
+ const url = `https://login.microsoftonline.com/${encodeURIComponent(domain)}/.well-known/openid-configuration`;
10
+ let response;
11
+ try {
12
+ response = await fetchImpl(url, {
13
+ headers: { Accept: "application/json" },
14
+ signal: AbortSignal.timeout(options.timeoutMs ?? 10000),
15
+ });
16
+ }
17
+ catch {
18
+ return { status: "lookup_failed", domain };
19
+ }
20
+ if (response.status === 400 || response.status === 404)
21
+ return { status: "not_m365", domain };
22
+ if (!response.ok)
23
+ return { status: "lookup_failed", domain };
24
+ const body = (await response.json().catch(() => null));
25
+ const match = typeof body?.issuer === "string" ? ISSUER.exec(body.issuer) : null;
26
+ if (!match)
27
+ return { status: "not_m365", domain };
28
+ return { status: "found", domain, tenantId: match[1].toLowerCase() };
29
+ }
30
+ async function resolveMailboxTenant(addresses, options = {}) {
31
+ const domains = [...new Set(addresses.map(address_1.mailboxDomain))];
32
+ const lookups = await Promise.all(domains.map((domain) => lookupTenant(domain, options)));
33
+ const notM365 = lookups.filter((l) => l.status === "not_m365").map((l) => l.domain);
34
+ if (notM365.length > 0)
35
+ return { ok: false, code: "not_m365", domains: notM365 };
36
+ const failed = lookups.filter((l) => l.status === "lookup_failed").map((l) => l.domain);
37
+ if (failed.length > 0)
38
+ return { ok: false, code: "lookup_failed", domains: failed };
39
+ const found = lookups.filter((l) => l.status === "found");
40
+ const tenantIds = new Set(found.map((l) => l.tenantId));
41
+ if (tenantIds.size !== 1) {
42
+ return { ok: false, code: "mixed_tenants", tenants: found.map(({ domain, tenantId }) => ({ domain, tenantId })) };
43
+ }
44
+ return { ok: true, tenantId: found[0].tenantId, domains };
45
+ }
@@ -0,0 +1,76 @@
1
+ import type { AccessStatus } from "../types";
2
+ export type SetupStep = "not_started" | "awaiting_consent" | "awaiting_script" | "awaiting_access" | "connected" | "failed";
3
+ export type ConsentErrorCode = "state_invalid" | "state_expired" | "state_stale" | "consent_denied" | "consent_failed" | "wrong_tenant";
4
+ export type FailureCode = "scope_leak" | "mailbox_missing" | "check_mailbox_missing" | "mailbox_unreachable";
5
+ export type SetupMethod = "graph" | "script";
6
+ export type ExchangeSetupErrorCode = "exchange_forbidden" | "exchange_org_customization" | "exchange_failed" | "sign_in_failed" | "no_object_id";
7
+ export type MailboxRole = "mailbox" | "check";
8
+ export interface SetupNotice {
9
+ address: string;
10
+ kind: "user_mailbox" | "rule_moves" | "rule_forwards";
11
+ rule?: string;
12
+ }
13
+ export interface MailboxCheck {
14
+ address: string;
15
+ role: MailboxRole;
16
+ status: AccessStatus | "error";
17
+ }
18
+ export interface M365Connection {
19
+ setupId: string;
20
+ step: SetupStep;
21
+ tenantId: string | null;
22
+ mailboxes: string[];
23
+ checkMailbox: string | null;
24
+ objectId: string | null;
25
+ objectIdSource: "token" | "manual" | null;
26
+ consentNonce: string | null;
27
+ consentError: ConsentErrorCode | null;
28
+ failure: FailureCode | null;
29
+ checks: MailboxCheck[] | null;
30
+ itLinkId: string | null;
31
+ itLinkExpiresAt: string | null;
32
+ consentedAt: string | null;
33
+ setupMethod?: SetupMethod | null;
34
+ exchangeSetupError?: ExchangeSetupErrorCode | null;
35
+ scriptRanAt: string | null;
36
+ signedInAs?: string | null;
37
+ notices?: SetupNotice[];
38
+ noticesComplete?: boolean;
39
+ lastCheckedAt: string | null;
40
+ connectedAt: string | null;
41
+ updatedAt: string;
42
+ }
43
+ export interface ConnectionStore {
44
+ load(): Promise<M365Connection | null>;
45
+ save(connection: M365Connection): Promise<void>;
46
+ }
47
+ export interface SetupAdmin {
48
+ id: string;
49
+ email?: string | null;
50
+ }
51
+ export type SetupViewer = "admin" | "it";
52
+ export interface SetupStatus {
53
+ viewer: SetupViewer;
54
+ step: SetupStep;
55
+ companyName: string;
56
+ entraAppName: string;
57
+ appId: string;
58
+ tenantId: string | null;
59
+ mailboxes: string[];
60
+ checkMailbox: string | null;
61
+ objectId: string | null;
62
+ consentError: ConsentErrorCode | null;
63
+ setupMethod: SetupMethod | null;
64
+ exchangeSetupError: ExchangeSetupErrorCode | null;
65
+ graphSetupAvailable: boolean;
66
+ setupReady: boolean;
67
+ notices: SetupNotice[];
68
+ failure: FailureCode | null;
69
+ checks: MailboxCheck[] | null;
70
+ scriptRanAt: string | null;
71
+ lastCheckedAt: string | null;
72
+ checkDeadline: string | null;
73
+ connectedAt: string | null;
74
+ signedInAs: string | null;
75
+ itLinkExpiresAt: string | null;
76
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,98 @@
1
+ export interface MailAddress {
2
+ address: string;
3
+ name?: string;
4
+ }
5
+ export type Recipient = string | MailAddress;
6
+ export type BodyType = "html" | "text";
7
+ export interface MessageBody {
8
+ contentType: BodyType;
9
+ content: string;
10
+ }
11
+ export interface MessageSummary {
12
+ id: string;
13
+ subject?: string;
14
+ from?: MailAddress;
15
+ receivedDateTime?: string;
16
+ internetMessageId?: string;
17
+ conversationId?: string;
18
+ hasAttachments?: boolean;
19
+ isRead?: boolean;
20
+ isDraft?: boolean;
21
+ parentFolderId?: string;
22
+ categories?: string[];
23
+ }
24
+ export interface DeltaItem extends MessageSummary {
25
+ removed: boolean;
26
+ removedReason?: string;
27
+ }
28
+ export interface DeltaPage {
29
+ items: DeltaItem[];
30
+ nextLink: string | null;
31
+ deltaLink: string | null;
32
+ }
33
+ export interface DeltaOptions {
34
+ folderId?: string;
35
+ link?: string;
36
+ since?: Date | string;
37
+ pageSize?: number;
38
+ }
39
+ export interface InternetMessageHeader {
40
+ name: string;
41
+ value: string;
42
+ }
43
+ export interface Message extends MessageSummary {
44
+ body: MessageBody;
45
+ sentDateTime?: string;
46
+ toRecipients: MailAddress[];
47
+ ccRecipients: MailAddress[];
48
+ replyTo: MailAddress[];
49
+ internetMessageHeaders?: InternetMessageHeader[];
50
+ inReplyTo?: string;
51
+ references?: string[];
52
+ }
53
+ export interface GetMessageOptions {
54
+ bodyType?: BodyType;
55
+ includeHeaders?: boolean;
56
+ }
57
+ export type AttachmentKind = "file" | "item" | "reference";
58
+ export interface AttachmentInfo {
59
+ id: string;
60
+ name: string;
61
+ contentType: string;
62
+ size: number;
63
+ isInline: boolean;
64
+ kind: AttachmentKind;
65
+ }
66
+ export interface CreateReplyOptions {
67
+ replyAll?: boolean;
68
+ comment?: string;
69
+ }
70
+ export interface OutgoingAttachment {
71
+ name: string;
72
+ contentType: string;
73
+ content: Uint8Array;
74
+ isInline?: boolean;
75
+ contentId?: string;
76
+ }
77
+ export interface MailFolder {
78
+ id: string;
79
+ displayName: string;
80
+ parentFolderId?: string;
81
+ childFolderCount?: number;
82
+ }
83
+ export interface ForwardInput {
84
+ to: Recipient[];
85
+ comment?: string;
86
+ }
87
+ export interface SendMailInput {
88
+ to: Recipient[];
89
+ cc?: Recipient[];
90
+ bcc?: Recipient[];
91
+ subject: string;
92
+ body: MessageBody;
93
+ attachments?: OutgoingAttachment[];
94
+ }
95
+ export type AccessStatus = "ok" | "denied" | "not_found";
96
+ export interface AccessCheckResult {
97
+ status: AccessStatus;
98
+ }
package/dist/types.js ADDED
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/dist/util.d.ts ADDED
@@ -0,0 +1,4 @@
1
+ export type FetchLike = typeof fetch;
2
+ export type SleepFn = (ms: number) => Promise<void>;
3
+ export declare const defaultSleep: SleepFn;
4
+ export declare function parseRetryAfter(header: string | null, now: number): number | null;
package/dist/util.js ADDED
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.defaultSleep = void 0;
4
+ exports.parseRetryAfter = parseRetryAfter;
5
+ const defaultSleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms));
6
+ exports.defaultSleep = defaultSleep;
7
+ function parseRetryAfter(header, now) {
8
+ if (!header)
9
+ return null;
10
+ const seconds = Number(header);
11
+ if (Number.isFinite(seconds) && seconds >= 0)
12
+ return Math.round(seconds * 1000);
13
+ const at = Date.parse(header);
14
+ if (Number.isNaN(at))
15
+ return null;
16
+ return Math.max(0, at - now);
17
+ }
package/package.json CHANGED
@@ -1,6 +1,70 @@
1
- {
2
- "name": "@dxv-systems/mail-graph",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
1
+ {
2
+ "name": "@dxv-systems/mail-graph",
3
+ "version": "0.1.0",
4
+ "description": "Microsoft Graph mail for DXV apps — app-only auth via a caller-supplied client assertion (federated or certificate), per-mailbox delta sync, messages, attachments, threaded replies, folders, forward and send. Never deletes. Guided Microsoft 365 setup (route handlers and a React page) under ./setup. Zero runtime dependencies.",
5
+ "keywords": [
6
+ "dxv",
7
+ "microsoft-graph",
8
+ "graph",
9
+ "m365",
10
+ "exchange",
11
+ "mail",
12
+ "helpdesk"
13
+ ],
14
+ "engines": {
15
+ "node": ">=20.0.0"
16
+ },
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "default": "./dist/index.js"
21
+ },
22
+ "./setup": {
23
+ "types": "./dist/setup/index.d.ts",
24
+ "default": "./dist/setup/index.js"
25
+ },
26
+ "./setup/react": {
27
+ "types": "./dist/setup/react.d.ts",
28
+ "default": "./dist/setup/react.js"
29
+ }
30
+ },
31
+ "main": "./dist/index.js",
32
+ "types": "./dist/index.d.ts",
33
+ "files": [
34
+ "dist"
35
+ ],
36
+ "sideEffects": false,
37
+ "scripts": {
38
+ "build": "tsc",
39
+ "test": "vitest run",
40
+ "test:watch": "vitest",
41
+ "prepublishOnly": "npm run build"
42
+ },
43
+ "peerDependencies": {
44
+ "react": ">=18"
45
+ },
46
+ "peerDependenciesMeta": {
47
+ "react": {
48
+ "optional": true
49
+ }
50
+ },
51
+ "devDependencies": {
52
+ "@testing-library/react": "^16.0.1",
53
+ "@types/node": "^20.19.0",
54
+ "@types/react": "^18.3.12",
55
+ "jsdom": "^25.0.1",
56
+ "react": "^18.3.1",
57
+ "react-dom": "^18.3.1",
58
+ "typescript": "^5.6.0",
59
+ "vitest": "^4.1.11"
60
+ },
61
+ "repository": {
62
+ "type": "git",
63
+ "url": "git+https://github.com/dxv-systems/dxv-packages.git",
64
+ "directory": "packages/mail-graph"
65
+ },
66
+ "publishConfig": {
67
+ "access": "public"
68
+ },
69
+ "license": "MIT"
70
+ }