modality-kit 0.14.1 → 0.14.3

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/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,
@@ -5937,6 +5943,9 @@ class LruCache {
5937
5943
  values() {
5938
5944
  return this._values.values();
5939
5945
  }
5946
+ keys() {
5947
+ return this._values.keys();
5948
+ }
5940
5949
  }
5941
5950
  export {
5942
5951
  withErrorHandling,
@@ -9,4 +9,5 @@ export declare class LruCache<T> {
9
9
  clear(): void;
10
10
  size(): number;
11
11
  values(): IterableIterator<T>;
12
+ keys(): MapIterator<string>;
12
13
  }
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.14.1",
2
+ "version": "0.14.3",
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
  }