@empiricalrun/playwright-utils 0.48.0 → 0.48.1

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @empiricalrun/playwright-utils
2
2
 
3
+ ## 0.48.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 376c2db: feat: prettier webhook urls
8
+
3
9
  ## 0.48.0
4
10
 
5
11
  ### Minor Changes
package/dist/webhook.js CHANGED
@@ -106,7 +106,7 @@ async function webhookSiteQuery(token, content) {
106
106
  return webhookSiteQueryDirect(token, content);
107
107
  }
108
108
  // ── inbox provider ──
109
- const INBOX_WORKER_URL = "https://inbox.empirical-run.workers.dev";
109
+ const INBOX_WORKER_URL = "https://inbox.empirical.run";
110
110
  function inboxRowToWebhookRequest(row) {
111
111
  let headers = {};
112
112
  try {
@@ -147,12 +147,12 @@ async function inboxGetUrl() {
147
147
  });
148
148
  const result = await apiClient.request("/api/inbox/proxy", {
149
149
  method: "POST",
150
- body: { method: "POST", path: "/api/webhooks/token" },
150
+ body: { method: "POST", path: "/api/hooks/token" },
151
151
  });
152
152
  const tokenData = result.data;
153
- return `${INBOX_WORKER_URL}/api/webhooks/${tokenData.uuid}`;
153
+ return `${INBOX_WORKER_URL}/hooks/${tokenData.uuid}`;
154
154
  }
155
- const response = await fetch(`${INBOX_WORKER_URL}/api/webhooks/token`, {
155
+ const response = await fetch(`${INBOX_WORKER_URL}/api/hooks/token`, {
156
156
  method: "POST",
157
157
  });
158
158
  if (!response.ok) {
@@ -160,7 +160,7 @@ async function inboxGetUrl() {
160
160
  throw new Error(`inbox webhook error [${response.status} ${response.statusText}]: ${body}`);
161
161
  }
162
162
  const { uuid } = await response.json();
163
- return `${INBOX_WORKER_URL}/api/webhooks/${uuid}`;
163
+ return `${INBOX_WORKER_URL}/hooks/${uuid}`;
164
164
  }
165
165
  async function inboxQuery(token, content) {
166
166
  const terms = Array.isArray(content) ? content : [content];
@@ -180,7 +180,7 @@ async function inboxQuery(token, content) {
180
180
  method: "POST",
181
181
  body: {
182
182
  method: "GET",
183
- path: `/api/webhooks?${params.toString()}`,
183
+ path: `/api/hooks?${params.toString()}`,
184
184
  },
185
185
  });
186
186
  const response = result.data;
@@ -189,7 +189,7 @@ async function inboxQuery(token, content) {
189
189
  }
190
190
  return response.data.map(inboxRowToWebhookRequest);
191
191
  }
192
- const rawResponse = await fetch(`${INBOX_WORKER_URL}/api/webhooks?${params.toString()}`);
192
+ const rawResponse = await fetch(`${INBOX_WORKER_URL}/api/hooks?${params.toString()}`);
193
193
  if (!rawResponse.ok) {
194
194
  const body = await rawResponse.text().catch(() => "");
195
195
  throw new Error(`inbox webhook error [${rawResponse.status} ${rawResponse.statusText}]: ${body}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@empiricalrun/playwright-utils",
3
- "version": "0.48.0",
3
+ "version": "0.48.1",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"