paris-immersion 0.1.22 → 0.1.23
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 +1 -1
- package/dist/lib/api.js +5 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -14,7 +14,7 @@ import { tostudyLoginCommand } from './commands/tostudy-login.js';
|
|
|
14
14
|
const program = new Command()
|
|
15
15
|
.name('paris')
|
|
16
16
|
.description('Paris Immersion — CLI do aluno (login, workspace, tarefas)')
|
|
17
|
-
.version('0.1.
|
|
17
|
+
.version('0.1.23');
|
|
18
18
|
program
|
|
19
19
|
.command('login')
|
|
20
20
|
.description('Autenticar com sua conta Paris (device-code OR --token direto)')
|
package/dist/lib/api.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { readCredentials } from './credentials.js';
|
|
2
|
-
|
|
2
|
+
// CLI de ALUNO: o default é PROD. O wizard/instalador exporta PARIS_API_URL no
|
|
3
|
+
// one-liner, mas um aluno que roda `paris login` na mão (sem essa env) caía em
|
|
4
|
+
// localhost:3011 → "fetch failed". Default = prod resolve isso. Dev local:
|
|
5
|
+
// exporte PARIS_API_URL=http://localhost:3011.
|
|
6
|
+
const DEFAULT_API_URL = process.env.PARIS_API_URL ?? 'https://paris-immersion-api-production.up.railway.app';
|
|
3
7
|
export class ApiError extends Error {
|
|
4
8
|
status;
|
|
5
9
|
body;
|
package/package.json
CHANGED