@clawos-dev/clawd 0.2.184 → 0.2.185
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.cjs +17 -4
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -45585,7 +45585,12 @@ function tryLoadViewerAssets(logger) {
|
|
|
45585
45585
|
} catch {
|
|
45586
45586
|
}
|
|
45587
45587
|
if (process.argv[1]) {
|
|
45588
|
-
|
|
45588
|
+
let real = process.argv[1];
|
|
45589
|
+
try {
|
|
45590
|
+
real = import_node_fs9.default.realpathSync(process.argv[1]);
|
|
45591
|
+
} catch {
|
|
45592
|
+
}
|
|
45593
|
+
candidates.push(import_node_path8.default.dirname(real));
|
|
45589
45594
|
}
|
|
45590
45595
|
for (const root of candidates) {
|
|
45591
45596
|
const viewerHtmlPath = import_node_path8.default.join(root, "share-md-viewer.html");
|
|
@@ -45639,6 +45644,15 @@ function createShareUiAssetLoader(opts) {
|
|
|
45639
45644
|
|
|
45640
45645
|
// src/share-ui/load.ts
|
|
45641
45646
|
var import_meta3 = {};
|
|
45647
|
+
function bundleDirFromArgv(argv1) {
|
|
45648
|
+
if (!argv1) return null;
|
|
45649
|
+
let real = argv1;
|
|
45650
|
+
try {
|
|
45651
|
+
real = import_node_fs11.default.realpathSync(argv1);
|
|
45652
|
+
} catch {
|
|
45653
|
+
}
|
|
45654
|
+
return import_node_path10.default.dirname(real);
|
|
45655
|
+
}
|
|
45642
45656
|
function tryLoadShareUi(logger) {
|
|
45643
45657
|
const candidates = [];
|
|
45644
45658
|
try {
|
|
@@ -45648,9 +45662,8 @@ function tryLoadShareUi(logger) {
|
|
|
45648
45662
|
candidates.push(import_node_path10.default.resolve(here, "..", "..", "dist"));
|
|
45649
45663
|
} catch {
|
|
45650
45664
|
}
|
|
45651
|
-
|
|
45652
|
-
|
|
45653
|
-
}
|
|
45665
|
+
const argvDir = bundleDirFromArgv(process.argv[1]);
|
|
45666
|
+
if (argvDir) candidates.push(argvDir);
|
|
45654
45667
|
for (const root of candidates) {
|
|
45655
45668
|
const shareUiDir = import_node_path10.default.join(root, "share-ui");
|
|
45656
45669
|
const indexHtmlPath = import_node_path10.default.join(shareUiDir, "guest.html");
|