Skip to content

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

Open
@leggetter

Description

@leggetter

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions