@ganglion/xacpx-relay 0.2.1 → 0.2.3
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/cli.d.ts +6 -2
- package/dist/cli.js +4 -9
- package/dist/relay-web/assets/{BrandLogo.vue_vue_type_script_setup_true_lang-CSPZDDtK.js → BrandLogo.vue_vue_type_script_setup_true_lang-BxgiIE4H.js} +1 -1
- package/dist/relay-web/assets/{DashboardView-Bhx2FJSv.js → DashboardView-B7i6MIlg.js} +29 -29
- package/dist/relay-web/assets/{LoginView-CYhQnBi-.js → LoginView-DK70PqWR.js} +1 -1
- package/dist/relay-web/assets/{SettingsView-hmSvIsKD.js → SettingsView-CmskD9oN.js} +2 -2
- package/dist/relay-web/assets/{index-DE2bTqBl.js → index-BHLOc9dP.js} +2 -2
- package/dist/relay-web/assets/{theme-CaepIjgl.js → theme-Bb1qY_pR.js} +1 -1
- package/dist/relay-web/index.html +1 -1
- package/package.json +1 -1
package/dist/cli.d.ts
CHANGED
|
@@ -7,9 +7,13 @@ export declare function defaultDbPath(): string;
|
|
|
7
7
|
/**
|
|
8
8
|
* Locates the bundled relay-web dashboard relative to the compiled cli.js.
|
|
9
9
|
* Returns the path only if `index.html` is present there; otherwise undefined.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
|
+
* Resolves against this module's own URL (import.meta.url), NOT process.argv[1]:
|
|
12
|
+
* when invoked via the global `xacpx-relay` bin symlink, argv[1] is the symlink
|
|
13
|
+
* path (…/bin/xacpx-relay), not the real cli.js, so an argv-based path would
|
|
14
|
+
* mis-resolve. The `cliJsPath` param exists only for tests.
|
|
11
15
|
*/
|
|
12
|
-
export declare function resolveBundledWebRoot(): string | undefined;
|
|
16
|
+
export declare function resolveBundledWebRoot(cliJsPath?: string): string | undefined;
|
|
13
17
|
export interface StartOptions {
|
|
14
18
|
dbPath: string;
|
|
15
19
|
httpPort: number;
|
package/dist/cli.js
CHANGED
|
@@ -7,6 +7,7 @@ import { randomUUID as randomUUID3 } from "node:crypto";
|
|
|
7
7
|
import { existsSync } from "node:fs";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
9
|
import { dirname as dirname2, join, resolve } from "node:path";
|
|
10
|
+
import { fileURLToPath } from "node:url";
|
|
10
11
|
|
|
11
12
|
// packages/relay/src/server.ts
|
|
12
13
|
import { serve } from "@hono/node-server";
|
|
@@ -1042,13 +1043,8 @@ function parseCookie(header) {
|
|
|
1042
1043
|
function defaultDbPath() {
|
|
1043
1044
|
return join(homedir(), ".xacpx-relay", "relay.db");
|
|
1044
1045
|
}
|
|
1045
|
-
function resolveBundledWebRoot() {
|
|
1046
|
-
const
|
|
1047
|
-
if (!argv1)
|
|
1048
|
-
return;
|
|
1049
|
-
if (!argv1.endsWith("cli.js"))
|
|
1050
|
-
return;
|
|
1051
|
-
const here = dirname2(argv1);
|
|
1046
|
+
function resolveBundledWebRoot(cliJsPath = fileURLToPath(import.meta.url)) {
|
|
1047
|
+
const here = dirname2(cliJsPath);
|
|
1052
1048
|
const embedded = resolve(here, "relay-web");
|
|
1053
1049
|
if (existsSync(join(embedded, "index.html")))
|
|
1054
1050
|
return embedded;
|
|
@@ -1170,8 +1166,7 @@ async function runRelayCli(args, io) {
|
|
|
1170
1166
|
io.print(USAGE);
|
|
1171
1167
|
return 1;
|
|
1172
1168
|
}
|
|
1173
|
-
|
|
1174
|
-
if (isMain) {
|
|
1169
|
+
if (__require.main == __require.module) {
|
|
1175
1170
|
runRelayCli(process.argv.slice(2), { print: (line) => console.log(line) }).then((code) => process.exit(code), (error) => {
|
|
1176
1171
|
console.error(error instanceof Error ? error.message : String(error));
|
|
1177
1172
|
process.exit(1);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as e,o as s,c as a,O as n}from"./index-
|
|
1
|
+
import{d as e,o as s,c as a,O as n}from"./index-BHLOc9dP.js";const o={class:"flex items-center gap-2 select-none"},d=e({__name:"BrandLogo",setup(r){return(p,t)=>(s(),a("div",o,[...t[0]||(t[0]=[n('<svg data-test="brand-x" width="22" height="22" viewBox="0 0 24 24" fill="none" aria-hidden="true"><defs><linearGradient id="xacpxBrand" x1="3" y1="3" x2="21" y2="21" gradientUnits="userSpaceOnUse"><stop stop-color="#4F9BF5"></stop><stop offset="1" stop-color="#69D689"></stop></linearGradient></defs><path d="M5 5 L19 19 M19 5 L5 19" stroke="url(#xacpxBrand)" stroke-width="3.2" stroke-linecap="round"></path></svg><span class="text-[15px] font-semibold tracking-tight text-fg">xacpx</span><span class="text-fg-muted text-xs">· relay</span>',3)])]))}});export{d as _};
|