Use self nf path to run sub commands
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 54/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- node.js, typescript
- Área
- cli, developer-experience
Línea de trabajo
Start by checking the CLI entry point and existing command dispatch for how nf subcommands are invoked. The request proposes using the local nf executable through npm exec for development; confirm which development command should change and verify it runs the requested build --watch subcommand.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Which package is this feature request for?
@nanoforge-dev/cli
Which command is this feature request for?
dev
Feature
nf dev starts build --watch and start --watch through the package manager: <pm> exec nf <command> --watch (dev.action.ts#L40-L42, package-manager.ts#L131-L141). So the package manager decides which nf runs, not the CLI that is running (process.argv[1]). As confirmed in the comments, the sub-commands can end up running the global nf binary instead of the project's local one.
Related: the local CLI is looked up from process.cwd(), not from --directory (local-binaries.ts#L6), so nf dev --directory <dir> run from another folder doesn't find the project's local CLI either.
Ideal solution or implementation
The sub-commands spawn process.execPath with the entry of the CLI that is running (process.argv[1]), followed by the sub-command and its flags, in directory, instead of <pm> exec nf.
Acceptance criteria:
- With a local CLI in the project and a different global
nf,nf devnever runs the global one forbuildorstart. - A test checks the command
nf devspawns (it uses the running CLI's entry, not<pm> exec nf). -
--editorand the other flags still reach thebuildsub-command.
Alternative solutions or implementations
Keep <pm> exec, but pass the local binary's path (<pm> exec <project>/node_modules/.bin/nf -- build --watch, as in the original request).
Other context
Open questions (not recorded, ask the team):
- Should the local CLI lookup use
--directoryinstead ofprocess.cwd()in the same change, or in its own issue?
- Lenguaje dominante
- TypeScript
- Estrellas
- 2
- Forks
- 2
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 17
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de NanoForge-dev/CLI
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NanoForge-dev/CLI#294 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NanoForge-dev/CLI#293 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
NanoForge-dev/CLI#292 ·
Los mantenedores suelen responder en 1 día
-
command:dev enhancement good first issue refactor
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
NanoForge-dev/CLI#281 ·
Los mantenedores suelen responder en 1 día
-
bug command:build good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
NanoForge-dev/CLI#276 ·
Los mantenedores suelen responder en 1 día
Todos los issues de NanoForge-dev/CLI
Issues similares
-
Mend: dependency security vulnerability
Dificultad 1/5 1-3 horas Aptitud para principiantes 65/100
fdm-monster/fdm-monster#5563 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
Los mantenedores suelen responder en 1 día
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
growilabs/growi#12246 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededPosiblemente ocupada @github-actions la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
SSWConsulting/SSW.Rules#2809 · 1 comentario ·
Los mantenedores suelen responder en 1 día