Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make source name more prominent if middleware connection creation / update output for use in local development #9

Open
leggetter opened this issue Apr 26, 2024 · 3 comments

Comments

@leggetter
Copy link
Contributor

The present output is something like the following, which is very verbose:

Connection updated {
  id: 'web_385vBCWBo7t3',
  team_id: 'tm_rWCCtze3Vbfa',
  updated_at: '2024-04-26T20:21:59.631Z',
  created_at: '2024-04-26T20:06:52.778Z',
  paused_at: null,
  name: null,
  rules: [ { type: 'retry', count: 5, interval: 60000, strategy: 'linear' } ],
  description: 'Autogenerated from Vercel integration',
  destination: {
    id: 'des_ESrYcUgTMSDv',
    team_id: 'tm_rWCCtze3Vbfa',
    url: 'https://hookdeck-vercel-example.vercel.app',
    updated_at: '2024-04-26T20:15:41.596Z',
    created_at: '2024-04-26T20:06:52.573Z',
    rate_limit: 10,
    rate_limit_period: 'minute',
    cli_path: null,
    path_forwarding_disabled: false,
    name: 'api-webhooks',
    http_method: null,
    auth_method: { type: 'HOOKDECK_SIGNATURE', config: {} },
    description: 'Autogenerated from Vercel integration',
    disabled_at: null
  },
  source: {
    id: 'src_y2xmnguyeneemb',
    team_id: 'tm_rWCCtze3Vbfa',
    updated_at: '2024-04-26T20:06:52.562Z',
    created_at: '2024-04-26T20:06:52.575Z',
    name: 'vercel-527074e1c',
    allowed_http_methods: [ 'POST', 'PUT', 'PATCH', 'DELETE' ],
    custom_response: null,
    description: 'Autogenerated from Vercel integration',
    url: 'https://hkdk.events/y2xmnguyeneemb',
    disabled_at: null,
    verification: null
  },
  disabled_at: null,
  full_name: 'vercel-527074e1c -> api-webhooks'
}
Destination updated {
  id: 'des_ESrYcUgTMSDv',
  team_id: 'tm_rWCCtze3Vbfa',
  url: 'https://hookdeck-vercel-example.vercel.app',
  updated_at: '2024-04-26T20:21:59.951Z',
  created_at: '2024-04-26T20:06:52.573Z',
  rate_limit: 10,
  rate_limit_period: 'minute',
  cli_path: null,
  path_forwarding_disabled: false,
  name: 'api-webhooks',
  http_method: null,
  auth_method: { type: 'HOOKDECK_SIGNATURE', config: {} },
  description: 'Autogenerated from Vercel integration',
  disabled_at: null
}
Hookdeck connection configured successfully https://hkdk.events/y2xmnguyeneemb
Hookdeck successfully configured

> [email protected] dev
> next dev

✔ Console Ninja extension is connected to Next.js, see https://tinyurl.com/2vt8jxzw
  ▲ Next.js 14.2.3
  - Local:        http://localhost:3000
  - Environments: .env.local

 ✓ Starting...
 ✓ Ready in 1614ms
 ✓ Compiled /src/middleware in 237ms (565 modules)

The Hookdeck URL is reasonably prominent:

Hookdeck connection configured successfully https://hkdk.events/y2xmnguyeneemb

However, for local development you really want to know the generated source name to connect the Hookdeck CLI to which is buried in the middle of the output.

Suggest: reduce the output and only show in verbose mode. By default just show:

  1. The Hookdeck Source URL
  2. The Hookdeck Source name
@alexbouchardd
Copy link

In this case, though, you couldn't use that URL with the CLI. In general, the URL itself can't really be used without the middleware so it's unclear to me why we would even print it. What's the workflow you picture here?

@leggetter
Copy link
Contributor Author

Maybe the URL isn't required. Just the source name so you know what to choose when you run hookdeck listen.

@alexbouchardd
Copy link

@jmnavarro This makes sense and aligned with our discussion in slack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants