CLI cannot load explicitly selected config paths containing # or %
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
- 35/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- node.js, typescript
Línea de trabajo
Start with loadConfig() in src/cli/internal.ts and the reproduction in src/cli/config.test.ts. Check how explicit paths and MPPX_CONFIG reach import(), then run the focused config tests. Done means filenames containing # or %20 load correctly and the returned path and selection precedence remain unchanged.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Check existing issues
- I checked there isn't already an issue for the bug I encountered.
Describe the bug
On current main, an explicitly selected CLI config exists on disk but fails to load if its filename contains a literal # or %20. A plain filename with the same contents loads normally. I reproduced this through both the explicit argument and MPPX_CONFIG, without making a request or using a wallet.
loadConfig() passes an absolute filesystem path directly to import(), which interprets URL syntax in the path instead of preserving the filename. The expected result is to load the selected file and return its original filesystem path, without changing selection or precedence.
Link to Minimal Reproducible Example
Steps To Reproduce
From the repository root at 4cd2cd25, after installing the repo dependencies:
dir=$(mktemp -d)
config="$dir/config#draft%20v2.mjs"
printf 'export default { methods: [] }\n' > "$config"
node --import tsx --input-type=module --eval 'import { loadConfig } from "./src/cli/internal.ts"; console.log(await loadConfig(process.argv[1]))' "$config"
The file exists, but the import fails. Repeat with config.mjs in the same directory to see the passing control.
Package Version
0.22.1 (main at 4cd2cd25)
Anything else?
Reproduced on macOS arm64 with Node.js 22.21.0. I prepared a narrow fix that converts the selected path to a file URL only at the import boundary. The two regression tests fail on main; with the fix, the focused config suite passes 11/11 and the direct Node matrix passes 8/8. The linked regression file is on the fixed branch; the steps above reproduce against main.
The repository currently limits PRs to collaborators, so here is the three-file diff for review if useful.
- Lenguaje dominante
- TypeScript
- Estrellas
- 196
- Forks
- 79
- Merge medio
- 15 h 20 min
- PR fusionados (30 d)
- 156
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 wevm/mppx
-
x402: no way to declare Bazaar discovery, and facilitatorPayment() drops the payload extensionsAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
Los mantenedores suelen responder en 1 día
-
friction
Dificultad 4/5 3-5 días Aptitud para principiantes 54/100
Los mantenedores suelen responder en 1 día
-
Support ECDSA P-256 and P-384 for TAP signaturesPosiblemente ocupada @brendanjryan la tomó hace 5 días. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
Los mantenedores suelen responder en 1 día
-
TAP verification fails when signatures cover @method, @scheme, or @queryPosiblemente ocupada @brendanjryan la tomó hace 5 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 55/100
Los mantenedores suelen responder en 1 día
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 30/100
wevm/mppx#920 · 10 comentarios ·
Los mantenedores suelen responder en 1 día
Issues similares
-
[typescript] BasicAuth.fromAuthorizationHeader accepts headers without the Basic scheme prefixAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día
-
enhancement severity:low
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Battle-Cattle/BCUK-Bot-4#1252 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
modelcontextprotocol/inspector#3098 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
onyx-dot-app/onyx#18730 ·
Los mantenedores suelen responder en 1 día