@lyra_wang/dsh-image-ocr 0.2.0 → 0.2.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/index.js +1 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -135,7 +135,7 @@ export function apply(ctx) {
135
135
  const buffer = Buffer.from(base64, 'base64');
136
136
  if (buffer.length === 0) throw new Error('图片数据为空');
137
137
  if (buffer.length > 12 * 1024 * 1024) throw new Error('图片太大(上限 12MB)');
138
- tempPath = join(os.tmpdir(), 'dsh-image-ocr-' + Date.now() + '-' + Math.random().toString(16).slice(2, 8) + '.png');
138
+ tempPath = join(tmpdir(), 'dsh-image-ocr-' + Date.now() + '-' + Math.random().toString(16).slice(2, 8) + '.png');
139
139
  writeFileSync(tempPath, buffer);
140
140
  }
141
141
  const text = await runOcr(binary, tempPath);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lyra_wang/dsh-image-ocr",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Composer + button: OCR the clipboard image locally (macOS Vision) and insert the text into the DSH input box.",
5
5
  "license": "MIT",
6
6
  "type": "module",