rscot-agent 1.2.0 → 1.2.2
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/index.js +15 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { createRequire as __rscotCreateRequire } from 'module';
|
|
3
|
+
const require = __rscotCreateRequire(import.meta.url);
|
|
2
4
|
|
|
3
5
|
// src/index.ts
|
|
4
6
|
import kleur2 from "kleur";
|
|
@@ -1420,8 +1422,18 @@ async function exchangeCode(code, verifier, deviceId) {
|
|
|
1420
1422
|
}
|
|
1421
1423
|
function openBrowser(url) {
|
|
1422
1424
|
const platform = process.platform;
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
+
let cmd;
|
|
1426
|
+
let args;
|
|
1427
|
+
if (platform === "win32") {
|
|
1428
|
+
cmd = "rundll32";
|
|
1429
|
+
args = ["url.dll,FileProtocolHandler", url];
|
|
1430
|
+
} else if (platform === "darwin") {
|
|
1431
|
+
cmd = "open";
|
|
1432
|
+
args = [url];
|
|
1433
|
+
} else {
|
|
1434
|
+
cmd = "xdg-open";
|
|
1435
|
+
args = [url];
|
|
1436
|
+
}
|
|
1425
1437
|
try {
|
|
1426
1438
|
const child = spawn(cmd, args, { detached: true, stdio: "ignore", windowsHide: true });
|
|
1427
1439
|
child.unref();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "rscot-agent",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.2",
|
|
4
4
|
"description": "Rscot Agent (rscot) — local-first, source-available coding agent. One-shot npx onramp that walks you through provider/key setup.",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"type": "module",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
"node": ">=18"
|
|
17
17
|
},
|
|
18
18
|
"scripts": {
|
|
19
|
-
"build": "
|
|
19
|
+
"build": "node esbuild.config.mjs",
|
|
20
20
|
"dev": "tsx watch src/index.ts",
|
|
21
21
|
"prepublishOnly": "npm run build",
|
|
22
22
|
"start": "node dist/index.js"
|