bimba-cli 0.7.4 → 0.7.5

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/serve.js +2 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bimba-cli",
3
- "version": "0.7.4",
3
+ "version": "0.7.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/HeapVoid/bimba.git"
package/serve.js CHANGED
@@ -691,6 +691,8 @@ export function serve(entrypoint, flags) {
691
691
  // Serve a resolved file: compile .imba, wrap CJS as ESM, pass ESM through
692
692
  const serveResolved = async (filePath) => {
693
693
  if (filePath.endsWith('.imba')) {
694
+ const f = Bun.file(filePath)
695
+ if (!(await f.exists())) return null
694
696
  const out = await compileFile(filePath)
695
697
  if (out.errors?.length) return new Response(out.errors.map(e => e.message).join('\n'), { status: 500 })
696
698
  return new Response(out.js, { headers: { 'Content-Type': 'application/javascript' } })