formalconf 2.0.9 → 2.0.10

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/formalconf.js +11 -2
  2. package/package.json +1 -1
@@ -199,6 +199,14 @@ async function writeFile(path, content) {
199
199
  }
200
200
  await nodeWriteFile(path, content, "utf-8");
201
201
  }
202
+ async function writeBuffer(path, data) {
203
+ if (isBun) {
204
+ await Bun.write(path, data);
205
+ return;
206
+ }
207
+ const buffer = Buffer.isBuffer(data) ? data : Buffer.from(data);
208
+ await nodeWriteFile(path, buffer);
209
+ }
202
210
  async function ensureDir(path) {
203
211
  if (isBun) {
204
212
  await Bun.$`mkdir -p ${path}`.quiet();
@@ -459,7 +467,7 @@ function StatusIndicator({
459
467
  // package.json
460
468
  var package_default = {
461
469
  name: "formalconf",
462
- version: "2.0.9",
470
+ version: "2.0.10",
463
471
  description: "Dotfiles management TUI for macOS - config management, package sync, and theme switching",
464
472
  type: "module",
465
473
  main: "./dist/formalconf.js",
@@ -5978,6 +5986,7 @@ init_runtime();
5978
5986
  // src/lib/wallpaper.ts
5979
5987
  import { existsSync as existsSync11, readdirSync as readdirSync8, unlinkSync } from "fs";
5980
5988
  import { join as join10 } from "path";
5989
+ init_runtime();
5981
5990
  var DEFAULT_TIMEOUT_MS = 30000;
5982
5991
  var MAX_FILE_SIZE = 50 * 1024 * 1024;
5983
5992
  function clearBackgroundsDir() {
@@ -6052,7 +6061,7 @@ async function downloadWallpaper(url, filename, timeoutMs = DEFAULT_TIMEOUT_MS)
6052
6061
  }
6053
6062
  const ext = getExtension(url, contentType);
6054
6063
  const outputPath = join10(BACKGROUNDS_TARGET_DIR, `${filename}.${ext}`);
6055
- await Bun.write(outputPath, arrayBuffer);
6064
+ await writeBuffer(outputPath, arrayBuffer);
6056
6065
  return { success: true, path: outputPath };
6057
6066
  } catch (err) {
6058
6067
  clearTimeout(timeoutId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "formalconf",
3
- "version": "2.0.9",
3
+ "version": "2.0.10",
4
4
  "description": "Dotfiles management TUI for macOS - config management, package sync, and theme switching",
5
5
  "type": "module",
6
6
  "main": "./dist/formalconf.js",