@classytic/arc 2.30.0 → 2.32.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/LICENSE +1 -1
- package/README.md +7 -0
- package/TRADEMARK.md +22 -0
- package/dist/{BaseController-B5DwufbB.mjs → BaseController-Dk34dxhI.mjs} +21 -19
- package/dist/{EventTransport-QmY7A258.d.mts → EventTransport-2uVV34WU.d.mts} +1 -0
- package/dist/{EventTransport-C6YA8xY9.mjs → EventTransport-BV10D0oG.mjs} +1 -0
- package/dist/{HookSystem-WkIougo6.mjs → HookSystem-vimw5D7Z.mjs} +2 -1
- package/dist/{QueryCache-DOMT_iq7.d.mts → QueryCache-DFA-QrU9.d.mts} +2 -1
- package/dist/{ResourceRegistry-y9Hnypus.mjs → ResourceRegistry-BVr7PgA0.mjs} +18 -15
- package/dist/{actionPermissions-CAphcmUG.mjs → actionPermissions-Dti7ebyv.mjs} +1 -0
- package/dist/audit/index.d.mts +3 -2
- package/dist/audit/index.mjs +2 -1
- package/dist/auth/audit.d.mts +1 -0
- package/dist/auth/audit.mjs +1 -0
- package/dist/auth/index.d.mts +5 -4
- package/dist/auth/index.mjs +11 -9
- package/dist/auth/redis-session.d.mts +2 -1
- package/dist/auth/redis-session.mjs +1 -0
- package/dist/{applyPermissionResult-Cf6zUCvb.mjs → authorizationDecision-__T3EJDA.mjs} +19 -10
- package/dist/{buildHandler-BYS3Vkfz.mjs → buildHandler-Dn7rzUJo.mjs} +6 -4
- package/dist/cache/index.d.mts +4 -3
- package/dist/cache/index.mjs +4 -3
- package/dist/{caching-_NJeDd1_.mjs → caching-DFJqHyFs.mjs} +2 -1
- package/dist/cleanup/index.d.mts +39 -16
- package/dist/cleanup/index.mjs +50 -38
- package/dist/cli/commands/describe.d.mts +2 -1
- package/dist/cli/commands/describe.mjs +4 -5
- package/dist/cli/commands/docs.d.mts +1 -0
- package/dist/cli/commands/docs.mjs +3 -2
- package/dist/cli/commands/doctor.d.mts +1 -0
- package/dist/cli/commands/doctor.mjs +1 -0
- package/dist/cli/commands/generate.d.mts +2 -1
- package/dist/cli/commands/generate.mjs +2 -1
- package/dist/cli/commands/init.d.mts +2 -1
- package/dist/cli/commands/init.mjs +2 -1
- package/dist/cli/commands/introspect.d.mts +1 -0
- package/dist/cli/commands/introspect.mjs +2 -1
- package/dist/cli/index.d.mts +3 -2
- package/dist/cli/index.mjs +3 -2
- package/dist/{constants-DNre0wRg.mjs → constants-J99LGTJI.mjs} +1 -0
- package/dist/context/index.d.mts +1 -0
- package/dist/context/index.mjs +3 -2
- package/dist/core/index.d.mts +3 -2
- package/dist/core/index.mjs +7 -6
- package/dist/{core-poalJLvp.mjs → core-BwwmNSp7.mjs} +3 -2
- package/dist/{createActionRouter-BxuywVRB.mjs → createActionRouter-DkJZWo0m.mjs} +14 -10
- package/dist/{createAggregationRouter-BiY-lGdY.mjs → createAggregationRouter-B1exOVD8.mjs} +10 -7
- package/dist/{createApp-CXrKFciH.mjs → createApp-Bv0m-Q6_.mjs} +625 -229
- package/dist/{defineAggregation-ufWjUwml.mjs → defineAggregation-gX4No1gt.mjs} +1 -0
- package/dist/{defineResource-CxWqDCAy.mjs → defineResource-XFPPUu2c.mjs} +84 -50
- package/dist/discovery/index.d.mts +1 -0
- package/dist/discovery/index.mjs +1 -0
- package/dist/docs/index.d.mts +3 -2
- package/dist/docs/index.mjs +3 -2
- package/dist/{elevation-C9s5hFP_.d.mts → elevation-BXCfVcNG.d.mts} +1 -0
- package/dist/{elevation-CIz1GjGm.mjs → elevation-DNXXxgjl.mjs} +4 -3
- package/dist/encryption/index.d.mts +2 -1
- package/dist/encryption/index.mjs +5 -3
- package/dist/{errorHandler-Bq2OeEQL.mjs → errorHandler-B2AZUJUj.mjs} +3 -2
- package/dist/{errorHandler-C6yv4ZTW.d.mts → errorHandler-CpYUJmPA.d.mts} +1 -0
- package/dist/{errors-DHcHVAgk.d.mts → errors-BGdVwP25.d.mts} +1 -0
- package/dist/{errors-DkO8Nk6-.mjs → errors-Bh1KK5ps.mjs} +1 -0
- package/dist/{eventPlugin-D2NNR4py.mjs → eventPlugin-Dk_TyXeE.mjs} +8 -6
- package/dist/{eventPlugin-Bg3cP2_u.d.mts → eventPlugin-GF5nnBIq.d.mts} +2 -1
- package/dist/events/index.d.mts +112 -44
- package/dist/events/index.mjs +177 -141
- package/dist/events/transports/redis-stream-entry.d.mts +2 -1
- package/dist/events/transports/redis-stream-entry.mjs +14 -9
- package/dist/events/transports/redis.d.mts +2 -1
- package/dist/events/transports/redis.mjs +1 -0
- package/dist/{externalPaths-BE6wFpYv.d.mts → externalPaths-CmGOxOtD.d.mts} +1 -0
- package/dist/factory/index.d.mts +9 -5
- package/dist/factory/index.mjs +131 -7
- package/dist/fastify-augmentation-BppG5bMT.d.mts +179 -0
- package/dist/{fields-CQ_7KQWw.mjs → fields-DEi65pGj.mjs} +6 -10
- package/dist/{fields-D3lhgzhD.d.mts → fields-I_EeRWND.d.mts} +1 -0
- package/dist/{generate-D0wZupBg.mjs → generate-CRSG0jTv.mjs} +2 -1
- package/dist/{generate-BnsL9GBm.d.mts → generate-DCGuEbqI.d.mts} +1 -0
- package/dist/{headers-BvlQSDMB.mjs → headers-BXjQYbeC.mjs} +2 -1
- package/dist/{health-CB_m4S32.mjs → health-5XnTa2uo.mjs} +1 -0
- package/dist/hooks/index.d.mts +2 -1
- package/dist/hooks/index.mjs +2 -1
- package/dist/idempotency/index.d.mts +3 -2
- package/dist/idempotency/index.mjs +8 -5
- package/dist/idempotency/redis.d.mts +2 -1
- package/dist/idempotency/redis.mjs +1 -0
- package/dist/{index-CG4yqMDB.d.mts → index-C-481Zf2.d.mts} +74 -18
- package/dist/{index-Q5gzEIWY.d.mts → index-CpzxqePp.d.mts} +107 -32
- package/dist/{index-Cx7bro4R.d.mts → index-DXlHwvuE.d.mts} +5 -4
- package/dist/index-ZWhLTp_s.d.mts +290 -0
- package/dist/{index-Ch16aAah.d.mts → index-zq6VrjaB.d.mts} +122 -15
- package/dist/index.d.mts +9 -8
- package/dist/index.mjs +11 -10
- package/dist/{init-tlRSt667.mjs → init-BbfP8aky.mjs} +25 -27
- package/dist/{init-BPEu8cs-.d.mts → init-Cscs4lab.d.mts} +1 -0
- package/dist/integrations/event-gateway.d.mts +3 -2
- package/dist/integrations/event-gateway.mjs +2 -1
- package/dist/integrations/index.d.mts +4 -3
- package/dist/integrations/index.mjs +1 -0
- package/dist/integrations/jobs/index.d.mts +2 -1
- package/dist/integrations/jobs/index.mjs +109 -33
- package/dist/integrations/mcp/index.d.mts +6 -6
- package/dist/integrations/mcp/index.mjs +2 -1
- package/dist/integrations/mcp/testing.d.mts +3 -2
- package/dist/integrations/mcp/testing.mjs +2 -2
- package/dist/integrations/streamline.d.mts +1 -0
- package/dist/integrations/streamline.mjs +3 -2
- package/dist/integrations/webhooks.d.mts +1 -0
- package/dist/integrations/webhooks.mjs +1 -0
- package/dist/integrations/websocket-pushref-redis.d.mts +2 -1
- package/dist/integrations/websocket-pushref-redis.mjs +1 -0
- package/dist/integrations/websocket-redis.d.mts +2 -1
- package/dist/integrations/websocket-redis.mjs +1 -0
- package/dist/integrations/websocket.d.mts +3 -2
- package/dist/integrations/websocket.mjs +38 -34
- package/dist/{interface-BGZCzOGL.d.mts → interface-BOk3YnTz.d.mts} +1 -0
- package/dist/{interface-n5hpKg1d.mjs → interface-BP4IJCBO.mjs} +1 -0
- package/dist/{interface-Uk8ONJv7.d.mts → interface-DEWNOMza.d.mts} +1 -0
- package/dist/{jsonBody-BlzAoGCe.mjs → jsonBody-DDSR2HFl.mjs} +2 -1
- package/dist/{keys-Cd316u_y.mjs → keys-B-HBTGXl.mjs} +1 -0
- package/dist/{loadResources-DpU8pfjV.mjs → loadResources-DisEAmkm.mjs} +4 -2
- package/dist/{loadResourcesFromEntry-kvGT6EcO.mjs → loadResourcesFromEntry-D1MJp13f.mjs} +2 -1
- package/dist/logger/index.d.mts +1 -0
- package/dist/logger/index.mjs +1 -0
- package/dist/{mcpPlugin-nRzm5g2s.mjs → mcpPlugin-CpfVpKHE.mjs} +38 -38
- package/dist/{memory-CmnzXE5Z.mjs → memory-DsuWnj4T.mjs} +5 -4
- package/dist/{metrics-fdxI5mn_.mjs → metrics-DdQL8syd.mjs} +2 -1
- package/dist/middleware/index.d.mts +2 -1
- package/dist/middleware/index.mjs +3 -2
- package/dist/migrations/index.d.mts +1 -0
- package/dist/migrations/index.mjs +3 -2
- package/dist/module-Br81am6m.mjs +78 -0
- package/dist/{multipartBody-D0eBvkeq.mjs → multipartBody-BnkBLN7v.mjs} +3 -2
- package/dist/{openapi-B8Vkbxbn.mjs → openapi-DIRzvxC0.mjs} +6 -5
- package/dist/outbox-admin/index.d.mts +85 -0
- package/dist/outbox-admin/index.mjs +115 -0
- package/dist/permissions/index.d.mts +5 -4
- package/dist/permissions/index.mjs +6 -5
- package/dist/{permissions-Bfu_8y1U.mjs → permissions-Dl_m0NCe.mjs} +308 -42
- package/dist/{pipe-BOLmGIxa.mjs → pipe-ELHCP3zj.mjs} +3 -4
- package/dist/pipeline/index.d.mts +2 -1
- package/dist/pipeline/index.mjs +2 -1
- package/dist/{pipeline-BJnpkY9i.mjs → pipeline-CPA-jx0M.mjs} +17 -14
- package/dist/plugins/index.d.mts +8 -7
- package/dist/plugins/index.mjs +16 -15
- package/dist/plugins/response-cache.d.mts +1 -0
- package/dist/plugins/response-cache.mjs +2 -1
- package/dist/plugins/tracing-entry.d.mts +2 -1
- package/dist/plugins/tracing-entry.mjs +2 -1
- package/dist/{pluralize-BhrgwZb9.mjs → pluralize-C2ZkKbsn.mjs} +1 -0
- package/dist/{preloadResources-DSY5HGpS.mjs → preloadResources-CDs87fTw.mjs} +1 -0
- package/dist/{preloadResources-DCfa2egz.d.mts → preloadResources-T1hmlTEZ.d.mts} +117 -12
- package/dist/presets/filesUpload.d.mts +6 -5
- package/dist/presets/filesUpload.mjs +10 -12
- package/dist/presets/index.d.mts +3 -2
- package/dist/presets/index.mjs +2 -1
- package/dist/presets/multiTenant.d.mts +2 -1
- package/dist/presets/multiTenant.mjs +3 -2
- package/dist/presets/search.d.mts +3 -2
- package/dist/presets/search.mjs +2 -1
- package/dist/{presets-CJOEXLuk.mjs → presets-Dntd_pUO.mjs} +6 -4
- package/dist/{projection-UBDgfMwu.mjs → projection-CjHhM5W1.mjs} +2 -1
- package/dist/{pushref-registry-BbcnpNTm.d.mts → pushref-registry-Dov9l4qE.d.mts} +1 -0
- package/dist/{queryCachePlugin-br4otiqF.d.mts → queryCachePlugin-BzqxconG.d.mts} +3 -2
- package/dist/{queryCachePlugin-DSGuSVLW.mjs → queryCachePlugin-Dhps-Ldt.mjs} +6 -5
- package/dist/{rateLimit-DrED-C4v.mjs → rateLimit-C7mmAGs3.mjs} +7 -3
- package/dist/{rateLimitKey-BoWRH3e7.mjs → rateLimitKey-CccEFBfk.mjs} +1 -0
- package/dist/{realtime-B9nmIY5V.mjs → realtime-DVvVZZFz.mjs} +20 -9
- package/dist/{redis-UDtLaNj6.d.mts → redis-CduhKsJi.d.mts} +2 -1
- package/dist/{redis-stream-uIaauNpZ.d.mts → redis-stream-qN6A-RFv.d.mts} +2 -1
- package/dist/{registerRoute-JkxIEBJq.mjs → registerRoute-B_QrjYZS.mjs} +10 -7
- package/dist/registry/index.d.mts +3 -2
- package/dist/registry/index.mjs +3 -2
- package/dist/{registry-BYXUUg21.mjs → registry-DqUmzA9W.mjs} +2 -1
- package/dist/{renewingLease-3cuQH7h8.mjs → renewingLease-BpP9wwj7.mjs} +1 -0
- package/dist/{replyHelpers-67tRawQZ.mjs → replyHelpers-DS-P0b32.mjs} +2 -1
- package/dist/{repositoryFilter-Dz8k3S4P.mjs → repositoryFilter-DotlxG3L.mjs} +1 -0
- package/dist/{requestContext-MrlJwECf.mjs → requestContext-B6vQF-sy.mjs} +1 -0
- package/dist/{rolldown-runtime-8H4AJuhK.mjs → rolldown-runtime-BhflRrBs.mjs} +1 -0
- package/dist/{schedules-CjOd2MG9.mjs → schedules-C2Q3uv2d.mjs} +3 -2
- package/dist/{schemaConverter-DJvodiHj.mjs → schemaConverter-Crjvczi_.mjs} +70 -17
- package/dist/{schemaIR-Ca7ySNPx.mjs → schemaIR-CnyKK_1j.mjs} +2 -1
- package/dist/schemas/index.d.mts +1 -0
- package/dist/schemas/index.mjs +1 -0
- package/dist/scim/index.d.mts +1 -0
- package/dist/scim/index.mjs +2 -1
- package/dist/scope/index.d.mts +3 -2
- package/dist/scope/index.mjs +5 -4
- package/dist/{scope-DfaPntpo.mjs → scope-afz_Ieek.mjs} +4 -3
- package/dist/{sessionManager-BHOM3N_0.d.mts → sessionManager-qimlKV0P.d.mts} +1 -0
- package/dist/{simpleEqualityMatcher-Cg05HPsn.mjs → simpleEqualityMatcher-C4KiMWUa.mjs} +1 -0
- package/dist/{sse-BQ1w0dfl.mjs → sse-B9P4Y-UI.mjs} +7 -5
- package/dist/{sseStream-BQ7Qaynp.mjs → sseStream-B3zb_d1h.mjs} +2 -1
- package/dist/{storage-DLUZ04kK.d.mts → storage-Cx9Sz3Ou.d.mts} +1 -0
- package/dist/{store-helpers-DY6xq4sM.mjs → store-helpers-DmEMHlPQ.mjs} +1 -0
- package/dist/{streaming-BQcW6_Kq.mjs → streaming-DPZdQmDz.mjs} +1 -0
- package/dist/{subscribe-helpers-DfzsivM6.mjs → subscribe-helpers-sp5xTDVA.mjs} +2 -1
- package/dist/sync/changelog.d.mts +1 -0
- package/dist/sync/changelog.mjs +1 -0
- package/dist/testing/cleanupStoreContract.d.mts +2 -1
- package/dist/testing/cleanupStoreContract.mjs +10 -5
- package/dist/testing/index.d.mts +166 -12
- package/dist/testing/index.mjs +315 -43
- package/dist/testing/outboxStoreContract.d.mts +12 -2
- package/dist/testing/outboxStoreContract.mjs +110 -20
- package/dist/testing/storageContract.d.mts +2 -1
- package/dist/testing/storageContract.mjs +11 -5
- package/dist/{tracing-CsGKQJGg.d.mts → tracing-Dro5eH6j.d.mts} +1 -0
- package/dist/{transactionContext-PNdoyLLm.mjs → transactionContext-BvLKvOIL.mjs} +1 -0
- package/dist/{typeGuards-C9KXUly6.mjs → typeGuards-B_5-hKjJ.mjs} +1 -0
- package/dist/types/index.d.mts +6 -5
- package/dist/types/index.mjs +1 -0
- package/dist/types/storage.d.mts +2 -1
- package/dist/types/storage.mjs +1 -0
- package/dist/{types-ChvvVNP8.d.mts → types-B7XeLEgK.d.mts} +34 -2
- package/dist/{types-Cc91nXuA.d.mts → types-ByHn9rEO.d.mts} +1 -0
- package/dist/{types-C_ZZRcD6.d.mts → types-C4QE8qnm.d.mts} +1 -0
- package/dist/{types-D_n8L6VY.d.mts → types-CT5vu6M0.d.mts} +132 -17
- package/dist/{types-DjC-KUCz.d.mts → types-ChuShpCP.d.mts} +1 -0
- package/dist/{types-Bmmn-fO0.d.mts → types-CwcUQ610.d.mts} +2 -6
- package/dist/{types-CSyCxl2V.mjs → types-DXYX7dIR.mjs} +4 -3
- package/dist/usage/index.d.mts +3 -2
- package/dist/usage/index.mjs +0 -0
- package/dist/{userHelpers-Cg_y3fBz.mjs → userHelpers-BNsOXzOd.mjs} +1 -0
- package/dist/utils/index.d.mts +16 -7
- package/dist/utils/index.mjs +10 -9
- package/dist/{utils-taUVD4p3.mjs → utils-BtOha_Sp.mjs} +3 -2
- package/dist/{validate-Bk44F2yT.mjs → validate-PMCPR9El.mjs} +2 -1
- package/dist/{versioning-gKWyryT3.mjs → versioning-CKv2jz_U.mjs} +4 -3
- package/dist/{versioning-DXgY5BUm.d.mts → versioning-D_rhHfZm.d.mts} +5 -2
- package/dist/{websocket-_Pd0CgR0.d.mts → websocket-BOXVggMf.d.mts} +2 -1
- package/package.json +557 -539
- package/skills/arc/SKILL.md +22 -8
- package/skills/arc/references/api-reference.md +4 -0
- package/skills/arc/references/auth.md +3 -0
- package/skills/arc/references/integrations.md +33 -0
- package/skills/arc/references/mcp.md +6 -7
- package/skills/arc/references/production.md +24 -25
- package/skills/arc-code-review/references/anti-patterns.md +3 -3
- package/dist/fastify-augmentation-0WhPnUH7.d.mts +0 -76
- package/dist/index-CCzVR-N3.d.mts +0 -107
- package/dist/module-_-M7C5ES.mjs +0 -29
package/dist/cleanup/index.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { g as getUserId } from "../types-DXYX7dIR.mjs";
|
|
3
|
+
import { t as defineResource } from "../defineResource-XFPPUu2c.mjs";
|
|
4
|
+
import { t as defineModule } from "../module-Br81am6m.mjs";
|
|
4
5
|
import { createPurgeEvidence } from "@classytic/primitives/retention";
|
|
5
6
|
import { canonicalJson, sha256Hex } from "@classytic/primitives/canonical";
|
|
6
7
|
//#region src/cleanup/errors.ts
|
|
@@ -562,7 +563,7 @@ function createCleanupService(deps) {
|
|
|
562
563
|
...DEFAULT_CLEANUP_LIMITS,
|
|
563
564
|
...deps.limits
|
|
564
565
|
};
|
|
565
|
-
const leaseMs = deps.leaseMs ??
|
|
566
|
+
const leaseMs = deps.leaseMs ?? 3e5;
|
|
566
567
|
const progressThrottleMs = deps.progressThrottleMs ?? 0;
|
|
567
568
|
const jobQueue = deps.jobQueue ?? { enqueue: async (job) => {
|
|
568
569
|
queueMicrotask(() => {
|
|
@@ -1139,24 +1140,40 @@ const actionBodySchema = {
|
|
|
1139
1140
|
}
|
|
1140
1141
|
}
|
|
1141
1142
|
};
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
*/
|
|
1143
|
+
async function resolve(input) {
|
|
1144
|
+
return typeof input === "function" ? await input() : input;
|
|
1145
|
+
}
|
|
1146
1146
|
function createDataCleanupModule(deps) {
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1147
|
+
/**
|
|
1148
|
+
* Built on FIRST READ, which is `bootstrap` — never in this factory body.
|
|
1149
|
+
*
|
|
1150
|
+
* Memoized, so the recipe thunk runs exactly once and the id-uniqueness check
|
|
1151
|
+
* still happens at boot (arc calls bootstrap during startup); it simply happens
|
|
1152
|
+
* inside arc's lifecycle rather than ahead of it.
|
|
1153
|
+
*/
|
|
1154
|
+
let cachedRegistry;
|
|
1155
|
+
const registry = async () => {
|
|
1156
|
+
cachedRegistry ??= createCleanupRegistry(typeof deps.recipes === "function" ? await deps.recipes() : deps.recipes);
|
|
1157
|
+
return cachedRegistry;
|
|
1158
|
+
};
|
|
1159
|
+
if (typeof deps.recipes !== "function") cachedRegistry = createCleanupRegistry(deps.recipes);
|
|
1160
|
+
let cached;
|
|
1161
|
+
const service = async () => {
|
|
1162
|
+
if (cached) return cached;
|
|
1163
|
+
cached = createCleanupService({
|
|
1164
|
+
registry: await registry(),
|
|
1165
|
+
runStore: await resolve(deps.runStore),
|
|
1166
|
+
evidenceStore: await resolve(deps.evidenceStore),
|
|
1167
|
+
writeFence: await resolve(deps.writeFence),
|
|
1168
|
+
jobQueue: await resolve(deps.jobQueue),
|
|
1169
|
+
limits: deps.limits,
|
|
1170
|
+
leaseMs: deps.leaseMs,
|
|
1171
|
+
progressThrottleMs: deps.progressThrottleMs,
|
|
1172
|
+
generateId: deps.generateId,
|
|
1173
|
+
now: deps.now
|
|
1174
|
+
});
|
|
1175
|
+
return cached;
|
|
1176
|
+
};
|
|
1160
1177
|
const prefix = deps.prefix ?? "/governance/data-cleanup";
|
|
1161
1178
|
const resolveActor = deps.resolveActor ?? defaultResolveActor;
|
|
1162
1179
|
const resolveAmbient = deps.resolveAmbient;
|
|
@@ -1175,9 +1192,8 @@ function createDataCleanupModule(deps) {
|
|
|
1175
1192
|
path: "/recipes",
|
|
1176
1193
|
summary: "List available cleanup recipes",
|
|
1177
1194
|
permissions: view,
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
return reply.send({ recipes: registry.introspect() });
|
|
1195
|
+
rawHandler: async (_req, reply) => {
|
|
1196
|
+
return reply.send({ recipes: (await registry()).introspect() });
|
|
1181
1197
|
}
|
|
1182
1198
|
},
|
|
1183
1199
|
{
|
|
@@ -1185,12 +1201,11 @@ function createDataCleanupModule(deps) {
|
|
|
1185
1201
|
path: "/preview",
|
|
1186
1202
|
summary: "Preview a cleanup plan (no mutation)",
|
|
1187
1203
|
permissions: view,
|
|
1188
|
-
raw: true,
|
|
1189
1204
|
schema: { body: previewBodySchema },
|
|
1190
|
-
|
|
1205
|
+
rawHandler: async (req, reply) => {
|
|
1191
1206
|
const r = req;
|
|
1192
1207
|
const body = req.body;
|
|
1193
|
-
const plan = await service.preview({
|
|
1208
|
+
const plan = await (await service()).preview({
|
|
1194
1209
|
recipeId: body.recipe,
|
|
1195
1210
|
parameters: body.parameters,
|
|
1196
1211
|
actor: resolveActor(r),
|
|
@@ -1204,12 +1219,11 @@ function createDataCleanupModule(deps) {
|
|
|
1204
1219
|
path: "/runs",
|
|
1205
1220
|
summary: "Execute a confirmed cleanup plan",
|
|
1206
1221
|
permissions: execute,
|
|
1207
|
-
raw: true,
|
|
1208
1222
|
schema: { body: runsBodySchema },
|
|
1209
|
-
|
|
1223
|
+
rawHandler: async (req, reply) => {
|
|
1210
1224
|
const r = req;
|
|
1211
1225
|
const body = req.body;
|
|
1212
|
-
const run = await service.execute({
|
|
1226
|
+
const run = await (await service()).execute({
|
|
1213
1227
|
recipeId: body.recipe,
|
|
1214
1228
|
parameters: body.parameters,
|
|
1215
1229
|
planDigest: body.planDigest,
|
|
@@ -1226,11 +1240,10 @@ function createDataCleanupModule(deps) {
|
|
|
1226
1240
|
path: "/runs/:id",
|
|
1227
1241
|
summary: "Observe a cleanup run",
|
|
1228
1242
|
permissions: view,
|
|
1229
|
-
raw: true,
|
|
1230
1243
|
schema: { params: runIdParamsSchema },
|
|
1231
|
-
|
|
1244
|
+
rawHandler: async (req, reply) => {
|
|
1232
1245
|
const { id } = req.params;
|
|
1233
|
-
return reply.send(await service.getRun(id));
|
|
1246
|
+
return reply.send(await (await service()).getRun(id));
|
|
1234
1247
|
}
|
|
1235
1248
|
},
|
|
1236
1249
|
{
|
|
@@ -1238,20 +1251,19 @@ function createDataCleanupModule(deps) {
|
|
|
1238
1251
|
path: "/runs/:id/action",
|
|
1239
1252
|
summary: "Cancel or retry a cleanup run",
|
|
1240
1253
|
permissions: manage,
|
|
1241
|
-
raw: true,
|
|
1242
1254
|
schema: {
|
|
1243
1255
|
params: runIdParamsSchema,
|
|
1244
1256
|
body: actionBodySchema
|
|
1245
1257
|
},
|
|
1246
|
-
|
|
1258
|
+
rawHandler: async (req, reply) => {
|
|
1247
1259
|
const actionActor = resolveActor(req);
|
|
1248
1260
|
const { id } = req.params;
|
|
1249
1261
|
const { action, reason } = req.body;
|
|
1250
|
-
if (action === "cancel") return reply.send(await service.cancel(id, {
|
|
1262
|
+
if (action === "cancel") return reply.send(await (await service()).cancel(id, {
|
|
1251
1263
|
actor: actionActor,
|
|
1252
1264
|
reason
|
|
1253
1265
|
}));
|
|
1254
|
-
return reply.send(await service.retry(id));
|
|
1266
|
+
return reply.send(await (await service()).retry(id));
|
|
1255
1267
|
}
|
|
1256
1268
|
}
|
|
1257
1269
|
]
|
|
@@ -1259,7 +1271,7 @@ function createDataCleanupModule(deps) {
|
|
|
1259
1271
|
return defineModule({
|
|
1260
1272
|
name: deps.moduleName ?? "data-cleanup",
|
|
1261
1273
|
...deps.owns ? { owns: deps.owns } : {},
|
|
1262
|
-
bootstrap: () => service,
|
|
1274
|
+
bootstrap: () => service(),
|
|
1263
1275
|
resources: () => [resource]
|
|
1264
1276
|
});
|
|
1265
1277
|
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { Nt as RateLimitConfig, V as ResourceDefinition, et as RouteSchemaOptions } from "../../index-CpzxqePp.mjs";
|
|
2
3
|
//#region src/cli/commands/describe.d.ts
|
|
3
4
|
interface DescribedResource {
|
|
4
5
|
name: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as CRUD_OPERATIONS } from "../../constants-J99LGTJI.mjs";
|
|
3
|
+
import { n as stringifyMeasureMap } from "../../ResourceRegistry-BVr7PgA0.mjs";
|
|
3
4
|
import { resolve } from "node:path";
|
|
4
5
|
import { pathToFileURL } from "node:url";
|
|
5
6
|
//#region src/cli/commands/describe.ts
|
|
@@ -77,9 +78,7 @@ function describePipeline(pipe) {
|
|
|
77
78
|
case "transform":
|
|
78
79
|
transforms.push(desc);
|
|
79
80
|
break;
|
|
80
|
-
case "interceptor":
|
|
81
|
-
interceptors.push(desc);
|
|
82
|
-
break;
|
|
81
|
+
case "interceptor": interceptors.push(desc);
|
|
83
82
|
}
|
|
84
83
|
}
|
|
85
84
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as buildOpenApiSpec } from "../../openapi-DIRzvxC0.mjs";
|
|
3
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-D1MJp13f.mjs";
|
|
3
4
|
import { dirname, resolve } from "node:path";
|
|
4
5
|
import { mkdirSync, writeFileSync } from "node:fs";
|
|
5
6
|
//#region src/cli/commands/docs.ts
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
|
|
2
|
+
import { a as ProjectConfig, i as PackageManager, n as DependencyManifest, r as InitOptions, t as init } from "../../init-Cscs4lab.mjs";
|
|
2
3
|
export { type DependencyManifest, type InitOptions, type PackageManager, type ProjectConfig, init };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as loadResourcesFromEntry } from "../../loadResourcesFromEntry-D1MJp13f.mjs";
|
|
2
3
|
//#region src/cli/commands/introspect.ts
|
|
3
4
|
function describePermission(value) {
|
|
4
5
|
if (!value) return "none";
|
package/dist/cli/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
|
|
1
2
|
import { describe } from "./commands/describe.mjs";
|
|
2
3
|
import { exportDocs } from "./commands/docs.mjs";
|
|
3
4
|
import { doctor } from "./commands/doctor.mjs";
|
|
4
|
-
import { n as generate } from "../generate-
|
|
5
|
-
import { t as init } from "../init-
|
|
5
|
+
import { n as generate } from "../generate-DCGuEbqI.mjs";
|
|
6
|
+
import { t as init } from "../init-Cscs4lab.mjs";
|
|
6
7
|
import { introspect } from "./commands/introspect.mjs";
|
|
7
8
|
export { describe, doctor, exportDocs, generate, init, introspect };
|
package/dist/cli/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
1
2
|
import { describe } from "./commands/describe.mjs";
|
|
2
3
|
import { exportDocs } from "./commands/docs.mjs";
|
|
3
4
|
import { doctor } from "./commands/doctor.mjs";
|
|
4
|
-
import { t as generate } from "../generate-
|
|
5
|
-
import { t as init } from "../init-
|
|
5
|
+
import { t as generate } from "../generate-CRSG0jTv.mjs";
|
|
6
|
+
import { t as init } from "../init-BbfP8aky.mjs";
|
|
6
7
|
import { introspect } from "./commands/introspect.mjs";
|
|
7
8
|
export { describe, doctor, exportDocs, generate, init, introspect };
|
package/dist/context/index.d.mts
CHANGED
package/dist/context/index.mjs
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import { t as
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as requestContext, t as getTraceHeaders } from "../requestContext-B6vQF-sy.mjs";
|
|
3
|
+
import { t as transactionContext } from "../transactionContext-BvLKvOIL.mjs";
|
|
3
4
|
export { getTraceHeaders, requestContext, transactionContext };
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
1
|
+
|
|
2
|
+
import { $t as TreeMixin, An as BaseControllerOptions, B as defineResource, Fn as BodySanitizerConfig, Mn as ControllerConstructionOptions, Nn as ListResult, Pn as BodySanitizer, Qt as TreeExt, V as ResourceDefinition, Xt as SoftDeleteExt, Yt as BaseController, Zt as SoftDeleteMixin, an as QueryResolver, cn as AccessControlConfig, ct as AggMeasureShorthand, dt as AggregationDateRangeRequirement, en as SlugExt, ft as AggregationIndexHint, gt as AggregationsMap, ht as AggregationRateLimit, in as BaseCrudController, jn as ControllerConfigurableOptions, lt as AggregationCacheConfig, mt as AggregationMaterializedResult, nn as BulkExt, on as QueryResolverConfig, pt as AggregationMaterializedContext, rn as BulkMixin, sn as AccessControl, st as AggMeasureInput, tn as SlugMixin, ut as AggregationConfig } from "../index-CpzxqePp.mjs";
|
|
3
|
+
import { A as DEFAULT_ID_FIELD, B as MAX_FILTER_DEPTH, C as DefineActionConfig, D as defineAggregation, E as createPermissionMiddleware, F as DEFAULT_UPDATE_METHOD, G as RESERVED_QUERY_PARAMS, H as MAX_SEARCH_LENGTH, I as HOOK_OPERATIONS, K as SYSTEM_FIELDS, L as HOOK_PHASES, M as DEFAULT_MAX_LIMIT, N as DEFAULT_SORT, O as CRUD_OPERATIONS, P as DEFAULT_TENANT_FIELD, R as HookOperation, S as mergeResourceConfig, T as createCrudRouter, U as MUTATION_OPERATIONS, V as MAX_REGEX_LENGTH, W as MutationOperation, _ as getEntityQuery, a as formatValidationErrors, b as ResourceSeams, c as isFieldReadable, d as createRequestContext, f as getControllerContext, g as getEntityIdField, h as getEntityId, i as assertValidConfig, j as DEFAULT_LIMIT, k as CrudOperation, l as createCrudHandlers, m as sendControllerResponse, n as ValidateOptions, o as validateResourceConfig, p as getControllerScope, r as ValidationResult, s as collectReadBlockedFields, t as ConfigError, u as createFastifyHandler, v as defineResourceVariants, w as defineAction, x as SeamedResourceConfig, y as AdapterLike, z as HookPhase } from "../index-DXlHwvuE.mjs";
|
|
3
4
|
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 ConfigError, 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, type ValidateOptions, type ValidationResult, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse, validateResourceConfig };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import { a as
|
|
3
|
-
import { a as
|
|
4
|
-
import { a as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
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-J99LGTJI.mjs";
|
|
3
|
+
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-Dk34dxhI.mjs";
|
|
4
|
+
import { a as ResourceDefinition, i as validateResourceConfig, n as assertValidConfig, o as createCrudRouter, r as formatValidationErrors, s as createPermissionMiddleware, t as defineResource } from "../defineResource-XFPPUu2c.mjs";
|
|
5
|
+
import { a as createFastifyHandler, c as getControllerScope, i as createCrudHandlers, l as sendControllerResponse, o as createRequestContext, s as getControllerContext } from "../pipeline-CPA-jx0M.mjs";
|
|
6
|
+
import { t as defineAggregation } from "../defineAggregation-gX4No1gt.mjs";
|
|
7
|
+
import { a as mergeResourceConfig, i as defineResourceVariants, n as getEntityIdField, o as defineAction, r as getEntityQuery, t as getEntityId } from "../core-BwwmNSp7.mjs";
|
|
7
8
|
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, assertValidConfig, collectReadBlockedFields, createCrudHandlers, createCrudRouter, createFastifyHandler, createPermissionMiddleware, createRequestContext, defineAction, defineAggregation, defineResource, defineResourceVariants, formatValidationErrors, getControllerContext, getControllerScope, getEntityId, getEntityIdField, getEntityQuery, isFieldReadable, mergeResourceConfig, sendControllerResponse, validateResourceConfig };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import "./constants-J99LGTJI.mjs";
|
|
3
|
+
import { t as defineResource } from "./defineResource-XFPPUu2c.mjs";
|
|
3
4
|
//#region src/core/defineAction.ts
|
|
4
5
|
/**
|
|
5
6
|
* Build an `ActionDefinition` with a typed handler. The literal schema
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
import "./
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { n as
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { t as __exportAll } from "./rolldown-runtime-BhflRrBs.mjs";
|
|
3
|
+
import "./constants-J99LGTJI.mjs";
|
|
4
|
+
import { f as createError } from "./errors-Bh1KK5ps.mjs";
|
|
5
|
+
import { a as buildRouteHooks, i as selectPluginMw, l as buildAuthMiddlewareForPermissions, n as buildRouteConfig, r as resolveRouterPluginMw, s as routeHookOptions, t as buildRateLimitConfig, u as buildArcDecorator } from "./rateLimit-C7mmAGs3.mjs";
|
|
6
|
+
import { n as buildActionPermissionMw, t as tryRegisterRoute } from "./registerRoute-B_QrjYZS.mjs";
|
|
7
|
+
import { l as sendControllerResponse, r as resolvePipelineSteps, t as buildActionPipelineHandler } from "./pipeline-CPA-jx0M.mjs";
|
|
8
|
+
import { n as schemaIRToJsonSchemaBranch, t as normalizeSchemaIR } from "./schemaIR-CnyKK_1j.mjs";
|
|
8
9
|
//#region src/core/createActionRouter.ts
|
|
9
10
|
var createActionRouter_exports = /* @__PURE__ */ __exportAll({
|
|
10
11
|
buildActionBodySchema: () => buildActionBodySchema,
|
|
@@ -57,7 +58,8 @@ function createActionRouter(fastify, config) {
|
|
|
57
58
|
const { urlPath, actionSubset, hasId } = mountOpts;
|
|
58
59
|
if (actionSubset.length === 0) return;
|
|
59
60
|
const subsetSet = new Set(actionSubset);
|
|
60
|
-
const
|
|
61
|
+
const perActionPermissions = actionSubset.map((name) => actionPermissions[name] ?? globalAuth);
|
|
62
|
+
const authMw = buildAuthMiddlewareForPermissions(fastify, perActionPermissions);
|
|
61
63
|
const subsetPermissions = {};
|
|
62
64
|
for (const name of actionSubset) {
|
|
63
65
|
const perm = actionPermissions[name];
|
|
@@ -89,7 +91,8 @@ function createActionRouter(fastify, config) {
|
|
|
89
91
|
if (!submitted || !subsetSet.has(submitted)) {
|
|
90
92
|
const wrongMount = submitted && allActionNames.includes(submitted) ? submitted : void 0;
|
|
91
93
|
const otherMount = hasId ? "/action" : "/:id/action";
|
|
92
|
-
|
|
94
|
+
const message = wrongMount ? `Action '${wrongMount}' on '${resourceName}' is mounted at 'POST ${otherMount}', not 'POST ${urlPath}'` : submitted ? `Unknown action '${submitted}' on '${resourceName}'. Valid at 'POST ${urlPath}': ${actionSubset.join(", ")}` : `Missing 'action' field on '${resourceName}'. Valid at 'POST ${urlPath}': ${actionSubset.join(", ")}`;
|
|
95
|
+
throw createError(400, message, {
|
|
93
96
|
code: "arc.invalid_action",
|
|
94
97
|
validActions: actionSubset,
|
|
95
98
|
mount: urlPath,
|
|
@@ -140,7 +143,8 @@ function createActionRouter(fastify, config) {
|
|
|
140
143
|
const handler = wrappedHandlers.get(action);
|
|
141
144
|
if (!handler) throw createError(400, `Invalid action '${action}'. Valid actions: ${actionSubset.join(", ")}`, { validActions: actionSubset });
|
|
142
145
|
try {
|
|
143
|
-
|
|
146
|
+
const response = await handler(id, data, req);
|
|
147
|
+
sendControllerResponse(reply, response, req);
|
|
144
148
|
return reply;
|
|
145
149
|
} catch (error) {
|
|
146
150
|
if (onError) {
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
1
|
+
/*! @classytic/arc v2.32.0 | MIT | https://classytic.com */
|
|
2
|
+
import { n as evaluateAndApplyPermission } from "./authorizationDecision-__T3EJDA.mjs";
|
|
3
|
+
import { f as createError } from "./errors-Bh1KK5ps.mjs";
|
|
4
|
+
import { u as getRequestScope } from "./types-DXYX7dIR.mjs";
|
|
5
|
+
import { a as buildRouteHooks, c as buildAuthMiddleware, i as selectPluginMw, r as resolveRouterPluginMw, s as routeHookOptions, t as buildRateLimitConfig, u as buildArcDecorator } from "./rateLimit-C7mmAGs3.mjs";
|
|
6
|
+
import { n as validateAggregations } from "./validate-PMCPR9El.mjs";
|
|
7
|
+
import { t as buildAggregationHandler } from "./buildHandler-Dn7rzUJo.mjs";
|
|
7
8
|
//#region src/core/aggregation/createAggregationRouter.ts
|
|
8
9
|
/**
|
|
9
10
|
* Register one Fastify route per aggregation. No-op when the map is
|
|
@@ -44,11 +45,13 @@ function registerOne(fastify, normalized, ctx) {
|
|
|
44
45
|
const ctx = buildPermissionContextLite(req, normalized.name);
|
|
45
46
|
await evaluateAndApplyPermission(permissionFn, ctx, req, reply, { defaultDenialMessage: (user) => user ? "You do not have permission to access this aggregation." : "Authentication required to access this aggregation." });
|
|
46
47
|
};
|
|
48
|
+
const pluginMwAll = resolveRouterPluginMw(fastify, false);
|
|
49
|
+
const pluginMw = selectPluginMw("GET", pluginMwAll);
|
|
47
50
|
const hooks = buildRouteHooks({
|
|
48
51
|
arcDecorator,
|
|
49
52
|
authMw,
|
|
50
53
|
permissionMw,
|
|
51
|
-
pluginMw
|
|
54
|
+
pluginMw,
|
|
52
55
|
routeGuards,
|
|
53
56
|
customMws: middlewares
|
|
54
57
|
});
|