@oh-my-pi/pi-natives 12.18.1 → 12.19.0

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.
Binary file
Binary file
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@oh-my-pi/pi-natives",
4
- "version": "12.18.1",
4
+ "version": "12.19.0",
5
5
  "description": "Native Rust bindings for grep, clipboard, image processing, syntax highlighting, PTY, and shell operations via N-API",
6
6
  "homepage": "https://github.com/can1357/oh-my-pi",
7
7
  "author": "Can Bölük",
@@ -38,7 +38,7 @@
38
38
  "bench": "bun bench/grep.ts"
39
39
  },
40
40
  "dependencies": {
41
- "@oh-my-pi/pi-utils": "12.18.1"
41
+ "@oh-my-pi/pi-utils": "12.19.0"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@types/bun": "^1.3.9"
@@ -27,8 +27,6 @@ const hasDisplay = process.platform !== "linux" || Boolean(process.env.DISPLAY |
27
27
  */
28
28
  export async function copyToClipboard(text: string): Promise<void> {
29
29
  if (process.stdout.isTTY) {
30
- const encoded = Buffer.from(text).toString("base64");
31
- const osc52 = `\x1b]52;c;${encoded}\x07`;
32
30
  const onError = (err: unknown) => {
33
31
  process.stdout.off("error", onError);
34
32
  // Prevent unhandled 'error' from crashing the process when stdout is a closed pipe.
@@ -37,6 +35,8 @@ export async function copyToClipboard(text: string): Promise<void> {
37
35
  }
38
36
  };
39
37
  try {
38
+ const encoded = Buffer.from(text).toString("base64");
39
+ const osc52 = `\x1b]52;c;${encoded}\x07`;
40
40
  process.stdout.on("error", onError);
41
41
  process.stdout.write(osc52, err => {
42
42
  process.stdout.off("error", onError);