opencodespaces 1.1.4 → 1.1.6

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.
@@ -10,7 +10,7 @@
10
10
  * opencodespaces sync stop [id] # Stop sync
11
11
  * opencodespaces sync status # Show sync status
12
12
  */
13
- import { execSync, spawn } from 'child_process';
13
+ import { execSync, execFileSync, spawn } from 'child_process';
14
14
  import fs from 'fs';
15
15
  import path from 'path';
16
16
  import os from 'os';
@@ -145,7 +145,7 @@ async function startSync(sessionId, localDir) {
145
145
  'two-way-resolved',
146
146
  ...ignoreArgs,
147
147
  ];
148
- execSync(`mutagen ${mutagenArgs.join(' ')}`, { stdio: 'pipe' });
148
+ execFileSync('mutagen', mutagenArgs, { stdio: 'pipe' });
149
149
  spinner.succeed(`Syncing ${localPath} ↔ ${hostAlias}:${remotePath}`);
150
150
  logger.log('');
151
151
  logger.warn('Note: node_modules and other large directories are excluded by default.');
@@ -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.6",
4
4
  "description": "CLI for OpenCodeSpaces - Connect your local IDE to cloud sessions",
5
5
  "type": "module",
6
6
  "bin": {