stratanodex 0.1.0 → 0.1.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.
@@ -87,6 +87,7 @@ export const createCliSession = () => http
87
87
  .post('/api/auth/cli-session')
88
88
  .then((r) => ({
89
89
  code: r.data.code,
90
+ url: r.data.url,
90
91
  }));
91
92
  export const pollCliSession = (code) => http.get(`/api/auth/cli-session/${code}`).then((r) => {
92
93
  // Backend returns { pending: true } or { token: string }
@@ -7,7 +7,6 @@ import { createCliSession, pollCliSession } from '../../api/client.js';
7
7
  import { saveToken } from '../../utils/auth.js';
8
8
  import { ApiError } from '../../api/ApiError.js';
9
9
  import chalk from 'chalk';
10
- const AUTH_URL_BASE = process.env['STRATANODEX_AUTH_URL'] ?? 'https://stratanodex-landing-page.vercel.app';
11
10
  const POLL_INTERVAL_MS = 2000;
12
11
  export function LoginScreen({ replaceScreen, registerActions }) {
13
12
  const [state, setState] = useState('creating');
@@ -28,12 +27,11 @@ export function LoginScreen({ replaceScreen, registerActions }) {
28
27
  const attempt = ++attemptRef.current;
29
28
  try {
30
29
  // 1. Create CLI session on backend
31
- const { code } = await createCliSession();
30
+ const { code, url } = await createCliSession();
32
31
  if (attemptRef.current !== attempt)
33
32
  return; // stale attempt
34
- // 2. Open browser to auth page hash-routed, ?session= is inside the hash
35
- const separator = AUTH_URL_BASE.includes('?') ? '&' : '?';
36
- await open(`${AUTH_URL_BASE}${separator}session=${code}#auth`);
33
+ // 2. Open browser to the auth URL returned by the backend
34
+ await open(url);
37
35
  setState('waiting');
38
36
  // 3. Poll until complete or error
39
37
  pollRef.current = setInterval(async () => {
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "stratanodex",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "description": "Keyboard-driven terminal task manager — hierarchical folders, lists & nodes with a full TUI",
5
5
  "homepage": "https://stratanodex.online",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/pranavdadhe1806/StrataNodex-CLI"
8
+ "url": "git+https://github.com/pranavdadhe1806/StrataNodex-CLI.git"
9
9
  },
10
10
  "type": "module",
11
11
  "bin": {
12
- "stratanodex": "./dist/index.js"
12
+ "stratanodex": "dist/index.js"
13
13
  },
14
14
  "engines": {
15
15
  "node": ">=20.0.0"