paris-immersion 0.1.30 → 0.1.32
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 +5 -1
- package/dist/lib/orca-launcher.js +3 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { Command } from 'commander';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
3
4
|
import { loginCommand } from './commands/login.js';
|
|
4
5
|
import { installCommand } from './commands/install.js';
|
|
5
6
|
import { doctorCommand } from './commands/doctor.js';
|
|
@@ -12,10 +13,13 @@ import { serveCommand } from './commands/serve.js';
|
|
|
12
13
|
import { daemonCommand, restartCommand } from './commands/daemon.js';
|
|
13
14
|
import { tostudyLoginCommand } from './commands/tostudy-login.js';
|
|
14
15
|
import { mentorCommand } from './commands/mentor.js';
|
|
16
|
+
// Versão SEMPRE do package.json — a string hardcoded ficava pra trás a cada
|
|
17
|
+
// release (0.1.30 se apresentava como 0.1.28) e sujava qualquer diagnóstico.
|
|
18
|
+
const pkgVersion = createRequire(import.meta.url)('../package.json').version;
|
|
15
19
|
const program = new Command()
|
|
16
20
|
.name('paris')
|
|
17
21
|
.description('Paris Immersion — CLI do aluno (login, workspace, tarefas)')
|
|
18
|
-
.version(
|
|
22
|
+
.version(pkgVersion);
|
|
19
23
|
program
|
|
20
24
|
.command('login')
|
|
21
25
|
.description('Autenticar com sua conta Paris (device-code OR --token direto)')
|
|
@@ -16,10 +16,13 @@ const execFileP = promisify(execFile);
|
|
|
16
16
|
* orca terminal create ... → aba nova com o claude + prompt, em foco
|
|
17
17
|
*/
|
|
18
18
|
function findOrcaBin() {
|
|
19
|
+
// Caminhos fixos primeiro (instalador põe em ~/.local/bin), depois o PATH do
|
|
20
|
+
// processo — o daemon (launchd/systemd) herda um PATH rico do install.
|
|
19
21
|
const candidates = [
|
|
20
22
|
path.join(homedir(), '.local', 'bin', 'orca'),
|
|
21
23
|
'/usr/local/bin/orca',
|
|
22
24
|
'/opt/homebrew/bin/orca',
|
|
25
|
+
...(process.env.PATH ?? '').split(path.delimiter).filter(Boolean).map((d) => path.join(d, 'orca')),
|
|
23
26
|
];
|
|
24
27
|
for (const c of candidates) {
|
|
25
28
|
if (existsSync(c))
|
package/package.json
CHANGED