@noir-ai/cli 1.2.0-beta.1 → 1.2.0-beta.2

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/dist/bin.js CHANGED
@@ -12,12 +12,13 @@ import {
12
12
  serve,
13
13
  table,
14
14
  warn
15
- } from "./chunk-OMUB7XOA.js";
15
+ } from "./chunk-I3L3KNJM.js";
16
16
  import {
17
17
  init
18
- } from "./chunk-UGUQQSWH.js";
18
+ } from "./chunk-7WKKZ452.js";
19
19
 
20
20
  // src/bin.ts
21
+ import { realpathSync } from "fs";
21
22
  import { pathToFileURL } from "url";
22
23
  import { SUPPORTED_HOSTS } from "@noir-ai/adapters";
23
24
  import { NOIR_VERSION as NOIR_VERSION3 } from "@noir-ai/core";
@@ -1274,7 +1275,7 @@ function createProgram() {
1274
1275
  async (dir, opts) => {
1275
1276
  const transport = opts.transport === "streamable-http" ? "streamable-http" : "stdio";
1276
1277
  const host = parseHost(opts.host);
1277
- const { create } = await import("./create-WP5ZKMCW.js");
1278
+ const { create } = await import("./create-ZK2EBXG3.js");
1278
1279
  await create(dir, {
1279
1280
  transport,
1280
1281
  url: opts.url,
@@ -1507,7 +1508,8 @@ async function run(argv = []) {
1507
1508
  var isMainModule = (() => {
1508
1509
  try {
1509
1510
  const entry = process.argv[1];
1510
- return typeof entry === "string" && entry.length > 0 ? pathToFileURL(entry).href === import.meta.url : false;
1511
+ if (typeof entry !== "string" || entry.length === 0) return false;
1512
+ return pathToFileURL(realpathSync(entry)).href === import.meta.url;
1511
1513
  } catch {
1512
1514
  return false;
1513
1515
  }