modality-kit 0.14.1 → 0.14.2

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 +8 -2
  2. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -207,8 +207,14 @@ function withErrorHandling(fn, operation) {
207
207
 
208
208
  // src/util_response.ts
209
209
  function formatSuccessResponse(content, meta) {
210
- const { instructions, ...restContent } = content;
211
- const otherContent = JSON.parse(JSON.stringify(restContent || {}));
210
+ let otherContent;
211
+ const instructions = content.instructions;
212
+ if (instructions != null) {
213
+ const { instructions: instructions2, ...restContent } = content;
214
+ otherContent = JSON.parse(JSON.stringify(restContent || {}));
215
+ } else {
216
+ otherContent = JSON.parse(JSON.stringify(content || {}));
217
+ }
212
218
  return JSON.stringify({
213
219
  success: true,
214
220
  instructions,
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.1",
2
+ "version": "0.14.2",
3
3
  "name": "modality-kit",
4
4
  "repository": {
5
5
  "type": "git",
@@ -30,8 +30,8 @@
30
30
  "build:src": "bun build src/index.ts --outdir dist",
31
31
  "build": "bun run build:clean && bun run build:types && bun run build:src",
32
32
  "dev": "bunx concurrently 'bun --watch tsc -p ./' 'bun build:src -- --watch --sourcemap=inline'",
33
- "test": "bun test",
34
- "prepublishOnly": "npm run build && npm run test"
33
+ "test": "npm run build && bun test",
34
+ "prepublishOnly": "npm t"
35
35
  },
36
36
  "files": ["package.json", "README.md", "dist"]
37
37
  }