mindwire 0.1.22 → 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 +14 -5
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/workspace.d.ts +9 -3
- 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;
|
|
@@ -625,7 +626,7 @@ var GitAccessApi = class {
|
|
|
625
626
|
run(projectId, operation, auth) {
|
|
626
627
|
return this.mw.http.request("POST", `/workspace/projects/${encodeURIComponent(projectId)}/git/${operation}`, { body: { auth } });
|
|
627
628
|
}
|
|
628
|
-
/** Requires health.gitOperationsVersion >= 1 (>= 2 for
|
|
629
|
+
/** Requires health.gitOperationsVersion >= 1 (>= 2 for branches, >= 4 for restore_commit). Acceptance persists before Git runs;
|
|
629
630
|
* disconnecting only detaches the client. The same ID/intent never runs twice.
|
|
630
631
|
*/
|
|
631
632
|
start(projectId, request) {
|
|
@@ -635,7 +636,7 @@ var GitAccessApi = class {
|
|
|
635
636
|
const result = await this.mw.http.request(
|
|
636
637
|
"GET",
|
|
637
638
|
`/workspace/projects/${encodeURIComponent(projectId)}/git/operations`,
|
|
638
|
-
{ query: { active: activeOnly, actionsVersion:
|
|
639
|
+
{ query: { active: activeOnly, actionsVersion: 4 } }
|
|
639
640
|
);
|
|
640
641
|
return result.operations;
|
|
641
642
|
}
|
|
@@ -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");
|