nbound 1.0.0 → 1.0.2

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.
@@ -12907,6 +12907,7 @@ class MultiEndpointClient {
12907
12907
  const url = new URL(baseUrl);
12908
12908
  url.searchParams.set("endpointId", endpointId);
12909
12909
  url.searchParams.set("type", "cli");
12910
+ url.searchParams.set("token", this.options.token);
12910
12911
  return url.toString();
12911
12912
  }
12912
12913
  handleEndpointConnected(endpointId, subscribedIds, urls) {
@@ -13070,6 +13071,7 @@ async function connectCommand(port, options) {
13070
13071
  process.exit(2);
13071
13072
  }
13072
13073
  let endpointIds;
13074
+ let endpointUrls = {};
13073
13075
  if (options.endpoint) {
13074
13076
  endpointIds = [options.endpoint];
13075
13077
  spinner.succeed("Authenticated");
@@ -13078,6 +13080,7 @@ async function connectCommand(port, options) {
13078
13080
  try {
13079
13081
  const endpoints = await listEndpoints(config.token);
13080
13082
  endpointIds = endpoints.map((e) => e.id);
13083
+ endpointUrls = Object.fromEntries(endpoints.map((e) => [e.id, e.url]));
13081
13084
  if (endpointIds.length === 0) {
13082
13085
  spinner.fail("No endpoints found");
13083
13086
  log.info("Create an endpoint at https://app.nbound.dev");
@@ -13105,7 +13108,7 @@ async function connectCommand(port, options) {
13105
13108
  log.blank();
13106
13109
  log.bold("Endpoints:");
13107
13110
  for (const id of subscribedIds) {
13108
- const url = webhookUrls[id] || id;
13111
+ const url = endpointUrls[id] || webhookUrls[id] || id;
13109
13112
  log.info(` ${url}`);
13110
13113
  }
13111
13114
  log.blank();
package/dist/index.js CHANGED
@@ -12905,6 +12905,7 @@ class MultiEndpointClient {
12905
12905
  const url = new URL(baseUrl);
12906
12906
  url.searchParams.set("endpointId", endpointId);
12907
12907
  url.searchParams.set("type", "cli");
12908
+ url.searchParams.set("token", this.options.token);
12908
12909
  return url.toString();
12909
12910
  }
12910
12911
  handleEndpointConnected(endpointId, subscribedIds, urls) {
@@ -13068,6 +13069,7 @@ async function connectCommand(port, options) {
13068
13069
  process.exit(2);
13069
13070
  }
13070
13071
  let endpointIds;
13072
+ let endpointUrls = {};
13071
13073
  if (options.endpoint) {
13072
13074
  endpointIds = [options.endpoint];
13073
13075
  spinner.succeed("Authenticated");
@@ -13076,6 +13078,7 @@ async function connectCommand(port, options) {
13076
13078
  try {
13077
13079
  const endpoints = await listEndpoints(config.token);
13078
13080
  endpointIds = endpoints.map((e) => e.id);
13081
+ endpointUrls = Object.fromEntries(endpoints.map((e) => [e.id, e.url]));
13079
13082
  if (endpointIds.length === 0) {
13080
13083
  spinner.fail("No endpoints found");
13081
13084
  log.info("Create an endpoint at https://app.nbound.dev");
@@ -13103,7 +13106,7 @@ async function connectCommand(port, options) {
13103
13106
  log.blank();
13104
13107
  log.bold("Endpoints:");
13105
13108
  for (const id of subscribedIds) {
13106
- const url = webhookUrls[id] || id;
13109
+ const url = endpointUrls[id] || webhookUrls[id] || id;
13107
13110
  log.info(` ${url}`);
13108
13111
  }
13109
13112
  log.blank();
@@ -13258,5 +13261,5 @@ program.command("connect <port>").description("Forward webhooks to localhost").o
13258
13261
  program.command("endpoints").description("List your endpoints").option("--json", "Output as JSON").action(endpointsCommand);
13259
13262
  program.parse();
13260
13263
 
13261
- //# debugId=929FF29F0D73C0D764756E2164756E21
13264
+ //# debugId=1055C689E14F621164756E2164756E21
13262
13265
  //# sourceMappingURL=index.js.map