@rendotdev/rig 0.0.5 → 0.0.6

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/rig.js +7 -2
  2. package/package.json +2 -2
package/dist/rig.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
 
13
13
  // src/cli.ts
14
14
  import { spawnSync } from "node:child_process";
15
- import { existsSync, readFileSync } from "node:fs";
15
+ import { existsSync, readFileSync, realpathSync } from "node:fs";
16
16
  import { join } from "node:path";
17
17
  import { fileURLToPath, pathToFileURL } from "node:url";
18
18
  class BunRuntimeBootstrap {
@@ -367,7 +367,12 @@ ${notice.message}`);
367
367
  function isCliEntrypoint(metaUrl, argvPath = process.argv[1]) {
368
368
  if (!argvPath)
369
369
  return false;
370
- return metaUrl === pathToFileURL(argvPath).href;
370
+ try {
371
+ const resolved = realpathSync(argvPath);
372
+ return metaUrl === pathToFileURL(resolved).href;
373
+ } catch {
374
+ return metaUrl === pathToFileURL(argvPath).href;
375
+ }
371
376
  }
372
377
  if (isCliEntrypoint(import.meta.url)) {
373
378
  const bootstrapped = new BunRuntimeBootstrap().run(import.meta.url, process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendotdev/rig",
3
- "version": "0.0.5",
3
+ "version": "0.0.6",
4
4
  "description": "Local typed command runtime for agents.",
5
5
  "homepage": "https://github.com/rendotdev/rig#readme",
6
6
  "bugs": {
@@ -24,7 +24,7 @@
24
24
  "access": "public"
25
25
  },
26
26
  "scripts": {
27
- "dev": "bun run src/cli.ts",
27
+ "dev": "bun --watch run src/cli.ts",
28
28
  "build": "bun run scripts/build.ts",
29
29
  "bench": "bun run scripts/bench.ts",
30
30
  "release": "bun run scripts/release.ts",