@boluo-ai/relay 0.1.0 → 0.1.1

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/cli.js +5 -3
  2. package/package.json +2 -2
package/dist/cli.js CHANGED
@@ -13,7 +13,7 @@ function mintUserId() {
13
13
  }
14
14
 
15
15
  // src/cli.ts
16
- import { existsSync, statSync, readFileSync } from "fs";
16
+ import { existsSync, statSync, readFileSync, realpathSync } from "fs";
17
17
  import { extname, join, normalize, resolve as resolvePath } from "path";
18
18
  import { fileURLToPath } from "url";
19
19
  import { Command } from "commander";
@@ -2012,8 +2012,10 @@ async function installShutdownHandlers(handle, stdout) {
2012
2012
  var isDirect = (() => {
2013
2013
  try {
2014
2014
  const entry = process.argv[1] ?? "";
2015
- const url = new URL(`file://${entry}`).href;
2016
- return import.meta.url === url;
2015
+ if (!entry) return false;
2016
+ const entryReal = realpathSync(entry);
2017
+ const importReal = realpathSync(fileURLToPath(import.meta.url));
2018
+ return entryReal === importReal;
2017
2019
  } catch {
2018
2020
  return false;
2019
2021
  }
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@boluo-ai/relay",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Boluo encrypted relay — WebSocket bridge between Boluo daemon and Boluo web UI, with bundled web SPA.",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/cli.js",
8
8
  "bin": {
9
- "boluo-relay": "./dist/cli.js"
9
+ "boluo-relay": "dist/cli.js"
10
10
  },
11
11
  "files": [
12
12
  "dist",