@classytic/arc 2.19.0 → 2.21.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.
Files changed (139) hide show
  1. package/README.md +1 -1
  2. package/bin/arc.js +37 -0
  3. package/dist/{BaseController-Dy6EQHjM.mjs → BaseController-BnLYgE9A.mjs} +4 -4
  4. package/dist/{EventTransport-IEn7Tn-Q.d.mts → EventTransport-QmY7A258.d.mts} +0 -1
  5. package/dist/{QueryCache-TRfXau3W.d.mts → QueryCache-Z1B38koh.d.mts} +0 -1
  6. package/dist/{ResourceRegistry-5fKZwhK_.mjs → ResourceRegistry-7RnrEWNP.mjs} +1 -1
  7. package/dist/{actionPermissions-D7NGwcAR.mjs → actionPermissions-ze70xXJi.mjs} +1 -1
  8. package/dist/audit/index.d.mts +9 -5
  9. package/dist/audit/index.mjs +1 -1
  10. package/dist/auth/audit.d.mts +7 -4
  11. package/dist/auth/audit.mjs +5 -0
  12. package/dist/auth/index.d.mts +7 -14
  13. package/dist/auth/index.mjs +7 -5
  14. package/dist/auth/redis-session.d.mts +1 -2
  15. package/dist/{buildHandler-B0qvAguf.mjs → buildHandler-D_2ULWxZ.mjs} +3 -3
  16. package/dist/cache/index.d.mts +2 -3
  17. package/dist/cache/index.mjs +2 -2
  18. package/dist/cli/commands/describe.d.mts +1 -2
  19. package/dist/cli/commands/describe.mjs +2 -2
  20. package/dist/cli/commands/docs.mjs +2 -2
  21. package/dist/cli/commands/generate.mjs +1 -1
  22. package/dist/cli/commands/init.mjs +1 -1
  23. package/dist/cli/commands/introspect.mjs +4 -13
  24. package/dist/cli/index.mjs +2 -2
  25. package/dist/{constants-gaEeMlz-.mjs → constants-DNre0wRg.mjs} +1 -1
  26. package/dist/context/index.d.mts +2 -2
  27. package/dist/core/index.d.mts +3 -3
  28. package/dist/core/index.mjs +5 -5
  29. package/dist/{core-Ba-6Sue6.mjs → core-DZ6Xe1jR.mjs} +182 -55
  30. package/dist/{createActionRouter-B_WzBFyf.mjs → createActionRouter-BWMDW-dL.mjs} +4 -4
  31. package/dist/{createAggregationRouter-B_G_nIjm.mjs → createAggregationRouter-l5mNdYrZ.mjs} +5 -4
  32. package/dist/{createApp--703hQE1.mjs → createApp-Bi61XxqU.mjs} +229 -24
  33. package/dist/discovery/index.d.mts +0 -1
  34. package/dist/docs/index.d.mts +1 -2
  35. package/dist/docs/index.mjs +1 -1
  36. package/dist/{elevation-xGUBq6p_.d.mts → elevation-C9s5hFP_.d.mts} +0 -1
  37. package/dist/encryption/index.d.mts +2 -144
  38. package/dist/{errorHandler-BtUUDPEa.d.mts → errorHandler-B0e-bq-O.d.mts} +0 -1
  39. package/dist/{errors-DOHkjQlD.d.mts → errors-DHcHVAgk.d.mts} +0 -1
  40. package/dist/{eventPlugin-DbBFd3x_.d.mts → eventPlugin-A6EbthXR.d.mts} +10 -6
  41. package/dist/events/index.d.mts +9 -6
  42. package/dist/events/index.mjs +9 -6
  43. package/dist/events/transports/redis-stream-entry.d.mts +1 -1
  44. package/dist/events/transports/redis.d.mts +1 -2
  45. package/dist/factory/index.d.mts +5 -4
  46. package/dist/factory/index.mjs +3 -3
  47. package/dist/{fastify-augmentation-D-5_yQJi.d.mts → fastify-augmentation-DafigGQp.d.mts} +12 -2
  48. package/dist/{fields-C7ahdGYf.d.mts → fields-BGqrAa_u.d.mts} +1 -2
  49. package/dist/{generate-Brans3fW.mjs → generate-usRSdQmP.mjs} +4 -3
  50. package/dist/hooks/index.d.mts +1 -1
  51. package/dist/idempotency/index.d.mts +4 -3
  52. package/dist/idempotency/index.mjs +1 -1
  53. package/dist/idempotency/redis.d.mts +1 -1
  54. package/dist/{index-CP6A1Ffj.d.mts → index-B5N-NaHs.d.mts} +88 -7
  55. package/dist/{index-CRKiiP5o.d.mts → index-B5PoNbfu.d.mts} +41 -7
  56. package/dist/{index-CUTG2Cuo.d.mts → index-Dtrj6XZk.d.mts} +90 -29
  57. package/dist/index.d.mts +7 -7
  58. package/dist/index.mjs +7 -7
  59. package/dist/{init-Bqpt1Hxf.mjs → init-0YhHkXGk.mjs} +239 -140
  60. package/dist/integrations/event-gateway.d.mts +2 -3
  61. package/dist/integrations/index.d.mts +2 -2
  62. package/dist/integrations/jobs.d.mts +0 -1
  63. package/dist/integrations/mcp/index.d.mts +6 -7
  64. package/dist/integrations/mcp/index.mjs +1 -1
  65. package/dist/integrations/mcp/testing.d.mts +1 -2
  66. package/dist/integrations/mcp/testing.mjs +1 -1
  67. package/dist/integrations/streamline.d.mts +19 -7
  68. package/dist/integrations/streamline.mjs +9 -5
  69. package/dist/integrations/webhooks.d.mts +0 -1
  70. package/dist/integrations/websocket-pushref-redis.d.mts +1 -2
  71. package/dist/integrations/websocket-redis.d.mts +1 -2
  72. package/dist/integrations/websocket.d.mts +2 -2
  73. package/dist/{loadResources-B8UmpITt.mjs → loadResources-DpU8pfjV.mjs} +4 -3
  74. package/dist/{loadResourcesFromEntry-BTlFEx05.mjs → loadResourcesFromEntry-OMCvIEE7.mjs} +1 -1
  75. package/dist/{mcpPlugin-C088Nd-G.mjs → mcpPlugin-B9XjjNVG.mjs} +148 -49
  76. package/dist/middleware/index.d.mts +1 -2
  77. package/dist/middleware/index.mjs +1 -1
  78. package/dist/module-WeuU5jfd.d.mts +429 -0
  79. package/dist/{openapi-DZ-5a5Op.mjs → openapi-Kyod_di6.mjs} +3 -3
  80. package/dist/permissions/index.d.mts +3 -3
  81. package/dist/permissions/index.mjs +2 -2
  82. package/dist/{permissions-BPB1xqGf.mjs → permissions-BJMuKMl7.mjs} +43 -3
  83. package/dist/pipeline/index.d.mts +1 -2
  84. package/dist/plugins/index.d.mts +87 -10
  85. package/dist/plugins/index.mjs +91 -4
  86. package/dist/plugins/response-cache.d.mts +5 -3
  87. package/dist/plugins/tracing-entry.d.mts +1 -1
  88. package/dist/plugins/tracing-entry.mjs +1 -1
  89. package/dist/{pluralize-DccFV9R7.mjs → pluralize-BhrgwZb9.mjs} +3 -3
  90. package/dist/presets/filesUpload.d.mts +4 -5
  91. package/dist/presets/filesUpload.mjs +1 -1
  92. package/dist/presets/index.d.mts +16 -3
  93. package/dist/presets/index.mjs +1 -1
  94. package/dist/presets/multiTenant.d.mts +1 -2
  95. package/dist/presets/multiTenant.mjs +1 -1
  96. package/dist/presets/search.d.mts +2 -3
  97. package/dist/presets/search.mjs +3 -2
  98. package/dist/{presets-BtyFwTO4.mjs → presets-gw0ciIUD.mjs} +1 -1
  99. package/dist/{pushref-registry-DnCqL3aa.d.mts → pushref-registry-BbcnpNTm.d.mts} +4 -2
  100. package/dist/{queryCachePlugin-xzFyKAjT.d.mts → queryCachePlugin-CfYWq-Ak.d.mts} +1 -2
  101. package/dist/{queryCachePlugin-emHb0CuX.mjs → queryCachePlugin-DzqLN904.mjs} +2 -2
  102. package/dist/{redis-C3W0qbz8.d.mts → redis-UDtLaNj6.d.mts} +0 -1
  103. package/dist/{redis-stream-DsP1vqZB.d.mts → redis-stream-iVR2l7aS.d.mts} +1 -2
  104. package/dist/{registerRoute-BdV8DDwU.mjs → registerRoute-oGAl0oA8.mjs} +1 -1
  105. package/dist/registry/index.d.mts +2 -2
  106. package/dist/registry/index.mjs +2 -2
  107. package/dist/{registry-Bm9LjWKs.mjs → registry-vcOCtPij.mjs} +1 -1
  108. package/dist/{schemaIR-D1MJwqmp.mjs → schemaIR-ajetw3Fv.mjs} +1 -42
  109. package/dist/schemas/index.d.mts +0 -1
  110. package/dist/scim/index.d.mts +0 -1
  111. package/dist/scim/index.mjs +2 -2
  112. package/dist/scope/index.d.mts +2 -3
  113. package/dist/{sessionManager-BXG-HGwG.d.mts → sessionManager-BHOM3N_0.d.mts} +10 -6
  114. package/dist/{storage-Co_PQpeQ.d.mts → storage-DLUZ04kK.d.mts} +8 -4
  115. package/dist/sync/changelog.d.mts +2 -0
  116. package/dist/sync/changelog.mjs +2 -0
  117. package/dist/testing/index.d.mts +2 -3
  118. package/dist/testing/index.mjs +6 -3
  119. package/dist/testing/storageContract.d.mts +1 -2
  120. package/dist/{tracing-D8jlGXP7.d.mts → tracing-CsGKQJGg.d.mts} +0 -1
  121. package/dist/types/index.d.mts +4 -4
  122. package/dist/types/storage.d.mts +1 -1
  123. package/dist/types-Cc91nXuA.d.mts +132 -0
  124. package/dist/{types-LNebCoJx.d.mts → types-DH0GupI7.d.mts} +8 -4
  125. package/dist/{types-DpvSF5Hh.d.mts → types-DRj-Ut4n.d.mts} +1 -2
  126. package/dist/{types-9_wtNPsI.d.mts → types-DpxoNX5v.d.mts} +112 -214
  127. package/dist/utils/index.d.mts +182 -128
  128. package/dist/utils/index.mjs +2 -2
  129. package/dist/{utils-C6QQ9-hd.mjs → utils-CO8a3B_1.mjs} +1435 -1391
  130. package/dist/{validate-CRcaWzp2.mjs → validate-C2mGgSXg.mjs} +3 -3
  131. package/dist/{versioning-D_eBCfNr.d.mts → versioning-DQ4mCvg0.d.mts} +1 -2
  132. package/dist/{websocket-MlYlrYq0.d.mts → websocket-uuWqM6UY.d.mts} +5 -4
  133. package/package.json +18 -13
  134. package/skills/arc/SKILL.md +10 -0
  135. package/skills/arc/references/mcp.md +2 -0
  136. package/skills/arc-module-publishing/SKILL.md +242 -0
  137. package/skills/arc-module-publishing/references/authoring-modules.md +272 -0
  138. package/skills/arc-module-publishing/references/package-manifest.md +155 -0
  139. package/skills/arc-module-publishing/references/publishing-workflow.md +182 -0
package/README.md CHANGED
@@ -126,7 +126,7 @@ export default defineResource({
126
126
  });
127
127
  ```
128
128
 
129
- Auto-generates: `GET /products`, `GET /products/:id`, `POST /products`, `PATCH /products/:id`, `DELETE /products/:id` + softDelete adds `GET /products/deleted`, `POST /products/:id/restore` + slugLookup adds `GET /products/by-slug/:slug` + custom routes + `POST /products/:id/action`.
129
+ Auto-generates: `GET /products`, `GET /products/:id`, `POST /products`, `PATCH /products/:id`, `DELETE /products/:id` + softDelete adds `GET /products/deleted`, `POST /products/:id/restore` + slugLookup adds `GET /products/slug/:slug` + custom routes + `POST /products/:id/action`.
130
130
 
131
131
  ### Resource shorthands
132
132
 
package/bin/arc.js CHANGED
@@ -60,8 +60,30 @@ if (args.length === 0 || args.includes('--help') || args.includes('-h')) {
60
60
 
61
61
  const [command, subcommand, ...rest] = args;
62
62
 
63
+ // Per-command usage — `arc <command> --help` prints this instead of falling
64
+ // through to the command (where `--help` was mistaken for an argument).
65
+ const COMMAND_ALIASES = { new: 'init', g: 'generate', i: 'introspect', desc: 'describe', d: 'docs' };
66
+ const COMMAND_HELP = {
67
+ init: 'Usage: arc init [name] [--jwt|--better-auth] [--mongokit|--custom] [--api-key]\n [--multi|--single] [--js] [--edge] [--docker|--no-docker] [--skip-install] [--force]\n Scaffold a new arc project (prompts when run in a TTY without a name).',
68
+ generate: 'Usage: arc generate <resource|controller|model|repository|schemas|mcp> <name> [--mcp]\n Aliases: g; types r/c/m/repo/s. Name must be kebab-case (letters, digits, hyphens).',
69
+ introspect: 'Usage: arc introspect <entry-file>\n Print a human-readable summary of the resources an entry file exports.',
70
+ describe: 'Usage: arc describe <entry-file> [--json] [--pretty] [--entry <file>]\n Describe resources; --json emits machine output for AI agents.',
71
+ docs: 'Usage: arc docs <entry-file> [output.json] [--entry <file>]\n Export the generated OpenAPI document.',
72
+ doctor: 'Usage: arc doctor\n Diagnose common arc setup issues (exit 1 on hard failures).',
73
+ };
74
+
63
75
  async function main() {
64
76
  try {
77
+ // `arc <command> --help` / `-h` → command-specific usage, exit 0.
78
+ const canonicalCommand = COMMAND_ALIASES[command] ?? command;
79
+ if (
80
+ COMMAND_HELP[canonicalCommand] &&
81
+ [subcommand, ...rest].some((a) => a === '--help' || a === '-h')
82
+ ) {
83
+ console.log(COMMAND_HELP[canonicalCommand]);
84
+ return;
85
+ }
86
+
65
87
  switch (command) {
66
88
  case 'init':
67
89
  case 'new':
@@ -310,6 +332,21 @@ function parseInitOptions(rawArgs) {
310
332
  case '-f':
311
333
  opts.force = true;
312
334
  break;
335
+
336
+ case '--help':
337
+ case '-h':
338
+ // Handled by the per-command help short-circuit in main(); ignore here.
339
+ break;
340
+
341
+ default:
342
+ // Surface typos instead of silently scaffolding with defaults — a
343
+ // dropped `--jwt` / `--mongokit` would change the whole project. Warn
344
+ // (non-fatal, to stderr) rather than error, since a scaffolder should
345
+ // stay forgiving.
346
+ if (arg.startsWith('-')) {
347
+ console.error(`Warning: unknown flag "${arg}" (ignored). Run "arc init --help".`);
348
+ }
349
+ break;
313
350
  }
314
351
  }
315
352
 
@@ -1,11 +1,11 @@
1
- import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-gaEeMlz-.mjs";
1
+ import { h as SYSTEM_FIELDS, o as DEFAULT_TENANT_FIELD } from "./constants-DNre0wRg.mjs";
2
2
  import { arcLog } from "./logger/index.mjs";
3
3
  import { d as createDomainError, f as createError, i as NotFoundError, r as ForbiddenError } from "./errors-DkO8Nk6-.mjs";
4
4
  import { b as isElevated, c as getOrgId, n as PUBLIC_SCOPE, x as isMember } from "./types-bHblZ9YN.mjs";
5
- import { M as scheduleBackground, N as simpleEqualityMatcher, j as getUserId, k as ArcQueryParser } from "./utils-C6QQ9-hd.mjs";
6
- import { t as buildQueryKey } from "./keys-Cd316u_y.mjs";
7
- import { F as applyFieldWritePermissions, L as resolveEffectiveRoles } from "./permissions-BPB1xqGf.mjs";
5
+ import { F as simpleEqualityMatcher, _ as ArcQueryParser, r as scheduleBackground, t as getUserId } from "./utils-CO8a3B_1.mjs";
6
+ import { I as applyFieldWritePermissions, R as resolveEffectiveRoles } from "./permissions-BJMuKMl7.mjs";
8
7
  import { t as getUserRoles } from "./types-XTApa8b6.mjs";
8
+ import { t as buildQueryKey } from "./keys-Cd316u_y.mjs";
9
9
  //#region src/core/AccessControl.ts
10
10
  const log = arcLog("access-control");
11
11
  var AccessControl = class {
@@ -1,5 +1,4 @@
1
1
  import { DeadLetteredEvent, DomainEvent, DomainEvent as DomainEvent$1, EventHandler, EventHandler as EventHandler$1, EventLogger, EventLogger as EventLogger$1, EventTransport, EventTransport as EventTransport$1, PublishManyResult } from "@classytic/primitives/events";
2
-
3
2
  //#region src/events/EventTransport.d.ts
4
3
  interface MemoryEventTransportOptions {
5
4
  /** Logger for error/warning messages (default: console) */
@@ -1,5 +1,4 @@
1
1
  import { r as CacheStore } from "./interface-C1_WLTMK.mjs";
2
-
3
2
  //#region src/cache/QueryCache.d.ts
4
3
  /** Metadata wrapper stored in CacheStore */
5
4
  interface CacheEnvelope<T = unknown> {
@@ -1,4 +1,4 @@
1
- import "./constants-gaEeMlz-.mjs";
1
+ import "./constants-DNre0wRg.mjs";
2
2
  //#region src/registry/ResourceRegistry.ts
3
3
  /**
4
4
  * Resource Registry
@@ -1,5 +1,5 @@
1
1
  import { b as isElevated, c as getOrgId, g as getUserId, n as PUBLIC_SCOPE, x as isMember } from "./types-bHblZ9YN.mjs";
2
- import { L as resolveEffectiveRoles, P as applyFieldReadPermissions } from "./permissions-BPB1xqGf.mjs";
2
+ import { F as applyFieldReadPermissions, R as resolveEffectiveRoles } from "./permissions-BJMuKMl7.mjs";
3
3
  import { t as getUserRoles } from "./types-XTApa8b6.mjs";
4
4
  import { t as executePipeline } from "./pipe-BOLmGIxa.mjs";
5
5
  import { isPaginatedResult, toCanonicalList } from "@classytic/repo-core/pagination";
@@ -1,7 +1,7 @@
1
- import { d as UserBase } from "../fields-C7ahdGYf.mjs";
1
+ import "../index-Dtrj6XZk.mjs";
2
+ import { d as UserBase } from "../fields-BGqrAa_u.mjs";
2
3
  import { FastifyPluginAsync } from "fastify";
3
4
  import { RepositoryLike } from "@classytic/repo-core/adapter";
4
-
5
5
  //#region src/audit/stores/interface.d.ts
6
6
  type AuditAction = "create" | "update" | "delete" | "restore" | "custom";
7
7
  interface AuditEntry {
@@ -126,7 +126,9 @@ interface AuditPluginOptions {
126
126
  * Set `purgeIntervalMs: 0` to skip the timer (manual purge only).
127
127
  */
128
128
  retention?: {
129
- /** Max entry age in ms. Entries with `timestamp < now - maxAgeMs` are purged. */maxAgeMs: number; /** Interval between purges in ms. Default 86_400_000 (24h). 0 disables the timer. */
129
+ /** Max entry age in ms. Entries with `timestamp < now - maxAgeMs` are purged. */
130
+ maxAgeMs: number;
131
+ /** Interval between purges in ms. Default 86_400_000 (24h). 0 disables the timer. */
130
132
  purgeIntervalMs?: number;
131
133
  };
132
134
  /**
@@ -159,8 +161,10 @@ interface AuditPluginOptions {
159
161
  * - `false`: Disable auto-audit (manual `fastify.audit.*()` calls only)
160
162
  */
161
163
  autoAudit?: boolean | {
162
- operations?: ("create" | "update" | "delete")[]; /** Allowlist — only listed resources are audited (mutually exclusive with exclude) */
163
- include?: string[]; /** Denylist — audit everything except listed resources */
164
+ operations?: ("create" | "update" | "delete")[];
165
+ /** Allowlist — only listed resources are audited (mutually exclusive with exclude) */
166
+ include?: string[];
167
+ /** Denylist — audit everything except listed resources */
164
168
  exclude?: string[];
165
169
  /**
166
170
  * Per-resource opt-in mode: only audit resources with `audit: true` in their
@@ -108,7 +108,7 @@ function extractUserId(user) {
108
108
  */
109
109
  function detectChanges(before, after) {
110
110
  const changes = [];
111
- const allKeys = new Set([...Object.keys(before), ...Object.keys(after)]);
111
+ const allKeys = /* @__PURE__ */ new Set([...Object.keys(before), ...Object.keys(after)]);
112
112
  for (const key of allKeys) {
113
113
  if (key.startsWith("_") || key === "updatedAt") continue;
114
114
  if (JSON.stringify(before[key]) !== JSON.stringify(after[key])) changes.push(key);
@@ -1,5 +1,4 @@
1
1
  import { FastifyInstance } from "fastify";
2
-
3
2
  //#region src/auth/audit.d.ts
4
3
  /**
5
4
  * Canonical auth event names emitted by the bridge. Hosts pattern-match
@@ -143,9 +142,13 @@ interface BetterAuthAuditBridge {
143
142
  * is called again. Useful for Prometheus exporters that scrape periodically.
144
143
  */
145
144
  getStats(): {
146
- /** Events buffered during pre-`attach` phase that were dropped due to `bufferSize` overflow. */droppedFromBuffer: number; /** Events that reached `app.audit.custom(...)` but threw (audit store failure). */
147
- dispatchFailures: number; /** Total `dispatch` calls — useful to verify BA is actually invoking the bridge's hooks. */
148
- dispatchAttempts: number; /** Events currently buffered awaiting `attach`. */
145
+ /** Events buffered during pre-`attach` phase that were dropped due to `bufferSize` overflow. */
146
+ droppedFromBuffer: number;
147
+ /** Events that reached `app.audit.custom(...)` but threw (audit store failure). */
148
+ dispatchFailures: number;
149
+ /** Total `dispatch` calls — useful to verify BA is actually invoking the bridge's hooks. */
150
+ dispatchAttempts: number;
151
+ /** Events currently buffered awaiting `attach`. */
149
152
  pendingBuffered: number;
150
153
  };
151
154
  }
@@ -100,6 +100,11 @@ const ENDPOINT_TO_EVENT = [
100
100
  test: /\/api-key\/delete\b/,
101
101
  phase: "after",
102
102
  name: "apikey.delete"
103
+ },
104
+ {
105
+ test: /\/sign-out\b/,
106
+ phase: "after",
107
+ name: "session.delete"
103
108
  }
104
109
  ];
105
110
  function classifyEndpoint(phase, ctx) {
@@ -1,9 +1,8 @@
1
- import { Ht as AuthPluginOptions, Vt as AuthHelpers } from "../index-CUTG2Cuo.mjs";
2
- import { c as PermissionCheck } from "../fields-C7ahdGYf.mjs";
1
+ import { Ht as AuthPluginOptions, Vt as AuthHelpers } from "../index-Dtrj6XZk.mjs";
2
+ import { c as PermissionCheck } from "../fields-BGqrAa_u.mjs";
3
3
  import { t as ExternalOpenApiPaths } from "../externalPaths-BE6wFpYv.mjs";
4
- import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-BXG-HGwG.mjs";
4
+ import { a as SessionManagerOptions, c as createSessionManager, i as SessionData, n as MemorySessionStoreOptions, o as SessionManagerResult, r as SessionCookieOptions, s as SessionStore, t as MemorySessionStore } from "../sessionManager-BHOM3N_0.mjs";
5
5
  import { FastifyPluginAsync, FastifyReply as FastifyReply$1, FastifyRequest } from "fastify";
6
-
7
6
  //#region src/auth/authPlugin.d.ts
8
7
  declare module "fastify" {
9
8
  interface FastifyInstance {
@@ -17,14 +16,6 @@ declare module "fastify" {
17
16
  auth: AuthHelpers;
18
17
  }
19
18
  }
20
- /**
21
- * Extract Bearer token from Authorization header.
22
- *
23
- * Exported for property-based test coverage — the contract is:
24
- * - header must start with exactly `"Bearer "` (case-sensitive, one space)
25
- * - everything after that prefix is returned verbatim (no trim, no parse)
26
- * - missing header → `null`; any other shape → `null`
27
- */
28
19
  declare const authPlugin: FastifyPluginAsync<AuthPluginOptions>;
29
20
  declare const _default: FastifyPluginAsync<AuthPluginOptions>;
30
21
  //#endregion
@@ -177,8 +168,10 @@ interface BetterAuthOpenApiOptions {
177
168
  */
178
169
  userFields?: Record<string, {
179
170
  type: string;
180
- description?: string; /** Whether this field is required in sign-up (default: false) */
181
- required?: boolean; /** Whether this field is accepted in request body (default: true). Set false for output-only fields. */
171
+ description?: string;
172
+ /** Whether this field is required in sign-up (default: false) */
173
+ required?: boolean;
174
+ /** Whether this field is accepted in request body (default: true). Set false for output-only fields. */
182
175
  input?: boolean;
183
176
  }>;
184
177
  }
@@ -1,5 +1,5 @@
1
1
  import { d as createDomainError, l as UnauthorizedError, p as isArcError, t as ArcError } from "../errors-DkO8Nk6-.mjs";
2
- import { _ as requireTeamMembership, m as requireOrgRole, p as requireOrgMembership } from "../permissions-BPB1xqGf.mjs";
2
+ import { h as requireOrgRole, m as requireOrgMembership, v as requireTeamMembership } from "../permissions-BJMuKMl7.mjs";
3
3
  import { n as normalizeRoles, t as getUserRoles } from "../types-XTApa8b6.mjs";
4
4
  import { a as toJsonSchema } from "../schemaConverter-U0MnO9vd.mjs";
5
5
  import { createHmac, randomUUID, timingSafeEqual } from "node:crypto";
@@ -1054,7 +1054,7 @@ var MemorySessionStore = class {
1054
1054
  const userSessions = this.userIndex.get(userId);
1055
1055
  if (!userSessions) return;
1056
1056
  for (const sessionId of userSessions) if (sessionId !== currentSessionId) this.sessions.delete(sessionId);
1057
- if (userSessions.has(currentSessionId)) this.userIndex.set(userId, new Set([currentSessionId]));
1057
+ if (userSessions.has(currentSessionId)) this.userIndex.set(userId, /* @__PURE__ */ new Set([currentSessionId]));
1058
1058
  else this.userIndex.delete(userId);
1059
1059
  }
1060
1060
  /**
@@ -1160,9 +1160,10 @@ function createSessionManager(options) {
1160
1160
  metadata
1161
1161
  };
1162
1162
  await store.set(sessionId, sessionData);
1163
+ const signedId = signSessionId(sessionId, secret);
1163
1164
  return {
1164
1165
  sessionId,
1165
- cookie: buildSetCookieHeader(cookieName, signSessionId(sessionId, secret), maxAgeSeconds, cookieOptions)
1166
+ cookie: buildSetCookieHeader(cookieName, signedId, maxAgeSeconds, cookieOptions)
1166
1167
  };
1167
1168
  }
1168
1169
  /**
@@ -1257,7 +1258,8 @@ function createSessionManager(options) {
1257
1258
  if (Date.now() - session.updatedAt > updateAgeMs) {
1258
1259
  const updatedSession = await refreshSession(sessionId);
1259
1260
  if (updatedSession) {
1260
- const newCookie = buildSetCookieHeader(cookieName, signSessionId(sessionId, secret), maxAgeSeconds, cookieOptions);
1261
+ const signedId = signSessionId(sessionId, secret);
1262
+ const newCookie = buildSetCookieHeader(cookieName, signedId, maxAgeSeconds, cookieOptions);
1261
1263
  reply.header("Set-Cookie", newCookie);
1262
1264
  request.session = {
1263
1265
  ...updatedSession,
@@ -1300,7 +1302,7 @@ function mirrorTrustedOriginsFromCors(options) {
1300
1302
  const { corsOrigins, canonicalUrl } = options;
1301
1303
  if (corsOrigins === true) return ["*"];
1302
1304
  if (!corsOrigins) return [canonicalUrl];
1303
- return Array.from(new Set([canonicalUrl, ...corsOrigins]));
1305
+ return Array.from(/* @__PURE__ */ new Set([canonicalUrl, ...corsOrigins]));
1304
1306
  }
1305
1307
  //#endregion
1306
1308
  export { MemorySessionStore, authPlugin_default as authPlugin, authPlugin as authPluginFn, createBetterAuthAdapter, createSessionManager, extractBetterAuthOpenApi, mirrorTrustedOriginsFromCors };
@@ -1,5 +1,4 @@
1
- import { i as SessionData, s as SessionStore } from "../sessionManager-BXG-HGwG.mjs";
2
-
1
+ import { i as SessionData, s as SessionStore } from "../sessionManager-BHOM3N_0.mjs";
3
2
  //#region src/auth/redis-session.d.ts
4
3
  /** Minimal Redis client interface — compatible with ioredis */
5
4
  interface RedisLike {
@@ -1,4 +1,4 @@
1
- import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-CRcaWzp2.mjs";
1
+ import { i as compileAggRequest, t as adapterSupportsAggregate } from "./validate-C2mGgSXg.mjs";
2
2
  //#region src/core/aggregation/buildHandler.ts
3
3
  /**
4
4
  * Framework-agnostic aggregation execution. Runs safety guards,
@@ -193,7 +193,7 @@ const OPERATOR_SHORTHAND = {
193
193
  size: "$size",
194
194
  type: "$type"
195
195
  };
196
- const SHORTHAND_RANGE_OPS = new Set([
196
+ const SHORTHAND_RANGE_OPS = /* @__PURE__ */ new Set([
197
197
  "gt",
198
198
  "gte",
199
199
  "lt",
@@ -239,7 +239,7 @@ function expandShorthandOperators(value) {
239
239
  */
240
240
  function extractCallerFilter(query) {
241
241
  const out = {};
242
- const reserved = new Set([
242
+ const reserved = /* @__PURE__ */ new Set([
243
243
  "page",
244
244
  "limit",
245
245
  "after",
@@ -1,7 +1,6 @@
1
1
  import { n as CacheStats, r as CacheStore, t as CacheLogger } from "../interface-C1_WLTMK.mjs";
2
- import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-TRfXau3W.mjs";
3
- import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-xzFyKAjT.mjs";
4
-
2
+ import { a as QueryCacheConfig, i as QueryCache, n as CacheResult, r as CacheStatus, t as CacheEnvelope } from "../QueryCache-Z1B38koh.mjs";
3
+ import { i as queryCachePlugin, n as QueryCacheDefaults, r as QueryCachePluginOptions, t as CrossResourceRule } from "../queryCachePlugin-CfYWq-Ak.mjs";
5
4
  //#region src/cache/keys.d.ts
6
5
  /**
7
6
  * Cache Key Utilities
@@ -1,6 +1,6 @@
1
- import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-Cd316u_y.mjs";
2
1
  import { t as MemoryCacheStore } from "../memory-CLXA2VeJ.mjs";
3
- import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-emHb0CuX.mjs";
2
+ import { i as versionKey, n as hashParams, r as tagVersionKey, t as buildQueryKey } from "../keys-Cd316u_y.mjs";
3
+ import { r as QueryCache, t as queryCachePlugin } from "../queryCachePlugin-DzqLN904.mjs";
4
4
  //#region src/cache/redis.ts
5
5
  /**
6
6
  * Redis-backed cache store.
@@ -1,5 +1,4 @@
1
- import { V as ResourceDefinition, ht as RouteSchemaOptions, it as RateLimitConfig } from "../../index-CUTG2Cuo.mjs";
2
-
1
+ import { V as ResourceDefinition, ht as RouteSchemaOptions, it as RateLimitConfig } from "../../index-Dtrj6XZk.mjs";
3
2
  //#region src/cli/commands/describe.d.ts
4
3
  interface DescribedResource {
5
4
  name: string;
@@ -1,5 +1,5 @@
1
- import { t as CRUD_OPERATIONS } from "../../constants-gaEeMlz-.mjs";
2
- import { n as stringifyMeasureMap } from "../../ResourceRegistry-5fKZwhK_.mjs";
1
+ import { t as CRUD_OPERATIONS } from "../../constants-DNre0wRg.mjs";
2
+ import { n as stringifyMeasureMap } from "../../ResourceRegistry-7RnrEWNP.mjs";
3
3
  import { resolve } from "node:path";
4
4
  import { pathToFileURL } from "node:url";
5
5
  //#region src/cli/commands/describe.ts
@@ -1,5 +1,5 @@
1
- import { t as buildOpenApiSpec } from "../../openapi-DZ-5a5Op.mjs";
2
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BTlFEx05.mjs";
1
+ import { t as buildOpenApiSpec } from "../../openapi-Kyod_di6.mjs";
2
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-OMCvIEE7.mjs";
3
3
  import { dirname, resolve } from "node:path";
4
4
  import { mkdirSync, writeFileSync } from "node:fs";
5
5
  //#region src/cli/commands/docs.ts
@@ -1,2 +1,2 @@
1
- import { t as generate } from "../../generate-Brans3fW.mjs";
1
+ import { t as generate } from "../../generate-usRSdQmP.mjs";
2
2
  export { generate };
@@ -1,2 +1,2 @@
1
- import { t as init } from "../../init-Bqpt1Hxf.mjs";
1
+ import { t as init } from "../../init-0YhHkXGk.mjs";
2
2
  export { init };
@@ -1,4 +1,4 @@
1
- import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-BTlFEx05.mjs";
1
+ import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-OMCvIEE7.mjs";
2
2
  //#region src/cli/commands/introspect.ts
3
3
  function describePermission(value) {
4
4
  if (!value) return "none";
@@ -10,19 +10,10 @@ function describePermission(value) {
10
10
  async function introspect(args) {
11
11
  console.log("Introspecting Arc resources...\n");
12
12
  const entryPath = args[0];
13
- if (!entryPath) {
14
- console.log("Usage: arc introspect <entry-file>\n");
15
- console.log("Where entry-file exports your defineResource() results.");
16
- console.log("Example: arc introspect ./src/resources.js");
17
- return;
18
- }
13
+ if (!entryPath) throw new Error("Missing entry-file argument\nUsage: arc introspect <entry-file>\nWhere entry-file exports your defineResource() results.\nExample: arc introspect ./src/resources.js");
19
14
  const { registry, registered } = await loadResourcesFromEntry(entryPath);
20
- if (registered === 0) {
21
- console.log("No resource definitions found in entry file.");
22
- console.log("\nMake sure your file exports defineResource() results:");
23
- console.log(" export const productResource = defineResource({ ... });");
24
- return;
25
- }
15
+ if (registered === 0) throw new Error(`No resource definitions found in "${entryPath}".\nMake sure the file exports defineResource() results:
16
+ export const productResource = defineResource({ ... });`);
26
17
  const resources = registry.getAll();
27
18
  console.log(`Found ${resources.length} resource(s):\n`);
28
19
  resources.forEach((resource, index) => {
@@ -1,7 +1,7 @@
1
1
  import { describe } from "./commands/describe.mjs";
2
2
  import { exportDocs } from "./commands/docs.mjs";
3
3
  import { doctor } from "./commands/doctor.mjs";
4
- import { t as generate } from "../generate-Brans3fW.mjs";
5
- import { t as init } from "../init-Bqpt1Hxf.mjs";
4
+ import { t as generate } from "../generate-usRSdQmP.mjs";
5
+ import { t as init } from "../init-0YhHkXGk.mjs";
6
6
  import { introspect } from "./commands/introspect.mjs";
7
7
  export { describe, doctor, exportDocs, generate, init, introspect };
@@ -73,7 +73,7 @@ const MAX_FILTER_DEPTH = 10;
73
73
  * filter. See `ArcQueryParser.parseFilters()` for the unwrap step that
74
74
  * merges `q.filter[*]` back into the top-level filter map.
75
75
  */
76
- const RESERVED_QUERY_PARAMS = Object.freeze(new Set([
76
+ const RESERVED_QUERY_PARAMS = Object.freeze(/* @__PURE__ */ new Set([
77
77
  "page",
78
78
  "limit",
79
79
  "sort",
@@ -1,5 +1,4 @@
1
1
  import { AsyncLocalStorage } from "node:async_hooks";
2
-
3
2
  //#region src/context/requestContext.d.ts
4
3
  /**
5
4
  * Shape of the request-scoped context store.
@@ -104,7 +103,8 @@ declare const transactionContext: {
104
103
  * Get the current DB session, or `undefined` if not inside a
105
104
  * `transactionContext.run(...)` scope.
106
105
  */
107
- get(): DbSession | undefined; /** The underlying AsyncLocalStorage instance. Exposed for advanced integrations. */
106
+ get(): DbSession | undefined;
107
+ /** The underlying AsyncLocalStorage instance. Exposed for advanced integrations. */
108
108
  storage: AsyncLocalStorage<unknown>;
109
109
  };
110
110
  //#endregion
@@ -1,3 +1,3 @@
1
- import { At as AggregationMaterializedResult, B as defineResource, Bn as BodySanitizerConfig, Ct as AggMeasureInput, Dt as AggregationDateRangeRequirement, Et as AggregationConfig, Fn as BaseControllerOptions, In as ControllerConfigurableOptions, Ln as ControllerConstructionOptions, Mt as AggregationsMap, Ot as AggregationIndexHint, Rn as ListResult, Tt as AggregationCacheConfig, V as ResourceDefinition, an as SlugExt, cn as BulkMixin, dn as QueryResolverConfig, en as BaseController, fn as AccessControl, in as TreeMixin, jt as AggregationRateLimit, kt as AggregationMaterializedContext, ln as BaseCrudController, nn as SoftDeleteMixin, on as SlugMixin, pn as AccessControlConfig, rn as TreeExt, sn as BulkExt, tn as SoftDeleteExt, un as QueryResolver, wt as AggMeasureShorthand, zn as BodySanitizer } from "../index-CUTG2Cuo.mjs";
2
- import { A as MAX_FILTER_DEPTH, C as DEFAULT_SORT, D as HOOK_PHASES, E as HOOK_OPERATIONS, F as RESERVED_QUERY_PARAMS, I as SYSTEM_FIELDS, M as MAX_SEARCH_LENGTH, N as MUTATION_OPERATIONS, O as HookOperation, P as MutationOperation, S as DEFAULT_MAX_LIMIT, T as DEFAULT_UPDATE_METHOD, _ as defineAggregation, a as createRequestContext, b as DEFAULT_ID_FIELD, c as sendControllerResponse, d as getEntityQuery, f as defineResourceVariants, g as createPermissionMiddleware, h as createCrudRouter, i as createFastifyHandler, j as MAX_REGEX_LENGTH, k as HookPhase, l as getEntityId, m as defineAction, n as isFieldReadable, o as getControllerContext, p as DefineActionConfig, r as createCrudHandlers, s as getControllerScope, t as collectReadBlockedFields, u as getEntityIdField, v as CRUD_OPERATIONS, w as DEFAULT_TENANT_FIELD, x as DEFAULT_LIMIT, y as CrudOperation } from "../index-CP6A1Ffj.mjs";
3
- export { AccessControl, type AccessControlConfig, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ControllerConfigurableOptions, type ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DefineActionConfig, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, sendControllerResponse };
1
+ import { At as AggregationMaterializedResult, B as defineResource, Bn as BodySanitizerConfig, Ct as AggMeasureInput, Dt as AggregationDateRangeRequirement, Et as AggregationConfig, Fn as BaseControllerOptions, In as ControllerConfigurableOptions, Ln as ControllerConstructionOptions, Mt as AggregationsMap, Ot as AggregationIndexHint, Rn as ListResult, Tt as AggregationCacheConfig, V as ResourceDefinition, an as SlugExt, cn as BulkMixin, dn as QueryResolverConfig, en as BaseController, fn as AccessControl, in as TreeMixin, jt as AggregationRateLimit, kt as AggregationMaterializedContext, ln as BaseCrudController, nn as SoftDeleteMixin, on as SlugMixin, pn as AccessControlConfig, rn as TreeExt, sn as BulkExt, tn as SoftDeleteExt, un as QueryResolver, wt as AggMeasureShorthand, zn as BodySanitizer } from "../index-Dtrj6XZk.mjs";
2
+ import { A as HOOK_OPERATIONS, B as SYSTEM_FIELDS, C as CrudOperation, D as DEFAULT_SORT, E as DEFAULT_MAX_LIMIT, F as MAX_REGEX_LENGTH, I as MAX_SEARCH_LENGTH, L as MUTATION_OPERATIONS, M as HookOperation, N as HookPhase, O as DEFAULT_TENANT_FIELD, P as MAX_FILTER_DEPTH, R as MutationOperation, S as CRUD_OPERATIONS, T as DEFAULT_LIMIT, _ as DefineActionConfig, a as createRequestContext, b as createPermissionMiddleware, c as sendControllerResponse, d as getEntityQuery, f as defineResourceVariants, g as mergeResourceConfig, h as SeamedResourceConfig, i as createFastifyHandler, j as HOOK_PHASES, k as DEFAULT_UPDATE_METHOD, l as getEntityId, m as ResourceSeams, n as isFieldReadable, o as getControllerContext, p as AdapterLike, r as createCrudHandlers, s as getControllerScope, t as collectReadBlockedFields, u as getEntityIdField, v as defineAction, w as DEFAULT_ID_FIELD, x as defineAggregation, y as createCrudRouter, z as RESERVED_QUERY_PARAMS } from "../index-B5N-NaHs.mjs";
3
+ export { AccessControl, type AccessControlConfig, type AdapterLike, type AggMeasureInput, type AggMeasureShorthand, type AggregationCacheConfig, type AggregationConfig, type AggregationDateRangeRequirement, type AggregationIndexHint, type AggregationMaterializedContext, type AggregationMaterializedResult, type AggregationRateLimit, type AggregationsMap, BaseController, type BaseControllerOptions, BaseCrudController, BodySanitizer, type BodySanitizerConfig, type BulkExt, BulkMixin, CRUD_OPERATIONS, type ControllerConfigurableOptions, type ControllerConstructionOptions, CrudOperation, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, type DefineActionConfig, HOOK_OPERATIONS, HOOK_PHASES, HookOperation, HookPhase, type ListResult, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, MutationOperation, QueryResolver, type QueryResolverConfig, RESERVED_QUERY_PARAMS, ResourceDefinition, type ResourceSeams, SYSTEM_FIELDS, type SeamedResourceConfig, type SlugExt, SlugMixin, type SoftDeleteExt, SoftDeleteMixin, type TreeExt, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse };
@@ -1,5 +1,5 @@
1
- import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-gaEeMlz-.mjs";
2
- import { a as BulkMixin, c as collectReadBlockedFields, f as AccessControl, i as SlugMixin, l as isFieldReadable, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController, u as BodySanitizer } from "../BaseController-Dy6EQHjM.mjs";
3
- import { a as defineResource, c as createCrudRouter, i as defineResourceVariants, l as createPermissionMiddleware, n as getEntityIdField, o as ResourceDefinition, r as getEntityQuery, s as defineAction, t as getEntityId, u as defineAggregation } from "../core-Ba-6Sue6.mjs";
4
- import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-D7NGwcAR.mjs";
5
- export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, sendControllerResponse };
1
+ import { a as DEFAULT_SORT, c as HOOK_OPERATIONS, d as MAX_REGEX_LENGTH, f as MAX_SEARCH_LENGTH, h as SYSTEM_FIELDS, i as DEFAULT_MAX_LIMIT, l as HOOK_PHASES, m as RESERVED_QUERY_PARAMS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MUTATION_OPERATIONS, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as MAX_FILTER_DEPTH } from "../constants-DNre0wRg.mjs";
2
+ import { a as BulkMixin, c as collectReadBlockedFields, f as AccessControl, i as SlugMixin, l as isFieldReadable, n as TreeMixin, o as BaseCrudController, r as SoftDeleteMixin, s as QueryResolver, t as BaseController, u as BodySanitizer } from "../BaseController-BnLYgE9A.mjs";
3
+ import { a as mergeResourceConfig, c as defineAction, d as defineAggregation, i as defineResourceVariants, l as createCrudRouter, n as getEntityIdField, o as defineResource, r as getEntityQuery, s as ResourceDefinition, t as getEntityId, u as createPermissionMiddleware } from "../core-DZ6Xe1jR.mjs";
4
+ import { a as createCrudHandlers, c as getControllerContext, l as getControllerScope, o as createFastifyHandler, s as createRequestContext, u as sendControllerResponse } from "../actionPermissions-ze70xXJi.mjs";
5
+ export { AccessControl, BaseController, BaseCrudController, BodySanitizer, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, QueryResolver, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse };