aws-runtime-bridge 1.7.6 → 1.7.8

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.
@@ -5,4 +5,11 @@
5
5
  */
6
6
  export declare const gitRouter: import("express-serve-static-core").Router;
7
7
  export declare function assertGitWorkspacePathAccessible(workspacePath: string): Promise<void>;
8
+ type GitDiffFileStatus = 'modified' | 'added' | 'deleted' | 'renamed';
9
+ /**
10
+ * 判断 Git diff 汇总行是否应该展示在差异树中。
11
+ * 普通 modified 且文本增删均为 0 通常是 filemode/元数据噪声,避免显示为“无差异内容”。
12
+ */
13
+ export declare function shouldIncludeGitDiffSummaryFile(status: GitDiffFileStatus, additions: number, deletions: number, isBinaryDiff: boolean): boolean;
14
+ export {};
8
15
  //# sourceMappingURL=git.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/routes/git.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,eAAO,MAAM,SAAS,4CAAW,CAAC;AAWlC,wBAAsB,gCAAgC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAe3F"}
1
+ {"version":3,"file":"git.d.ts","sourceRoot":"","sources":["../../src/routes/git.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAQH,eAAO,MAAM,SAAS,4CAAW,CAAC;AAWlC,wBAAsB,gCAAgC,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAe3F;AASD,KAAK,iBAAiB,GAAG,UAAU,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAEtE;;;GAGG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,iBAAiB,EACzB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,YAAY,EAAE,OAAO,GACpB,OAAO,CAMT"}
@@ -5,8 +5,8 @@
5
5
  */
6
6
  import { Router } from 'express';
7
7
  import { spawn } from 'node:child_process';
8
- import path from 'node:path';
9
8
  import { promises as fs } from 'node:fs';
9
+ import path from 'node:path';
10
10
  import { validateToken } from '../middleware/auth.js';
11
11
  export const gitRouter = Router();
12
12
  export async function assertGitWorkspacePathAccessible(workspacePath) {
@@ -25,6 +25,16 @@ export async function assertGitWorkspacePathAccessible(workspacePath) {
25
25
  throw new Error(`workspace path is not a directory: ${workspacePath}`);
26
26
  }
27
27
  }
28
+ /**
29
+ * 判断 Git diff 汇总行是否应该展示在差异树中。
30
+ * 普通 modified 且文本增删均为 0 通常是 filemode/元数据噪声,避免显示为“无差异内容”。
31
+ */
32
+ export function shouldIncludeGitDiffSummaryFile(status, additions, deletions, isBinaryDiff) {
33
+ if (status === 'added' || status === 'deleted' || status === 'renamed') {
34
+ return true;
35
+ }
36
+ return isBinaryDiff || additions > 0 || deletions > 0;
37
+ }
28
38
  /**
29
39
  * 执行 git 命令并返回输出
30
40
  */
@@ -418,10 +428,14 @@ gitRouter.post('/git/diff', validateToken, async (req, res) => {
418
428
  const parts = line.split('\t');
419
429
  if (parts.length < 3)
420
430
  continue;
431
+ const isBinaryDiff = parts[0] === '-' || parts[1] === '-';
421
432
  const additions = parts[0] === '-' ? 0 : parseInt(parts[0], 10) || 0;
422
433
  const deletions = parts[1] === '-' ? 0 : parseInt(parts[1], 10) || 0;
423
434
  const filePath = parseRenameDisplayPath(parts.slice(2).join('\t').trim());
424
435
  const status = statusMap.get(filePath) || 'modified';
436
+ if (!filePath || !shouldIncludeGitDiffSummaryFile(status, additions, deletions, isBinaryDiff)) {
437
+ continue;
438
+ }
425
439
  files.push({ path: filePath, status, additions, deletions });
426
440
  }
427
441
  res.json({
@@ -4,8 +4,8 @@
4
4
  import { mkdtemp, rm, writeFile } from 'node:fs/promises';
5
5
  import { tmpdir } from 'node:os';
6
6
  import path from 'node:path';
7
- import { describe, it, expect } from 'vitest';
8
- import { assertGitWorkspacePathAccessible } from './git.js';
7
+ import { describe, expect, it } from 'vitest';
8
+ import { assertGitWorkspacePathAccessible, shouldIncludeGitDiffSummaryFile } from './git.js';
9
9
  describe('git stash operations', () => {
10
10
  function parseStashList(output) {
11
11
  const stashes = [];
@@ -98,6 +98,21 @@ describe('git workspace path validation', () => {
98
98
  }
99
99
  });
100
100
  });
101
+ describe('git diff summary visibility', () => {
102
+ it('filters ordinary modified files without textual changes', () => {
103
+ expect(shouldIncludeGitDiffSummaryFile('modified', 0, 0, false)).toBe(false);
104
+ });
105
+ it('keeps modified files with text or binary changes', () => {
106
+ expect(shouldIncludeGitDiffSummaryFile('modified', 1, 0, false)).toBe(true);
107
+ expect(shouldIncludeGitDiffSummaryFile('modified', 0, 1, false)).toBe(true);
108
+ expect(shouldIncludeGitDiffSummaryFile('modified', 0, 0, true)).toBe(true);
109
+ });
110
+ it('keeps structural status changes even when line counts are zero', () => {
111
+ expect(shouldIncludeGitDiffSummaryFile('added', 0, 0, false)).toBe(true);
112
+ expect(shouldIncludeGitDiffSummaryFile('deleted', 0, 0, false)).toBe(true);
113
+ expect(shouldIncludeGitDiffSummaryFile('renamed', 0, 0, false)).toBe(true);
114
+ });
115
+ });
101
116
  describe('error handling', () => {
102
117
  it('detects "no local changes" error', () => {
103
118
  const isNoChangesError = (stderr) => stderr.includes('No local changes to save');
@@ -111,7 +126,7 @@ describe('error handling', () => {
111
126
  });
112
127
  it('detects invalid stash reference', () => {
113
128
  const isInvalidRef = (stderr) => stderr.includes('is not a valid reference');
114
- expect(isInvalidRef("stash@{99} is not a valid reference")).toBe(true);
129
+ expect(isInvalidRef('stash@{99} is not a valid reference')).toBe(true);
115
130
  expect(isInvalidRef('other error')).toBe(false);
116
131
  });
117
132
  });
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Bridge 包发布后通知服务
3
+ *
4
+ * 主干流程:读取 GitHub Actions 注入的 webhook URL 与密钥;两者均配置时,
5
+ * 读取当前包名/版本并发送带 HMAC 签名的 JSON 通知;任一配置缺失时安全跳过。
6
+ */
7
+ import axios from "axios";
8
+ import { type Logger } from "../utils/logger.js";
9
+ export interface BridgePackageInfo {
10
+ name: string;
11
+ version: string;
12
+ }
13
+ export interface BridgePackagePublishPayload {
14
+ package: string;
15
+ version: string;
16
+ repository?: string;
17
+ ref?: string;
18
+ sha?: string;
19
+ runId?: string;
20
+ runNumber?: string;
21
+ publishedAt: string;
22
+ }
23
+ interface NotifyOptions {
24
+ env?: NodeJS.ProcessEnv;
25
+ logger?: Pick<Logger, "info" | "warn" | "error">;
26
+ packageInfo?: BridgePackageInfo;
27
+ now?: () => Date;
28
+ post?: typeof axios.post;
29
+ }
30
+ /**
31
+ * 具体功能实现:读取 package.json 中用于通知服务识别包版本的最小信息。
32
+ */
33
+ export declare function readBridgePackageInfo(): Promise<BridgePackageInfo>;
34
+ /**
35
+ * 具体功能实现:构造稳定的发布通知负载,附带 GitHub Actions 上下文便于服务端审计。
36
+ */
37
+ export declare function createBridgePackagePublishPayload(packageInfo: BridgePackageInfo, env?: NodeJS.ProcessEnv, now?: () => Date): BridgePackagePublishPayload;
38
+ /**
39
+ * 具体功能实现:对实际发送的 JSON 字符串签名,保证服务端验签与请求体完全一致。
40
+ */
41
+ export declare function createBridgePublishSignature(body: string, secret: string): string;
42
+ /**
43
+ * 主逻辑:根据环境变量决定跳过或发送发布通知;已配置 webhook 时失败会抛出,
44
+ * 让 GitHub Actions 明确暴露“包已发布但通知失败”的状态。
45
+ */
46
+ export declare function notifyBridgePackagePublished(options?: NotifyOptions): Promise<boolean>;
47
+ export {};
48
+ //# sourceMappingURL=bridge-package-publish-hooks.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-package-publish-hooks.d.ts","sourceRoot":"","sources":["../../src/services/bridge-package-publish-hooks.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,OAAO,EAAgB,KAAK,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAQ/D,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,UAAU,aAAa;IACrB,GAAG,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;IACxB,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,CAAC;IACjD,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,GAAG,CAAC,EAAE,MAAM,IAAI,CAAC;IACjB,IAAI,CAAC,EAAE,OAAO,KAAK,CAAC,IAAI,CAAC;CAC1B;AA2BD;;GAEG;AACH,wBAAsB,qBAAqB,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAYxE;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,WAAW,EAAE,iBAAiB,EAC9B,GAAG,GAAE,MAAM,CAAC,UAAwB,EACpC,GAAG,GAAE,MAAM,IAAuB,GACjC,2BAA2B,CAW7B;AAED;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAGjF;AAED;;;GAGG;AACH,wBAAsB,4BAA4B,CAAC,OAAO,GAAE,aAAkB,GAAG,OAAO,CAAC,OAAO,CAAC,CAwChG"}
@@ -0,0 +1,115 @@
1
+ /**
2
+ * Bridge 包发布后通知服务
3
+ *
4
+ * 主干流程:读取 GitHub Actions 注入的 webhook URL 与密钥;两者均配置时,
5
+ * 读取当前包名/版本并发送带 HMAC 签名的 JSON 通知;任一配置缺失时安全跳过。
6
+ */
7
+ import axios from "axios";
8
+ import { createHmac } from "node:crypto";
9
+ import { readFile } from "node:fs/promises";
10
+ import path from "node:path";
11
+ import { fileURLToPath } from "node:url";
12
+ import { createLogger } from "../utils/logger.js";
13
+ const HOOK_URL_ENV = "BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL";
14
+ const HOOK_SECRET_ENV = "BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET";
15
+ const DEFAULT_TIMEOUT_MS = 10_000;
16
+ const publishHooksLogger = createLogger("bridge-package-publish-hooks");
17
+ function normalizeOptionalString(value) {
18
+ if (value == null) {
19
+ return undefined;
20
+ }
21
+ const normalized = String(value).trim();
22
+ return normalized || undefined;
23
+ }
24
+ /**
25
+ * 具体功能实现:只暴露 URL 是否已配置,避免 CI 日志泄露 token 型 URL。
26
+ */
27
+ function describeHookUrl(url) {
28
+ try {
29
+ const parsed = new URL(url);
30
+ return `${parsed.protocol}//${parsed.host}`;
31
+ }
32
+ catch {
33
+ return "configured-url";
34
+ }
35
+ }
36
+ /**
37
+ * 具体功能实现:读取 package.json 中用于通知服务识别包版本的最小信息。
38
+ */
39
+ export async function readBridgePackageInfo() {
40
+ const packageJsonUrl = new URL("../../package.json", import.meta.url);
41
+ const rawPackageJson = await readFile(packageJsonUrl, "utf-8");
42
+ const packageJson = JSON.parse(rawPackageJson);
43
+ const name = normalizeOptionalString(packageJson.name);
44
+ const version = normalizeOptionalString(packageJson.version);
45
+ if (!name || !version) {
46
+ throw new Error("package.json must contain non-empty name and version fields");
47
+ }
48
+ return { name, version };
49
+ }
50
+ /**
51
+ * 具体功能实现:构造稳定的发布通知负载,附带 GitHub Actions 上下文便于服务端审计。
52
+ */
53
+ export function createBridgePackagePublishPayload(packageInfo, env = process.env, now = () => new Date()) {
54
+ return {
55
+ package: packageInfo.name,
56
+ version: packageInfo.version,
57
+ repository: normalizeOptionalString(env.GITHUB_REPOSITORY),
58
+ ref: normalizeOptionalString(env.GITHUB_REF),
59
+ sha: normalizeOptionalString(env.GITHUB_SHA),
60
+ runId: normalizeOptionalString(env.GITHUB_RUN_ID),
61
+ runNumber: normalizeOptionalString(env.GITHUB_RUN_NUMBER),
62
+ publishedAt: now().toISOString(),
63
+ };
64
+ }
65
+ /**
66
+ * 具体功能实现:对实际发送的 JSON 字符串签名,保证服务端验签与请求体完全一致。
67
+ */
68
+ export function createBridgePublishSignature(body, secret) {
69
+ const digest = createHmac("sha256", secret).update(body, "utf-8").digest("hex");
70
+ return `sha256=${digest}`;
71
+ }
72
+ /**
73
+ * 主逻辑:根据环境变量决定跳过或发送发布通知;已配置 webhook 时失败会抛出,
74
+ * 让 GitHub Actions 明确暴露“包已发布但通知失败”的状态。
75
+ */
76
+ export async function notifyBridgePackagePublished(options = {}) {
77
+ const env = options.env ?? process.env;
78
+ const logger = options.logger ?? publishHooksLogger;
79
+ const hookUrl = normalizeOptionalString(env[HOOK_URL_ENV]);
80
+ const hookSecret = normalizeOptionalString(env[HOOK_SECRET_ENV]);
81
+ if (!hookUrl && !hookSecret) {
82
+ logger.info("Bridge package publish hook is not configured. Skipping notification.");
83
+ return false;
84
+ }
85
+ if (!hookUrl || !hookSecret) {
86
+ logger.warn(`Bridge package publish hook requires both ${HOOK_URL_ENV} and ${HOOK_SECRET_ENV}. Skipping notification.`);
87
+ return false;
88
+ }
89
+ const packageInfo = options.packageInfo ?? (await readBridgePackageInfo());
90
+ const payload = createBridgePackagePublishPayload(packageInfo, env, options.now);
91
+ const body = JSON.stringify(payload);
92
+ const signature = createBridgePublishSignature(body, hookSecret);
93
+ const timestamp = String(Math.floor(Date.parse(payload.publishedAt) / 1000));
94
+ const post = options.post ?? axios.post;
95
+ logger.info(`Notifying bridge package publish hook for ${packageInfo.name}@${packageInfo.version} (${describeHookUrl(hookUrl)}).`);
96
+ await post(hookUrl, body, {
97
+ headers: {
98
+ "Content-Type": "application/json",
99
+ "X-Bridge-Signature": signature,
100
+ "X-Bridge-Timestamp": timestamp,
101
+ },
102
+ timeout: DEFAULT_TIMEOUT_MS,
103
+ });
104
+ logger.info(`Bridge package publish hook notified for ${packageInfo.name}@${packageInfo.version}.`);
105
+ return true;
106
+ }
107
+ const isCliEntry = process.argv[1]
108
+ ? fileURLToPath(import.meta.url) === path.resolve(process.argv[1])
109
+ : false;
110
+ if (isCliEntry) {
111
+ notifyBridgePackagePublished().catch((error) => {
112
+ publishHooksLogger.error("Failed to notify bridge package publish hook:", error instanceof Error ? error.message : String(error));
113
+ process.exitCode = 1;
114
+ });
115
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=bridge-package-publish-hooks.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bridge-package-publish-hooks.test.d.ts","sourceRoot":"","sources":["../../src/services/bridge-package-publish-hooks.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,136 @@
1
+ import { createHmac } from "node:crypto";
2
+ import { afterEach, describe, expect, it, vi } from "vitest";
3
+ import { createBridgePackagePublishPayload, createBridgePublishSignature, notifyBridgePackagePublished, readBridgePackageInfo, } from "./bridge-package-publish-hooks.js";
4
+ const originalEnv = { ...process.env };
5
+ function createLoggerMock() {
6
+ return {
7
+ info: vi.fn(),
8
+ warn: vi.fn(),
9
+ error: vi.fn(),
10
+ };
11
+ }
12
+ function createPublishEnv(overrides = {}) {
13
+ return {
14
+ ...originalEnv,
15
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL: "",
16
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET: "",
17
+ GITHUB_REPOSITORY: "owner/repo",
18
+ GITHUB_REF: "refs/heads/main",
19
+ GITHUB_SHA: "abc123",
20
+ GITHUB_RUN_ID: "456",
21
+ GITHUB_RUN_NUMBER: "789",
22
+ ...overrides,
23
+ };
24
+ }
25
+ const packageInfo = {
26
+ name: "aws-runtime-bridge",
27
+ version: "1.7.6",
28
+ };
29
+ afterEach(() => {
30
+ process.env = { ...originalEnv };
31
+ vi.clearAllMocks();
32
+ vi.restoreAllMocks();
33
+ });
34
+ describe("bridge package publish hooks", () => {
35
+ it("reads the bridge package name and version from package.json", async () => {
36
+ await expect(readBridgePackageInfo()).resolves.toMatchObject({
37
+ name: "aws-runtime-bridge",
38
+ version: expect.stringMatching(/^\d+\.\d+\.\d+/),
39
+ });
40
+ });
41
+ it("creates a publish payload with GitHub Actions metadata", () => {
42
+ const payload = createBridgePackagePublishPayload(packageInfo, createPublishEnv(), () => new Date("2026-05-23T12:00:00.000Z"));
43
+ expect(payload).toEqual({
44
+ package: "aws-runtime-bridge",
45
+ version: "1.7.6",
46
+ repository: "owner/repo",
47
+ ref: "refs/heads/main",
48
+ sha: "abc123",
49
+ runId: "456",
50
+ runNumber: "789",
51
+ publishedAt: "2026-05-23T12:00:00.000Z",
52
+ });
53
+ });
54
+ it("signs the exact request body with HMAC SHA-256", () => {
55
+ const body = JSON.stringify({ package: "aws-runtime-bridge", version: "1.7.6" });
56
+ const secret = "test-secret";
57
+ const expectedDigest = createHmac("sha256", secret).update(body, "utf-8").digest("hex");
58
+ expect(createBridgePublishSignature(body, secret)).toBe(`sha256=${expectedDigest}`);
59
+ });
60
+ it("skips notification when both hook URL and secret are absent", async () => {
61
+ const post = vi.fn();
62
+ const logger = createLoggerMock();
63
+ await expect(notifyBridgePackagePublished({
64
+ env: createPublishEnv(),
65
+ logger,
66
+ packageInfo,
67
+ post,
68
+ })).resolves.toBe(false);
69
+ expect(post).not.toHaveBeenCalled();
70
+ expect(logger.info).toHaveBeenCalledWith("Bridge package publish hook is not configured. Skipping notification.");
71
+ expect(JSON.stringify(logger)).not.toContain("test-secret");
72
+ });
73
+ it("skips notification when only one hook setting is configured", async () => {
74
+ const post = vi.fn();
75
+ const logger = createLoggerMock();
76
+ await expect(notifyBridgePackagePublished({
77
+ env: createPublishEnv({
78
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL: "https://hooks.example.test/bridge",
79
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET: "",
80
+ }),
81
+ logger,
82
+ packageInfo,
83
+ post,
84
+ })).resolves.toBe(false);
85
+ expect(post).not.toHaveBeenCalled();
86
+ expect(logger.warn).toHaveBeenCalledWith("Bridge package publish hook requires both BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL and BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET. Skipping notification.");
87
+ });
88
+ it("sends signed publish notification when hook URL and secret are configured", async () => {
89
+ const post = vi.fn().mockResolvedValue({ data: { success: true } });
90
+ const logger = createLoggerMock();
91
+ const secret = "super-secret-value";
92
+ const env = createPublishEnv({
93
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL: "https://hooks.example.test/bridge?token=url-token",
94
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET: secret,
95
+ });
96
+ await expect(notifyBridgePackagePublished({
97
+ env,
98
+ logger,
99
+ packageInfo,
100
+ now: () => new Date("2026-05-23T12:00:00.000Z"),
101
+ post,
102
+ })).resolves.toBe(true);
103
+ expect(post).toHaveBeenCalledTimes(1);
104
+ const [url, body, config] = post.mock.calls[0] ?? [];
105
+ expect(url).toBe("https://hooks.example.test/bridge?token=url-token");
106
+ expect(typeof body).toBe("string");
107
+ expect(JSON.parse(body)).toMatchObject({
108
+ package: "aws-runtime-bridge",
109
+ version: "1.7.6",
110
+ publishedAt: "2026-05-23T12:00:00.000Z",
111
+ });
112
+ expect(config).toMatchObject({
113
+ headers: {
114
+ "Content-Type": "application/json",
115
+ "X-Bridge-Signature": createBridgePublishSignature(body, secret),
116
+ "X-Bridge-Timestamp": "1779537600",
117
+ },
118
+ timeout: 10_000,
119
+ });
120
+ expect(logger.info).toHaveBeenCalledWith("Notifying bridge package publish hook for aws-runtime-bridge@1.7.6 (https://hooks.example.test).");
121
+ expect(JSON.stringify(logger.info.mock.calls)).not.toContain(secret);
122
+ expect(JSON.stringify(logger.info.mock.calls)).not.toContain("url-token");
123
+ });
124
+ it("surfaces notification failures when hook is configured", async () => {
125
+ const post = vi.fn().mockRejectedValue(new Error("network unavailable"));
126
+ await expect(notifyBridgePackagePublished({
127
+ env: createPublishEnv({
128
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_URL: "https://hooks.example.test/bridge",
129
+ BRIDGE_PACKAGE_ON_PUBLIC_HOOKS_SECRET: "test-secret",
130
+ }),
131
+ logger: createLoggerMock(),
132
+ packageInfo,
133
+ post,
134
+ })).rejects.toThrow("network unavailable");
135
+ });
136
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aws-runtime-bridge",
3
- "version": "1.7.6",
3
+ "version": "1.7.8",
4
4
  "description": "AgentsWorkStudio runtime bridge service for machine-level agent runtime integration",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",