mindwire 0.1.23 → 0.1.24
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 +12 -3
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { MindwireError, TimeoutError, ApiError, RunFailedError, binaryCacheDirectory, cachedExecutable, verifyReleaseBytes, cacheExecutable, executableChecksum } from './chunk-PFYKJ6LX.js';
|
|
3
3
|
import { promisify, parseArgs } from 'util';
|
|
4
|
-
import {
|
|
4
|
+
import { fileURLToPath } from 'url';
|
|
5
|
+
import { realpathSync } from 'fs';
|
|
5
6
|
import * as path2 from 'path';
|
|
6
7
|
import { createHash, randomBytes, randomUUID } from 'crypto';
|
|
7
8
|
import { createInterface } from 'readline/promises';
|
|
@@ -57,7 +58,7 @@ function computerPairingURI(invitation) {
|
|
|
57
58
|
}
|
|
58
59
|
|
|
59
60
|
// src/version.ts
|
|
60
|
-
var SDK_VERSION = "0.1.
|
|
61
|
+
var SDK_VERSION = "0.1.24" ;
|
|
61
62
|
|
|
62
63
|
// src/http.ts
|
|
63
64
|
var DEFAULT_TIMEOUT_MS = 12e4;
|
|
@@ -2380,7 +2381,15 @@ ${controller.error}` : ""}`
|
|
|
2380
2381
|
throw new Error(`Unknown command ${command}. Run mindwire --help.`);
|
|
2381
2382
|
}
|
|
2382
2383
|
}
|
|
2383
|
-
|
|
2384
|
+
function isCLIEntry() {
|
|
2385
|
+
if (!process.argv[1]) return false;
|
|
2386
|
+
try {
|
|
2387
|
+
return realpathSync(process.argv[1]) === realpathSync(fileURLToPath(import.meta.url));
|
|
2388
|
+
} catch {
|
|
2389
|
+
return false;
|
|
2390
|
+
}
|
|
2391
|
+
}
|
|
2392
|
+
if (isCLIEntry()) {
|
|
2384
2393
|
void main().catch((error) => {
|
|
2385
2394
|
const message = error instanceof Error ? error.message : String(error);
|
|
2386
2395
|
if (process.argv.includes("--json")) process.stderr.write(JSON.stringify({ event: "error", message }) + "\n");
|