@zuplo/cli 6.70.48 → 6.70.49

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.
Files changed (47) hide show
  1. package/node_modules/@fastify/reply-from/node_modules/undici/lib/api/api-request.js +1 -1
  2. package/node_modules/@fastify/reply-from/node_modules/undici/lib/cache/sqlite-cache-store.js +3 -3
  3. package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/connect.js +16 -0
  4. package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/request.js +17 -2
  5. package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/socks5-client.js +10 -5
  6. package/node_modules/@fastify/reply-from/node_modules/undici/lib/core/socks5-utils.js +17 -22
  7. package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/client-h1.js +64 -20
  8. package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/client.js +6 -2
  9. package/node_modules/@fastify/reply-from/node_modules/undici/lib/dispatcher/h2c-client.js +1 -1
  10. package/node_modules/@fastify/reply-from/node_modules/undici/lib/mock/mock-call-history.js +15 -15
  11. package/node_modules/@fastify/reply-from/node_modules/undici/lib/util/cache.js +8 -7
  12. package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/fetch/formdata-parser.js +17 -6
  13. package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/fetch/index.js +5 -2
  14. package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/webidl/index.js +5 -5
  15. package/node_modules/@fastify/reply-from/node_modules/undici/lib/web/websocket/stream/websocketstream.js +1 -7
  16. package/node_modules/@fastify/reply-from/node_modules/undici/package.json +1 -1
  17. package/node_modules/@sentry/node/node_modules/brace-expansion/index.js +1 -1
  18. package/node_modules/@sentry/node/node_modules/brace-expansion/package.json +1 -1
  19. package/node_modules/@zuplo/core/package.json +1 -1
  20. package/node_modules/@zuplo/graphql/package.json +1 -1
  21. package/node_modules/@zuplo/openapi-tools/package.json +1 -1
  22. package/node_modules/@zuplo/otel/package.json +1 -1
  23. package/node_modules/@zuplo/runtime/out/esm/{browser-login-idp-WT4H7RKW.js → browser-login-idp-U763HG2Z.js} +2 -2
  24. package/node_modules/@zuplo/runtime/out/esm/chunk-MJ6GX4IA.js +30 -0
  25. package/node_modules/@zuplo/runtime/out/esm/chunk-MJ6GX4IA.js.map +1 -0
  26. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js +8 -8
  27. package/node_modules/@zuplo/runtime/out/esm/mcp-gateway/index.js.map +1 -1
  28. package/node_modules/@zuplo/runtime/out/types/mcp-gateway/index.d.ts +66 -0
  29. package/node_modules/@zuplo/runtime/package.json +1 -1
  30. package/node_modules/glob/node_modules/brace-expansion/index.js +1 -1
  31. package/node_modules/glob/node_modules/brace-expansion/package.json +1 -1
  32. package/node_modules/hono/dist/cjs/index.js +3 -0
  33. package/node_modules/hono/dist/cjs/middleware/compress/index.js +10 -4
  34. package/node_modules/hono/dist/cjs/utils/filepath.js +1 -1
  35. package/node_modules/hono/dist/cjs/utils/ipaddr.js +1 -1
  36. package/node_modules/hono/dist/index.js +2 -0
  37. package/node_modules/hono/dist/middleware/compress/index.js +9 -4
  38. package/node_modules/hono/dist/tsconfig.build.tsbuildinfo +1 -1
  39. package/node_modules/hono/dist/types/index.d.ts +2 -1
  40. package/node_modules/hono/dist/types/middleware/compress/index.d.ts +11 -1
  41. package/node_modules/hono/dist/utils/filepath.js +1 -1
  42. package/node_modules/hono/dist/utils/ipaddr.js +1 -1
  43. package/node_modules/hono/package.json +1 -1
  44. package/package.json +6 -6
  45. package/node_modules/@zuplo/runtime/out/esm/chunk-WU5PDK6Z.js +0 -30
  46. package/node_modules/@zuplo/runtime/out/esm/chunk-WU5PDK6Z.js.map +0 -1
  47. /package/node_modules/@zuplo/runtime/out/esm/{browser-login-idp-WT4H7RKW.js.map → browser-login-idp-U763HG2Z.js.map} +0 -0
@@ -1418,6 +1418,72 @@ export declare interface McpTokenExchangeInboundPolicyOptions {
1418
1418
  };
1419
1419
  }
1420
1420
 
1421
+ /**
1422
+ * Authenticate MCP gateway requests using a gateway-issued OAuth access token,
1423
+ * with browser login delegated to WorkOS.
1424
+ *
1425
+ * WorkOS-friendly wrapper around `McpOAuthInboundPolicy`. Provide `clientId`
1426
+ * and `clientSecret`; the constructor derives the WorkOS OIDC issuer, JWKS URL,
1427
+ * authorize URL, and token URL automatically and runs the resulting shape
1428
+ * through the same Zod schema as the generic policy.
1429
+ *
1430
+ * @title MCP WorkOS OAuth
1431
+ * @public
1432
+ * @product mcp-gateway
1433
+ */
1434
+ export declare class McpWorkosOAuthInboundPolicy extends InboundPolicy<McpWorkosOAuthInboundPolicyOptions> {
1435
+ #private;
1436
+ constructor(rawOptions: unknown, policyName: string);
1437
+ handler(
1438
+ request: ZuploRequest,
1439
+ context: ZuploContext
1440
+ ): Promise<ZuploRequest | Response>;
1441
+ }
1442
+
1443
+ /**
1444
+ * The options for this policy.
1445
+ * @public
1446
+ */
1447
+ export declare interface McpWorkosOAuthInboundPolicyOptions {
1448
+ /**
1449
+ * The WorkOS client_id registered for the gateway's browser login flow. The OIDC issuer and JWKS URL are derived from this client ID.
1450
+ */
1451
+ clientId: string;
1452
+ /**
1453
+ * The WorkOS client_secret. Use $env(...) to source from a secret environment variable.
1454
+ */
1455
+ clientSecret: string;
1456
+ /**
1457
+ * OIDC scopes requested during browser login.
1458
+ */
1459
+ scope?: string;
1460
+ /**
1461
+ * Gateway-side OAuth token settings. The gateway issuer and advertised URLs are derived from the incoming request origin.
1462
+ */
1463
+ gateway?: {
1464
+ /**
1465
+ * Lifetime of access tokens issued by /oauth/token.
1466
+ */
1467
+ accessTokenTtlSeconds?: number;
1468
+ /**
1469
+ * Lifetime of refresh tokens issued by /oauth/token.
1470
+ */
1471
+ refreshTokenTtlSeconds?: number;
1472
+ /**
1473
+ * Whether to advertise client_id_metadata_document_supported in AS metadata.
1474
+ */
1475
+ cimdEnabled?: boolean;
1476
+ };
1477
+ /**
1478
+ * Optional overrides for the derived browser-login settings.
1479
+ */
1480
+ browserLoginOverrides?: {
1481
+ remoteTimeoutMs?: number;
1482
+ stateTtlSeconds?: number;
1483
+ sessionTtlSeconds?: number;
1484
+ };
1485
+ }
1486
+
1421
1487
  /**
1422
1488
  * Arbitrary MCP _meta fields to expose downstream.
1423
1489
  * @public
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@zuplo/runtime",
3
3
  "type": "module",
4
- "version": "6.70.48",
4
+ "version": "6.70.49",
5
5
  "repository": "https://github.com/zuplo/zuplo",
6
6
  "author": "Zuplo, Inc.",
7
7
  "exports": {
@@ -163,7 +163,7 @@ function expand(str, max, isTop) {
163
163
 
164
164
  N = [];
165
165
 
166
- for (var i = x; test(i, y); i += incr) {
166
+ for (var i = x; test(i, y) && N.length < max; i += incr) {
167
167
  var c;
168
168
  if (isAlphaSequence) {
169
169
  c = String.fromCharCode(i);
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "brace-expansion",
3
3
  "description": "Brace expansion as known from sh/bash",
4
- "version": "2.1.0",
4
+ "version": "2.1.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git://github.com/juliangruber/brace-expansion.git"
@@ -17,11 +17,14 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
  var index_exports = {};
19
19
  __export(index_exports, {
20
+ Context: () => import_context.Context,
20
21
  Hono: () => import_hono.Hono
21
22
  });
22
23
  module.exports = __toCommonJS(index_exports);
23
24
  var import_hono = require("./hono");
25
+ var import_context = require("./context");
24
26
  // Annotate the CommonJS export names for ESM import in node:
25
27
  0 && (module.exports = {
28
+ Context,
26
29
  Hono
27
30
  });
@@ -17,6 +17,7 @@ var __copyProps = (to, from, except, desc) => {
17
17
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
18
18
  var compress_exports = {};
19
19
  __export(compress_exports, {
20
+ COMPRESSIBLE_CONTENT_TYPE_REGEX: () => import_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX,
20
21
  compress: () => compress
21
22
  });
22
23
  module.exports = __toCommonJS(compress_exports);
@@ -45,6 +46,14 @@ const selectEncoding = (header, candidates) => {
45
46
  const compress = (options) => {
46
47
  const threshold = options?.threshold ?? 1024;
47
48
  const candidates = options?.encoding ? [options.encoding] : ENCODING_TYPES;
49
+ const contentTypeFilter = options?.contentTypeFilter ?? import_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX;
50
+ const shouldCompress = typeof contentTypeFilter === "function" ? (res) => {
51
+ const type = res.headers.get("Content-Type");
52
+ return type && contentTypeFilter(type);
53
+ } : (res) => {
54
+ const type = res.headers.get("Content-Type");
55
+ return type && contentTypeFilter.test(type);
56
+ };
48
57
  return async function compress2(ctx, next) {
49
58
  await next();
50
59
  const contentLength = ctx.res.headers.get("Content-Length");
@@ -71,15 +80,12 @@ const compress = (options) => {
71
80
  }
72
81
  };
73
82
  };
74
- const shouldCompress = (res) => {
75
- const type = res.headers.get("Content-Type");
76
- return type && import_compress.COMPRESSIBLE_CONTENT_TYPE_REGEX.test(type);
77
- };
78
83
  const shouldTransform = (res) => {
79
84
  const cacheControl = res.headers.get("Cache-Control");
80
85
  return !cacheControl || !cacheControlNoTransformRegExp.test(cacheControl);
81
86
  };
82
87
  // Annotate the CommonJS export names for ESM import in node:
83
88
  0 && (module.exports = {
89
+ COMPRESSIBLE_CONTENT_TYPE_REGEX,
84
90
  compress
85
91
  });
@@ -42,7 +42,7 @@ const getFilePathWithoutDefaultDocument = (options) => {
42
42
  return;
43
43
  }
44
44
  filename = filename.replace(/^\.?[\/\\]/, "");
45
- filename = filename.replace(/\\/, "/");
45
+ filename = filename.replace(/\\/g, "/");
46
46
  root = root.replace(/\/$/, "");
47
47
  let path = root ? root + "/" + filename : filename;
48
48
  path = path.replace(/^\.?\//, "");
@@ -294,7 +294,7 @@ const convertIPv6BinaryToString = (ipV6) => {
294
294
  maxZeroEnd = 8;
295
295
  }
296
296
  }
297
- if (maxZeroStart !== -1) {
297
+ if (maxZeroStart !== -1 && maxZeroEnd - maxZeroStart > 1) {
298
298
  sections.splice(maxZeroStart, maxZeroEnd - maxZeroStart, ":");
299
299
  }
300
300
  return sections.join(":").replace(/:{2,}/g, "::");
@@ -1,5 +1,7 @@
1
1
  // src/index.ts
2
2
  import { Hono } from "./hono.js";
3
+ import { Context } from "./context.js";
3
4
  export {
5
+ Context,
4
6
  Hono
5
7
  };
@@ -24,6 +24,14 @@ var selectEncoding = (header, candidates) => {
24
24
  var compress = (options) => {
25
25
  const threshold = options?.threshold ?? 1024;
26
26
  const candidates = options?.encoding ? [options.encoding] : ENCODING_TYPES;
27
+ const contentTypeFilter = options?.contentTypeFilter ?? COMPRESSIBLE_CONTENT_TYPE_REGEX;
28
+ const shouldCompress = typeof contentTypeFilter === "function" ? (res) => {
29
+ const type = res.headers.get("Content-Type");
30
+ return type && contentTypeFilter(type);
31
+ } : (res) => {
32
+ const type = res.headers.get("Content-Type");
33
+ return type && contentTypeFilter.test(type);
34
+ };
27
35
  return async function compress2(ctx, next) {
28
36
  await next();
29
37
  const contentLength = ctx.res.headers.get("Content-Length");
@@ -50,14 +58,11 @@ var compress = (options) => {
50
58
  }
51
59
  };
52
60
  };
53
- var shouldCompress = (res) => {
54
- const type = res.headers.get("Content-Type");
55
- return type && COMPRESSIBLE_CONTENT_TYPE_REGEX.test(type);
56
- };
57
61
  var shouldTransform = (res) => {
58
62
  const cacheControl = res.headers.get("Cache-Control");
59
63
  return !cacheControl || !cacheControlNoTransformRegExp.test(cacheControl);
60
64
  };
61
65
  export {
66
+ COMPRESSIBLE_CONTENT_TYPE_REGEX,
62
67
  compress
63
68
  };