opencodespaces 1.1.4 → 1.1.5
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/lib/version.d.ts +1 -4
- package/dist/lib/version.js +9 -2
- package/package.json +1 -1
package/dist/lib/version.d.ts
CHANGED
package/dist/lib/version.js
CHANGED
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* CLI Version
|
|
2
|
+
* CLI Version - read from package.json
|
|
3
3
|
*/
|
|
4
|
-
|
|
4
|
+
import { createRequire } from 'module';
|
|
5
|
+
import { dirname, join } from 'path';
|
|
6
|
+
import { fileURLToPath } from 'url';
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
const require = createRequire(import.meta.url);
|
|
9
|
+
// Navigate from dist/lib/ to package.json
|
|
10
|
+
const pkg = require(join(__dirname, '..', '..', 'package.json'));
|
|
11
|
+
export const version = pkg.version;
|