fiberplane / fpx

Supercharge your local development
https://fiberplane.dev
MIT License
43 stars 1 forks source link

Re-discover routes on app update #63

Closed keturiosakys closed 2 months ago

keturiosakys commented 2 months ago

Resolves FP-3845

Updates the Typescript API to use file watching to restart route probes. This assumes npx @fiberplane/studio gets run from the root of the project in question (or that directory is provided over an environment variable).

brettimus commented 2 months ago

thing to look out for: i kept seeing this error

✘ [ERROR] Error in ProxyController: Error inside ProxyWorker

   Error
      at castErrorCause
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/wrangler/wrangler-dist/cli.js:207265:18)
      at ProxyController.emitErrorEvent
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/wrangler/wrangler-dist/cli.js:208155:16)
      at ProxyController.onProxyWorkerMessage
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/wrangler/wrangler-dist/cli.js:208051:14)
      at PROXY_CONTROLLER
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/wrangler/wrangler-dist/cli.js:207826:20)
      at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
      at async #handleLoopbackCustomService
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/miniflare/dist/src/index.js:8765:24)
      at async #handleLoopback
  (/Users/brettbeutell/fiber/goose-quotes/node_modules/miniflare/dist/src/index.js:8807:20) {
    cause: {
      name: 'Error',
      message: 'Network connection lost.',
      stack: 'Error: Network connection lost.'
    }
  }

which i haven't seen before. curious if implementing a filewatcher had some effect on wranglers reloading.

brettimus commented 2 months ago

gonna merge but left comments for any who are interested in the changes i added