@arbol-ai/maximus 8.5.0 → 8.5.1

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.
@@ -4,7 +4,7 @@ import { n as readBodyBytes } from "./body-DOIHwIIl.js";
4
4
  import { a as operationPathParameters, r as isInputHeaderName, t as createHttpRouteResolver } from "./http-paths-D043DkJv.js";
5
5
  import { t as pathParameterSchemas } from "./http-routes-B6tCsnxB.js";
6
6
  import { b as operationScopes, d as MAX_BODY_BYTES_CEILING, f as STANDARD_CODES, t as MAX_TASK_TTL_MS, x as isNamespacedScope } from "./tasks-DYdY-dBI.js";
7
- import { c as tokenAudiences, f as hasSchemaReferences, r as checkTokenAuthority, t as createOpenApi } from "./openapi-D2rds7vy.js";
7
+ import { g as hasSchemaReferences, m as bundleSchemas, o as tokenAudiences, t as checkTokenAuthority } from "./tokens-D4gRyyPu.js";
8
8
  import { IsKind } from "typebox";
9
9
 
10
10
  // src/internal/exact-length.ts
@@ -301,12 +301,15 @@ function checkHttpExposure(name, op, routes) {
301
301
  }
302
302
  /**
303
303
  * A schema reference (TypeBox `Ref` or `Cyclic`) resolves when the OpenAPI document bundles the schemas,
304
- * to the one definition its name has. An application whose schemas refer to a name is bundled at
305
- * construction, so a reference that names no single definition is refused before the service starts rather
306
- * than when the document is first requested; schemas without references have nothing to resolve.
304
+ * to the one definition its name has. An application whose schemas refer to a name has its schemas bundled
305
+ * at construction, so a reference that names no single definition is refused before the service starts
306
+ * rather than when the document is first requested; schemas without references have nothing to resolve.
307
+ * Only the schemas are bundled: building the whole document here cost a large service's Worker hundreds of
308
+ * milliseconds of startup, past what Workers allow, and `maximus openapi --check` builds it before a deploy.
307
309
  */
308
310
  function checkSchemaReferences(manifest) {
309
- if ([...Object.values(manifest.operations).flatMap((op) => [op.input, op.output]), ...Object.values(manifest.errors.definitions).map((definition) => definition.dataSchema)].some(hasSchemaReferences)) createOpenApi(manifest);
311
+ const schemas = [...Object.values(manifest.operations).flatMap((op) => [op.input, op.output]), ...Object.values(manifest.errors.definitions).map((definition) => definition.dataSchema)];
312
+ if (schemas.some(hasSchemaReferences)) bundleSchemas(schemas, {});
310
313
  }
311
314
  /** Guides are named resources and prompts: each name safe and unique. */
312
315
  function checkGuides(guides) {
@@ -1,7 +1,7 @@
1
1
  import { f as Value, t as admitInput } from "./validation-CpzAxj2_.js";
2
2
  import { B as withoutSecrets, R as holdsSecrets } from "./schemas-_UJcx_uY.js";
3
3
  import { i as standardErrors } from "./errors-BoutSmiy.js";
4
- import { a as isAttachmentSchema, o as validAttachment } from "./define-app-CQpWqqqE.js";
4
+ import { a as isAttachmentSchema, o as validAttachment } from "./define-app-CvTei9a8.js";
5
5
  import { b as operationScopes, c as ADMISSION_CODES, f as STANDARD_CODES, l as BODY_CODES, v as operationMatchesScopes, y as operationOutputLimit } from "./tasks-DYdY-dBI.js";
6
6
  import { t as err } from "./result-CF4OzG9O.js";
7
7
  import { t as sha256Hex } from "./digest-C51F1bhA.js";
@@ -1,4 +1,4 @@
1
- import { u as usesOwnBearer, v as usesCloudflareAccess } from "./openapi-D2rds7vy.js";
1
+ import { f as usesCloudflareAccess, l as usesOwnBearer } from "./tokens-D4gRyyPu.js";
2
2
 
3
3
  // src/internal/http-layout.ts
4
4
  /**