@authhero/proxy 0.8.5 → 0.9.0

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.
package/dist/proxy.mjs CHANGED
@@ -241,7 +241,8 @@ e.object({
241
241
  start: e.number(),
242
242
  limit: e.number(),
243
243
  length: e.number(),
244
- total: e.number().optional()
244
+ total: e.number().optional(),
245
+ next: e.string().optional()
245
246
  });
246
247
  var ue = e.object({
247
248
  email: e.string().optional(),
@@ -3438,12 +3439,20 @@ function ti(e) {
3438
3439
  };
3439
3440
  }
3440
3441
  //#endregion
3442
+ //#region src/http-adapter/service-binding-fetch.ts
3443
+ function ni(e) {
3444
+ return (t, n) => {
3445
+ let r = t instanceof Request && n === void 0 ? t : new Request(t, n);
3446
+ return e.fetch(r);
3447
+ };
3448
+ }
3449
+ //#endregion
3441
3450
  //#region src/kv-adapter/index.ts
3442
- var ni = "authhero-proxy-host:";
3443
- function ri(e, t) {
3451
+ var ri = "authhero-proxy-host:";
3452
+ function ii(e, t) {
3444
3453
  return `${e}${t.toLowerCase()}`;
3445
3454
  }
3446
- function ii() {
3455
+ function ai() {
3447
3456
  let e = () => {
3448
3457
  throw Error("KV proxy adapter does not expose write access to proxy_routes; mutate via the control-plane management API");
3449
3458
  };
@@ -3465,15 +3474,15 @@ function ii() {
3465
3474
  }
3466
3475
  };
3467
3476
  }
3468
- function ai(e) {
3469
- let { kv: t, keyPrefix: n = ni, timeoutMs: r } = e;
3477
+ function oi(e) {
3478
+ let { kv: t, keyPrefix: n = ri, timeoutMs: r } = e;
3470
3479
  return {
3471
- proxyRoutes: ii(),
3480
+ proxyRoutes: ai(),
3472
3481
  async resolveHost(e) {
3473
- let i = ri(n, e), a = t.get(i, "json");
3482
+ let i = ii(n, e), a = t.get(i, "json");
3474
3483
  return (r && r > 0 ? await J(a, r, "kv.get") : await a) ?? null;
3475
3484
  }
3476
3485
  };
3477
3486
  }
3478
3487
  //#endregion
3479
- export { ni as DEFAULT_KV_HOST_KEY_PREFIX, F as HandlerRegistry, $r as PROXY_RESOLVE_HOST_SCOPE, nr as basicAuthHandler, Yr as buildCacheAdapterKey, Gr as buildCacheApiKey, ri as buildKvHostKey, Nr as buildMatchFilter, ir as cacheHandler, Z as compileHostApp, $n as corsHandler, Jr as createCacheAdapterHostCache, Wr as createCacheApiHostCache, ti as createHttpProxyAdapter, P as createInMemoryHostCache, ai as createKvProxyAdapter, zr as createProxyApp, Q as createProxyDataPlaneHandler, Rr as createProxyDataPlaneRouter, Zr as createStaticProxyAdapter, I as defineHandler, Dr as dispatchNamespaceHandler, ar as forwardedHeadersHandler, Tn as handlerConfigSchema, rr as headersHandler, vr as httpHandler, Qr as httpRoute, wn as matchSchema, Mr as matchesAnyHost, jr as matchesHost, j as proxyRouteInsertSchema, En as proxyRouteSchema, Dn as proxyRouteUpdateSchema, Or as redirectHandler, Ar as registerBuiltinHandlers, lr as rewriteCookiesHandler, ur as rewriteLocationHandler, Sr as serviceBindingHandler, X as sortRoutes, kr as staticHandler };
3488
+ export { ri as DEFAULT_KV_HOST_KEY_PREFIX, F as HandlerRegistry, $r as PROXY_RESOLVE_HOST_SCOPE, nr as basicAuthHandler, Yr as buildCacheAdapterKey, Gr as buildCacheApiKey, ii as buildKvHostKey, Nr as buildMatchFilter, ir as cacheHandler, Z as compileHostApp, $n as corsHandler, Jr as createCacheAdapterHostCache, Wr as createCacheApiHostCache, ti as createHttpProxyAdapter, P as createInMemoryHostCache, oi as createKvProxyAdapter, zr as createProxyApp, Q as createProxyDataPlaneHandler, Rr as createProxyDataPlaneRouter, ni as createServiceBindingFetch, Zr as createStaticProxyAdapter, I as defineHandler, Dr as dispatchNamespaceHandler, ar as forwardedHeadersHandler, Tn as handlerConfigSchema, rr as headersHandler, vr as httpHandler, Qr as httpRoute, wn as matchSchema, Mr as matchesAnyHost, jr as matchesHost, j as proxyRouteInsertSchema, En as proxyRouteSchema, Dn as proxyRouteUpdateSchema, Or as redirectHandler, Ar as registerBuiltinHandlers, lr as rewriteCookiesHandler, ur as rewriteLocationHandler, Sr as serviceBindingHandler, X as sortRoutes, kr as staticHandler };