sourcegraph / openctx

See contextual info about code from your dev tools, in your editor, code review, and anywhere else you read code.
https://openctx.org
Apache License 2.0
135 stars 14 forks source link

[WIP] feat: add postgres provider. #175

Open thorwebdev opened 2 months ago

thorwebdev commented 2 months ago

See demo

Local configuration:

"openctx.providers": {
    "file:///<path>/openctx/provider/postgres/dist/index.js": {
      "DB_URL": "postgresql://postgres:postgres@127.0.0.1:54322/postgres"
    }
  },
thorwebdev commented 2 months ago

Trying to test this locally, but getting an error: failed to call provider: Error: Cannot find module './client.js'

image

The client.js file is bundled in the /dist folder though. Any ideas what might be wrong here?

image
thorwebdev commented 2 months ago

Ahh, I guess I need to point to the bundle.js file locally actually. Any idea where I can find the console.log statements though?

tinvaan commented 2 months ago

Ahh, I guess I need to point to the bundle.js file locally actually. Any idea where I can find the console.log statements though?

That's right, you need to point to your local bundle.js file. console.log statements should be visible in your editor's(VSCode) developer console[cmd + Shift + P > Toggle Developer Tools]. It's usually flooded with a ton of info, so it may be easier if you use console.error instead and filter for "Errors only".

Screenshot 2024-07-15 at 5 55 07 PM
thorwebdev commented 2 months ago

@tinvaan thaaank you 🫶 working like a charm now 🙌

image