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.
@@ -1,4 +1 @@
1
- /**
2
- * CLI Version
3
- */
4
- export declare const version = "0.1.0";
1
+ export declare const version: string;
@@ -1,4 +1,11 @@
1
1
  /**
2
- * CLI Version
2
+ * CLI Version - read from package.json
3
3
  */
4
- export const version = '0.1.0';
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;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencodespaces",
3
- "version": "1.1.4",
3
+ "version": "1.1.5",
4
4
  "description": "CLI for OpenCodeSpaces - Connect your local IDE to cloud sessions",
5
5
  "type": "module",
6
6
  "bin": {