@classytic/mongokit 3.22.1 → 3.23.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/{PaginationEngine-CYRTLW6s.d.mts → PaginationEngine-BnZ24ehC.d.mts} +1 -1
- package/dist/{Repository-Dr1MDAen.mjs → Repository-CLQA3sEz.mjs} +2 -1
- package/dist/actions/index.d.mts +1 -1
- package/dist/adapter/index.d.mts +14 -0
- package/dist/adapter/index.mjs +1 -1
- package/dist/{adapter-rTPLUrAV.mjs → adapter-BWgJ_Jdc.mjs} +15 -0
- package/dist/ai/index.d.mts +1 -1
- package/dist/better-auth/index.mjs +2 -2
- package/dist/{create-repository-DwODY4rZ.mjs → create-repository-Bx1PpcdF.mjs} +2 -2
- package/dist/{create-repository-DXa3nMG6.d.mts → create-repository-Cn1LkvL7.d.mts} +3 -3
- package/dist/{index-CENL7LRb.d.mts → index-DLQ6pjal.d.mts} +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.mjs +5 -5
- package/dist/{multi-tenant.plugin-CFzMOuZP.d.mts → multi-tenant.plugin-BjXXuc_g.d.mts} +1 -1
- package/dist/pagination/PaginationEngine.d.mts +1 -1
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.mjs +3 -3
- package/dist/testkit/index.d.mts +1 -1
- package/dist/testkit/index.mjs +1 -1
- package/dist/{timestamp.plugin-Cn6LKUIZ.mjs → timestamp.plugin-BnuuIDqJ.mjs} +1 -1
- package/dist/{to-plain-qzKeAC6z.d.mts → to-plain-g8-gsVxZ.d.mts} +1 -1
- package/dist/{types-BnRqAJVa.d.mts → types-BtMuhoX5.d.mts} +44 -3
- package/dist/utils/index.d.mts +1 -1
- package/dist/{validation-chain.plugin-D-EjrYpR.d.mts → validation-chain.plugin-CFJbr964.d.mts} +1 -1
- package/dist/{validation-chain.plugin-D6qWMH5d.mjs → validation-chain.plugin-ZFDHxXLn.mjs} +34 -2
- package/package.json +178 -178
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as KeysetPaginationOptions, U as PaginationConfig, V as OffsetPaginationOptions, i as AnyDocument, n as AggregatePaginationOptions } from "./types-
|
|
1
|
+
import { A as KeysetPaginationOptions, U as PaginationConfig, V as OffsetPaginationOptions, i as AnyDocument, n as AggregatePaginationOptions } from "./types-BtMuhoX5.mjs";
|
|
2
2
|
import { Model } from "mongoose";
|
|
3
3
|
import { AggregatePaginationResult, KeysetPaginationResult, OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
4
4
|
//#region src/pagination/PaginationEngine.d.ts
|
|
@@ -3037,8 +3037,9 @@ var Repository = class extends RepositoryBase {
|
|
|
3037
3037
|
async applyTransition(id, machine, args, options = {}) {
|
|
3038
3038
|
const entityId = String(id);
|
|
3039
3039
|
const sources = Array.isArray(args.from) ? args.from : [args.from];
|
|
3040
|
+
const isMultiSource = Array.isArray(args.from);
|
|
3040
3041
|
for (const from of sources) {
|
|
3041
|
-
if (from === args.to) continue;
|
|
3042
|
+
if (isMultiSource && from === args.to) continue;
|
|
3042
3043
|
machine.assertTransition(entityId, from, args.to);
|
|
3043
3044
|
}
|
|
3044
3045
|
const historyField = args.history === false ? null : args.history ?? "statusHistory";
|
package/dist/actions/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as create_d_exports, i as delete_d_exports, n as update_d_exports, o as aggregate_d_exports, r as read_d_exports } from "../index-
|
|
1
|
+
import { a as create_d_exports, i as delete_d_exports, n as update_d_exports, o as aggregate_d_exports, r as read_d_exports } from "../index-DLQ6pjal.mjs";
|
|
2
2
|
export { aggregate_d_exports as aggregate, create_d_exports as create, delete_d_exports as deleteActions, read_d_exports as read, update_d_exports as update };
|
package/dist/adapter/index.d.mts
CHANGED
|
@@ -101,6 +101,20 @@ declare class MongooseAdapter<TDoc = unknown> implements DataAdapter<TDoc> {
|
|
|
101
101
|
* find a no-op success path.
|
|
102
102
|
*/
|
|
103
103
|
validate(_data: unknown): AdapterValidationResult;
|
|
104
|
+
/**
|
|
105
|
+
* In-memory matcher for the `DataAdapter.matchesFilter` seam. Hosts
|
|
106
|
+
* (arc's `AccessControl.validateItemAccess`, the realtime change feed)
|
|
107
|
+
* validate an already-fetched document against arc's Mongo-shaped
|
|
108
|
+
* `_policyFilters` (`{ ownerId }`, `{ $or: [...] }`, `{ _id: { $in } }`,
|
|
109
|
+
* `{ organizationId }`) WITHOUT a DB round-trip. Without this, arc falls
|
|
110
|
+
* back to its flat-equality helper and operator-shaped filters become
|
|
111
|
+
* unenforceable in-process (`requireGrant` list resolutions → fail-closed
|
|
112
|
+
* 501 on realtime). Delegates to repo-core's canonical
|
|
113
|
+
* `matchesRecordFilter` — one shared contract/IR across every kit; its
|
|
114
|
+
* evaluator is id-coercion aware so a Mongo `ObjectId` `_id` matches its
|
|
115
|
+
* string form. Arrow field: keeps its binding when passed by reference.
|
|
116
|
+
*/
|
|
117
|
+
readonly matchesFilter: (item: unknown, filters: Record<string, unknown>) => boolean;
|
|
104
118
|
/**
|
|
105
119
|
* No-op — mongokit's per-call resources (`watch()` change streams,
|
|
106
120
|
* `cursor()` iterators) are released by their own `AbortSignal` /
|
package/dist/adapter/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createMongooseAdapter, r as isMongooseModel, t as MongooseAdapter } from "../adapter-
|
|
1
|
+
import { n as createMongooseAdapter, r as isMongooseModel, t as MongooseAdapter } from "../adapter-BWgJ_Jdc.mjs";
|
|
2
2
|
export { MongooseAdapter, createMongooseAdapter, isMongooseModel };
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { n as warn } from "./logger-K7dPmu2U.mjs";
|
|
2
2
|
import { t as buildCrudSchemasFromModel } from "./mongooseToJsonSchema-CVnrKFDq.mjs";
|
|
3
|
+
import { matchesRecordFilter } from "@classytic/repo-core/filter";
|
|
3
4
|
import { mergeFieldRuleConstraints } from "@classytic/repo-core/schema";
|
|
4
5
|
import { asRepositoryLike, isRepository } from "@classytic/repo-core/adapter";
|
|
5
6
|
//#region src/adapter/types.ts
|
|
@@ -161,6 +162,20 @@ var MongooseAdapter = class {
|
|
|
161
162
|
return { valid: true };
|
|
162
163
|
}
|
|
163
164
|
/**
|
|
165
|
+
* In-memory matcher for the `DataAdapter.matchesFilter` seam. Hosts
|
|
166
|
+
* (arc's `AccessControl.validateItemAccess`, the realtime change feed)
|
|
167
|
+
* validate an already-fetched document against arc's Mongo-shaped
|
|
168
|
+
* `_policyFilters` (`{ ownerId }`, `{ $or: [...] }`, `{ _id: { $in } }`,
|
|
169
|
+
* `{ organizationId }`) WITHOUT a DB round-trip. Without this, arc falls
|
|
170
|
+
* back to its flat-equality helper and operator-shaped filters become
|
|
171
|
+
* unenforceable in-process (`requireGrant` list resolutions → fail-closed
|
|
172
|
+
* 501 on realtime). Delegates to repo-core's canonical
|
|
173
|
+
* `matchesRecordFilter` — one shared contract/IR across every kit; its
|
|
174
|
+
* evaluator is id-coercion aware so a Mongo `ObjectId` `_id` matches its
|
|
175
|
+
* string form. Arrow field: keeps its binding when passed by reference.
|
|
176
|
+
*/
|
|
177
|
+
matchesFilter = (item, filters) => matchesRecordFilter(item, filters);
|
|
178
|
+
/**
|
|
164
179
|
* No-op — mongokit's per-call resources (`watch()` change streams,
|
|
165
180
|
* `cursor()` iterators) are released by their own `AbortSignal` /
|
|
166
181
|
* end-of-iteration, so the adapter holds nothing long-lived. Provided
|
package/dist/ai/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Repository } from "../Repository-
|
|
2
|
-
import { n as createMongooseAdapter } from "../adapter-
|
|
1
|
+
import { n as Repository } from "../Repository-CLQA3sEz.mjs";
|
|
2
|
+
import { n as createMongooseAdapter } from "../adapter-BWgJ_Jdc.mjs";
|
|
3
3
|
import { pluralizeBetterAuthCollection, resolveBetterAuthCollections } from "@classytic/repo-core/better-auth";
|
|
4
4
|
//#region src/better-auth/index.ts
|
|
5
5
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { n as Repository } from "./Repository-
|
|
2
|
-
import { a as methodRegistryPlugin, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, t as timestampPlugin } from "./timestamp.plugin-
|
|
1
|
+
import { n as Repository } from "./Repository-CLQA3sEz.mjs";
|
|
2
|
+
import { a as methodRegistryPlugin, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, t as timestampPlugin } from "./timestamp.plugin-BnuuIDqJ.mjs";
|
|
3
3
|
//#region src/create-repository.ts
|
|
4
4
|
function isLoggerAudit(value) {
|
|
5
5
|
const v = value;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _ as RepositoryCachePluginOptions, i as CustomIdOptions, t as MultiTenantOptions, w as AuditTrailOptions } from "./multi-tenant.plugin-
|
|
3
|
-
import { t as PaginationEngine } from "./PaginationEngine-
|
|
1
|
+
import { At as LookupOptions, B as ObjectId, H as OperationOptions, J as PopulateSpec, M as LookupPopulateOptions, N as LookupPopulateResult, P as Middleware, Q as RepositoryContext, U as PaginationConfig, X as ReadOptions, Y as PrioritizedHook, Z as ReadPreferenceType, _ as DeleteManyResult, at as SessionOptions, c as CacheableOptions, d as CollationOptions, ft as UpdateManyResult, it as SelectSpec, j as Logger, kt as LookupBuilder, n as AggregatePaginationOptions, nt as RepositoryOptions, p as CreateOptions, pt as UpdateOptions, q as PluginType, st as SoftDeleteOptions, t as AggregateOptions, ut as SortSpec$1, v as DeleteResult, w as FindOneAndUpdateOptions, xt as WithTransactionOptions } from "./types-BtMuhoX5.mjs";
|
|
2
|
+
import { _ as RepositoryCachePluginOptions, i as CustomIdOptions, t as MultiTenantOptions, w as AuditTrailOptions } from "./multi-tenant.plugin-BjXXuc_g.mjs";
|
|
3
|
+
import { t as PaginationEngine } from "./PaginationEngine-BnZ24ehC.mjs";
|
|
4
4
|
import { AggPaginationRequest, AggRequest, AggResult, ArchiveOptions, ArchiveResult, ArchiveSink, ChangeEvent, FilterInput, KeysetAggPaginationResult, QueryOptions, RepoCapabilities, RepositoryBase, TenantPurgeOptions, TenantPurgeResult, TenantPurgeStrategy, WatchOptions } from "@classytic/repo-core/repository";
|
|
5
5
|
import { ClientSession, Expression, Model, PipelineStage, PopulateOptions } from "mongoose";
|
|
6
6
|
import { Filter } from "@classytic/repo-core/filter";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { At as LookupOptions, B as ObjectId, H as OperationOptions, I as MinMaxResult, J as PopulateSpec, T as GroupResult, Z as ReadPreferenceType, ft as UpdateManyResult, ht as UpdateWithValidationResult, i as AnyDocument, it as SelectSpec, p as CreateOptions, pt as UpdateOptions, ut as SortSpec, v as DeleteResult, w as FindOneAndUpdateOptions } from "./types-BtMuhoX5.mjs";
|
|
2
2
|
import { Model, PipelineStage } from "mongoose";
|
|
3
3
|
declare namespace aggregate_d_exports {
|
|
4
4
|
export { aggregate, aggregatePaginate, average, countBy, distinct, facet, groupBy, lookup, minMax, sum, unwind };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { $ as RepositoryEvent, A as KeysetPaginationOptions, B as ObjectId, C as FieldPreset, Ct as IControllerResponse, D as InferDocument, Dt as
|
|
2
|
-
import { t as index_d_exports } from "./index-
|
|
3
|
-
import { C as AuditTrailMethods, E as auditTrailPlugin, S as AuditQueryResult, T as AuditTrailQuery, _ as RepositoryCachePluginOptions, a as DateSequentialIdOptions, b as AuditOperation, c as SequentialIdOptions, d as getNextSequence, f as prefixedId, g as RepositoryCacheHandle, h as CacheOptions, i as CustomIdOptions, l as customIdPlugin, m as CacheAdapter, n as adminBypass, o as IdGenerator, p as sequentialId, r as multiTenantPlugin, s as PrefixedIdOptions, t as MultiTenantOptions, u as dateSequentialId, v as cachePlugin, w as AuditTrailOptions, x as AuditQueryOptions, y as AuditEntry } from "./multi-tenant.plugin-
|
|
4
|
-
import { t as PaginationEngine } from "./PaginationEngine-
|
|
5
|
-
import { a as Repository, i as HOOK_PRIORITY, n as CreateRepositoryConfig, o as TransitionMachine, r as createRepository, s as AggregationBuilder, t as AuditConfig } from "./create-repository-
|
|
6
|
-
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, N as BulkWriteResult, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "./validation-chain.plugin-
|
|
1
|
+
import { $ as RepositoryEvent, A as KeysetPaginationOptions, At as LookupOptions, B as ObjectId, C as FieldPreset, Ct as IControllerResponse, D as InferDocument, Dt as MongoKitPluginName, E as HookMode, Et as MONGOKIT_PLUGIN_NAMES, F as MiddlewareContext, G as Plugin, H as OperationOptions, I as MinMaxResult, J as PopulateSpec, K as PluginFunction, L as MinimalRepoView, M as LookupPopulateOptions, N as LookupPopulateResult, O as InferRawDoc, Ot as RepositoryPluginName, P as Middleware, Q as RepositoryContext, R as MongoOperatorUpdate, S as EventPhase, St as IController, T as GroupResult, Tt as IResponseFormatter, U as PaginationConfig, V as OffsetPaginationOptions, W as PartialBy, X as ReadOptions, Y as PrioritizedHook, Z as ReadPreferenceType, _t as ValidationChainOptions, a as AnyModel, at as SessionOptions, b as EventHandlers, bt as WithPlugins, c as CacheableOptions, ct as SoftDeleteRepository, d as CollationOptions, dt as Strict, et as RepositoryInstance, f as CreateInput, ft as UpdateManyResult, g as DeepPartial, gt as UserContext, h as DecodedCursor, ht as UpdateWithValidationResult, i as AnyDocument, it as SelectSpec, j as Logger, k as KeysOfType, kt as LookupBuilder, l as CascadeOptions, lt as SortDirection, m as CursorPayload, mt as UpdatePatch, n as AggregatePaginationOptions, nt as RepositoryOptions, o as BasePaginationOptions, ot as SoftDeleteFilterMode, p as CreateOptions, pt as UpdateOptions, q as PluginType, r as AllPluginMethods, rt as RequiredBy, s as CacheOperationOptions, st as SoftDeleteOptions, t as AggregateOptions, tt as RepositoryOperation, u as CascadeRelation, ut as SortSpec, v as DeleteResult, vt as ValidatorDefinition, w as FindOneAndUpdateOptions, wt as IRequestContext, x as EventPayload, xt as WithTransactionOptions, y as DocField, yt as ValueType, z as NonNullableFields } from "./types-BtMuhoX5.mjs";
|
|
2
|
+
import { t as index_d_exports } from "./index-DLQ6pjal.mjs";
|
|
3
|
+
import { C as AuditTrailMethods, E as auditTrailPlugin, S as AuditQueryResult, T as AuditTrailQuery, _ as RepositoryCachePluginOptions, a as DateSequentialIdOptions, b as AuditOperation, c as SequentialIdOptions, d as getNextSequence, f as prefixedId, g as RepositoryCacheHandle, h as CacheOptions, i as CustomIdOptions, l as customIdPlugin, m as CacheAdapter, n as adminBypass, o as IdGenerator, p as sequentialId, r as multiTenantPlugin, s as PrefixedIdOptions, t as MultiTenantOptions, u as dateSequentialId, v as cachePlugin, w as AuditTrailOptions, x as AuditQueryOptions, y as AuditEntry } from "./multi-tenant.plugin-BjXXuc_g.mjs";
|
|
4
|
+
import { t as PaginationEngine } from "./PaginationEngine-BnZ24ehC.mjs";
|
|
5
|
+
import { a as Repository, i as HOOK_PRIORITY, n as CreateRepositoryConfig, o as TransitionMachine, r as createRepository, s as AggregationBuilder, t as AuditConfig } from "./create-repository-Cn1LkvL7.mjs";
|
|
6
|
+
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, N as BulkWriteResult, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "./validation-chain.plugin-CFJbr964.mjs";
|
|
7
7
|
import { n as SchemaPathsLike, t as FieldType$1 } from "./coercion-BjdPX3YF.mjs";
|
|
8
8
|
import { n as SchemaIndexes } from "./indexes-DIjMpYES.mjs";
|
|
9
|
-
import { _ as parseDuplicateKeyError, a as configureLogger, c as idVariants, d as createFieldPreset, f as filterResponseData, g as isDuplicateKeyError, h as createError, i as createMemoryCache, m as getMongooseProjection, n as buildCrudSchemasFromModel, p as getFieldsForUser, r as buildCrudSchemasFromMongooseSchema, t as toPlain } from "./to-plain-
|
|
9
|
+
import { _ as parseDuplicateKeyError, a as configureLogger, c as idVariants, d as createFieldPreset, f as filterResponseData, g as isDuplicateKeyError, h as createError, i as createMemoryCache, m as getMongooseProjection, n as buildCrudSchemasFromModel, p as getFieldsForUser, r as buildCrudSchemasFromMongooseSchema, t as toPlain } from "./to-plain-g8-gsVxZ.mjs";
|
|
10
10
|
import { RepoCapabilities } from "@classytic/repo-core/repository";
|
|
11
11
|
import { ClientSession, PipelineStage } from "mongoose";
|
|
12
12
|
//#region src/actions/cascade-references.d.ts
|
|
@@ -852,4 +852,4 @@ declare function createOptionsExtractor<TCtx extends Record<string, unknown>>(fi
|
|
|
852
852
|
*/
|
|
853
853
|
declare function systemContext(extra?: SessionOptions): SessionOptions;
|
|
854
854
|
//#endregion
|
|
855
|
-
export { ALL_OPERATIONS, type AggregateHelpersMethods, type AggregateOptions, type AggregatePaginationOptions, AggregationBuilder, type AllPluginMethods, type AnyDocument, type AnyModel, type AppendOnlyPluginOptions, type AuditConfig, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BasePaginationOptions, type BatchOperationsMethods, type BulkWriteResult, type CacheAdapter, type CacheOperationOptions, type CacheOptions, type CacheableOptions, type CascadeOptions, type CascadePurgeReferencesOptions, type CascadeRelation, type CollationOptions, type CollectionRWLike, type CreateInput, type CreateOptions, type CreateRepositoryConfig, type CursorPayload, type CustomIdOptions, type DateSequentialIdOptions, type DecodedCursor, type DeepPartial, type DeleteResult, type DocField, type ElasticSearchOptions, type EventHandlers, type EventPayload, type EventPhase, type FieldPreset, type FieldType, type FilterQuery, type FindOneAndUpdateOptions, type GroupResult, HOOK_PRIORITY, type HookMode, type IController, type IControllerResponse, type IRequestContext, type IResponseFormatter, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type InferDocument, type InferRawDoc, type KeysOfType, type KeysetPaginationOptions, type LeaseMethods, type LeasePluginOptions, type Logger, LookupBuilder, type LookupOptions, type LookupPopulateOptions, type LookupPopulateResult, MONGOKIT_CAPABILITIES, MUTATING_OPERATIONS, type Middleware, type MiddlewareContext, type MinMaxResult, type MinimalRepoView, type MongoOperationsMethods, type MongoOperatorUpdate, type MultiTenantOptions, type NonNullableFields, OP_REGISTRY, type ObjectId, type ObservabilityOptions, type OffsetPaginationOptions, type OperationDescriptor, type OperationMetric, type OperationOptions, type PaginationConfig, PaginationEngine, type ParsedQuery, type PartialBy, type Plugin, type PluginFunction, type PluginType, type PolicyKey, type PopulateOption, type PopulateSpec, type PrefixedIdOptions, type PrioritizedHook, type PurgeMode, type PurgeableRepoLike, QueryParser, type QueryParserOptions, READ_OPERATIONS, type ReadOptions, type ReadPreferenceType, type ReferencePurgeResult, type ReferenceRelation, Repository, Repository as default, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type RepositoryContext, type RepositoryEvent, type RepositoryInstance, type RepositoryOperation, type RepositoryOptions, type RequiredBy, type SchemaLike, type SearchMode, type SelectSpec, type SequentialIdOptions, type SessionOptions, type SoftDeleteFilterMode, type SoftDeleteMethods, type SoftDeleteOptions, type SoftDeleteRepository, type SortDirection, type SortSpec, type Strict, type SubdocumentMethods, type TenantContext, type TenantStore, type TransitionMachine, type UpdateManyResult, type UpdateOptions, type UpdatePatch, type UpdateWithValidationResult, type UserContext, type ValidationChainOptions, type ValidatorDefinition, type ValueType, type WithPlugins, type WithTransactionOptions, index_d_exports as actions, adminBypass, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, batchTransaction, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, cascadePurgeReferences, compileFilterToMongo, configureLogger, createError, createFieldPreset, createMemoryCache, createOptionsExtractor, createRepository, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, idVariants, immutableField, immutableStatesPlugin, isDuplicateKeyError, isTransactionUnsupported, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, repoOptionsFromCtx, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, systemContext, timestampPlugin, toPlain, uniqueField, validationChainPlugin, withTransaction };
|
|
855
|
+
export { ALL_OPERATIONS, type AggregateHelpersMethods, type AggregateOptions, type AggregatePaginationOptions, AggregationBuilder, type AllPluginMethods, type AnyDocument, type AnyModel, type AppendOnlyPluginOptions, type AuditConfig, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BasePaginationOptions, type BatchOperationsMethods, type BulkWriteResult, type CacheAdapter, type CacheOperationOptions, type CacheOptions, type CacheableOptions, type CascadeOptions, type CascadePurgeReferencesOptions, type CascadeRelation, type CollationOptions, type CollectionRWLike, type CreateInput, type CreateOptions, type CreateRepositoryConfig, type CursorPayload, type CustomIdOptions, type DateSequentialIdOptions, type DecodedCursor, type DeepPartial, type DeleteResult, type DocField, type ElasticSearchOptions, type EventHandlers, type EventPayload, type EventPhase, type FieldPreset, type FieldType, type FilterQuery, type FindOneAndUpdateOptions, type GroupResult, HOOK_PRIORITY, type HookMode, type IController, type IControllerResponse, type IRequestContext, type IResponseFormatter, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type InferDocument, type InferRawDoc, type KeysOfType, type KeysetPaginationOptions, type LeaseMethods, type LeasePluginOptions, type Logger, LookupBuilder, type LookupOptions, type LookupPopulateOptions, type LookupPopulateResult, MONGOKIT_CAPABILITIES, MONGOKIT_PLUGIN_NAMES, MUTATING_OPERATIONS, type Middleware, type MiddlewareContext, type MinMaxResult, type MinimalRepoView, type MongoKitPluginName, type MongoOperationsMethods, type MongoOperatorUpdate, type MultiTenantOptions, type NonNullableFields, OP_REGISTRY, type ObjectId, type ObservabilityOptions, type OffsetPaginationOptions, type OperationDescriptor, type OperationMetric, type OperationOptions, type PaginationConfig, PaginationEngine, type ParsedQuery, type PartialBy, type Plugin, type PluginFunction, type PluginType, type PolicyKey, type PopulateOption, type PopulateSpec, type PrefixedIdOptions, type PrioritizedHook, type PurgeMode, type PurgeableRepoLike, QueryParser, type QueryParserOptions, READ_OPERATIONS, type ReadOptions, type ReadPreferenceType, type ReferencePurgeResult, type ReferenceRelation, Repository, Repository as default, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type RepositoryContext, type RepositoryEvent, type RepositoryInstance, type RepositoryOperation, type RepositoryOptions, type RepositoryPluginName, type RequiredBy, type SchemaLike, type SearchMode, type SelectSpec, type SequentialIdOptions, type SessionOptions, type SoftDeleteFilterMode, type SoftDeleteMethods, type SoftDeleteOptions, type SoftDeleteRepository, type SortDirection, type SortSpec, type Strict, type SubdocumentMethods, type TenantContext, type TenantStore, type TransitionMachine, type UpdateManyResult, type UpdateOptions, type UpdatePatch, type UpdateWithValidationResult, type UserContext, type ValidationChainOptions, type ValidatorDefinition, type ValueType, type WithPlugins, type WithTransactionOptions, index_d_exports as actions, adminBypass, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, batchTransaction, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, cascadePurgeReferences, compileFilterToMongo, configureLogger, createError, createFieldPreset, createMemoryCache, createOptionsExtractor, createRepository, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, idVariants, immutableField, immutableStatesPlugin, isDuplicateKeyError, isTransactionUnsupported, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, repoOptionsFromCtx, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, systemContext, timestampPlugin, toPlain, uniqueField, validationChainPlugin, withTransaction };
|
package/dist/index.mjs
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { n as idVariants } from "./id-resolution-P2OzcyRl.mjs";
|
|
2
|
-
import { a as withTransaction, c as MUTATING_OPERATIONS, d as operationsByPolicyKey, f as MONGOKIT_CAPABILITIES, i as isTransactionUnsupported, l as OP_REGISTRY, n as Repository, o as AggregationBuilder, p as createMongoPurgePort, r as batchTransaction, s as ALL_OPERATIONS, t as HOOK_PRIORITY, u as READ_OPERATIONS } from "./Repository-
|
|
2
|
+
import { a as withTransaction, c as MUTATING_OPERATIONS, d as operationsByPolicyKey, f as MONGOKIT_CAPABILITIES, i as isTransactionUnsupported, l as OP_REGISTRY, n as Repository, o as AggregationBuilder, p as createMongoPurgePort, r as batchTransaction, s as ALL_OPERATIONS, t as HOOK_PRIORITY, u as READ_OPERATIONS } from "./Repository-CLQA3sEz.mjs";
|
|
3
3
|
import { b as LookupBuilder, x as compileFilterToMongo } from "./update-1Lq9OMD2.mjs";
|
|
4
4
|
import { n as warn, t as configureLogger } from "./logger-K7dPmu2U.mjs";
|
|
5
5
|
import { n as isDuplicateKeyError, r as parseDuplicateKeyError, t as createError } from "./error-BuByZwKU.mjs";
|
|
6
6
|
import { t as actions_exports } from "./actions/index.mjs";
|
|
7
|
-
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, l as prefixedId, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, p as AuditTrailQuery, r as adminBypass, s as dateSequentialId, t as timestampPlugin, u as sequentialId } from "./timestamp.plugin-
|
|
7
|
+
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, l as prefixedId, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, p as AuditTrailQuery, r as adminBypass, s as dateSequentialId, t as timestampPlugin, u as sequentialId } from "./timestamp.plugin-BnuuIDqJ.mjs";
|
|
8
8
|
import { t as PaginationEngine } from "./PaginationEngine-BT1ywu9k.mjs";
|
|
9
9
|
import { isGeoOperator, parseGeoFilter } from "./query/primitives/geo.mjs";
|
|
10
|
-
import { t as createRepository } from "./create-repository-
|
|
11
|
-
import { _ as
|
|
10
|
+
import { t as createRepository } from "./create-repository-Bx1PpcdF.mjs";
|
|
11
|
+
import { _ as appendOnlyPlugin, a as uniqueField, c as subdocumentPlugin, d as mongoOperationsPlugin, f as leasePlugin, g as cascadePlugin, h as elasticSearchPlugin, i as requireField, l as observabilityPlugin, m as fieldFilterPlugin, n as blockIf, o as validationChainPlugin, p as immutableStatesPlugin, r as immutableField, s as createTenantContext, t as autoInject, u as MONGOKIT_PLUGIN_NAMES, v as aggregateHelpersPlugin } from "./validation-chain.plugin-ZFDHxXLn.mjs";
|
|
12
12
|
import { i as getMongooseProjection, n as filterResponseData, r as getFieldsForUser, t as createFieldPreset } from "./field-selection-FSQFLpsU.mjs";
|
|
13
13
|
import { buildFieldTypeMap, coerceFieldValue, coerceHeuristic } from "./query/primitives/coercion.mjs";
|
|
14
14
|
import { extractSchemaIndexes } from "./query/primitives/indexes.mjs";
|
|
@@ -1462,4 +1462,4 @@ function systemContext(extra) {
|
|
|
1462
1462
|
*/
|
|
1463
1463
|
var src_default = Repository;
|
|
1464
1464
|
//#endregion
|
|
1465
|
-
export { ALL_OPERATIONS, AggregationBuilder, AuditTrailQuery, HOOK_PRIORITY, LookupBuilder, MONGOKIT_CAPABILITIES, MUTATING_OPERATIONS, OP_REGISTRY, PaginationEngine, QueryParser, READ_OPERATIONS, Repository, actions_exports as actions, adminBypass, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, batchTransaction, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, cascadePurgeReferences, compileFilterToMongo, configureLogger, createError, createFieldPreset, createMemoryCache, createOptionsExtractor, createRepository, createTenantContext, customIdPlugin, dateSequentialId, src_default as default, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, idVariants, immutableField, immutableStatesPlugin, isDuplicateKeyError, isTransactionUnsupported, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, repoOptionsFromCtx, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, systemContext, timestampPlugin, toPlain, uniqueField, validationChainPlugin, withTransaction };
|
|
1465
|
+
export { ALL_OPERATIONS, AggregationBuilder, AuditTrailQuery, HOOK_PRIORITY, LookupBuilder, MONGOKIT_CAPABILITIES, MONGOKIT_PLUGIN_NAMES, MUTATING_OPERATIONS, OP_REGISTRY, PaginationEngine, QueryParser, READ_OPERATIONS, Repository, actions_exports as actions, adminBypass, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, batchTransaction, blockIf, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, cachePlugin, cascadePlugin, cascadePurgeReferences, compileFilterToMongo, configureLogger, createError, createFieldPreset, createMemoryCache, createOptionsExtractor, createRepository, createTenantContext, customIdPlugin, dateSequentialId, src_default as default, elasticSearchPlugin, fieldFilterPlugin, filterResponseData, getFieldsForUser, getMongooseProjection, getNextSequence, idVariants, immutableField, immutableStatesPlugin, isDuplicateKeyError, isTransactionUnsupported, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, operationsByPolicyKey, parseDuplicateKeyError, prefixedId, repoOptionsFromCtx, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, systemContext, timestampPlugin, toPlain, uniqueField, validationChainPlugin, withTransaction };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as ObjectId, G as Plugin, Q as RepositoryContext } from "./types-
|
|
1
|
+
import { B as ObjectId, G as Plugin, Q as RepositoryContext } from "./types-BtMuhoX5.mjs";
|
|
2
2
|
import mongoose from "mongoose";
|
|
3
3
|
import { CacheAdapter as CacheAdapter$1, CacheOptions, RepositoryCacheHandle, RepositoryCachePluginOptions, cachePlugin } from "@classytic/repo-core/cache";
|
|
4
4
|
import { TenantConfig } from "@classytic/repo-core/tenant";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as PaginationEngine } from "../PaginationEngine-
|
|
1
|
+
import { t as PaginationEngine } from "../PaginationEngine-BnZ24ehC.mjs";
|
|
2
2
|
export { PaginationEngine };
|
package/dist/plugins/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { G as Plugin } from "../types-
|
|
2
|
-
import { C as AuditTrailMethods, E as auditTrailPlugin, S as AuditQueryResult, T as AuditTrailQuery, _ as RepositoryCachePluginOptions, a as DateSequentialIdOptions, b as AuditOperation, c as SequentialIdOptions, d as getNextSequence, f as prefixedId, g as RepositoryCacheHandle, h as CacheOptions, i as CustomIdOptions, l as customIdPlugin, m as CacheAdapter, o as IdGenerator, p as sequentialId, r as multiTenantPlugin, s as PrefixedIdOptions, t as MultiTenantOptions, u as dateSequentialId, v as cachePlugin, w as AuditTrailOptions, x as AuditQueryOptions, y as AuditEntry } from "../multi-tenant.plugin-
|
|
3
|
-
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, b as MethodRegistryRepository, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "../validation-chain.plugin-
|
|
1
|
+
import { Dt as MongoKitPluginName, Et as MONGOKIT_PLUGIN_NAMES, G as Plugin, Ot as RepositoryPluginName } from "../types-BtMuhoX5.mjs";
|
|
2
|
+
import { C as AuditTrailMethods, E as auditTrailPlugin, S as AuditQueryResult, T as AuditTrailQuery, _ as RepositoryCachePluginOptions, a as DateSequentialIdOptions, b as AuditOperation, c as SequentialIdOptions, d as getNextSequence, f as prefixedId, g as RepositoryCacheHandle, h as CacheOptions, i as CustomIdOptions, l as customIdPlugin, m as CacheAdapter, o as IdGenerator, p as sequentialId, r as multiTenantPlugin, s as PrefixedIdOptions, t as MultiTenantOptions, u as dateSequentialId, v as cachePlugin, w as AuditTrailOptions, x as AuditQueryOptions, y as AuditEntry } from "../multi-tenant.plugin-BjXXuc_g.mjs";
|
|
3
|
+
import { A as elasticSearchPlugin, C as LeasePluginOptions, D as immutableStatesPlugin, E as ImmutableStatesPluginOptions, F as auditLogPlugin, I as AppendOnlyPluginOptions, L as appendOnlyPlugin, M as BatchOperationsMethods, O as fieldFilterPlugin, P as batchOperationsPlugin, R as AggregateHelpersMethods, S as LeaseMethods, T as ImmutableClaimView, _ as observabilityPlugin, a as uniqueField, b as MethodRegistryRepository, c as TenantContext, d as SubdocumentMethods, f as subdocumentPlugin, g as OperationMetric, h as ObservabilityOptions, i as requireField, j as cascadePlugin, k as ElasticSearchOptions, l as TenantStore, m as softDeletePlugin, n as blockIf, o as validationChainPlugin, p as SoftDeleteMethods, r as immutableField, s as timestampPlugin, t as autoInject, u as createTenantContext, v as MongoOperationsMethods, w as leasePlugin, x as methodRegistryPlugin, y as mongoOperationsPlugin, z as aggregateHelpersPlugin } from "../validation-chain.plugin-CFJbr964.mjs";
|
|
4
4
|
import { ChangeLogStore } from "@classytic/repo-core/sync";
|
|
5
5
|
//#region src/plugins/change-log.plugin.d.ts
|
|
6
6
|
interface ChangeLogPluginOptions {
|
|
@@ -15,4 +15,4 @@ interface ChangeLogPluginOptions {
|
|
|
15
15
|
}
|
|
16
16
|
declare function changeLogPlugin(options: ChangeLogPluginOptions): Plugin;
|
|
17
17
|
//#endregion
|
|
18
|
-
export { type AggregateHelpersMethods, type AppendOnlyPluginOptions, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BatchOperationsMethods, type CacheAdapter, type CacheOptions, type ChangeLogPluginOptions, type CustomIdOptions, type DateSequentialIdOptions, type ElasticSearchOptions, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type LeaseMethods, type LeasePluginOptions, type MethodRegistryRepository, type MongoOperationsMethods, type MultiTenantOptions, type ObservabilityOptions, type OperationMetric, type PrefixedIdOptions, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type SequentialIdOptions, type SoftDeleteMethods, type SubdocumentMethods, type TenantContext, type TenantStore, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
|
18
|
+
export { type AggregateHelpersMethods, type AppendOnlyPluginOptions, type AuditEntry, type AuditOperation, type AuditQueryOptions, type AuditQueryResult, type AuditTrailMethods, type AuditTrailOptions, AuditTrailQuery, type BatchOperationsMethods, type CacheAdapter, type CacheOptions, type ChangeLogPluginOptions, type CustomIdOptions, type DateSequentialIdOptions, type ElasticSearchOptions, type IdGenerator, type ImmutableClaimView, type ImmutableStatesPluginOptions, type LeaseMethods, type LeasePluginOptions, MONGOKIT_PLUGIN_NAMES, type MethodRegistryRepository, type MongoKitPluginName, type MongoOperationsMethods, type MultiTenantOptions, type ObservabilityOptions, type OperationMetric, type PrefixedIdOptions, type RepositoryCacheHandle, type RepositoryCachePluginOptions, type RepositoryPluginName, type SequentialIdOptions, type SoftDeleteMethods, type SubdocumentMethods, type TenantContext, type TenantStore, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
package/dist/plugins/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, l as prefixedId, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, p as AuditTrailQuery, s as dateSequentialId, t as timestampPlugin, u as sequentialId } from "../timestamp.plugin-
|
|
2
|
-
import { _ as
|
|
1
|
+
import { a as methodRegistryPlugin, c as getNextSequence, d as cachePlugin, f as batchOperationsPlugin, h as auditLogPlugin, i as multiTenantPlugin, l as prefixedId, m as auditTrailPlugin, n as softDeletePlugin, o as customIdPlugin, p as AuditTrailQuery, s as dateSequentialId, t as timestampPlugin, u as sequentialId } from "../timestamp.plugin-BnuuIDqJ.mjs";
|
|
2
|
+
import { _ as appendOnlyPlugin, a as uniqueField, c as subdocumentPlugin, d as mongoOperationsPlugin, f as leasePlugin, g as cascadePlugin, h as elasticSearchPlugin, i as requireField, l as observabilityPlugin, m as fieldFilterPlugin, n as blockIf, o as validationChainPlugin, p as immutableStatesPlugin, r as immutableField, s as createTenantContext, t as autoInject, u as MONGOKIT_PLUGIN_NAMES, v as aggregateHelpersPlugin } from "../validation-chain.plugin-ZFDHxXLn.mjs";
|
|
3
3
|
//#region src/plugins/change-log.plugin.ts
|
|
4
4
|
const PLUGIN_NAME = "changeLog";
|
|
5
5
|
function isSkipped(context) {
|
|
@@ -70,4 +70,4 @@ function changeLogPlugin(options) {
|
|
|
70
70
|
};
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
|
-
export { AuditTrailQuery, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
|
73
|
+
export { AuditTrailQuery, MONGOKIT_PLUGIN_NAMES, aggregateHelpersPlugin, appendOnlyPlugin, auditLogPlugin, auditTrailPlugin, autoInject, batchOperationsPlugin, blockIf, cachePlugin, cascadePlugin, changeLogPlugin, createTenantContext, customIdPlugin, dateSequentialId, elasticSearchPlugin, fieldFilterPlugin, getNextSequence, immutableField, immutableStatesPlugin, leasePlugin, methodRegistryPlugin, mongoOperationsPlugin, multiTenantPlugin, observabilityPlugin, prefixedId, requireField, sequentialId, softDeletePlugin, subdocumentPlugin, timestampPlugin, uniqueField, validationChainPlugin };
|
package/dist/testkit/index.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as Repository, n as CreateRepositoryConfig } from "../create-repository-
|
|
1
|
+
import { a as Repository, n as CreateRepositoryConfig } from "../create-repository-Cn1LkvL7.mjs";
|
|
2
2
|
import { Connection, Model, Schema } from "mongoose";
|
|
3
3
|
import { MongoMemoryReplSet, MongoMemoryServer } from "mongodb-memory-server";
|
|
4
4
|
//#region src/testkit/index.d.ts
|
package/dist/testkit/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as OP_REGISTRY, s as ALL_OPERATIONS, t as HOOK_PRIORITY } from "./Repository-
|
|
1
|
+
import { l as OP_REGISTRY, s as ALL_OPERATIONS, t as HOOK_PRIORITY } from "./Repository-CLQA3sEz.mjs";
|
|
2
2
|
import { n as warn } from "./logger-K7dPmu2U.mjs";
|
|
3
3
|
import { t as createError } from "./error-BuByZwKU.mjs";
|
|
4
4
|
import { throwIfAborted, withRetry } from "@classytic/repo-core/repository";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as FieldPreset, gt as UserContext } from "./types-
|
|
1
|
+
import { C as FieldPreset, gt as UserContext } from "./types-BtMuhoX5.mjs";
|
|
2
2
|
import mongoose, { Schema } from "mongoose";
|
|
3
3
|
import { CacheAdapter } from "@classytic/repo-core/cache";
|
|
4
4
|
import { CrudSchemas, SchemaBuilderOptions } from "@classytic/repo-core/schema";
|
|
@@ -202,6 +202,41 @@ declare class LookupBuilder {
|
|
|
202
202
|
* - For real-time dashboards: Consider separate aggregation collections
|
|
203
203
|
*/
|
|
204
204
|
//#endregion
|
|
205
|
+
//#region src/plugins/names.d.ts
|
|
206
|
+
/**
|
|
207
|
+
* Canonical identifiers exposed by mongokit's bundled plugins.
|
|
208
|
+
*
|
|
209
|
+
* Use these values with `RepositoryOptions.requirePlugins` and
|
|
210
|
+
* `OperationOptions.skipPlugins` instead of repeating string literals.
|
|
211
|
+
* The values intentionally preserve the plugins' existing public names.
|
|
212
|
+
*/
|
|
213
|
+
declare const MONGOKIT_PLUGIN_NAMES: {
|
|
214
|
+
readonly aggregateHelpers: 'aggregate-helpers';
|
|
215
|
+
readonly appendOnly: 'appendOnly';
|
|
216
|
+
readonly auditLog: 'auditLog';
|
|
217
|
+
readonly auditTrail: 'auditTrail';
|
|
218
|
+
readonly batchOperations: 'batch-operations';
|
|
219
|
+
readonly cache: 'cache';
|
|
220
|
+
readonly cascade: 'cascade';
|
|
221
|
+
readonly changeLog: 'changeLog';
|
|
222
|
+
readonly customId: 'custom-id';
|
|
223
|
+
readonly elasticSearch: 'elastic-search';
|
|
224
|
+
readonly fieldFilter: 'fieldFilter';
|
|
225
|
+
readonly immutableStates: 'immutableStates';
|
|
226
|
+
readonly lease: 'lease';
|
|
227
|
+
readonly methodRegistry: 'method-registry';
|
|
228
|
+
readonly mongoOperations: 'mongo-operations';
|
|
229
|
+
readonly multiTenant: 'multi-tenant';
|
|
230
|
+
readonly observability: 'observability';
|
|
231
|
+
readonly softDelete: 'softDelete';
|
|
232
|
+
readonly subdocument: 'subdocument';
|
|
233
|
+
readonly timestamp: 'timestamp';
|
|
234
|
+
readonly validationChain: 'validation-chain';
|
|
235
|
+
};
|
|
236
|
+
type MongoKitPluginName = (typeof MONGOKIT_PLUGIN_NAMES)[keyof typeof MONGOKIT_PLUGIN_NAMES];
|
|
237
|
+
/** Bundled-name autocomplete while remaining open to third-party plugins. */
|
|
238
|
+
type RepositoryPluginName = MongoKitPluginName | (string & Record<never, never>);
|
|
239
|
+
//#endregion
|
|
205
240
|
//#region src/types/controller.types.d.ts
|
|
206
241
|
/**
|
|
207
242
|
* Framework-agnostic request context
|
|
@@ -874,13 +909,19 @@ interface RepositoryOptions {
|
|
|
874
909
|
*
|
|
875
910
|
* @example
|
|
876
911
|
* ```ts
|
|
912
|
+
* import { MONGOKIT_PLUGIN_NAMES } from '@classytic/mongokit';
|
|
913
|
+
*
|
|
877
914
|
* new Repository(OrderModel, [
|
|
878
915
|
* methodRegistryPlugin(),
|
|
879
916
|
* multiTenantPlugin({ tenantField: 'organizationId' }),
|
|
880
917
|
* softDeletePlugin(),
|
|
881
918
|
* auditLogPlugin({ logger }),
|
|
882
919
|
* ], paginationConfig, {
|
|
883
|
-
* requirePlugins: [
|
|
920
|
+
* requirePlugins: [
|
|
921
|
+
* MONGOKIT_PLUGIN_NAMES.multiTenant,
|
|
922
|
+
* MONGOKIT_PLUGIN_NAMES.softDelete,
|
|
923
|
+
* MONGOKIT_PLUGIN_NAMES.auditLog,
|
|
924
|
+
* ],
|
|
884
925
|
* });
|
|
885
926
|
* ```
|
|
886
927
|
*
|
|
@@ -888,7 +929,7 @@ interface RepositoryOptions {
|
|
|
888
929
|
* property in the chain, the constructor throws with the missing
|
|
889
930
|
* names listed.
|
|
890
931
|
*/
|
|
891
|
-
requirePlugins?: readonly
|
|
932
|
+
requirePlugins?: readonly RepositoryPluginName[];
|
|
892
933
|
/**
|
|
893
934
|
* Standard Schema validator (Zod 3.24+, Valibot 1+, ArkType 2+, ...)
|
|
894
935
|
* for write payloads. Forwarded to `RepositoryBase`, which validates
|
|
@@ -1786,4 +1827,4 @@ type AllPluginMethods<TDoc> = {
|
|
|
1786
1827
|
*/
|
|
1787
1828
|
type WithPlugins<TDoc, TRepo extends RepositoryInstance = RepositoryInstance> = TRepo & AllPluginMethods<TDoc>;
|
|
1788
1829
|
//#endregion
|
|
1789
|
-
export { RepositoryEvent as $, KeysetPaginationOptions as A, ObjectId as B, FieldPreset as C, IControllerResponse as Ct, InferDocument as D,
|
|
1830
|
+
export { RepositoryEvent as $, KeysetPaginationOptions as A, LookupOptions as At, ObjectId as B, FieldPreset as C, IControllerResponse as Ct, InferDocument as D, MongoKitPluginName as Dt, HookMode as E, MONGOKIT_PLUGIN_NAMES as Et, MiddlewareContext as F, Plugin as G, OperationOptions as H, MinMaxResult as I, PopulateSpec as J, PluginFunction as K, MinimalRepoView as L, LookupPopulateOptions as M, LookupPopulateResult as N, InferRawDoc as O, RepositoryPluginName as Ot, Middleware as P, RepositoryContext as Q, MongoOperatorUpdate as R, EventPhase as S, IController as St, GroupResult as T, IResponseFormatter as Tt, PaginationConfig as U, OffsetPaginationOptions as V, PartialBy as W, ReadOptions as X, PrioritizedHook as Y, ReadPreferenceType as Z, DeleteManyResult as _, ValidationChainOptions as _t, AnyModel as a, SessionOptions as at, EventHandlers as b, WithPlugins as bt, CacheableOptions as c, SoftDeleteRepository as ct, CollationOptions as d, Strict as dt, RepositoryInstance as et, CreateInput as f, UpdateManyResult as ft, DeepPartial as g, UserContext as gt, DecodedCursor as h, UpdateWithValidationResult as ht, AnyDocument as i, SelectSpec as it, Logger as j, KeysOfType as k, LookupBuilder as kt, CascadeOptions as l, SortDirection as lt, CursorPayload as m, UpdatePatch as mt, AggregatePaginationOptions as n, RepositoryOptions as nt, BasePaginationOptions as o, SoftDeleteFilterMode as ot, CreateOptions as p, UpdateOptions as pt, PluginType as q, AllPluginMethods as r, RequiredBy as rt, CacheOperationOptions as s, SoftDeleteOptions as st, AggregateOptions as t, RepositoryOperation as tt, CascadeRelation as u, SortSpec as ut, DeleteResult as v, ValidatorDefinition as vt, FindOneAndUpdateOptions as w, IRequestContext as wt, EventPayload as x, WithTransactionOptions as xt, DocField as y, ValueType as yt, NonNullableFields as z };
|
package/dist/utils/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as configureLogger, d as createFieldPreset, f as filterResponseData, h as createError, i as createMemoryCache, l as isObjectIdInstance, m as getMongooseProjection, n as buildCrudSchemasFromModel, o as IdType, p as getFieldsForUser, r as buildCrudSchemasFromMongooseSchema, s as getSchemaIdType, t as toPlain, u as isValidIdForType } from "../to-plain-
|
|
1
|
+
import { a as configureLogger, d as createFieldPreset, f as filterResponseData, h as createError, i as createMemoryCache, l as isObjectIdInstance, m as getMongooseProjection, n as buildCrudSchemasFromModel, o as IdType, p as getFieldsForUser, r as buildCrudSchemasFromMongooseSchema, s as getSchemaIdType, t as toPlain, u as isValidIdForType } from "../to-plain-g8-gsVxZ.mjs";
|
|
2
2
|
export { type IdType, buildCrudSchemasFromModel, buildCrudSchemasFromMongooseSchema, configureLogger, createError, createFieldPreset, createMemoryCache, filterResponseData, getFieldsForUser, getMongooseProjection, getSchemaIdType, isObjectIdInstance, isValidIdForType, toPlain };
|
package/dist/{validation-chain.plugin-D-EjrYpR.d.mts → validation-chain.plugin-CFJbr964.d.mts}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { B as ObjectId, C as FieldPreset, G as Plugin, J as PopulateSpec, Q as RepositoryContext, _t as ValidationChainOptions, et as RepositoryInstance, it as SelectSpec, j as Logger, l as CascadeOptions, st as SoftDeleteOptions, ut as SortSpec, vt as ValidatorDefinition } from "./types-
|
|
1
|
+
import { B as ObjectId, C as FieldPreset, G as Plugin, J as PopulateSpec, Q as RepositoryContext, _t as ValidationChainOptions, et as RepositoryInstance, it as SelectSpec, j as Logger, l as CascadeOptions, st as SoftDeleteOptions, ut as SortSpec, vt as ValidatorDefinition } from "./types-BtMuhoX5.mjs";
|
|
2
2
|
import { BulkWriteResult } from "@classytic/repo-core/repository";
|
|
3
3
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
4
4
|
import { OffsetPaginationResult } from "@classytic/repo-core/pagination";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as OP_REGISTRY, s as ALL_OPERATIONS } from "./Repository-
|
|
1
|
+
import { l as OP_REGISTRY, s as ALL_OPERATIONS } from "./Repository-CLQA3sEz.mjs";
|
|
2
2
|
import { _ as upsert } from "./update-1Lq9OMD2.mjs";
|
|
3
3
|
import { n as warn } from "./logger-K7dPmu2U.mjs";
|
|
4
4
|
import { t as createError } from "./error-BuByZwKU.mjs";
|
|
@@ -925,6 +925,38 @@ function mongoOperationsPlugin() {
|
|
|
925
925
|
};
|
|
926
926
|
}
|
|
927
927
|
//#endregion
|
|
928
|
+
//#region src/plugins/names.ts
|
|
929
|
+
/**
|
|
930
|
+
* Canonical identifiers exposed by mongokit's bundled plugins.
|
|
931
|
+
*
|
|
932
|
+
* Use these values with `RepositoryOptions.requirePlugins` and
|
|
933
|
+
* `OperationOptions.skipPlugins` instead of repeating string literals.
|
|
934
|
+
* The values intentionally preserve the plugins' existing public names.
|
|
935
|
+
*/
|
|
936
|
+
const MONGOKIT_PLUGIN_NAMES = {
|
|
937
|
+
aggregateHelpers: "aggregate-helpers",
|
|
938
|
+
appendOnly: "appendOnly",
|
|
939
|
+
auditLog: "auditLog",
|
|
940
|
+
auditTrail: "auditTrail",
|
|
941
|
+
batchOperations: "batch-operations",
|
|
942
|
+
cache: "cache",
|
|
943
|
+
cascade: "cascade",
|
|
944
|
+
changeLog: "changeLog",
|
|
945
|
+
customId: "custom-id",
|
|
946
|
+
elasticSearch: "elastic-search",
|
|
947
|
+
fieldFilter: "fieldFilter",
|
|
948
|
+
immutableStates: "immutableStates",
|
|
949
|
+
lease: "lease",
|
|
950
|
+
methodRegistry: "method-registry",
|
|
951
|
+
mongoOperations: "mongo-operations",
|
|
952
|
+
multiTenant: "multi-tenant",
|
|
953
|
+
observability: "observability",
|
|
954
|
+
softDelete: "softDelete",
|
|
955
|
+
subdocument: "subdocument",
|
|
956
|
+
timestamp: "timestamp",
|
|
957
|
+
validationChain: "validation-chain"
|
|
958
|
+
};
|
|
959
|
+
//#endregion
|
|
928
960
|
//#region src/plugins/observability.plugin.ts
|
|
929
961
|
/**
|
|
930
962
|
* Observability Plugin
|
|
@@ -1272,4 +1304,4 @@ function uniqueField(field, errorMessage) {
|
|
|
1272
1304
|
};
|
|
1273
1305
|
}
|
|
1274
1306
|
//#endregion
|
|
1275
|
-
export {
|
|
1307
|
+
export { appendOnlyPlugin as _, uniqueField as a, subdocumentPlugin as c, mongoOperationsPlugin as d, leasePlugin as f, cascadePlugin as g, elasticSearchPlugin as h, requireField as i, observabilityPlugin as l, fieldFilterPlugin as m, blockIf as n, validationChainPlugin as o, immutableStatesPlugin as p, immutableField as r, createTenantContext as s, autoInject as t, MONGOKIT_PLUGIN_NAMES as u, aggregateHelpersPlugin as v };
|
package/package.json
CHANGED
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@classytic/mongokit",
|
|
3
|
-
"version": "3.
|
|
4
|
-
"description": "Production-grade MongoDB repositories - smart pagination, events, and plugins. Built on @classytic/repo-core.",
|
|
5
|
-
"type": "module",
|
|
6
|
-
"sideEffects": false,
|
|
7
|
-
"main": "./dist/index.mjs",
|
|
8
|
-
"module": "./dist/index.mjs",
|
|
9
|
-
"types": "./dist/index.d.mts",
|
|
10
|
-
"exports": {
|
|
11
|
-
".": {
|
|
12
|
-
"types": "./dist/index.d.mts",
|
|
13
|
-
"default": "./dist/index.mjs"
|
|
14
|
-
},
|
|
15
|
-
"./pagination": {
|
|
16
|
-
"types": "./dist/pagination/PaginationEngine.d.mts",
|
|
17
|
-
"default": "./dist/pagination/PaginationEngine.mjs"
|
|
18
|
-
},
|
|
19
|
-
"./plugins": {
|
|
20
|
-
"types": "./dist/plugins/index.d.mts",
|
|
21
|
-
"default": "./dist/plugins/index.mjs"
|
|
22
|
-
},
|
|
23
|
-
"./utils": {
|
|
24
|
-
"types": "./dist/utils/index.d.mts",
|
|
25
|
-
"default": "./dist/utils/index.mjs"
|
|
26
|
-
},
|
|
27
|
-
"./actions": {
|
|
28
|
-
"types": "./dist/actions/index.d.mts",
|
|
29
|
-
"default": "./dist/actions/index.mjs"
|
|
30
|
-
},
|
|
31
|
-
"./ai": {
|
|
32
|
-
"types": "./dist/ai/index.d.mts",
|
|
33
|
-
"default": "./dist/ai/index.mjs"
|
|
34
|
-
},
|
|
35
|
-
"./adapter": {
|
|
36
|
-
"types": "./dist/adapter/index.d.mts",
|
|
37
|
-
"default": "./dist/adapter/index.mjs"
|
|
38
|
-
},
|
|
39
|
-
"./better-auth": {
|
|
40
|
-
"types": "./dist/better-auth/index.d.mts",
|
|
41
|
-
"default": "./dist/better-auth/index.mjs"
|
|
42
|
-
},
|
|
43
|
-
"./lock": {
|
|
44
|
-
"types": "./dist/lock/index.d.mts",
|
|
45
|
-
"default": "./dist/lock/index.mjs"
|
|
46
|
-
},
|
|
47
|
-
"./usage": {
|
|
48
|
-
"types": "./dist/usage/index.d.mts",
|
|
49
|
-
"default": "./dist/usage/index.mjs"
|
|
50
|
-
},
|
|
51
|
-
"./query/primitives/geo": {
|
|
52
|
-
"types": "./dist/query/primitives/geo.d.mts",
|
|
53
|
-
"default": "./dist/query/primitives/geo.mjs"
|
|
54
|
-
},
|
|
55
|
-
"./query/primitives/coercion": {
|
|
56
|
-
"types": "./dist/query/primitives/coercion.d.mts",
|
|
57
|
-
"default": "./dist/query/primitives/coercion.mjs"
|
|
58
|
-
},
|
|
59
|
-
"./query/primitives/indexes": {
|
|
60
|
-
"types": "./dist/query/primitives/indexes.d.mts",
|
|
61
|
-
"default": "./dist/query/primitives/indexes.mjs"
|
|
62
|
-
},
|
|
63
|
-
"./testkit": {
|
|
64
|
-
"types": "./dist/testkit/index.d.mts",
|
|
65
|
-
"default": "./dist/testkit/index.mjs"
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
"files": [
|
|
69
|
-
"dist",
|
|
70
|
-
"README.md",
|
|
71
|
-
"LICENSE"
|
|
72
|
-
],
|
|
73
|
-
"keywords": [
|
|
74
|
-
"mongodb",
|
|
75
|
-
"mongoose",
|
|
76
|
-
"repository",
|
|
77
|
-
"repository-pattern",
|
|
78
|
-
"data-access",
|
|
79
|
-
"pagination",
|
|
80
|
-
"cursor-pagination",
|
|
81
|
-
"infinite-scroll",
|
|
82
|
-
"offset-pagination",
|
|
83
|
-
"keyset-pagination",
|
|
84
|
-
"caching",
|
|
85
|
-
"redis",
|
|
86
|
-
"cache",
|
|
87
|
-
"multi-tenant",
|
|
88
|
-
"multi-tenancy",
|
|
89
|
-
"vector-search",
|
|
90
|
-
"embeddings",
|
|
91
|
-
"atlas-search",
|
|
92
|
-
"observability",
|
|
93
|
-
"event-driven",
|
|
94
|
-
"plugin-based",
|
|
95
|
-
"zero-dependencies",
|
|
96
|
-
"express",
|
|
97
|
-
"fastify",
|
|
98
|
-
"nestjs",
|
|
99
|
-
"nextjs",
|
|
100
|
-
"typescript"
|
|
101
|
-
],
|
|
102
|
-
"author": "Classytic <classytic.dev@gmail.com> (https://github.com/classytic)",
|
|
103
|
-
"contributors": [
|
|
104
|
-
"Sadman Chowdhury (https://github.com/siam923)"
|
|
105
|
-
],
|
|
106
|
-
"license": "MIT",
|
|
107
|
-
"repository": {
|
|
108
|
-
"type": "git",
|
|
109
|
-
"url": "git+https://github.com/classytic/mongokit.git"
|
|
110
|
-
},
|
|
111
|
-
"bugs": {
|
|
112
|
-
"url": "https://github.com/classytic/mongokit/issues"
|
|
113
|
-
},
|
|
114
|
-
"homepage": "https://github.com/classytic/mongokit#readme",
|
|
115
|
-
"peerDependencies": {
|
|
116
|
-
"@classytic/repo-core": ">=0.
|
|
117
|
-
"mongoose": ">=9.4.1"
|
|
118
|
-
},
|
|
119
|
-
"engines": {
|
|
120
|
-
"node": ">=22"
|
|
121
|
-
},
|
|
122
|
-
"publishConfig": {
|
|
123
|
-
"access": "public"
|
|
124
|
-
},
|
|
125
|
-
"scripts": {
|
|
126
|
-
"build": "tsdown",
|
|
127
|
-
"dev": "tsdown --watch",
|
|
128
|
-
"test": "vitest run --project unit --project integration",
|
|
129
|
-
"test:unit": "vitest run --project unit",
|
|
130
|
-
"test:integration": "vitest run --project integration",
|
|
131
|
-
"test:e2e": "vitest run --project e2e",
|
|
132
|
-
"test:all": "vitest run --project unit --project integration --project e2e",
|
|
133
|
-
"test:watch": "vitest --project unit --project integration",
|
|
134
|
-
"test:coverage": "vitest run --coverage",
|
|
135
|
-
"typecheck": "tsc --noEmit",
|
|
136
|
-
"typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
137
|
-
"lint": "biome check src/",
|
|
138
|
-
"lint:fix": "biome check src/ --write",
|
|
139
|
-
"lint:package": "publint && attw --pack . --profile esm-only",
|
|
140
|
-
"format": "biome format src/ --write",
|
|
141
|
-
"check": "biome ci src/ --diagnostic-level=error",
|
|
142
|
-
"push": "classytic-push",
|
|
143
|
-
"prepublishOnly": "npm run check && npm run build && npm run lint:package && npm run typecheck && npm run typecheck:tests && npm test",
|
|
144
|
-
"publish:dry": "npm publish --dry-run --access public",
|
|
145
|
-
"publish:npm": "npm publish --access public",
|
|
146
|
-
"release:tag": "node -e \"require('child_process').execSync('npm run push -- v'+require('./package.json').version,{stdio:'inherit'})\"",
|
|
147
|
-
"release": "npm run push -- main && npm run release:tag && npm publish --access public",
|
|
148
|
-
"release:patch": "npm version patch && npm run release",
|
|
149
|
-
"release:minor": "npm version minor && npm run release",
|
|
150
|
-
"release:major": "npm version major && npm run release"
|
|
151
|
-
},
|
|
152
|
-
"devDependencies": {
|
|
153
|
-
"@arethetypeswrong/cli": "^0.18.2",
|
|
154
|
-
"@better-auth/api-key": "^1.6.22",
|
|
155
|
-
"@better-auth/mongo-adapter": "^1.6.22",
|
|
156
|
-
"@biomejs/biome": "^2.4.10",
|
|
157
|
-
"@classytic/dev-tools": "^0.2.0",
|
|
158
|
-
"@classytic/repo-core": "^0.
|
|
159
|
-
"@types/node": "^22.0.0",
|
|
160
|
-
"@vitest/coverage-v8": "^4.1.4",
|
|
161
|
-
"ajv": "^8.18.0",
|
|
162
|
-
"ajv-formats": "^3.0.1",
|
|
163
|
-
"better-auth": "^1.6.23",
|
|
164
|
-
"dotenv": "^17.4.2",
|
|
165
|
-
"knip": "^6.3.0",
|
|
166
|
-
"mongodb": "7.2.0",
|
|
167
|
-
"mongodb-memory-server": "^10.4.3",
|
|
168
|
-
"mongoose": "^9.4.1",
|
|
169
|
-
"publint": "^0.3.18",
|
|
170
|
-
"tsdown": "^0.22.5",
|
|
171
|
-
"typescript": "^7.0.2",
|
|
172
|
-
"vitest": "^4.1.4"
|
|
173
|
-
},
|
|
174
|
-
"overrides": {
|
|
175
|
-
"mongodb": "7.2.0",
|
|
176
|
-
"bson": "7.2.0"
|
|
177
|
-
}
|
|
178
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@classytic/mongokit",
|
|
3
|
+
"version": "3.23.0",
|
|
4
|
+
"description": "Production-grade MongoDB repositories - smart pagination, events, and plugins. Built on @classytic/repo-core.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"sideEffects": false,
|
|
7
|
+
"main": "./dist/index.mjs",
|
|
8
|
+
"module": "./dist/index.mjs",
|
|
9
|
+
"types": "./dist/index.d.mts",
|
|
10
|
+
"exports": {
|
|
11
|
+
".": {
|
|
12
|
+
"types": "./dist/index.d.mts",
|
|
13
|
+
"default": "./dist/index.mjs"
|
|
14
|
+
},
|
|
15
|
+
"./pagination": {
|
|
16
|
+
"types": "./dist/pagination/PaginationEngine.d.mts",
|
|
17
|
+
"default": "./dist/pagination/PaginationEngine.mjs"
|
|
18
|
+
},
|
|
19
|
+
"./plugins": {
|
|
20
|
+
"types": "./dist/plugins/index.d.mts",
|
|
21
|
+
"default": "./dist/plugins/index.mjs"
|
|
22
|
+
},
|
|
23
|
+
"./utils": {
|
|
24
|
+
"types": "./dist/utils/index.d.mts",
|
|
25
|
+
"default": "./dist/utils/index.mjs"
|
|
26
|
+
},
|
|
27
|
+
"./actions": {
|
|
28
|
+
"types": "./dist/actions/index.d.mts",
|
|
29
|
+
"default": "./dist/actions/index.mjs"
|
|
30
|
+
},
|
|
31
|
+
"./ai": {
|
|
32
|
+
"types": "./dist/ai/index.d.mts",
|
|
33
|
+
"default": "./dist/ai/index.mjs"
|
|
34
|
+
},
|
|
35
|
+
"./adapter": {
|
|
36
|
+
"types": "./dist/adapter/index.d.mts",
|
|
37
|
+
"default": "./dist/adapter/index.mjs"
|
|
38
|
+
},
|
|
39
|
+
"./better-auth": {
|
|
40
|
+
"types": "./dist/better-auth/index.d.mts",
|
|
41
|
+
"default": "./dist/better-auth/index.mjs"
|
|
42
|
+
},
|
|
43
|
+
"./lock": {
|
|
44
|
+
"types": "./dist/lock/index.d.mts",
|
|
45
|
+
"default": "./dist/lock/index.mjs"
|
|
46
|
+
},
|
|
47
|
+
"./usage": {
|
|
48
|
+
"types": "./dist/usage/index.d.mts",
|
|
49
|
+
"default": "./dist/usage/index.mjs"
|
|
50
|
+
},
|
|
51
|
+
"./query/primitives/geo": {
|
|
52
|
+
"types": "./dist/query/primitives/geo.d.mts",
|
|
53
|
+
"default": "./dist/query/primitives/geo.mjs"
|
|
54
|
+
},
|
|
55
|
+
"./query/primitives/coercion": {
|
|
56
|
+
"types": "./dist/query/primitives/coercion.d.mts",
|
|
57
|
+
"default": "./dist/query/primitives/coercion.mjs"
|
|
58
|
+
},
|
|
59
|
+
"./query/primitives/indexes": {
|
|
60
|
+
"types": "./dist/query/primitives/indexes.d.mts",
|
|
61
|
+
"default": "./dist/query/primitives/indexes.mjs"
|
|
62
|
+
},
|
|
63
|
+
"./testkit": {
|
|
64
|
+
"types": "./dist/testkit/index.d.mts",
|
|
65
|
+
"default": "./dist/testkit/index.mjs"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"files": [
|
|
69
|
+
"dist",
|
|
70
|
+
"README.md",
|
|
71
|
+
"LICENSE"
|
|
72
|
+
],
|
|
73
|
+
"keywords": [
|
|
74
|
+
"mongodb",
|
|
75
|
+
"mongoose",
|
|
76
|
+
"repository",
|
|
77
|
+
"repository-pattern",
|
|
78
|
+
"data-access",
|
|
79
|
+
"pagination",
|
|
80
|
+
"cursor-pagination",
|
|
81
|
+
"infinite-scroll",
|
|
82
|
+
"offset-pagination",
|
|
83
|
+
"keyset-pagination",
|
|
84
|
+
"caching",
|
|
85
|
+
"redis",
|
|
86
|
+
"cache",
|
|
87
|
+
"multi-tenant",
|
|
88
|
+
"multi-tenancy",
|
|
89
|
+
"vector-search",
|
|
90
|
+
"embeddings",
|
|
91
|
+
"atlas-search",
|
|
92
|
+
"observability",
|
|
93
|
+
"event-driven",
|
|
94
|
+
"plugin-based",
|
|
95
|
+
"zero-dependencies",
|
|
96
|
+
"express",
|
|
97
|
+
"fastify",
|
|
98
|
+
"nestjs",
|
|
99
|
+
"nextjs",
|
|
100
|
+
"typescript"
|
|
101
|
+
],
|
|
102
|
+
"author": "Classytic <classytic.dev@gmail.com> (https://github.com/classytic)",
|
|
103
|
+
"contributors": [
|
|
104
|
+
"Sadman Chowdhury (https://github.com/siam923)"
|
|
105
|
+
],
|
|
106
|
+
"license": "MIT",
|
|
107
|
+
"repository": {
|
|
108
|
+
"type": "git",
|
|
109
|
+
"url": "git+https://github.com/classytic/mongokit.git"
|
|
110
|
+
},
|
|
111
|
+
"bugs": {
|
|
112
|
+
"url": "https://github.com/classytic/mongokit/issues"
|
|
113
|
+
},
|
|
114
|
+
"homepage": "https://github.com/classytic/mongokit#readme",
|
|
115
|
+
"peerDependencies": {
|
|
116
|
+
"@classytic/repo-core": ">=0.14.0",
|
|
117
|
+
"mongoose": ">=9.4.1"
|
|
118
|
+
},
|
|
119
|
+
"engines": {
|
|
120
|
+
"node": ">=22"
|
|
121
|
+
},
|
|
122
|
+
"publishConfig": {
|
|
123
|
+
"access": "public"
|
|
124
|
+
},
|
|
125
|
+
"scripts": {
|
|
126
|
+
"build": "tsdown",
|
|
127
|
+
"dev": "tsdown --watch",
|
|
128
|
+
"test": "vitest run --project unit --project integration",
|
|
129
|
+
"test:unit": "vitest run --project unit",
|
|
130
|
+
"test:integration": "vitest run --project integration",
|
|
131
|
+
"test:e2e": "vitest run --project e2e",
|
|
132
|
+
"test:all": "vitest run --project unit --project integration --project e2e",
|
|
133
|
+
"test:watch": "vitest --project unit --project integration",
|
|
134
|
+
"test:coverage": "vitest run --coverage",
|
|
135
|
+
"typecheck": "tsc --noEmit",
|
|
136
|
+
"typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
137
|
+
"lint": "biome check src/",
|
|
138
|
+
"lint:fix": "biome check src/ --write",
|
|
139
|
+
"lint:package": "publint && attw --pack . --profile esm-only",
|
|
140
|
+
"format": "biome format src/ --write",
|
|
141
|
+
"check": "biome ci src/ --diagnostic-level=error",
|
|
142
|
+
"push": "classytic-push",
|
|
143
|
+
"prepublishOnly": "npm run check && npm run build && npm run lint:package && npm run typecheck && npm run typecheck:tests && npm test",
|
|
144
|
+
"publish:dry": "npm publish --dry-run --access public",
|
|
145
|
+
"publish:npm": "npm publish --access public",
|
|
146
|
+
"release:tag": "node -e \"require('child_process').execSync('npm run push -- v'+require('./package.json').version,{stdio:'inherit'})\"",
|
|
147
|
+
"release": "npm run push -- main && npm run release:tag && npm publish --access public",
|
|
148
|
+
"release:patch": "npm version patch && npm run release",
|
|
149
|
+
"release:minor": "npm version minor && npm run release",
|
|
150
|
+
"release:major": "npm version major && npm run release"
|
|
151
|
+
},
|
|
152
|
+
"devDependencies": {
|
|
153
|
+
"@arethetypeswrong/cli": "^0.18.2",
|
|
154
|
+
"@better-auth/api-key": "^1.6.22",
|
|
155
|
+
"@better-auth/mongo-adapter": "^1.6.22",
|
|
156
|
+
"@biomejs/biome": "^2.4.10",
|
|
157
|
+
"@classytic/dev-tools": "^0.2.0",
|
|
158
|
+
"@classytic/repo-core": "^0.14.0",
|
|
159
|
+
"@types/node": "^22.0.0",
|
|
160
|
+
"@vitest/coverage-v8": "^4.1.4",
|
|
161
|
+
"ajv": "^8.18.0",
|
|
162
|
+
"ajv-formats": "^3.0.1",
|
|
163
|
+
"better-auth": "^1.6.23",
|
|
164
|
+
"dotenv": "^17.4.2",
|
|
165
|
+
"knip": "^6.3.0",
|
|
166
|
+
"mongodb": "7.2.0",
|
|
167
|
+
"mongodb-memory-server": "^10.4.3",
|
|
168
|
+
"mongoose": "^9.4.1",
|
|
169
|
+
"publint": "^0.3.18",
|
|
170
|
+
"tsdown": "^0.22.5",
|
|
171
|
+
"typescript": "^7.0.2",
|
|
172
|
+
"vitest": "^4.1.4"
|
|
173
|
+
},
|
|
174
|
+
"overrides": {
|
|
175
|
+
"mongodb": "7.2.0",
|
|
176
|
+
"bson": "7.2.0"
|
|
177
|
+
}
|
|
178
|
+
}
|