@simpleplatform/sdk 2.0.0 → 2.0.1

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.
Files changed (2) hide show
  1. package/dist/index.js +4 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -141,8 +141,10 @@ function readInputFromHost() {
141
141
  return JSON.stringify(globalThis.__SIMPLE_INITIAL_PAYLOAD__.request);
142
142
  }
143
143
  // Otherwise, we are in the main WASM module and must read from the host ABI.
144
- const buffer = host.getContext();
145
- return new TextDecoder().decode(buffer);
144
+ // The runtime parses the context on its own side now, so what comes back is a
145
+ // value rather than bytes. Both branches of this function still answer with
146
+ // text because that is what its callers parse.
147
+ return JSON.stringify(host.getContext());
146
148
  }
147
149
  function returnError(message, context) {
148
150
  const response = { data: null, errors: [message], ok: false };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simpleplatform/sdk",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "Simple Platform Typescript SDK",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://docs.simple.dev",