ccstatusline-usage 2.0.30 → 2.0.31
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/ccstatusline.js +31 -4
- package/package.json +1 -1
package/dist/ccstatusline.js
CHANGED
|
@@ -51450,7 +51450,7 @@ import { execSync as execSync3 } from "child_process";
|
|
|
51450
51450
|
import * as fs5 from "fs";
|
|
51451
51451
|
import * as path4 from "path";
|
|
51452
51452
|
var __dirname = "/Users/peter/Documents/Code/ccstatusline-usage/src/utils";
|
|
51453
|
-
var PACKAGE_VERSION = "2.0.
|
|
51453
|
+
var PACKAGE_VERSION = "2.0.31";
|
|
51454
51454
|
function getPackageVersion() {
|
|
51455
51455
|
if (/^\d+\.\d+\.\d+/.test(PACKAGE_VERSION)) {
|
|
51456
51456
|
return PACKAGE_VERSION;
|
|
@@ -53814,11 +53814,14 @@ var CustomTextEditor = ({ widget, onComplete, onCancel }) => {
|
|
|
53814
53814
|
import { execSync as execSync7 } from "child_process";
|
|
53815
53815
|
import * as fs6 from "fs";
|
|
53816
53816
|
var import_react30 = __toESM(require_react(), 1);
|
|
53817
|
-
var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53818
53817
|
import * as path5 from "path";
|
|
53818
|
+
var jsx_dev_runtime2 = __toESM(require_jsx_dev_runtime(), 1);
|
|
53819
53819
|
function getPackageDir() {
|
|
53820
|
-
const
|
|
53821
|
-
|
|
53820
|
+
const scriptPaths = [
|
|
53821
|
+
process.argv[1],
|
|
53822
|
+
__require.main?.filename
|
|
53823
|
+
].filter(Boolean);
|
|
53824
|
+
for (const scriptPath of scriptPaths) {
|
|
53822
53825
|
try {
|
|
53823
53826
|
const realPath = fs6.realpathSync(scriptPath);
|
|
53824
53827
|
let dir = path5.dirname(realPath);
|
|
@@ -53859,6 +53862,30 @@ function getPackageDir() {
|
|
|
53859
53862
|
} catch {}
|
|
53860
53863
|
}
|
|
53861
53864
|
}
|
|
53865
|
+
const globalPaths = [
|
|
53866
|
+
"/usr/local/lib/node_modules/ccstatusline-usage",
|
|
53867
|
+
"/usr/lib/node_modules/ccstatusline-usage",
|
|
53868
|
+
path5.join(home, ".nvm", "versions", "node"),
|
|
53869
|
+
path5.join(home, "node_modules", "ccstatusline-usage"),
|
|
53870
|
+
path5.join(home, ".local", "lib", "node_modules", "ccstatusline-usage")
|
|
53871
|
+
];
|
|
53872
|
+
for (const globalPath of globalPaths) {
|
|
53873
|
+
if (globalPath.includes(".nvm")) {
|
|
53874
|
+
try {
|
|
53875
|
+
if (fs6.existsSync(globalPath)) {
|
|
53876
|
+
const versions2 = fs6.readdirSync(globalPath);
|
|
53877
|
+
for (const ver of versions2) {
|
|
53878
|
+
const pkgDir = path5.join(globalPath, ver, "lib", "node_modules", "ccstatusline-usage");
|
|
53879
|
+
if (fs6.existsSync(path5.join(pkgDir, "scripts", "usage.sh"))) {
|
|
53880
|
+
return pkgDir;
|
|
53881
|
+
}
|
|
53882
|
+
}
|
|
53883
|
+
}
|
|
53884
|
+
} catch {}
|
|
53885
|
+
} else if (fs6.existsSync(path5.join(globalPath, "scripts", "usage.sh"))) {
|
|
53886
|
+
return globalPath;
|
|
53887
|
+
}
|
|
53888
|
+
}
|
|
53862
53889
|
return "";
|
|
53863
53890
|
}
|
|
53864
53891
|
var PKG_DIR = getPackageDir();
|