@budibase/frontend-core 3.34.4 → 3.34.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@budibase/frontend-core",
3
- "version": "3.34.4",
3
+ "version": "3.34.6",
4
4
  "description": "Budibase frontend core libraries used in builder and client",
5
5
  "author": "Budibase",
6
6
  "license": "MPL-2.0",
@@ -18,11 +18,10 @@
18
18
  "ai": "^6.0.116",
19
19
  "dayjs": "^1.10.8",
20
20
  "lodash": "4.17.23",
21
- "shortid": "2.2.15",
22
21
  "socket.io-client": "^4.7.5"
23
22
  },
24
23
  "devDependencies": {
25
24
  "vitest": "^3.2.4"
26
25
  },
27
- "gitHead": "374da6efdde7455de279a8cdfda9d5662db9cb46"
26
+ "gitHead": "0621ebbce4477636be0ce64767efeee47cc0add6"
28
27
  }
package/src/api/index.ts CHANGED
@@ -158,7 +158,7 @@ export const createAPIClient = (config: APIClientConfig = {}): APIClient => {
158
158
  headers["Content-Type"] = "application/json"
159
159
  }
160
160
  if (config?.attachHeaders) {
161
- config.attachHeaders(headers)
161
+ config.attachHeaders(headers, { url, method })
162
162
  }
163
163
 
164
164
  // Build request body
package/src/api/types.ts CHANGED
@@ -60,7 +60,10 @@ export type Headers = Record<string, string>
60
60
 
61
61
  export type APIClientConfig = {
62
62
  enableCaching?: boolean
63
- attachHeaders?: (headers: Headers) => void
63
+ attachHeaders?: (
64
+ headers: Headers,
65
+ request?: { url: string; method: HTTPMethod }
66
+ ) => void
64
67
  onError?: (error: APIError) => void
65
68
  onMigrationDetected?: (migration: string) => void
66
69
  }