@s2-dev/streamstore 0.15.7 → 0.15.9

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/bin/mcp-server.js CHANGED
@@ -34196,9 +34196,9 @@ var init_config = __esm(() => {
34196
34196
  SDK_METADATA = {
34197
34197
  language: "typescript",
34198
34198
  openapiDocVersion: "1.0.0",
34199
- sdkVersion: "0.15.7",
34200
- genVersion: "2.662.0",
34201
- userAgent: "speakeasy-sdk/typescript 0.15.7 2.662.0 1.0.0 @s2-dev/streamstore"
34199
+ sdkVersion: "0.15.9",
34200
+ genVersion: "2.671.2",
34201
+ userAgent: "speakeasy-sdk/typescript 0.15.9 2.671.2 1.0.0 @s2-dev/streamstore"
34202
34202
  };
34203
34203
  });
34204
34204
 
@@ -37843,19 +37843,7 @@ function findBoundary(buf) {
37843
37843
  }
37844
37844
  return null;
37845
37845
  }
37846
- function* chunks(remainder) {
37847
- while (true) {
37848
- const match2 = findBoundary(remainder);
37849
- if (!match2) {
37850
- yield { chunk: new Uint8Array, remainder };
37851
- return;
37852
- }
37853
- const chunk = remainder.slice(0, match2.index);
37854
- remainder = remainder.slice(match2.index + match2.length);
37855
- yield { chunk, remainder };
37856
- }
37857
- }
37858
- function parseChunk(chunk, parse) {
37846
+ function parseMessage(chunk, parse) {
37859
37847
  const text = new TextDecoder().decode(chunk);
37860
37848
  const lines = text.split(/\r\n|\r|\n/);
37861
37849
  const dataLines = [];
@@ -37890,32 +37878,37 @@ function parseChunk(chunk, parse) {
37890
37878
  var EventStream;
37891
37879
  var init_event_streams = __esm(() => {
37892
37880
  EventStream = class EventStream extends ReadableStream {
37893
- constructor(stream, parse) {
37894
- const reader = stream.getReader();
37881
+ constructor(responseBody, parse) {
37882
+ const upstream = responseBody.getReader();
37895
37883
  let buffer = new Uint8Array;
37896
37884
  super({
37897
- async pull(controller) {
37885
+ async pull(downstream) {
37898
37886
  try {
37899
- const r = await reader.read();
37900
- if (r.done)
37901
- return controller.close();
37902
- buffer = concatBuffer(buffer, r.value);
37903
- for (const { chunk, remainder } of chunks(buffer)) {
37904
- buffer = remainder;
37905
- const item = parseChunk(chunk, parse);
37887
+ while (true) {
37888
+ const match2 = findBoundary(buffer);
37889
+ if (!match2) {
37890
+ const chunk = await upstream.read();
37891
+ if (chunk.done)
37892
+ return downstream.close();
37893
+ buffer = concatBuffer(buffer, chunk.value);
37894
+ continue;
37895
+ }
37896
+ const message = buffer.slice(0, match2.index);
37897
+ buffer = buffer.slice(match2.index + match2.length);
37898
+ const item = parseMessage(message, parse);
37906
37899
  if (item?.value)
37907
- controller.enqueue(item.value);
37900
+ return downstream.enqueue(item.value);
37908
37901
  if (item?.done) {
37909
- await reader.cancel("done");
37910
- return controller.close();
37902
+ await upstream.cancel("done");
37903
+ return downstream.close();
37911
37904
  }
37912
37905
  }
37913
37906
  } catch (e) {
37914
- await reader.cancel(e);
37915
- controller.error(e);
37907
+ downstream.error(e);
37908
+ await upstream.cancel(e);
37916
37909
  }
37917
37910
  },
37918
- cancel: (reason) => reader.cancel(reason)
37911
+ cancel: (reason) => upstream.cancel(reason)
37919
37912
  });
37920
37913
  }
37921
37914
  [Symbol.asyncIterator]() {
@@ -44656,7 +44649,7 @@ var init_streamsReconfigureStream2 = __esm(() => {
44656
44649
  function createMCPServer(deps) {
44657
44650
  const server = new McpServer({
44658
44651
  name: "S2",
44659
- version: "0.15.7"
44652
+ version: "0.15.9"
44660
44653
  });
44661
44654
  const client = new S2Core({
44662
44655
  accessToken: deps.accessToken,
@@ -45913,7 +45906,7 @@ var routes = rn({
45913
45906
  var app = Ve(routes, {
45914
45907
  name: "mcp",
45915
45908
  versionInfo: {
45916
- currentVersion: "0.15.7"
45909
+ currentVersion: "0.15.9"
45917
45910
  }
45918
45911
  });
45919
45912
  _t(app, process3.argv.slice(2), buildContext(process3));
@@ -45921,5 +45914,5 @@ export {
45921
45914
  app
45922
45915
  };
45923
45916
 
45924
- //# debugId=1DA43670894CD94464756E2164756E21
45917
+ //# debugId=781F6DD5EE35074564756E2164756E21
45925
45918
  //# sourceMappingURL=mcp-server.js.map