@dosu/cli 0.3.1 → 0.3.3
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/bin/dosu.js +18 -9
- package/package.json +2 -2
package/bin/dosu.js
CHANGED
|
@@ -3848,12 +3848,24 @@ h1 {
|
|
|
3848
3848
|
<h1>Authentication Successful</h1>
|
|
3849
3849
|
<p class="subtitle">You're all set. The CLI is now authenticated.</p>
|
|
3850
3850
|
${emailLine}
|
|
3851
|
-
<div class="card" onclick="
|
|
3852
|
-
<p class="close-hint">This tab will close automatically in <span id="countdown">10</span>s</p>
|
|
3851
|
+
<div class="card" id="close-card" onclick="tryClose()">Close this tab and return to your terminal.</div>
|
|
3852
|
+
<p class="close-hint" id="close-hint">This tab will close automatically in <span id="countdown">10</span>s</p>
|
|
3853
3853
|
</div>
|
|
3854
3854
|
<script>
|
|
3855
|
+
function tryClose(){
|
|
3856
|
+
window.close();
|
|
3857
|
+
setTimeout(function(){
|
|
3858
|
+
var c=document.getElementById('close-card');
|
|
3859
|
+
c.textContent='You can close this tab now.';
|
|
3860
|
+
c.style.cursor='default';
|
|
3861
|
+
c.onclick=null;
|
|
3862
|
+
var h=document.getElementById('close-hint');
|
|
3863
|
+
if(h)h.style.display='none';
|
|
3864
|
+
clearInterval(t);
|
|
3865
|
+
},500);
|
|
3866
|
+
}
|
|
3855
3867
|
var s=10,el=document.getElementById('countdown');
|
|
3856
|
-
var t=setInterval(function(){if(--s<=0){clearInterval(t);
|
|
3868
|
+
var t=setInterval(function(){if(--s<=0){clearInterval(t);tryClose();}el.textContent=s;},1000);
|
|
3857
3869
|
</script>
|
|
3858
3870
|
</body>
|
|
3859
3871
|
</html>`;
|
|
@@ -4672,8 +4684,7 @@ async function openBrowserForSetup(cfg, opts) {
|
|
|
4672
4684
|
cfg.access_token = token.access_token;
|
|
4673
4685
|
cfg.refresh_token = token.refresh_token;
|
|
4674
4686
|
cfg.expires_at = Math.floor(Date.now() / 1000) + token.expires_in;
|
|
4675
|
-
|
|
4676
|
-
cfg.mode = MODE_OSS;
|
|
4687
|
+
cfg.mode = token.mode === MODE_OSS ? MODE_OSS : undefined;
|
|
4677
4688
|
saveConfig(cfg);
|
|
4678
4689
|
return cfg;
|
|
4679
4690
|
} catch (err) {
|
|
@@ -5088,11 +5099,9 @@ init_config();
|
|
|
5088
5099
|
init_providers();
|
|
5089
5100
|
|
|
5090
5101
|
// src/version/version.ts
|
|
5091
|
-
var VERSION = "0.3.
|
|
5092
|
-
var COMMIT = "none";
|
|
5093
|
-
var DATE = "unknown";
|
|
5102
|
+
var VERSION = "0.3.3";
|
|
5094
5103
|
function getVersionString() {
|
|
5095
|
-
return `
|
|
5104
|
+
return `v${VERSION}`;
|
|
5096
5105
|
}
|
|
5097
5106
|
|
|
5098
5107
|
// src/cli/cli.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dosu/cli",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.3",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Dosu CLI - Manage MCP servers for AI tools",
|
|
6
6
|
"license": "MIT",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"scripts": {
|
|
20
20
|
"dev": "bun run src/index.ts",
|
|
21
21
|
"dev:local": "DOSU_DEV=true bun run src/index.ts",
|
|
22
|
-
"build": "bun --env-file=.env.production build
|
|
22
|
+
"build": "bun --env-file=.env.production run scripts/build-compile.ts",
|
|
23
23
|
"build:npm": "bun --env-file=.env.production run scripts/build-npm.ts",
|
|
24
24
|
"build:all": "bun --env-file=.env.production run scripts/build-all.ts",
|
|
25
25
|
"test": "bunx vitest run",
|