automify 0.1.3 → 0.1.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "automify",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "AI computer use for browser, CLI, and desktop in Node.js.",
5
5
  "homepage": "https://aldovincenti.github.io/automify",
6
6
  "bugs": {
@@ -69,6 +69,7 @@ runPnpm(["--filter", "@nut-tree/shared", "run", "compile"], { cwd: nutSource });
69
69
  runPnpm(["--filter", "@nut-tree/provider-interfaces", "run", "compile"], { cwd: nutSource });
70
70
  runPnpm(["--filter", "@nut-tree/default-clipboard-provider", "run", "compile"], { cwd: nutSource });
71
71
  runPnpm(["--filter", "@nut-tree/libnut", "run", "compile"], { cwd: nutSource });
72
+ writeLibnutImportBridge();
72
73
  runPnpm(["--filter", "@nut-tree/nut-js", "run", "compile"], { cwd: nutSource });
73
74
 
74
75
  run("npm", ["install", "--no-save", ...runtimeDependencies], { cwd: root });
@@ -225,6 +226,30 @@ function patchNutWorkspace() {
225
226
  }
226
227
  }
227
228
 
229
+ function writeLibnutImportBridge() {
230
+ const distDir = join(nutSource, "providers", "libnut", "dist");
231
+ mkdirSync(distDir, { recursive: true });
232
+ writeText(
233
+ join(distDir, "import_libnut.js"),
234
+ `"use strict";
235
+ Object.defineProperty(exports, "__esModule", { value: true });
236
+ exports.libnut = void 0;
237
+ exports.libnut = process.platform === "win32"
238
+ ? require("@nut-tree/libnut-win32")
239
+ : process.platform === "linux"
240
+ ? require("@nut-tree/libnut-linux")
241
+ : require("@nut-tree/libnut-darwin");
242
+ `
243
+ );
244
+ writeText(
245
+ join(distDir, "import_libnut.d.ts"),
246
+ `import ln from "./libnut";
247
+ declare const libnut: typeof ln;
248
+ export { libnut };
249
+ `
250
+ );
251
+ }
252
+
228
253
  function installWorkspacePackage(source, target) {
229
254
  rmSync(target, { recursive: true, force: true });
230
255
  mkdirSync(dirname(target), { recursive: true });