paris-immersion 0.1.27 → 0.1.28
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/commands/login.js +5 -2
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/commands/login.js
CHANGED
|
@@ -36,11 +36,14 @@ export async function loginCommand(opts) {
|
|
|
36
36
|
if (opts.token) {
|
|
37
37
|
process.stdout.write(c.dim(`Validando token via ${apiUrl}...\n`));
|
|
38
38
|
try {
|
|
39
|
-
|
|
39
|
+
// /auth/me devolve envelope { user: {...} } — sem o unwrap o installer
|
|
40
|
+
// dizia "Autenticado como undefined" (achado da simulação de 2026-08-13).
|
|
41
|
+
const meRes = await apiFetch('/auth/me', {
|
|
40
42
|
method: 'GET',
|
|
41
43
|
apiUrl,
|
|
42
44
|
token: opts.token,
|
|
43
45
|
});
|
|
46
|
+
const me = meRes.user ?? meRes;
|
|
44
47
|
await writeCredentials({
|
|
45
48
|
token: opts.token,
|
|
46
49
|
user_id: me.id,
|
|
@@ -48,7 +51,7 @@ export async function loginCommand(opts) {
|
|
|
48
51
|
api_url: apiUrl,
|
|
49
52
|
obtained_at: new Date().toISOString(),
|
|
50
53
|
});
|
|
51
|
-
console.log(c.green(`✓ Autenticado como ${me.email}.`));
|
|
54
|
+
console.log(c.green(`✓ Autenticado como ${me.name ?? me.email}.`));
|
|
52
55
|
console.log(c.dim(' Token salvo em ~/.paris/credentials.'));
|
|
53
56
|
await refreshDaemonAfterLogin();
|
|
54
57
|
return;
|
package/dist/index.js
CHANGED
|
@@ -15,7 +15,7 @@ import { mentorCommand } from './commands/mentor.js';
|
|
|
15
15
|
const program = new Command()
|
|
16
16
|
.name('paris')
|
|
17
17
|
.description('Paris Immersion — CLI do aluno (login, workspace, tarefas)')
|
|
18
|
-
.version('0.1.
|
|
18
|
+
.version('0.1.28');
|
|
19
19
|
program
|
|
20
20
|
.command('login')
|
|
21
21
|
.description('Autenticar com sua conta Paris (device-code OR --token direto)')
|
package/package.json
CHANGED