@kapeta/local-cluster-service 0.76.3 → 0.76.4

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,3 +1,10 @@
1
+ ## [0.76.4](https://github.com/kapetacom/local-cluster-service/compare/v0.76.3...v0.76.4) (2024-10-01)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * more headers for logging including handle ([0cadb9a](https://github.com/kapetacom/local-cluster-service/commit/0cadb9abae8575bf486567bb1401dcaa69866bdd))
7
+
1
8
  ## [0.76.3](https://github.com/kapetacom/local-cluster-service/compare/v0.76.2...v0.76.3) (2024-10-01)
2
9
 
3
10
 
@@ -149,13 +149,14 @@ class StormClient {
149
149
  async replaceMockWithAPICall(prompt) {
150
150
  const u = `${this._baseUrl}/v2/ui/implement-api-clients-all`;
151
151
  try {
152
+ const headers = {};
153
+ headers[exports.HandleHeader] = this._handle;
154
+ headers[exports.ConversationIdHeader] = this._systemId;
155
+ headers[exports.SystemIdHeader] = this._systemId;
152
156
  const response = await fetch(u, {
153
157
  method: 'POST',
154
158
  body: JSON.stringify(prompt.pages),
155
- headers: {
156
- systemId: prompt.systemId,
157
- conversationId: prompt.systemId,
158
- },
159
+ headers: headers,
159
160
  });
160
161
  if (!response.ok) {
161
162
  console.error('Failed to implement api clients', response.status, await response.text());
@@ -180,11 +181,16 @@ class StormClient {
180
181
  }
181
182
  async createSimpleBackend(handle, systemId, input) {
182
183
  const u = `${this._baseUrl}/v2/create-simple-backend/${handle}/${systemId}`;
184
+ const headers = {};
185
+ headers[exports.HandleHeader] = this._handle;
186
+ headers[exports.ConversationIdHeader] = this._systemId;
187
+ headers[exports.SystemIdHeader] = this._systemId;
183
188
  const response = await fetch(u, {
184
189
  method: 'POST',
185
190
  body: JSON.stringify({
186
191
  pages: input.pages,
187
192
  }),
193
+ headers: headers,
188
194
  });
189
195
  if (!response.ok) {
190
196
  throw new Error(`HTTP error! Status: ${response.status}`);
@@ -149,13 +149,14 @@ class StormClient {
149
149
  async replaceMockWithAPICall(prompt) {
150
150
  const u = `${this._baseUrl}/v2/ui/implement-api-clients-all`;
151
151
  try {
152
+ const headers = {};
153
+ headers[exports.HandleHeader] = this._handle;
154
+ headers[exports.ConversationIdHeader] = this._systemId;
155
+ headers[exports.SystemIdHeader] = this._systemId;
152
156
  const response = await fetch(u, {
153
157
  method: 'POST',
154
158
  body: JSON.stringify(prompt.pages),
155
- headers: {
156
- systemId: prompt.systemId,
157
- conversationId: prompt.systemId,
158
- },
159
+ headers: headers,
159
160
  });
160
161
  if (!response.ok) {
161
162
  console.error('Failed to implement api clients', response.status, await response.text());
@@ -180,11 +181,16 @@ class StormClient {
180
181
  }
181
182
  async createSimpleBackend(handle, systemId, input) {
182
183
  const u = `${this._baseUrl}/v2/create-simple-backend/${handle}/${systemId}`;
184
+ const headers = {};
185
+ headers[exports.HandleHeader] = this._handle;
186
+ headers[exports.ConversationIdHeader] = this._systemId;
187
+ headers[exports.SystemIdHeader] = this._systemId;
183
188
  const response = await fetch(u, {
184
189
  method: 'POST',
185
190
  body: JSON.stringify({
186
191
  pages: input.pages,
187
192
  }),
193
+ headers: headers,
188
194
  });
189
195
  if (!response.ok) {
190
196
  throw new Error(`HTTP error! Status: ${response.status}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kapeta/local-cluster-service",
3
- "version": "0.76.3",
3
+ "version": "0.76.4",
4
4
  "description": "Manages configuration, ports and service discovery for locally running Kapeta systems",
5
5
  "type": "commonjs",
6
6
  "exports": {
@@ -253,13 +253,15 @@ export class StormClient {
253
253
  public async replaceMockWithAPICall(prompt: ImplementAPIClients): Promise<HTMLPage[]> {
254
254
  const u = `${this._baseUrl}/v2/ui/implement-api-clients-all`;
255
255
  try {
256
+ const headers: { [key: string]: any } = {};
257
+ headers[HandleHeader] = this._handle;
258
+ headers[ConversationIdHeader] = this._systemId;
259
+ headers[SystemIdHeader] = this._systemId;
260
+
256
261
  const response = await fetch(u, {
257
262
  method: 'POST',
258
263
  body: JSON.stringify(prompt.pages),
259
- headers: {
260
- systemId: prompt.systemId,
261
- conversationId: prompt.systemId,
262
- },
264
+ headers: headers,
263
265
  });
264
266
 
265
267
  if (!response.ok) {
@@ -287,11 +289,18 @@ export class StormClient {
287
289
 
288
290
  public async createSimpleBackend(handle: string, systemId: string, input: CreateSimpleBackendRequest) {
289
291
  const u = `${this._baseUrl}/v2/create-simple-backend/${handle}/${systemId}`;
292
+
293
+ const headers: { [key: string]: any } = {};
294
+ headers[HandleHeader] = this._handle;
295
+ headers[ConversationIdHeader] = this._systemId;
296
+ headers[SystemIdHeader] = this._systemId;
297
+
290
298
  const response = await fetch(u, {
291
299
  method: 'POST',
292
300
  body: JSON.stringify({
293
301
  pages: input.pages,
294
302
  }),
303
+ headers: headers,
295
304
  });
296
305
  if (!response.ok) {
297
306
  throw new Error(`HTTP error! Status: ${response.status}`);