@restatedev/restate-sdk 1.15.0-rc.2 → 1.15.0-rc.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/dist/io.cjs CHANGED
@@ -57,7 +57,7 @@ var OutputPump = class {
57
57
  }
58
58
  async awaitNextProgress() {
59
59
  const nextOutput = this.coreVm.take_output();
60
- if (nextOutput instanceof Uint8Array) await this.outputWriter.write(nextOutput);
60
+ if (nextOutput?.length > 0) await this.outputWriter.write(nextOutput);
61
61
  }
62
62
  };
63
63
 
package/dist/io.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;;;;GAKG;AACH,qBAAa,SAAS;IAKlB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;gBAG5B,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,uBAAuB,EAChC,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI;IAOlD;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;YAKd,GAAG;CAsBlB;AAED;;GAEG;AACH,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,YAAY,EAAE,YAAY;IAGvC,iBAAiB;CASxB"}
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,KAAK,EAAE,MAAM,yDAAyD,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,EAAE,uBAAuB,EAAE,MAAM,sCAAsC,CAAC;AAE/E;;;;;GAKG;AACH,qBAAa,SAAS;IAKlB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,OAAO,CAAS;IACxB,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAuB;gBAG5B,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,WAAW,EAAE,WAAW,EACxB,OAAO,EAAE,uBAAuB,EAChC,aAAa,EAAE,CAAC,CAAC,EAAE,GAAG,KAAK,IAAI;IAOlD;;;OAGG;IACH,IAAI,IAAI,OAAO,CAAC,WAAW,CAAC;YAKd,GAAG;CAsBlB;AAED;;GAEG;AACH,qBAAa,UAAU;IAEnB,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY;gBADZ,MAAM,EAAE,EAAE,CAAC,MAAM,EACjB,YAAY,EAAE,YAAY;IAGvC,iBAAiB;CAMxB"}
package/dist/io.js CHANGED
@@ -56,7 +56,7 @@ var OutputPump = class {
56
56
  }
57
57
  async awaitNextProgress() {
58
58
  const nextOutput = this.coreVm.take_output();
59
- if (nextOutput instanceof Uint8Array) await this.outputWriter.write(nextOutput);
59
+ if (nextOutput?.length > 0) await this.outputWriter.write(nextOutput);
60
60
  }
61
61
  };
62
62
 
package/dist/io.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"io.js","names":["coreVm: vm.WasmVM","inputReader: InputReader","channel: ExternalProgressChannel","errorCallback: (e: any) => void","outputWriter: OutputWriter"],"sources":["../src/io.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2025 - Restate Software, Inc., Restate GmbH\n *\n * This file is part of the Restate SDK for Node.js/TypeScript,\n * which is released under the MIT license.\n *\n * You can find a copy of the license in file LICENSE in the root\n * directory of this repository or package, or at\n * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type * as vm from \"./endpoint/handlers/vm/sdk_shared_core_wasm_bindings.js\";\nimport { InputReader, OutputWriter } from \"./endpoint/handlers/types.js\";\nimport { ExternalProgressChannel } from \"./utils/external_progress_channel.js\";\n\n/**\n * Adapter between input stream and vm.\n *\n * It starts a detached promise that fills the vm with input.\n * Each read (value or input-closed) emits a signal on the shared {@link ExternalProgressChannel}.\n */\nexport class InputPump {\n private stopped = false;\n private readonly runDone: Promise<InputReader>;\n\n constructor(\n private readonly coreVm: vm.WasmVM,\n private readonly inputReader: InputReader,\n private readonly channel: ExternalProgressChannel,\n private readonly errorCallback: (e: any) => void\n ) {\n this.runDone = this.run()\n .catch(() => {})\n .then(() => this.inputReader);\n }\n\n /**\n * Stop the pump.\n * Once finished, returns back the ownership of the input reader for further usage.\n */\n stop(): Promise<InputReader> {\n this.stopped = true;\n return this.runDone;\n }\n\n private async run(): Promise<void> {\n while (!this.stopped) {\n let nextValue;\n try {\n nextValue = await this.inputReader.next();\n } catch (e) {\n if (this.stopped) return;\n this.errorCallback(e);\n return;\n }\n if (this.stopped) return;\n if (nextValue.done) {\n this.coreVm.notify_input_closed();\n this.channel.signal();\n return;\n }\n if (nextValue.value !== undefined) {\n this.coreVm.notify_input(nextValue.value);\n this.channel.signal();\n }\n }\n }\n}\n\n/**\n * Adapter between output stream and vm. It moves forward when [awaitNextProgress] is invoked.\n */\nexport class OutputPump {\n constructor(\n private readonly coreVm: vm.WasmVM,\n private readonly outputWriter: OutputWriter\n ) {}\n\n async awaitNextProgress() {\n const nextOutput = this.coreVm.take_output() as\n | Uint8Array\n | null\n | undefined;\n if (nextOutput instanceof Uint8Array) {\n await this.outputWriter.write(nextOutput);\n }\n }\n}\n"],"mappings":";;;;;;;AAuBA,IAAa,YAAb,MAAuB;CACrB,AAAQ,UAAU;CAClB,AAAiB;CAEjB,YACE,AAAiBA,QACjB,AAAiBC,aACjB,AAAiBC,SACjB,AAAiBC,eACjB;EAJiB;EACA;EACA;EACA;AAEjB,OAAK,UAAU,KAAK,KAAK,CACtB,YAAY,GAAG,CACf,WAAW,KAAK,YAAY;;;;;;CAOjC,OAA6B;AAC3B,OAAK,UAAU;AACf,SAAO,KAAK;;CAGd,MAAc,MAAqB;AACjC,SAAO,CAAC,KAAK,SAAS;GACpB,IAAI;AACJ,OAAI;AACF,gBAAY,MAAM,KAAK,YAAY,MAAM;YAClC,GAAG;AACV,QAAI,KAAK,QAAS;AAClB,SAAK,cAAc,EAAE;AACrB;;AAEF,OAAI,KAAK,QAAS;AAClB,OAAI,UAAU,MAAM;AAClB,SAAK,OAAO,qBAAqB;AACjC,SAAK,QAAQ,QAAQ;AACrB;;AAEF,OAAI,UAAU,UAAU,QAAW;AACjC,SAAK,OAAO,aAAa,UAAU,MAAM;AACzC,SAAK,QAAQ,QAAQ;;;;;;;;AAS7B,IAAa,aAAb,MAAwB;CACtB,YACE,AAAiBH,QACjB,AAAiBI,cACjB;EAFiB;EACA;;CAGnB,MAAM,oBAAoB;EACxB,MAAM,aAAa,KAAK,OAAO,aAAa;AAI5C,MAAI,sBAAsB,WACxB,OAAM,KAAK,aAAa,MAAM,WAAW"}
1
+ {"version":3,"file":"io.js","names":["coreVm: vm.WasmVM","inputReader: InputReader","channel: ExternalProgressChannel","errorCallback: (e: any) => void","outputWriter: OutputWriter"],"sources":["../src/io.ts"],"sourcesContent":["/*\n * Copyright (c) 2023-2025 - Restate Software, Inc., Restate GmbH\n *\n * This file is part of the Restate SDK for Node.js/TypeScript,\n * which is released under the MIT license.\n *\n * You can find a copy of the license in file LICENSE in the root\n * directory of this repository or package, or at\n * https://github.com/restatedev/sdk-typescript/blob/main/LICENSE\n */\n\n/* eslint-disable @typescript-eslint/no-explicit-any */\n\nimport type * as vm from \"./endpoint/handlers/vm/sdk_shared_core_wasm_bindings.js\";\nimport { InputReader, OutputWriter } from \"./endpoint/handlers/types.js\";\nimport { ExternalProgressChannel } from \"./utils/external_progress_channel.js\";\n\n/**\n * Adapter between input stream and vm.\n *\n * It starts a detached promise that fills the vm with input.\n * Each read (value or input-closed) emits a signal on the shared {@link ExternalProgressChannel}.\n */\nexport class InputPump {\n private stopped = false;\n private readonly runDone: Promise<InputReader>;\n\n constructor(\n private readonly coreVm: vm.WasmVM,\n private readonly inputReader: InputReader,\n private readonly channel: ExternalProgressChannel,\n private readonly errorCallback: (e: any) => void\n ) {\n this.runDone = this.run()\n .catch(() => {})\n .then(() => this.inputReader);\n }\n\n /**\n * Stop the pump.\n * Once finished, returns back the ownership of the input reader for further usage.\n */\n stop(): Promise<InputReader> {\n this.stopped = true;\n return this.runDone;\n }\n\n private async run(): Promise<void> {\n while (!this.stopped) {\n let nextValue;\n try {\n nextValue = await this.inputReader.next();\n } catch (e) {\n if (this.stopped) return;\n this.errorCallback(e);\n return;\n }\n if (this.stopped) return;\n if (nextValue.done) {\n this.coreVm.notify_input_closed();\n this.channel.signal();\n return;\n }\n if (nextValue.value !== undefined) {\n this.coreVm.notify_input(nextValue.value);\n this.channel.signal();\n }\n }\n }\n}\n\n/**\n * Adapter between output stream and vm. It moves forward when [awaitNextProgress] is invoked.\n */\nexport class OutputPump {\n constructor(\n private readonly coreVm: vm.WasmVM,\n private readonly outputWriter: OutputWriter\n ) {}\n\n async awaitNextProgress() {\n const nextOutput = this.coreVm.take_output();\n if (nextOutput?.length > 0) {\n await this.outputWriter.write(nextOutput);\n }\n }\n}\n"],"mappings":";;;;;;;AAuBA,IAAa,YAAb,MAAuB;CACrB,AAAQ,UAAU;CAClB,AAAiB;CAEjB,YACE,AAAiBA,QACjB,AAAiBC,aACjB,AAAiBC,SACjB,AAAiBC,eACjB;EAJiB;EACA;EACA;EACA;AAEjB,OAAK,UAAU,KAAK,KAAK,CACtB,YAAY,GAAG,CACf,WAAW,KAAK,YAAY;;;;;;CAOjC,OAA6B;AAC3B,OAAK,UAAU;AACf,SAAO,KAAK;;CAGd,MAAc,MAAqB;AACjC,SAAO,CAAC,KAAK,SAAS;GACpB,IAAI;AACJ,OAAI;AACF,gBAAY,MAAM,KAAK,YAAY,MAAM;YAClC,GAAG;AACV,QAAI,KAAK,QAAS;AAClB,SAAK,cAAc,EAAE;AACrB;;AAEF,OAAI,KAAK,QAAS;AAClB,OAAI,UAAU,MAAM;AAClB,SAAK,OAAO,qBAAqB;AACjC,SAAK,QAAQ,QAAQ;AACrB;;AAEF,OAAI,UAAU,UAAU,QAAW;AACjC,SAAK,OAAO,aAAa,UAAU,MAAM;AACzC,SAAK,QAAQ,QAAQ;;;;;;;;AAS7B,IAAa,aAAb,MAAwB;CACtB,YACE,AAAiBH,QACjB,AAAiBI,cACjB;EAFiB;EACA;;CAGnB,MAAM,oBAAoB;EACxB,MAAM,aAAa,KAAK,OAAO,aAAa;AAC5C,MAAI,YAAY,SAAS,EACvB,OAAM,KAAK,aAAa,MAAM,WAAW"}
package/dist/package.cjs CHANGED
@@ -1,6 +1,6 @@
1
1
 
2
2
  //#region package.json
3
- var version = "1.15.0-rc.2";
3
+ var version = "1.15.0-rc.4";
4
4
 
5
5
  //#endregion
6
6
  Object.defineProperty(exports, 'version', {
package/dist/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  //#region package.json
2
- var version = "1.15.0-rc.2";
2
+ var version = "1.15.0-rc.4";
3
3
 
4
4
  //#endregion
5
5
  export { version };
@@ -1 +1 @@
1
- {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.15.0-rc.2\",\n \"description\": \"Typescript SDK for Restate\",\n \"author\": \"Restate Developers\",\n \"email\": \"code@restate.dev\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/restatedev/sdk-typescript#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/restatedev/sdk-typescript.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/restatedev/sdk-typescript/issues\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./fetch\": {\n \"import\": \"./dist/fetch.js\",\n \"require\": \"./dist/fetch.cjs\"\n },\n \"./lambda\": {\n \"import\": \"./dist/lambda.js\",\n \"require\": \"./dist/lambda.cjs\"\n },\n \"./node\": {\n \"import\": \"./dist/node.js\",\n \"require\": \"./dist/node.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"test\": \"turbo run _test --filter={.}...\",\n \"_test\": \"vitest run\",\n \"build\": \"turbo run _build --filter={.}...\",\n \"_build\": \"tsc --noEmit && tsdown\",\n \"dev\": \"tsc --noEmit --watch\",\n \"clean\": \"rm -rf dist *.tsbuildinfo .turbo\",\n \"check:types\": \"turbo run _check:types --filter={.}...\",\n \"_check:types\": \"tsc --noEmit --project tsconfig.build.json\",\n \"lint\": \"eslint .\",\n \"check:exports\": \"turbo run _check:exports --filter={.}...\",\n \"_check:exports\": \"attw --pack .\",\n \"check:api\": \"turbo run _check:api --filter={.}...\",\n \"_check:api\": \"api-extractor run --local && api-extractor run --local --config api-extractor.fetch.json && api-extractor run --local --config api-extractor.lambda.json && api-extractor run --local --config api-extractor.node.json\",\n \"prepublishOnly\": \"pnpm -w verify\"\n },\n \"dependencies\": {\n \"@restatedev/restate-sdk-core\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/aws-lambda\": \"^8.10.115\"\n },\n \"typesVersions\": {\n \"*\": {\n \"fetch\": [\n \"./dist/fetch.d.ts\"\n ],\n \"lambda\": [\n \"./dist/lambda.d.ts\"\n ],\n \"node\": [\n \"./dist/node.d.ts\"\n ]\n }\n }\n}\n"],"mappings":";cAEa"}
1
+ {"version":3,"file":"package.js","names":[],"sources":["../package.json"],"sourcesContent":["{\n \"name\": \"@restatedev/restate-sdk\",\n \"version\": \"1.15.0-rc.4\",\n \"description\": \"Typescript SDK for Restate\",\n \"author\": \"Restate Developers\",\n \"email\": \"code@restate.dev\",\n \"license\": \"MIT\",\n \"homepage\": \"https://github.com/restatedev/sdk-typescript#readme\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/restatedev/sdk-typescript.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/restatedev/sdk-typescript/issues\"\n },\n \"type\": \"module\",\n \"main\": \"./dist/index.cjs\",\n \"module\": \"./dist/index.js\",\n \"types\": \"./dist/index.d.cts\",\n \"exports\": {\n \".\": {\n \"import\": \"./dist/index.js\",\n \"require\": \"./dist/index.cjs\"\n },\n \"./fetch\": {\n \"import\": \"./dist/fetch.js\",\n \"require\": \"./dist/fetch.cjs\"\n },\n \"./lambda\": {\n \"import\": \"./dist/lambda.js\",\n \"require\": \"./dist/lambda.cjs\"\n },\n \"./node\": {\n \"import\": \"./dist/node.js\",\n \"require\": \"./dist/node.cjs\"\n },\n \"./package.json\": \"./package.json\"\n },\n \"files\": [\n \"dist\",\n \"README.md\"\n ],\n \"publishConfig\": {\n \"access\": \"public\"\n },\n \"scripts\": {\n \"test\": \"turbo run _test --filter={.}...\",\n \"_test\": \"vitest run\",\n \"build\": \"turbo run _build --filter={.}...\",\n \"_build\": \"tsc --noEmit && tsdown\",\n \"dev\": \"tsc --noEmit --watch\",\n \"clean\": \"rm -rf dist *.tsbuildinfo .turbo\",\n \"check:types\": \"turbo run _check:types --filter={.}...\",\n \"_check:types\": \"tsc --noEmit --project tsconfig.build.json\",\n \"lint\": \"eslint .\",\n \"check:exports\": \"turbo run _check:exports --filter={.}...\",\n \"_check:exports\": \"attw --pack .\",\n \"check:api\": \"turbo run _check:api --filter={.}...\",\n \"_check:api\": \"api-extractor run --local && api-extractor run --local --config api-extractor.fetch.json && api-extractor run --local --config api-extractor.lambda.json && api-extractor run --local --config api-extractor.node.json\",\n \"prepublishOnly\": \"pnpm -w verify\"\n },\n \"dependencies\": {\n \"@restatedev/restate-sdk-core\": \"workspace:*\"\n },\n \"devDependencies\": {\n \"@types/aws-lambda\": \"^8.10.115\"\n },\n \"typesVersions\": {\n \"*\": {\n \"fetch\": [\n \"./dist/fetch.d.ts\"\n ],\n \"lambda\": [\n \"./dist/lambda.d.ts\"\n ],\n \"node\": [\n \"./dist/node.d.ts\"\n ]\n }\n }\n}\n"],"mappings":";cAEa"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@restatedev/restate-sdk",
3
- "version": "1.15.0-rc.2",
3
+ "version": "1.15.0-rc.4",
4
4
  "description": "Typescript SDK for Restate",
5
5
  "author": "Restate Developers",
6
6
  "email": "code@restate.dev",
@@ -44,7 +44,7 @@
44
44
  "access": "public"
45
45
  },
46
46
  "dependencies": {
47
- "@restatedev/restate-sdk-core": "1.15.0-rc.2"
47
+ "@restatedev/restate-sdk-core": "1.15.0-rc.4"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@types/aws-lambda": "^8.10.115"