@classytic/arc 2.50.0 → 2.51.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/{EventTransport-B18mcj_M.mjs → EventTransport-K7Q9WPjm.mjs} +2 -2
- package/dist/{HookSystem-FUBaLTRm.mjs → HookSystem-DBAu9uNT.mjs} +2 -2
- package/dist/{ResourceRegistry-C5NM07fZ.mjs → ResourceRegistry-BelzCRMy.mjs} +2 -2
- package/dist/{acquire-MHCnbDtH.mjs → acquire-B0zhfGSm.mjs} +1 -1
- package/dist/audit/index.mjs +4 -4
- package/dist/auth/audit.mjs +1 -1
- package/dist/auth/index.d.mts +30 -0
- package/dist/auth/index.mjs +172 -32
- package/dist/auth/redis-session.mjs +1 -1
- package/dist/auth/social/index.d.mts +42 -0
- package/dist/auth/social/index.mjs +311 -0
- package/dist/{authorizationDecision-BD8K4jdQ.mjs → authorizationDecision-Dxj_cy6N.mjs} +4 -4
- package/dist/{boundedMap-CuCwos_X.mjs → boundedMap-DOBai-H3.mjs} +1 -1
- package/dist/{buildHandler-BttjNkTM.mjs → buildHandler-Dyl8P9j0.mjs} +5 -5
- package/dist/cache/index.mjs +4 -4
- package/dist/{caching-CxUQLHfR.mjs → caching-CUmaNL8Y.mjs} +2 -2
- package/dist/{claimed-CQ4ZpD8K.mjs → claimed-DJPk4VZr.mjs} +1 -1
- package/dist/cleanup/index.mjs +4 -4
- package/dist/cli/commands/describe.mjs +3 -3
- package/dist/cli/commands/docs.mjs +3 -3
- package/dist/cli/commands/doctor.mjs +1 -1
- package/dist/cli/commands/generate.mjs +2 -2
- package/dist/cli/commands/init.mjs +2 -2
- package/dist/cli/commands/introspect.mjs +2 -2
- package/dist/cli/index.mjs +3 -3
- package/dist/{constants-BZFsZwJh.mjs → constants-DH41jnNT.mjs} +1 -1
- package/dist/context/index.mjs +5 -5
- package/dist/core/index.mjs +7 -7
- package/dist/{core-DWA1-5IE.mjs → core-DPmRWlpx.mjs} +3 -3
- package/dist/{createActionRouter-fP3l2xVF.mjs → createActionRouter-B1xhER6i.mjs} +5 -5
- package/dist/{createAggregationRouter-BJZeOmBa.mjs → createAggregationRouter-CNntJL-z.mjs} +7 -7
- package/dist/{createApp-Db9JRumw.mjs → createApp-DpG26bCu.mjs} +29 -29
- package/dist/{defineAggregation-BskqRz8M.mjs → defineAggregation-rI3EbZUg.mjs} +1 -1
- package/dist/{defineResource-B2vTvKzW.mjs → defineResource-5DcG_wlI.mjs} +8 -8
- package/dist/discovery/index.mjs +1 -1
- package/dist/docs/index.mjs +3 -3
- package/dist/{elevation-XoY0C73T.mjs → elevation-XFu7J3aj.mjs} +5 -5
- package/dist/encryption/index.mjs +3 -3
- package/dist/{errorHandler-BYI-JQMm.mjs → errorHandler-xDVUWOMu.mjs} +3 -3
- package/dist/{errors-3xaK0i9n.mjs → errors-KBZ3tQk5.mjs} +1 -1
- package/dist/{eventPlugin-CVQ9ddnL.mjs → eventPlugin-C4lNj2Dw.mjs} +8 -8
- package/dist/{eventTypes-UPYg7gW1.mjs → eventTypes-DZRoUAdk.mjs} +2 -2
- package/dist/events/index.mjs +8 -8
- package/dist/events/transports/redis-stream-entry.mjs +4 -4
- package/dist/events/transports/redis.mjs +2 -2
- package/dist/factory/index.mjs +6 -6
- package/dist/{fieldTypes-CxRvCaaZ.mjs → fieldTypes-DrXUW1jc.mjs} +2 -2
- package/dist/{fields-DLFcJiDe.mjs → fields-C5J8WTd2.mjs} +1 -1
- package/dist/{filter-merge-Bvjk_8dV.mjs → filter-merge-DTjYoDrj.mjs} +1 -1
- package/dist/{generate-0OpCUjUv.mjs → generate-SA8oMlLB.mjs} +2 -2
- package/dist/{headers-BROW65-r.mjs → headers-D5wrBLOk.mjs} +2 -2
- package/dist/{health-Cy6aOg1i.mjs → health-BLal039H.mjs} +1 -1
- package/dist/{health-Cfh-kYI_.mjs → health-vEo3fni4.mjs} +1 -1
- package/dist/hooks/index.mjs +2 -2
- package/dist/http-cache/index.mjs +4 -4
- package/dist/http-cache/purgers/cloudflare.mjs +2 -2
- package/dist/http-cache/purgers/fastly.mjs +2 -2
- package/dist/http-cache/testing/index.mjs +1 -1
- package/dist/idempotency/index.mjs +7 -7
- package/dist/idempotency/redis.mjs +2 -2
- package/dist/index.mjs +11 -11
- package/dist/{init-D7PQcvvL.mjs → init-DeKHaNZn.mjs} +22 -22
- package/dist/integrations/event-gateway.mjs +2 -2
- package/dist/integrations/index.mjs +1 -1
- package/dist/integrations/jobs/index.mjs +3 -3
- package/dist/integrations/mcp/index.mjs +2 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.mjs +3 -3
- package/dist/integrations/webhooks.mjs +4 -4
- package/dist/integrations/websocket-pushref-redis.mjs +1 -1
- package/dist/integrations/websocket-redis.mjs +1 -1
- package/dist/integrations/websocket.mjs +2 -2
- package/dist/{jsonBody-C0oREwUc.mjs → jsonBody-rDPGT5A9.mjs} +2 -2
- package/dist/{keys-CGlPoVSn.mjs → keys-t7i-lJ2r.mjs} +1 -1
- package/dist/{loadResources-Oi47dogA.mjs → loadResources-CcupAVJH.mjs} +3 -3
- package/dist/{loadResourcesFromEntry-BW-LexBz.mjs → loadResourcesFromEntry-BpjYlaoj.mjs} +2 -2
- package/dist/logger/index.mjs +2 -2
- package/dist/{logger-BagW7_YA.mjs → logger-IL7Btm-N.mjs} +1 -1
- package/dist/{mcpPlugin-C6-wFsOX.mjs → mcpPlugin-BsdH7Vot.mjs} +21 -21
- package/dist/{memory-Bl7kv6TS.mjs → memory-Dkp6ZD3F.mjs} +3 -3
- package/dist/{metrics-CqnMJKrJ.mjs → metrics-CDPqgdKr.mjs} +3 -3
- package/dist/middleware/index.mjs +3 -3
- package/dist/migrations/index.mjs +2 -2
- package/dist/{module-lbEbHUfI.mjs → module-KFxT1Iuk.mjs} +1 -1
- package/dist/{multipartBody-CqNezaB3.mjs → multipartBody-BHktuarE.mjs} +1 -1
- package/dist/{observeSend-BjilzlYl.mjs → observeSend-CY-sLanc.mjs} +1 -1
- package/dist/{openapi-DXNbadgd.mjs → openapi-DbeXiy2v.mjs} +6 -6
- package/dist/outbox-admin/index.mjs +5 -5
- package/dist/{outbox-module-k5rIszQ4.mjs → outbox-module-BWqkTE8-.mjs} +7 -7
- package/dist/permissions/index.mjs +7 -7
- package/dist/{permissions-BJylQopQ.mjs → permissions-e5YMrFbm.mjs} +9 -9
- package/dist/{pipe-D1cq8hET.mjs → pipe-CMnKfdF4.mjs} +2 -2
- package/dist/pipeline/index.mjs +2 -2
- package/dist/{plan-iEgaS5_H.mjs → plan-BvLJGm3U.mjs} +1 -1
- package/dist/{plugin-DsLr6L4O.mjs → plugin-DYmu8uT4.mjs} +24 -24
- package/dist/plugins/index.mjs +18 -18
- package/dist/plugins/response-cache.mjs +4 -4
- package/dist/plugins/tracing-entry.mjs +2 -2
- package/dist/{pluralize-CX4ZvwCa.mjs → pluralize-ClwfBdIx.mjs} +1 -1
- package/dist/presets/filesUpload.mjs +5 -5
- package/dist/presets/index.mjs +2 -2
- package/dist/presets/multiTenant.mjs +5 -5
- package/dist/presets/search.mjs +2 -2
- package/dist/{presets-D_suT4OY.mjs → presets-DX_lPabi.mjs} +4 -4
- package/dist/{projection-CmjGjFih.mjs → projection-DnZiFPPE.mjs} +2 -2
- package/dist/{purger.types-CZwkTZ7B.mjs → purger.types-BEzTVDOU.mjs} +1 -1
- package/dist/{queryCachePlugin-BDOPEAmH.mjs → queryCachePlugin-C57-Nj-g.mjs} +6 -6
- package/dist/{rateLimitKey-igF1x64n.mjs → rateLimitKey-B1RxyGt3.mjs} +1 -1
- package/dist/{realtime-Cq_ugiWw.mjs → realtime-C-VIoXMg.mjs} +11 -11
- package/dist/registry/index.mjs +3 -3
- package/dist/{registry-DmF9Akvn.mjs → registry-DbQvODPH.mjs} +2 -2
- package/dist/{relay-DA89IhFt.mjs → relay-B61seKq1.mjs} +5 -5
- package/dist/{renewingLease-DBtGUt8T.mjs → renewingLease-Dp7wmzNN.mjs} +1 -1
- package/dist/{replyHelpers-CUbeUc5q.mjs → replyHelpers-CHii_jIO.mjs} +2 -2
- package/dist/{requestContext-DO9Qv0gw.mjs → requestContext-C_mbAm8o.mjs} +1 -1
- package/dist/{requirement-C3GaQmkR.mjs → requirement-C8OsWLYp.mjs} +1 -1
- package/dist/{resourceRateLimit-KKn-sFhb.mjs → resourceRateLimit-DhbQZjE2.mjs} +2 -2
- package/dist/{rolldown-runtime-Ck1Tj4Ax.mjs → rolldown-runtime-HTi8KV7V.mjs} +1 -1
- package/dist/{routeValidator-BF7n34xV.mjs → routeValidator-DnQ2BGnH.mjs} +1 -1
- package/dist/{runtimeCapabilities-D0A4kkrC.mjs → runtimeCapabilities-G9QXHov1.mjs} +1 -1
- package/dist/{schedules-CLrQRSTt.mjs → schedules-DAthT5O3.mjs} +5 -5
- package/dist/{schemaConverter-JEmU21fu.mjs → schemaConverter-BOt_ed78.mjs} +2 -2
- package/dist/{schemaIR-wOffQlbq.mjs → schemaIR-MZVVj6Cw.mjs} +14 -14
- package/dist/schemas/index.mjs +1 -1
- package/dist/scim/index.mjs +2 -2
- package/dist/scope/index.mjs +5 -5
- package/dist/{scope-CcTMRd7s.mjs → scope-btg-225w.mjs} +4 -4
- package/dist/{shutdown-BIR-QBYM.mjs → shutdown-Dfy8La90.mjs} +1 -1
- package/dist/{simpleEqualityMatcher-DqqJqovq.mjs → simpleEqualityMatcher-D5dOqbbj.mjs} +1 -1
- package/dist/{sse-OEuPpgss.mjs → sse-DivxX1m6.mjs} +7 -7
- package/dist/{sseStream-DknHE2K5.mjs → sseStream-hQxQjvre.mjs} +2 -2
- package/dist/{store-helpers-D4vtEXt2.mjs → store-helpers-DfqfssAw.mjs} +1 -1
- package/dist/{streaming-CcIpcx02.mjs → streaming-CQiOktsh.mjs} +1 -1
- package/dist/{subscriberIdentity-PO6kimAl.mjs → subscriberIdentity-Bf8VLqA7.mjs} +1 -1
- package/dist/{tenancy-CH2Kuksc.mjs → tenancy-Btmaf1MB.mjs} +2 -2
- package/dist/{tenantPreparation-BTGpblQW.mjs → tenantPreparation-4e3qyb6q.mjs} +4 -4
- package/dist/testing/cleanupStoreContract.mjs +1 -1
- package/dist/testing/index.mjs +11 -11
- package/dist/testing/outboxStoreContract.mjs +2 -2
- package/dist/testing/requiredPorts.mjs +2 -2
- package/dist/testing/storageContract.mjs +1 -1
- package/dist/{timing-Dii5X7AP.mjs → timing-DXx0IWyi.mjs} +1 -1
- package/dist/{transactionContext-DMPhYEOt.mjs → transactionContext-DperjON1.mjs} +1 -1
- package/dist/{typeGuards-C1o_XEyp.mjs → typeGuards-eoQLIOh6.mjs} +1 -1
- package/dist/types/index.mjs +1 -1
- package/dist/types/storage.mjs +1 -1
- package/dist/{types-BuV_cFqT.mjs → types-CcpISJe8.mjs} +4 -4
- package/dist/usage/index.mjs +4 -4
- package/dist/{userHelpers-D4m_pLSC.mjs → userHelpers-Cp5zqlEN.mjs} +1 -1
- package/dist/utils/index.mjs +12 -12
- package/dist/{utils-CxLMXGn5.mjs → utils-dKN-_315.mjs} +6 -6
- package/dist/{validate-CZ975J8N.mjs → validate-BZHaAdgy.mjs} +3 -3
- package/dist/{versioning-B2_8SBZo.mjs → versioning-CPLP0VbB.mjs} +3 -3
- package/dist/{workScope-B3W3r35s.mjs → workScope-BI72KXsI.mjs} +2 -2
- package/package.json +17 -12
- package/skills/arc/references/auth-better-auth.md +27 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-
|
|
4
|
-
import { n as PUBLIC_SCOPE } from "./types-
|
|
5
|
-
import { t as runObservingSend } from "./observeSend-
|
|
6
|
-
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-
|
|
7
|
-
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-
|
|
8
|
-
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-
|
|
9
|
-
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-
|
|
10
|
-
import { i as markArcRootValidator, r as arcValidatorBuilder, t as arcAjvCustomOptions } from "./routeValidator-
|
|
11
|
-
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-
|
|
12
|
-
import { t as parseJsonBody } from "./jsonBody-
|
|
13
|
-
import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-
|
|
14
|
-
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-
|
|
15
|
-
import { r as withSubscriberId } from "./subscriberIdentity-
|
|
16
|
-
import { r as getOptionalModuleExports } from "./module-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
|
|
3
|
+
import { a as enterArcLoggerScope, i as runWithArcLogger, n as configureArcLogger, r as createPinoWriter, t as arcLog } from "./logger-IL7Btm-N.mjs";
|
|
4
|
+
import { n as PUBLIC_SCOPE } from "./types-CcpISJe8.mjs";
|
|
5
|
+
import { t as runObservingSend } from "./observeSend-CY-sLanc.mjs";
|
|
6
|
+
import { r as initRuntimeCapabilityRegistry, t as auditRuntimeCapabilities } from "./runtimeCapabilities-G9QXHov1.mjs";
|
|
7
|
+
import { a as runShutdown, t as initShutdownRegistry } from "./shutdown-Dfy8La90.mjs";
|
|
8
|
+
import { n as isScopeAwareKeyGenerator, t as createTenantKeyGenerator } from "./rateLimitKey-B1RxyGt3.mjs";
|
|
9
|
+
import { i as resolveResourceRateLimiter, n as markRateLimitingDisabled } from "./resourceRateLimit-DhbQZjE2.mjs";
|
|
10
|
+
import { i as markArcRootValidator, r as arcValidatorBuilder, t as arcAjvCustomOptions } from "./routeValidator-DnQ2BGnH.mjs";
|
|
11
|
+
import { c as createRequestIdGenerator, r as mergeHealthChecks } from "./health-vEo3fni4.mjs";
|
|
12
|
+
import { t as parseJsonBody } from "./jsonBody-rDPGT5A9.mjs";
|
|
13
|
+
import { a as portsForModule, b as verifyEventDurability, f as resolveModuleArm, g as crudEventsOf, h as buildModuleGraph, m as analyzeModuleGraph, n as composeModules, x as verifyModuleGraph } from "./plan-BvLJGm3U.mjs";
|
|
14
|
+
import { c as wrapWithAttribution, f as defineEvent, l as wrapWithBoundary, r as CRUD_EVENT_SCHEMA } from "./eventTypes-DZRoUAdk.mjs";
|
|
15
|
+
import { r as withSubscriberId } from "./subscriberIdentity-Bf8VLqA7.mjs";
|
|
16
|
+
import { r as getOptionalModuleExports } from "./module-KFxT1Iuk.mjs";
|
|
17
17
|
import { isProductionEnv, readEnv } from "@classytic/primitives/environment";
|
|
18
18
|
import Fastify from "fastify";
|
|
19
19
|
import qs from "qs";
|
|
@@ -766,7 +766,7 @@ async function registerArcCore(fastify, config, trackPlugin) {
|
|
|
766
766
|
await fastify.register(arcCorePlugin, { emitEvents: config.arcPlugins?.emitEvents !== false });
|
|
767
767
|
trackPlugin("arc-core");
|
|
768
768
|
if (config.arcPlugins?.events !== false) {
|
|
769
|
-
const { default: eventPlugin } = await import("./eventPlugin-
|
|
769
|
+
const { default: eventPlugin } = await import("./eventPlugin-C4lNj2Dw.mjs").then((n) => n.r);
|
|
770
770
|
const eventOpts = typeof config.arcPlugins?.events === "object" ? config.arcPlugins.events : {};
|
|
771
771
|
await fastify.register(eventPlugin, {
|
|
772
772
|
/**
|
|
@@ -821,15 +821,15 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
821
821
|
trackPlugin("arc-graceful-shutdown", shutdownOpts);
|
|
822
822
|
}
|
|
823
823
|
if (config.arcPlugins?.caching) {
|
|
824
|
-
const { default: cachingPlugin } = await import("./caching-
|
|
824
|
+
const { default: cachingPlugin } = await import("./caching-CUmaNL8Y.mjs").then((n) => n.n);
|
|
825
825
|
const opts = config.arcPlugins.caching === true ? {} : config.arcPlugins.caching;
|
|
826
826
|
await fastify.register(cachingPlugin, opts);
|
|
827
827
|
trackPlugin("arc-caching", opts);
|
|
828
828
|
}
|
|
829
829
|
if (config.arcPlugins?.queryCache) {
|
|
830
|
-
const { queryCachePlugin } = await import("./queryCachePlugin-
|
|
830
|
+
const { queryCachePlugin } = await import("./queryCachePlugin-C57-Nj-g.mjs").then((n) => n.n);
|
|
831
831
|
const opts = config.arcPlugins.queryCache === true ? {} : config.arcPlugins.queryCache;
|
|
832
|
-
const store = config.stores?.queryCache ?? new (await (import("./memory-
|
|
832
|
+
const store = config.stores?.queryCache ?? new (await (import("./memory-Dkp6ZD3F.mjs").then((n) => n.n))).MemoryCacheStore();
|
|
833
833
|
await fastify.register(queryCachePlugin, {
|
|
834
834
|
store,
|
|
835
835
|
...opts
|
|
@@ -839,7 +839,7 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
839
839
|
if (config.arcPlugins?.sse) {
|
|
840
840
|
if (config.arcPlugins?.events === false) fastify.log.warn("SSE plugin requires events plugin (arcPlugins.events). SSE disabled.");
|
|
841
841
|
else {
|
|
842
|
-
const { default: ssePlugin } = await import("./sse-
|
|
842
|
+
const { default: ssePlugin } = await import("./sse-DivxX1m6.mjs").then((n) => n.n);
|
|
843
843
|
const opts = config.arcPlugins.sse === true ? {} : config.arcPlugins.sse;
|
|
844
844
|
await fastify.register(ssePlugin, opts);
|
|
845
845
|
trackPlugin("arc-sse", opts);
|
|
@@ -848,20 +848,20 @@ async function registerArcPlugins(fastify, config, trackPlugin, modules, moduleH
|
|
|
848
848
|
if (config.arcPlugins?.realtime) {
|
|
849
849
|
if (config.arcPlugins?.events === false) fastify.log.warn("Realtime plugin requires events plugin (arcPlugins.events). Realtime disabled.");
|
|
850
850
|
else {
|
|
851
|
-
const { default: realtimePlugin } = await import("./realtime-
|
|
851
|
+
const { default: realtimePlugin } = await import("./realtime-C-VIoXMg.mjs").then((n) => n.n);
|
|
852
852
|
const opts = config.arcPlugins.realtime === true ? {} : config.arcPlugins.realtime;
|
|
853
853
|
await fastify.register(realtimePlugin, opts);
|
|
854
854
|
trackPlugin("arc-realtime", opts);
|
|
855
855
|
}
|
|
856
856
|
}
|
|
857
857
|
if (config.arcPlugins?.metrics) {
|
|
858
|
-
const { default: metricsPlugin } = await import("./metrics-
|
|
858
|
+
const { default: metricsPlugin } = await import("./metrics-CDPqgdKr.mjs").then((n) => n.n);
|
|
859
859
|
const opts = config.arcPlugins.metrics === true ? {} : config.arcPlugins.metrics;
|
|
860
860
|
await fastify.register(metricsPlugin, opts);
|
|
861
861
|
trackPlugin("arc-metrics", opts);
|
|
862
862
|
}
|
|
863
863
|
if (config.arcPlugins?.versioning) {
|
|
864
|
-
const { default: versioningPlugin } = await import("./versioning-
|
|
864
|
+
const { default: versioningPlugin } = await import("./versioning-CPLP0VbB.mjs").then((n) => n.n);
|
|
865
865
|
await fastify.register(versioningPlugin, config.arcPlugins.versioning);
|
|
866
866
|
trackPlugin("arc-versioning", config.arcPlugins.versioning);
|
|
867
867
|
}
|
|
@@ -938,7 +938,7 @@ async function registerAuth(fastify, config, trackPlugin) {
|
|
|
938
938
|
*/
|
|
939
939
|
async function registerElevation(fastify, config, trackPlugin) {
|
|
940
940
|
if (!config.elevation) return;
|
|
941
|
-
const { elevationPlugin } = await import("./elevation-
|
|
941
|
+
const { elevationPlugin } = await import("./elevation-XFu7J3aj.mjs").then((n) => n.n);
|
|
942
942
|
await fastify.register(elevationPlugin, config.elevation);
|
|
943
943
|
trackPlugin("arc-elevation", config.elevation);
|
|
944
944
|
fastify.log.debug("Elevation plugin enabled");
|
|
@@ -953,7 +953,7 @@ async function registerElevation(fastify, config, trackPlugin) {
|
|
|
953
953
|
*/
|
|
954
954
|
async function registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers) {
|
|
955
955
|
if (config.errorHandler === false) return;
|
|
956
|
-
const { errorHandlerPlugin } = await import("./errorHandler-
|
|
956
|
+
const { errorHandlerPlugin } = await import("./errorHandler-xDVUWOMu.mjs").then((n) => n.r);
|
|
957
957
|
/**
|
|
958
958
|
* DISCLOSURE DEFAULTS MERGE — they used to be REPLACED, and that was two bugs.
|
|
959
959
|
*
|
|
@@ -1172,7 +1172,7 @@ async function registerResources(fastify, config, preResolvedModules, skippedBri
|
|
|
1172
1172
|
let discoveryPath;
|
|
1173
1173
|
let discoveryYieldedZero = false;
|
|
1174
1174
|
if (resolvedResources === void 0 && config.resourceDir) {
|
|
1175
|
-
const { loadResources } = await import("./loadResources-
|
|
1175
|
+
const { loadResources } = await import("./loadResources-CcupAVJH.mjs").then((n) => n.n);
|
|
1176
1176
|
const { resolve, dirname } = await import("node:path");
|
|
1177
1177
|
const { fileURLToPath } = await import("node:url");
|
|
1178
1178
|
const rawDir = config.resourceDir;
|
|
@@ -1297,7 +1297,7 @@ Resources supplied by "${m.name}": ${provided}.`);
|
|
|
1297
1297
|
if (fastify.hasDecorator("getScheduleStats")) throw new Error("[arc] modules declare scheduledJobs but schedulesPlugin was already registered manually. Configure their runner through arcPlugins.schedules so Arc can compose one schedule table.");
|
|
1298
1298
|
const frozenJobs = Object.freeze(scheduledJobs.map((job) => Object.freeze({ ...job })));
|
|
1299
1299
|
const scheduleOptions = typeof config.arcPlugins?.schedules === "object" ? config.arcPlugins.schedules : {};
|
|
1300
|
-
const { default: schedulesPlugin } = await import("./schedules-
|
|
1300
|
+
const { default: schedulesPlugin } = await import("./schedules-DAthT5O3.mjs").then((n) => n.n);
|
|
1301
1301
|
await fastify.register(schedulesPlugin, {
|
|
1302
1302
|
...scheduleOptions,
|
|
1303
1303
|
schedules: frozenJobs
|
|
@@ -2291,7 +2291,7 @@ async function buildApp(options, loggerScope, onInstance, onBootDisposer) {
|
|
|
2291
2291
|
await registerErrorHandler(fastify, config, trackPlugin, moduleErrorMappers);
|
|
2292
2292
|
await registerResources(fastify, config, resolvedModules, skippedBridges);
|
|
2293
2293
|
if (config.replyHelpers) {
|
|
2294
|
-
const { replyHelpersPlugin } = await import("./replyHelpers-
|
|
2294
|
+
const { replyHelpersPlugin } = await import("./replyHelpers-CHii_jIO.mjs").then((n) => n.n);
|
|
2295
2295
|
await fastify.register(replyHelpersPlugin);
|
|
2296
2296
|
}
|
|
2297
2297
|
if (config.serializeBigInt) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as arcLog } from "./logger-
|
|
3
|
-
import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-
|
|
4
|
-
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-
|
|
5
|
-
import { B as requireAuth } from "./permissions-
|
|
6
|
-
import { n as getAvailablePresets, t as applyPresets } from "./presets-
|
|
7
|
-
import { t as pluralize } from "./pluralize-
|
|
8
|
-
import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as arcLog } from "./logger-IL7Btm-N.mjs";
|
|
3
|
+
import { C as isWriteVerbCapable, S as detectOverriddenWriteSlots, f as BaseController, i as resolveOpenApiSchemas, l as autoInjectTenantFieldRules, t as buildResourcePlugin } from "./plugin-DYmu8uT4.mjs";
|
|
4
|
+
import { m as MUTATION_OPERATIONS, t as CRUD_OPERATIONS } from "./constants-DH41jnNT.mjs";
|
|
5
|
+
import { B as requireAuth } from "./permissions-e5YMrFbm.mjs";
|
|
6
|
+
import { n as getAvailablePresets, t as applyPresets } from "./presets-DX_lPabi.mjs";
|
|
7
|
+
import { t as pluralize } from "./pluralize-ClwfBdIx.mjs";
|
|
8
|
+
import { a as isZodSchema, i as isJsonSchema } from "./schemaConverter-BOt_ed78.mjs";
|
|
9
9
|
import { isReadOnlyRepo } from "@classytic/repo-core/repository";
|
|
10
10
|
import { readEnv } from "@classytic/primitives/environment";
|
|
11
11
|
// src/core/defineResource/writeVerbs.ts
|
package/dist/discovery/index.mjs
CHANGED
package/dist/docs/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-
|
|
3
|
-
import { n as getUserRoles } from "../userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as openapi_default, t as buildOpenApiSpec } from "../openapi-DbeXiy2v.mjs";
|
|
3
|
+
import { n as getUserRoles } from "../userHelpers-Cp5zqlEN.mjs";
|
|
4
4
|
import fp from "fastify-plugin";
|
|
5
5
|
// src/docs/scalar.ts
|
|
6
6
|
const scalarPlugin = async (fastify, opts = {}) => {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { t as arcLog } from "./logger-
|
|
4
|
-
import { n as requireSingleHeaderValue } from "./headers-
|
|
5
|
-
import { n as getUserRoles } from "./userHelpers-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
|
|
3
|
+
import { t as arcLog } from "./logger-IL7Btm-N.mjs";
|
|
4
|
+
import { n as requireSingleHeaderValue } from "./headers-D5wrBLOk.mjs";
|
|
5
|
+
import { n as getUserRoles } from "./userHelpers-Cp5zqlEN.mjs";
|
|
6
6
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
7
7
|
import fp from "fastify-plugin";
|
|
8
8
|
// src/scope/elevation.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as ArcError } from "../errors-
|
|
3
|
-
import { t as parseJsonBody } from "../jsonBody-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as ArcError } from "../errors-KBZ3tQk5.mjs";
|
|
3
|
+
import { t as parseJsonBody } from "../jsonBody-rDPGT5A9.mjs";
|
|
4
4
|
import { createCipheriv, createDecipheriv, randomBytes } from "node:crypto";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
// src/encryption/fieldCipher.ts
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { m as statusToArcCode, p as isArcError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
|
|
3
|
+
import { m as statusToArcCode, p as isArcError } from "./errors-KBZ3tQk5.mjs";
|
|
4
4
|
import { isHttpError, toErrorContract } from "@classytic/repo-core/errors";
|
|
5
5
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
6
6
|
import fp from "fastify-plugin";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
3
|
-
import { n as requestContext } from "./requestContext-
|
|
4
|
-
import { t as arcLog } from "./logger-
|
|
5
|
-
import { d as createDomainError } from "./errors-
|
|
6
|
-
import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-
|
|
7
|
-
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-
|
|
8
|
-
import { n as preserveSubscriberIdentity } from "./subscriberIdentity-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
|
|
3
|
+
import { n as requestContext } from "./requestContext-C_mbAm8o.mjs";
|
|
4
|
+
import { t as arcLog } from "./logger-IL7Btm-N.mjs";
|
|
5
|
+
import { d as createDomainError } from "./errors-KBZ3tQk5.mjs";
|
|
6
|
+
import { i as runAdmittedWork, n as isAdmittedWork, r as registerShutdownParticipant } from "./shutdown-Dfy8La90.mjs";
|
|
7
|
+
import { n as MemoryEventTransport, r as createEvent, t as ARC_EVENT_TRANSPORT } from "./EventTransport-K7Q9WPjm.mjs";
|
|
8
|
+
import { n as preserveSubscriberIdentity } from "./subscriberIdentity-Bf8VLqA7.mjs";
|
|
9
9
|
import { isProductionEnv } from "@classytic/primitives/environment";
|
|
10
10
|
import fp from "fastify-plugin";
|
|
11
11
|
import { NonDurablePublishError } from "@classytic/primitives/durable-events";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as createEvent } from "./EventTransport-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as createEvent } from "./EventTransport-K7Q9WPjm.mjs";
|
|
3
3
|
import { createRequire } from "node:module";
|
|
4
4
|
import { durableEventMeta } from "@classytic/primitives/durable-events";
|
|
5
5
|
// src/events/defineEvent.ts
|
package/dist/events/index.mjs
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-
|
|
3
|
-
import { n as MemoryEventTransport } from "../EventTransport-
|
|
4
|
-
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-
|
|
5
|
-
import { r as withSubscriberId } from "../subscriberIdentity-
|
|
6
|
-
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-
|
|
7
|
-
import { t as createOutboxModule } from "../outbox-module-
|
|
8
|
-
import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as crudEventType, d as createEventRegistry, f as defineEvent, i as CRUD_EVENT_SUFFIXES, l as wrapWithBoundary, n as CACHE_EVENTS, o as subscribeWithBoundary, s as subscribeWithSchema, t as ARC_LIFECYCLE_EVENTS, u as wrapWithSchema } from "../eventTypes-DZRoUAdk.mjs";
|
|
3
|
+
import { n as MemoryEventTransport } from "../EventTransport-K7Q9WPjm.mjs";
|
|
4
|
+
import { a as withRetry, i as createDeadLetterPublisher, n as eventPlugin } from "../eventPlugin-C4lNj2Dw.mjs";
|
|
5
|
+
import { r as withSubscriberId } from "../subscriberIdentity-Bf8VLqA7.mjs";
|
|
6
|
+
import { r as readOutboxHealth, t as DEFAULT_RELAY_LAG_UNHEALTHY_MS } from "../health-BLal039H.mjs";
|
|
7
|
+
import { t as createOutboxModule } from "../outbox-module-BWqkTE8-.mjs";
|
|
8
|
+
import { n as repositoryAsOutboxStore, r as exponentialBackoff, t as EventOutbox } from "../relay-B61seKq1.mjs";
|
|
9
9
|
import { fingerprintRequest, runIdempotent } from "@classytic/repo-core/idempotency";
|
|
10
10
|
import { MemoryOutboxStore } from "@classytic/primitives/memory-outbox";
|
|
11
11
|
// src/events/inbox.ts
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as evictToSize } from "../../boundedMap-
|
|
3
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
4
|
-
import { t as getSubscriberId } from "../../subscriberIdentity-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evictToSize } from "../../boundedMap-DOBai-H3.mjs";
|
|
3
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-BI72KXsI.mjs";
|
|
4
|
+
import { t as getSubscriberId } from "../../subscriberIdentity-Bf8VLqA7.mjs";
|
|
5
5
|
import sjson from "secure-json-parse";
|
|
6
6
|
import { createEventRouter } from "@classytic/primitives/events";
|
|
7
7
|
// src/events/transports/redis-stream.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { r as workSeedFromEvent, t as runWorkScope } from "../../workScope-BI72KXsI.mjs";
|
|
3
3
|
import sjson from "secure-json-parse";
|
|
4
4
|
// src/events/transports/redis.ts
|
|
5
5
|
/**
|
package/dist/factory/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-
|
|
3
|
-
import { r as mergeHealthChecks, t as healthPlugin } from "../health-
|
|
4
|
-
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-
|
|
5
|
-
import { t as loadResources } from "../loadResources-
|
|
6
|
-
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { a as developmentPreset, c as productionPreset, d as getModuleResources, f as getModuleState, g as collectModuleWorkflows, l as testingPreset, m as subscribeModuleEventHandlers, n as DEFAULT_LOGGER_REDACT_PATHS, o as edgePreset, p as hasModule, r as createApp, s as getPreset, t as ArcFactory, u as workerPreset } from "../createApp-DpG26bCu.mjs";
|
|
3
|
+
import { r as mergeHealthChecks, t as healthPlugin } from "../health-vEo3fni4.mjs";
|
|
4
|
+
import { a as lazyModuleExports, i as hasModuleExports, n as getModuleExports, o as lazyRequiredModuleExports, r as getOptionalModuleExports, t as defineModule } from "../module-KFxT1Iuk.mjs";
|
|
5
|
+
import { t as loadResources } from "../loadResources-CcupAVJH.mjs";
|
|
6
|
+
import { _ as dependentsOf, b as verifyEventDurability, d as resolveModule, g as crudEventsOf, h as buildModuleGraph, i as planModules, m as analyzeModuleGraph, o as resolveModuleClosure, p as activateBridges, r as compositionProblems, s as orderModules, t as assertComposable, u as resolveContribution, v as eventTopology, x as verifyModuleGraph, y as renderModuleGraph } from "../plan-BvLJGm3U.mjs";
|
|
7
7
|
// src/factory/module/asyncapi.ts
|
|
8
8
|
/**
|
|
9
9
|
* The module graph as an AsyncAPI 3.0 document — one channel per event (addressed by the event
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as __exportAll } from "./rolldown-runtime-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-HTi8KV7V.mjs";
|
|
3
3
|
// src/core/aggregation/fieldTypes.ts
|
|
4
4
|
var fieldTypes_exports = /* @__PURE__ */ __exportAll({
|
|
5
5
|
coerceByType: () => coerceByType,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as pluralize } from "./pluralize-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as pluralize } from "./pluralize-ClwfBdIx.mjs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { existsSync, mkdirSync, readFileSync, writeFileSync } from "node:fs";
|
|
5
5
|
// src/cli/commands/generate/name-helpers.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { u as ValidationError } from "./errors-KBZ3tQk5.mjs";
|
|
3
3
|
// src/utils/headers.ts
|
|
4
4
|
/**
|
|
5
5
|
* Canonical header typing + accessor.
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
export { t as HookSystem, n as afterCreate, r as afterDelete, i as afterUpdate, a as beforeCreate, o as beforeDelete, s as beforeUpdate, c as createHookSystem, l as defineHook } from "../HookSystem-DBAu9uNT.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { n as chunkTags, t as CachePurgeError } from "../purger.types-
|
|
3
|
-
import { t as hasEvents } from "../typeGuards-
|
|
4
|
-
import { r as exponentialBackoff, t as EventOutbox } from "../relay-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as chunkTags, t as CachePurgeError } from "../purger.types-BEzTVDOU.mjs";
|
|
3
|
+
import { t as hasEvents } from "../typeGuards-eoQLIOh6.mjs";
|
|
4
|
+
import { r as exponentialBackoff, t as EventOutbox } from "../relay-B61seKq1.mjs";
|
|
5
5
|
import fp from "fastify-plugin";
|
|
6
6
|
import { createEvent } from "@classytic/primitives/events";
|
|
7
7
|
// src/http-cache/invalidation/delivery.ts
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CachePurgeError } from "../../purger.types-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
|
|
3
3
|
// src/http-cache/purgers/cloudflare.ts
|
|
4
4
|
/**
|
|
5
5
|
* Cloudflare purge-by-tag (`Cache-Tag`). Needs an API token scoped to Zone > Cache Purge only.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as CachePurgeError } from "../../purger.types-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CachePurgeError } from "../../purger.types-BEzTVDOU.mjs";
|
|
3
3
|
// src/http-cache/purgers/fastly.ts
|
|
4
4
|
/**
|
|
5
5
|
* Fastly surrogate-key purge, with soft purge (`Fastly-Soft-Purge: 1`). Responses must carry the tags in
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { d as createDomainError } from "../errors-
|
|
3
|
-
import { n as requireSingleHeaderValue } from "../headers-
|
|
4
|
-
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-
|
|
5
|
-
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-
|
|
6
|
-
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-
|
|
7
|
-
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { d as createDomainError } from "../errors-KBZ3tQk5.mjs";
|
|
3
|
+
import { n as requireSingleHeaderValue } from "../headers-D5wrBLOk.mjs";
|
|
4
|
+
import { n as createIdempotencyResult, r as operationIdentity, t as resolveIdempotencyTiming } from "../timing-DXx0IWyi.mjs";
|
|
5
|
+
import { n as acquireIdempotencyKey, r as releaseIdempotencyLock } from "../acquire-B0zhfGSm.mjs";
|
|
6
|
+
import { n as createSafeGetOne, t as createIsDuplicateKeyError } from "../store-helpers-DfqfssAw.mjs";
|
|
7
|
+
import { i as requestRequiresIdempotencyKey, n as idempotencyConfigProblem, r as requestDedupedByHandler, t as declaresIdempotencyFence } from "../requirement-C8OsWLYp.mjs";
|
|
8
8
|
import { ARC_ERROR_CODES } from "@classytic/repo-core/errors";
|
|
9
9
|
import { and, eq, exists, gt, lt, or, startsWith } from "@classytic/repo-core/filter";
|
|
10
10
|
import { createHash } from "node:crypto";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { t as acquireBySteps } from "../acquire-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as acquireBySteps } from "../acquire-B0zhfGSm.mjs";
|
|
3
3
|
import { createHash } from "node:crypto";
|
|
4
4
|
// src/idempotency/stores/redis.ts
|
|
5
5
|
/**
|
package/dist/index.mjs
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
2
|
-
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-
|
|
3
|
-
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-
|
|
4
|
-
import { t as defineAggregation } from "./defineAggregation-
|
|
5
|
-
import { a as ResourceDefinition, t as defineResource } from "./defineResource-
|
|
6
|
-
import { E as getControllerScope } from "./schemaIR-
|
|
7
|
-
import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-
|
|
8
|
-
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-
|
|
9
|
-
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-
|
|
10
|
-
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
|
+
import { E as nativePolicyFilter, _ as BaseCrudController, f as BaseController, g as BulkMixin, h as SlugMixin, m as SoftDeleteMixin, p as TreeMixin } from "./plugin-DYmu8uT4.mjs";
|
|
3
|
+
import { a as defineResourceVariants, o as mergeResourceConfig, s as defineAction } from "./core-DPmRWlpx.mjs";
|
|
4
|
+
import { t as defineAggregation } from "./defineAggregation-rI3EbZUg.mjs";
|
|
5
|
+
import { a as ResourceDefinition, t as defineResource } from "./defineResource-5DcG_wlI.mjs";
|
|
6
|
+
import { E as getControllerScope } from "./schemaIR-MZVVj6Cw.mjs";
|
|
7
|
+
import { a as DEFAULT_SORT, d as MAX_FILTER_DEPTH, f as MAX_REGEX_LENGTH, g as SYSTEM_FIELDS, h as RESERVED_QUERY_PARAMS, i as DEFAULT_MAX_LIMIT, l as HOOK_OPERATIONS, m as MUTATION_OPERATIONS, n as DEFAULT_ID_FIELD, o as DEFAULT_TENANT_FIELD, p as MAX_SEARCH_LENGTH, r as DEFAULT_LIMIT, s as DEFAULT_UPDATE_METHOD, t as CRUD_OPERATIONS, u as HOOK_PHASES } from "./constants-DH41jnNT.mjs";
|
|
8
|
+
import { B as requireAuth, C as createOrgPermissions, D as requireScopeContext, E as requireOrgRole, F as allowPublic, G as when, I as anyOf, N as allOf, O as requireServiceScope, R as denyAll, S as createDynamicPermissionMatrix, T as requireOrgMembership, U as requireRoles, V as requireOwnership, a as adminOnly, c as ownerWithAdminBypass, d as publicRead, f as publicReadAdminWrite, k as requireTeamMembership, o as authenticated, p as readOnly, s as fullPublic, u as presets_exports, w as requireOrgInScope } from "./permissions-e5YMrFbm.mjs";
|
|
9
|
+
import { i as fields, n as applyFieldWritePermissions, t as applyFieldReadPermissions } from "./fields-C5J8WTd2.mjs";
|
|
10
|
+
import { d as createDomainError, i as NotFoundError, l as UnauthorizedError, r as ForbiddenError, t as ArcError, u as ValidationError } from "./errors-KBZ3tQk5.mjs";
|
|
11
11
|
// src/index.ts
|
|
12
|
-
const version = "2.
|
|
12
|
+
const version = "2.51.0";
|
|
13
13
|
export { ArcError, BaseController, BaseCrudController, BulkMixin, CRUD_OPERATIONS, DEFAULT_ID_FIELD, DEFAULT_LIMIT, DEFAULT_MAX_LIMIT, DEFAULT_SORT, DEFAULT_TENANT_FIELD, DEFAULT_UPDATE_METHOD, ForbiddenError, HOOK_OPERATIONS, HOOK_PHASES, MAX_FILTER_DEPTH, MAX_REGEX_LENGTH, MAX_SEARCH_LENGTH, MUTATION_OPERATIONS, NotFoundError, RESERVED_QUERY_PARAMS, ResourceDefinition, SYSTEM_FIELDS, SlugMixin, SoftDeleteMixin, TreeMixin, UnauthorizedError, ValidationError, adminOnly, allOf, allowPublic, anyOf, applyFieldReadPermissions, applyFieldWritePermissions, authenticated, createDomainError, createDynamicPermissionMatrix, createOrgPermissions, defineAction, defineAggregation, defineResource, defineResourceVariants, denyAll, fields, fullPublic, getControllerScope, mergeResourceConfig, nativePolicyFilter, ownerWithAdminBypass, presets_exports as permissions, publicRead, publicReadAdminWrite, readOnly, requireAuth, requireOrgInScope, requireOrgMembership, requireOrgRole, requireOwnership, requireRoles, requireScopeContext, requireServiceScope, requireTeamMembership, version, when };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! @classytic/arc v2.
|
|
1
|
+
/*! @classytic/arc v2.51.0 | MIT | https://classytic.com */
|
|
2
2
|
import * as fs from "node:fs/promises";
|
|
3
3
|
import * as path from "node:path";
|
|
4
4
|
import { dirname, join } from "node:path";
|
|
@@ -700,7 +700,10 @@ import { mongodbAdapter } from '@better-auth/mongo-adapter';` : "";
|
|
|
700
700
|
].filter(Boolean).join("\n");
|
|
701
701
|
const dbAdapter = useMongo ? config.typescript ? `database: mongodbAdapter(mongoose.connection.getClient().db() as never),` : `database: mongodbAdapter(mongoose.connection.getClient().db()),` : `// Configure your database adapter here
|
|
702
702
|
// See: https://www.better-auth.com/docs/concepts/database`;
|
|
703
|
-
const
|
|
703
|
+
const pluginUsage = `
|
|
704
|
+
plugins: [
|
|
705
|
+
${[
|
|
706
|
+
` socialAuth({ providers: social.providers }),`,
|
|
704
707
|
useBearer ? ` bearer(),` : "",
|
|
705
708
|
useApiKey ? ` apiKey({
|
|
706
709
|
enableMetadata: true,
|
|
@@ -711,11 +714,8 @@ import { mongodbAdapter } from '@better-auth/mongo-adapter';` : "";
|
|
|
711
714
|
creatorRole: 'owner',
|
|
712
715
|
teams: { enabled: true },
|
|
713
716
|
}),` : ""
|
|
714
|
-
].filter(Boolean)
|
|
715
|
-
|
|
716
|
-
plugins: [
|
|
717
|
-
${pluginEntries.join("\n")}
|
|
718
|
-
],` : "";
|
|
717
|
+
].filter(Boolean).join("\n")}
|
|
718
|
+
],`;
|
|
719
719
|
const stubPluginsList = [useOrg ? `'organization'` : ""].filter(Boolean).join(", ");
|
|
720
720
|
const stubExtras = useApiKey ? `, extraCollections: ['apikey']` : "";
|
|
721
721
|
return `/**
|
|
@@ -737,6 +737,7 @@ ${[
|
|
|
737
737
|
pluginImports,
|
|
738
738
|
stubsImport
|
|
739
739
|
].filter(Boolean).join("\n")}
|
|
740
|
+
import { defineSocialProviders, socialAuth } from '@classytic/arc/auth/social';
|
|
740
741
|
import config from '#config/index.js';
|
|
741
742
|
|
|
742
743
|
// Factory keeps the CONCRETE betterAuth({...}) instantiation as the source
|
|
@@ -745,6 +746,9 @@ import config from '#config/index.js';
|
|
|
745
746
|
// typecheck because Better Auth's \`Auth<T>\` is generic over the exact
|
|
746
747
|
// options object.
|
|
747
748
|
function createAuth() {
|
|
749
|
+
// Throws at boot naming any missing credential of an enabled provider.
|
|
750
|
+
const social = defineSocialProviders({ enabled: process.env.SOCIAL_PROVIDERS ?? '' });
|
|
751
|
+
|
|
748
752
|
return betterAuth({
|
|
749
753
|
secret: config.betterAuth.secret,
|
|
750
754
|
baseURL: process.env.BETTER_AUTH_URL || \`http://localhost:\${config.server.port}\`,
|
|
@@ -768,18 +772,9 @@ ${config.tenant === "multi" ? `
|
|
|
768
772
|
minPasswordLength: 6,
|
|
769
773
|
},
|
|
770
774
|
|
|
771
|
-
//
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
socialProviders: {
|
|
775
|
-
google: {
|
|
776
|
-
clientId: process.env.GOOGLE_CLIENT_ID,
|
|
777
|
-
clientSecret: process.env.GOOGLE_CLIENT_SECRET,
|
|
778
|
-
},
|
|
779
|
-
},
|
|
780
|
-
}
|
|
781
|
-
: {}),
|
|
782
|
-
${orgPluginUsage}
|
|
775
|
+
// Social sign-in: SOCIAL_PROVIDERS=google,github enables providers (see .env.example).
|
|
776
|
+
socialProviders: social.socialProviders,
|
|
777
|
+
${pluginUsage}
|
|
783
778
|
session: {
|
|
784
779
|
cookieCache: {
|
|
785
780
|
enabled: true,
|
|
@@ -787,7 +782,7 @@ ${orgPluginUsage}
|
|
|
787
782
|
},
|
|
788
783
|
},
|
|
789
784
|
|
|
790
|
-
trustedOrigins: [config.frontend.url],
|
|
785
|
+
trustedOrigins: [config.frontend.url, ...social.trustedOrigins],
|
|
791
786
|
|
|
792
787
|
rateLimit: {
|
|
793
788
|
enabled: process.env.NODE_ENV === 'production',
|
|
@@ -1441,9 +1436,13 @@ NODE_ENV=development
|
|
|
1441
1436
|
BETTER_AUTH_SECRET=your-32-character-minimum-secret-here
|
|
1442
1437
|
FRONTEND_URL=http://localhost:3000
|
|
1443
1438
|
|
|
1444
|
-
#
|
|
1439
|
+
# Social sign-in: providers to enable (google, github, apple, facebook), comma-separated.
|
|
1440
|
+
# Each enabled provider needs its credentials; boot fails naming any that are missing.
|
|
1441
|
+
# Provider console redirect URI: <BETTER_AUTH_URL>/api/auth/callback/<provider>
|
|
1442
|
+
SOCIAL_PROVIDERS=
|
|
1445
1443
|
# GOOGLE_CLIENT_ID=
|
|
1446
1444
|
# GOOGLE_CLIENT_SECRET=
|
|
1445
|
+
# GOOGLE_ID_TOKEN_AUDIENCES= # native/mobile client ids accepted on id-token sign-in
|
|
1447
1446
|
`;
|
|
1448
1447
|
else content += `
|
|
1449
1448
|
# JWT
|
|
@@ -1480,7 +1479,8 @@ HOST=0.0.0.0
|
|
|
1480
1479
|
BETTER_AUTH_SECRET=dev-secret-change-in-production-min-32-chars
|
|
1481
1480
|
FRONTEND_URL=http://localhost:3000
|
|
1482
1481
|
|
|
1483
|
-
#
|
|
1482
|
+
# Social sign-in (e.g. SOCIAL_PROVIDERS=google, then set its credentials)
|
|
1483
|
+
SOCIAL_PROVIDERS=
|
|
1484
1484
|
GOOGLE_CLIENT_ID=
|
|
1485
1485
|
GOOGLE_CLIENT_SECRET=
|
|
1486
1486
|
`;
|