@s2-dev/streamstore 0.15.8 → 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 +29 -38
- package/bin/mcp-server.js.map +6 -6
- package/dist/commonjs/lib/config.d.ts +3 -3
- package/dist/commonjs/lib/config.js +3 -3
- package/dist/commonjs/lib/event-streams.d.ts +1 -1
- package/dist/commonjs/lib/event-streams.d.ts.map +1 -1
- package/dist/commonjs/lib/event-streams.js +23 -32
- package/dist/commonjs/lib/event-streams.js.map +1 -1
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/esm/lib/config.d.ts +3 -3
- package/dist/esm/lib/config.js +3 -3
- package/dist/esm/lib/event-streams.d.ts +1 -1
- package/dist/esm/lib/event-streams.d.ts.map +1 -1
- package/dist/esm/lib/event-streams.js +23 -32
- package/dist/esm/lib/event-streams.js.map +1 -1
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/lib/config.ts +3 -3
- package/src/lib/event-streams.ts +21 -33
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
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.
|
|
34200
|
-
genVersion: "2.
|
|
34201
|
-
userAgent: "speakeasy-sdk/typescript 0.15.
|
|
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
|
|
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,34 +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(
|
|
37894
|
-
const
|
|
37881
|
+
constructor(responseBody, parse) {
|
|
37882
|
+
const upstream = responseBody.getReader();
|
|
37895
37883
|
let buffer = new Uint8Array;
|
|
37896
37884
|
super({
|
|
37897
|
-
async pull(
|
|
37885
|
+
async pull(downstream) {
|
|
37898
37886
|
try {
|
|
37899
37887
|
while (true) {
|
|
37900
|
-
const
|
|
37901
|
-
if (
|
|
37902
|
-
|
|
37903
|
-
|
|
37904
|
-
|
|
37905
|
-
buffer =
|
|
37906
|
-
|
|
37907
|
-
|
|
37908
|
-
|
|
37909
|
-
|
|
37910
|
-
|
|
37911
|
-
|
|
37912
|
-
|
|
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);
|
|
37899
|
+
if (item?.value)
|
|
37900
|
+
return downstream.enqueue(item.value);
|
|
37901
|
+
if (item?.done) {
|
|
37902
|
+
await upstream.cancel("done");
|
|
37903
|
+
return downstream.close();
|
|
37913
37904
|
}
|
|
37914
37905
|
}
|
|
37915
37906
|
} catch (e) {
|
|
37916
|
-
|
|
37917
|
-
|
|
37907
|
+
downstream.error(e);
|
|
37908
|
+
await upstream.cancel(e);
|
|
37918
37909
|
}
|
|
37919
37910
|
},
|
|
37920
|
-
cancel: (reason) =>
|
|
37911
|
+
cancel: (reason) => upstream.cancel(reason)
|
|
37921
37912
|
});
|
|
37922
37913
|
}
|
|
37923
37914
|
[Symbol.asyncIterator]() {
|
|
@@ -44658,7 +44649,7 @@ var init_streamsReconfigureStream2 = __esm(() => {
|
|
|
44658
44649
|
function createMCPServer(deps) {
|
|
44659
44650
|
const server = new McpServer({
|
|
44660
44651
|
name: "S2",
|
|
44661
|
-
version: "0.15.
|
|
44652
|
+
version: "0.15.9"
|
|
44662
44653
|
});
|
|
44663
44654
|
const client = new S2Core({
|
|
44664
44655
|
accessToken: deps.accessToken,
|
|
@@ -45915,7 +45906,7 @@ var routes = rn({
|
|
|
45915
45906
|
var app = Ve(routes, {
|
|
45916
45907
|
name: "mcp",
|
|
45917
45908
|
versionInfo: {
|
|
45918
|
-
currentVersion: "0.15.
|
|
45909
|
+
currentVersion: "0.15.9"
|
|
45919
45910
|
}
|
|
45920
45911
|
});
|
|
45921
45912
|
_t(app, process3.argv.slice(2), buildContext(process3));
|
|
@@ -45923,5 +45914,5 @@ export {
|
|
|
45923
45914
|
app
|
|
45924
45915
|
};
|
|
45925
45916
|
|
|
45926
|
-
//# debugId=
|
|
45917
|
+
//# debugId=781F6DD5EE35074564756E2164756E21
|
|
45927
45918
|
//# sourceMappingURL=mcp-server.js.map
|