contextswitch 0.1.2 → 0.1.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.js +5 -3
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -11,15 +11,17 @@ import "./chunk-PNKVD2UK.js";
|
|
|
11
11
|
import { Command } from "commander";
|
|
12
12
|
import picocolors from "picocolors";
|
|
13
13
|
import { existsSync, readFileSync, unlinkSync } from "fs";
|
|
14
|
-
import { join } from "path";
|
|
14
|
+
import { join, dirname } from "path";
|
|
15
|
+
import { fileURLToPath } from "url";
|
|
15
16
|
var pc = picocolors;
|
|
16
17
|
function getVersion() {
|
|
17
18
|
try {
|
|
18
|
-
const
|
|
19
|
+
const currentDir = typeof __dirname !== "undefined" ? __dirname : dirname(fileURLToPath(import.meta.url));
|
|
20
|
+
const packagePath = join(currentDir, "..", "package.json");
|
|
19
21
|
const packageJson = JSON.parse(readFileSync(packagePath, "utf-8"));
|
|
20
22
|
return packageJson.version;
|
|
21
23
|
} catch {
|
|
22
|
-
return "0.1.
|
|
24
|
+
return "0.1.3";
|
|
23
25
|
}
|
|
24
26
|
}
|
|
25
27
|
function processSessionFallbackMarker() {
|