@roulabs/mx 1.0.0 → 1.0.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.
- package/bin/mx.js +10 -1
- package/package.json +1 -1
package/bin/mx.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
// src/main.ts
|
|
4
|
+
import { readFileSync as readFileSync2 } from "fs";
|
|
5
|
+
import * as path7 from "path";
|
|
6
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
7
|
+
|
|
3
8
|
// ../../packages/core/src/errors.ts
|
|
4
9
|
var MxError = class extends Error {
|
|
5
10
|
/**
|
|
@@ -835,7 +840,11 @@ function workPort(root, name, positionals) {
|
|
|
835
840
|
}
|
|
836
841
|
|
|
837
842
|
// src/main.ts
|
|
838
|
-
var VERSION =
|
|
843
|
+
var VERSION = (() => {
|
|
844
|
+
const here = path7.dirname(fileURLToPath2(import.meta.url));
|
|
845
|
+
const pkg = JSON.parse(readFileSync2(path7.join(here, "..", "package.json"), "utf8"));
|
|
846
|
+
return pkg.version;
|
|
847
|
+
})();
|
|
839
848
|
function main() {
|
|
840
849
|
const { positionals, flags } = parseArgs(process.argv.slice(2));
|
|
841
850
|
setPorcelain(flags.porcelain);
|