@classytic/mongokit 3.28.0 → 3.30.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 +54 -1
- package/TRADEMARK.md +22 -0
- package/dist/{create-repository-D4ZU94b3.d.mts → Repository-BXHkUtLk.d.mts} +30 -57
- package/dist/{Repository-BFBTAMlA.mjs → Repository-X7U2d0kU.mjs} +417 -47
- package/dist/actions/index.mjs +1 -1
- package/dist/adapter/index.mjs +1 -1
- package/dist/{adapter-CLvUHiTW.mjs → adapter-BitHg-CN.mjs} +1 -1
- package/dist/ai/index.d.mts +1 -1
- package/dist/better-auth/index.d.mts +13 -0
- package/dist/better-auth/index.mjs +76 -6
- package/dist/create-repository-CvD4wzuN.d.mts +54 -0
- package/dist/{create-repository-2DMwkYVz.mjs → create-repository-DYe5YEie.mjs} +3 -2
- package/dist/index.d.mts +275 -41
- package/dist/index.mjs +80 -7
- package/dist/kernel-conformance/index.d.mts +217 -0
- package/dist/kernel-conformance/index.mjs +603 -0
- package/dist/method-registry.plugin-DblM7V6j.mjs +112 -0
- package/dist/model-registry-ClKtWiHa.mjs +67 -0
- package/dist/{mongooseToJsonSchema-CByt1VhQ.mjs → mongooseToJsonSchema-DKbnKduN.mjs} +14 -3
- package/dist/{multi-tenant.plugin-DVyVGREb.d.mts → multi-tenant.plugin-2VtSSm1Y.d.mts} +1 -1
- package/dist/outbox/index.d.mts +63 -0
- package/dist/outbox/index.mjs +239 -0
- package/dist/{plugin-options-vFufQZMZ.d.mts → plugin-options-BsFH0sTi.d.mts} +1 -1
- package/dist/plugins/index.d.mts +4 -4
- package/dist/plugins/index.mjs +3 -2
- package/dist/{repository-DCHRWRXw.d.mts → repository-Q16ErTu8.d.mts} +19 -1
- package/dist/testkit/index.d.mts +8 -1
- package/dist/testkit/index.mjs +1 -1
- package/dist/{timestamp.plugin-ennbatTW.mjs → timestamp.plugin-ChFRcLRJ.mjs} +32 -143
- package/dist/{to-plain-DkF5px0R.d.mts → to-plain-BuX1RUZV.d.mts} +12 -4
- package/dist/{update-1Lq9OMD2.mjs → update-DHdXdOk_.mjs} +43 -30
- package/dist/utils/index.d.mts +2 -2
- package/dist/utils/index.mjs +1 -1
- package/dist/{validation-chain.plugin-Cm0Ttnd8.d.mts → validation-chain.plugin-BSshLJTA.d.mts} +44 -44
- package/dist/{validation-chain.plugin-k9joH2qw.mjs → validation-chain.plugin-BxTl_dYR.mjs} +139 -138
- package/package.json +28 -15
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { c as ALL_OPERATIONS, u as OP_REGISTRY } from "./Repository-
|
|
2
|
-
import { _ as upsert } from "./update-
|
|
1
|
+
import { c as ALL_OPERATIONS, u as OP_REGISTRY } from "./Repository-X7U2d0kU.mjs";
|
|
2
|
+
import { _ as upsert } from "./update-DHdXdOk_.mjs";
|
|
3
3
|
import { n as warn } from "./logger-K7dPmu2U.mjs";
|
|
4
4
|
import { t as createError } from "./error-BuByZwKU.mjs";
|
|
5
5
|
import { r as getFieldsForUser } from "./field-selection-FSQFLpsU.mjs";
|
|
@@ -463,7 +463,8 @@ function fieldFilterPlugin(fieldPreset) {
|
|
|
463
463
|
apply(repo) {
|
|
464
464
|
const applyFieldFiltering = (context) => {
|
|
465
465
|
if (!fieldPreset) return;
|
|
466
|
-
const
|
|
466
|
+
const user = context.context?.user || context.user;
|
|
467
|
+
const presetSelect = getFieldsForUser(user, fieldPreset).join(" ");
|
|
467
468
|
if (context.select) context.select = `${presetSelect} ${context.select}`;
|
|
468
469
|
else context.select = presetSelect;
|
|
469
470
|
};
|
|
@@ -476,140 +477,6 @@ function fieldFilterPlugin(fieldPreset) {
|
|
|
476
477
|
};
|
|
477
478
|
}
|
|
478
479
|
//#endregion
|
|
479
|
-
//#region src/plugins/immutable-states.plugin.ts
|
|
480
|
-
/** Ops this plugin has an explicit strategy for (see module doc). */
|
|
481
|
-
const STRATEGY_OPS = /* @__PURE__ */ new Set([
|
|
482
|
-
"create",
|
|
483
|
-
"createMany",
|
|
484
|
-
"update",
|
|
485
|
-
"delete",
|
|
486
|
-
"claimVersion",
|
|
487
|
-
"restore",
|
|
488
|
-
"findOneAndUpdate",
|
|
489
|
-
"updateMany",
|
|
490
|
-
"deleteMany",
|
|
491
|
-
"bulkWrite",
|
|
492
|
-
"claim"
|
|
493
|
-
]);
|
|
494
|
-
function immutableStatesPlugin(options) {
|
|
495
|
-
const field = options.field ?? "state";
|
|
496
|
-
const internalFlag = options.internalFlag ?? "_immutableInternal";
|
|
497
|
-
const frozen = new Set(options.states);
|
|
498
|
-
const throwViolation = (ctx) => {
|
|
499
|
-
if (options.errorFactory) throw options.errorFactory(ctx);
|
|
500
|
-
throw createError(403, `Document ${String(ctx.id)} is in immutable state${ctx.state !== void 0 ? ` '${ctx.state}'` : ""} — '${ctx.operation}' is not permitted. Frozen rows change only through the owning engine's transition verbs.`, {
|
|
501
|
-
code: "IMMUTABLE_STATE_VIOLATION",
|
|
502
|
-
meta: { ...ctx }
|
|
503
|
-
});
|
|
504
|
-
};
|
|
505
|
-
return {
|
|
506
|
-
name: "immutableStates",
|
|
507
|
-
apply(repo) {
|
|
508
|
-
const unhandled = Object.entries(OP_REGISTRY).filter(([op, meta]) => meta.mutates && !STRATEGY_OPS.has(op)).map(([op]) => op);
|
|
509
|
-
if (unhandled.length > 0) throw createError(500, `immutableStatesPlugin has no strategy for mutating op(s): ${unhandled.join(", ")}. Mongokit added write ops this plugin predates — extend the plugin before using it.`, {
|
|
510
|
-
code: "IMMUTABLE_STATES_UNHANDLED_OPS",
|
|
511
|
-
meta: { unhandled }
|
|
512
|
-
});
|
|
513
|
-
const Model = repo.Model;
|
|
514
|
-
const getState = (doc) => field.split(".").reduce((acc, key) => acc?.[key], doc);
|
|
515
|
-
const scoped = (base, ctx) => {
|
|
516
|
-
const q = { ...base };
|
|
517
|
-
if (options.tenantField && ctx.query && options.tenantField in ctx.query) q[options.tenantField] = ctx.query[options.tenantField];
|
|
518
|
-
return q;
|
|
519
|
-
};
|
|
520
|
-
/** Raw-Model read — never re-enters the repo hook pipeline. */
|
|
521
|
-
const readStateById = async (ctx) => {
|
|
522
|
-
if (ctx.id === void 0 || ctx.id === null) return void 0;
|
|
523
|
-
const doc = await Model.findOne(scoped({ _id: ctx.id }, ctx)).select({ [field]: 1 }).lean();
|
|
524
|
-
return doc ? getState(doc) : void 0;
|
|
525
|
-
};
|
|
526
|
-
const guardById = (op) => async (ctx) => {
|
|
527
|
-
if (ctx[internalFlag]) return;
|
|
528
|
-
const state = await readStateById(ctx);
|
|
529
|
-
if (state !== void 0 && frozen.has(state)) throwViolation({
|
|
530
|
-
id: ctx.id,
|
|
531
|
-
operation: op,
|
|
532
|
-
state
|
|
533
|
-
});
|
|
534
|
-
};
|
|
535
|
-
for (const op of [
|
|
536
|
-
"update",
|
|
537
|
-
"delete",
|
|
538
|
-
"claimVersion",
|
|
539
|
-
"restore"
|
|
540
|
-
]) repo.on(`before:${op}`, guardById(op));
|
|
541
|
-
repo.on("before:findOneAndUpdate", async (ctx) => {
|
|
542
|
-
if (ctx[internalFlag]) return;
|
|
543
|
-
const filter = ctx.query ?? {};
|
|
544
|
-
const doc = await Model.findOne(filter).select({
|
|
545
|
-
[field]: 1,
|
|
546
|
-
_id: 1
|
|
547
|
-
}).lean();
|
|
548
|
-
if (!doc) return;
|
|
549
|
-
const state = getState(doc);
|
|
550
|
-
if (state !== void 0 && frozen.has(state)) throwViolation({
|
|
551
|
-
id: doc._id,
|
|
552
|
-
operation: "findOneAndUpdate",
|
|
553
|
-
state
|
|
554
|
-
});
|
|
555
|
-
});
|
|
556
|
-
const guardMany = (op) => async (ctx) => {
|
|
557
|
-
if (ctx[internalFlag]) return;
|
|
558
|
-
const filter = ctx.query ?? {};
|
|
559
|
-
const hit = await Model.exists({ $and: [filter, { [field]: { $in: [...frozen] } }] });
|
|
560
|
-
if (hit) throwViolation({
|
|
561
|
-
id: hit._id,
|
|
562
|
-
operation: op,
|
|
563
|
-
state: void 0
|
|
564
|
-
});
|
|
565
|
-
};
|
|
566
|
-
repo.on("before:updateMany", guardMany("updateMany"));
|
|
567
|
-
repo.on("before:deleteMany", guardMany("deleteMany"));
|
|
568
|
-
repo.on("before:bulkWrite", (ctx) => {
|
|
569
|
-
if (ctx[internalFlag]) return;
|
|
570
|
-
throwViolation({
|
|
571
|
-
id: void 0,
|
|
572
|
-
operation: "bulkWrite",
|
|
573
|
-
state: void 0
|
|
574
|
-
});
|
|
575
|
-
});
|
|
576
|
-
repo.on("before:claim", async (rawCtx) => {
|
|
577
|
-
const ctx = rawCtx;
|
|
578
|
-
if (ctx[internalFlag]) return;
|
|
579
|
-
const t = ctx.transition;
|
|
580
|
-
if (!t) return;
|
|
581
|
-
if ((t.field ?? "status") === field) {
|
|
582
|
-
const fromSpec = t.from;
|
|
583
|
-
if (!(Array.isArray(fromSpec) ? fromSpec.some((f) => frozen.has(String(f))) : frozen.has(String(fromSpec)))) return;
|
|
584
|
-
if (options.allowClaim?.({
|
|
585
|
-
id: ctx.id,
|
|
586
|
-
transition: t,
|
|
587
|
-
data: ctx.data
|
|
588
|
-
})) return;
|
|
589
|
-
throwViolation({
|
|
590
|
-
id: ctx.id,
|
|
591
|
-
operation: "claim",
|
|
592
|
-
state: void 0
|
|
593
|
-
});
|
|
594
|
-
}
|
|
595
|
-
const state = await readStateById(ctx);
|
|
596
|
-
if (state !== void 0 && frozen.has(state)) {
|
|
597
|
-
if (options.allowClaim?.({
|
|
598
|
-
id: ctx.id,
|
|
599
|
-
transition: t,
|
|
600
|
-
data: ctx.data
|
|
601
|
-
})) return;
|
|
602
|
-
throwViolation({
|
|
603
|
-
id: ctx.id,
|
|
604
|
-
operation: "claim",
|
|
605
|
-
state
|
|
606
|
-
});
|
|
607
|
-
}
|
|
608
|
-
});
|
|
609
|
-
}
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
//#endregion
|
|
613
480
|
//#region src/plugins/idempotency-store.plugin.ts
|
|
614
481
|
function randomToken() {
|
|
615
482
|
const bytes = /* @__PURE__ */ new Uint8Array(16);
|
|
@@ -757,6 +624,140 @@ function idempotencyStorePlugin(options = {}) {
|
|
|
757
624
|
};
|
|
758
625
|
}
|
|
759
626
|
//#endregion
|
|
627
|
+
//#region src/plugins/immutable-states.plugin.ts
|
|
628
|
+
/** Ops this plugin has an explicit strategy for (see module doc). */
|
|
629
|
+
const STRATEGY_OPS = /* @__PURE__ */ new Set([
|
|
630
|
+
"create",
|
|
631
|
+
"createMany",
|
|
632
|
+
"update",
|
|
633
|
+
"delete",
|
|
634
|
+
"claimVersion",
|
|
635
|
+
"restore",
|
|
636
|
+
"findOneAndUpdate",
|
|
637
|
+
"updateMany",
|
|
638
|
+
"deleteMany",
|
|
639
|
+
"bulkWrite",
|
|
640
|
+
"claim"
|
|
641
|
+
]);
|
|
642
|
+
function immutableStatesPlugin(options) {
|
|
643
|
+
const field = options.field ?? "state";
|
|
644
|
+
const internalFlag = options.internalFlag ?? "_immutableInternal";
|
|
645
|
+
const frozen = new Set(options.states);
|
|
646
|
+
const throwViolation = (ctx) => {
|
|
647
|
+
if (options.errorFactory) throw options.errorFactory(ctx);
|
|
648
|
+
throw createError(403, `Document ${String(ctx.id)} is in immutable state${ctx.state !== void 0 ? ` '${ctx.state}'` : ""} — '${ctx.operation}' is not permitted. Frozen rows change only through the owning engine's transition verbs.`, {
|
|
649
|
+
code: "IMMUTABLE_STATE_VIOLATION",
|
|
650
|
+
meta: { ...ctx }
|
|
651
|
+
});
|
|
652
|
+
};
|
|
653
|
+
return {
|
|
654
|
+
name: "immutableStates",
|
|
655
|
+
apply(repo) {
|
|
656
|
+
const unhandled = Object.entries(OP_REGISTRY).filter(([op, meta]) => meta.mutates && !STRATEGY_OPS.has(op)).map(([op]) => op);
|
|
657
|
+
if (unhandled.length > 0) throw createError(500, `immutableStatesPlugin has no strategy for mutating op(s): ${unhandled.join(", ")}. Mongokit added write ops this plugin predates — extend the plugin before using it.`, {
|
|
658
|
+
code: "IMMUTABLE_STATES_UNHANDLED_OPS",
|
|
659
|
+
meta: { unhandled }
|
|
660
|
+
});
|
|
661
|
+
const Model = repo.Model;
|
|
662
|
+
const getState = (doc) => field.split(".").reduce((acc, key) => acc?.[key], doc);
|
|
663
|
+
const scoped = (base, ctx) => {
|
|
664
|
+
const q = { ...base };
|
|
665
|
+
if (options.tenantField && ctx.query && options.tenantField in ctx.query) q[options.tenantField] = ctx.query[options.tenantField];
|
|
666
|
+
return q;
|
|
667
|
+
};
|
|
668
|
+
/** Raw-Model read — never re-enters the repo hook pipeline. */
|
|
669
|
+
const readStateById = async (ctx) => {
|
|
670
|
+
if (ctx.id === void 0 || ctx.id === null) return void 0;
|
|
671
|
+
const doc = await Model.findOne(scoped({ _id: ctx.id }, ctx)).select({ [field]: 1 }).lean();
|
|
672
|
+
return doc ? getState(doc) : void 0;
|
|
673
|
+
};
|
|
674
|
+
const guardById = (op) => async (ctx) => {
|
|
675
|
+
if (ctx[internalFlag]) return;
|
|
676
|
+
const state = await readStateById(ctx);
|
|
677
|
+
if (state !== void 0 && frozen.has(state)) throwViolation({
|
|
678
|
+
id: ctx.id,
|
|
679
|
+
operation: op,
|
|
680
|
+
state
|
|
681
|
+
});
|
|
682
|
+
};
|
|
683
|
+
for (const op of [
|
|
684
|
+
"update",
|
|
685
|
+
"delete",
|
|
686
|
+
"claimVersion",
|
|
687
|
+
"restore"
|
|
688
|
+
]) repo.on(`before:${op}`, guardById(op));
|
|
689
|
+
repo.on("before:findOneAndUpdate", async (ctx) => {
|
|
690
|
+
if (ctx[internalFlag]) return;
|
|
691
|
+
const filter = ctx.query ?? {};
|
|
692
|
+
const doc = await Model.findOne(filter).select({
|
|
693
|
+
[field]: 1,
|
|
694
|
+
_id: 1
|
|
695
|
+
}).lean();
|
|
696
|
+
if (!doc) return;
|
|
697
|
+
const state = getState(doc);
|
|
698
|
+
if (state !== void 0 && frozen.has(state)) throwViolation({
|
|
699
|
+
id: doc._id,
|
|
700
|
+
operation: "findOneAndUpdate",
|
|
701
|
+
state
|
|
702
|
+
});
|
|
703
|
+
});
|
|
704
|
+
const guardMany = (op) => async (ctx) => {
|
|
705
|
+
if (ctx[internalFlag]) return;
|
|
706
|
+
const filter = ctx.query ?? {};
|
|
707
|
+
const hit = await Model.exists({ $and: [filter, { [field]: { $in: [...frozen] } }] });
|
|
708
|
+
if (hit) throwViolation({
|
|
709
|
+
id: hit._id,
|
|
710
|
+
operation: op,
|
|
711
|
+
state: void 0
|
|
712
|
+
});
|
|
713
|
+
};
|
|
714
|
+
repo.on("before:updateMany", guardMany("updateMany"));
|
|
715
|
+
repo.on("before:deleteMany", guardMany("deleteMany"));
|
|
716
|
+
repo.on("before:bulkWrite", (ctx) => {
|
|
717
|
+
if (ctx[internalFlag]) return;
|
|
718
|
+
throwViolation({
|
|
719
|
+
id: void 0,
|
|
720
|
+
operation: "bulkWrite",
|
|
721
|
+
state: void 0
|
|
722
|
+
});
|
|
723
|
+
});
|
|
724
|
+
repo.on("before:claim", async (rawCtx) => {
|
|
725
|
+
const ctx = rawCtx;
|
|
726
|
+
if (ctx[internalFlag]) return;
|
|
727
|
+
const t = ctx.transition;
|
|
728
|
+
if (!t) return;
|
|
729
|
+
if ((t.field ?? "status") === field) {
|
|
730
|
+
const fromSpec = t.from;
|
|
731
|
+
if (!(Array.isArray(fromSpec) ? fromSpec.some((f) => frozen.has(String(f))) : frozen.has(String(fromSpec)))) return;
|
|
732
|
+
if (options.allowClaim?.({
|
|
733
|
+
id: ctx.id,
|
|
734
|
+
transition: t,
|
|
735
|
+
data: ctx.data
|
|
736
|
+
})) return;
|
|
737
|
+
throwViolation({
|
|
738
|
+
id: ctx.id,
|
|
739
|
+
operation: "claim",
|
|
740
|
+
state: void 0
|
|
741
|
+
});
|
|
742
|
+
}
|
|
743
|
+
const state = await readStateById(ctx);
|
|
744
|
+
if (state !== void 0 && frozen.has(state)) {
|
|
745
|
+
if (options.allowClaim?.({
|
|
746
|
+
id: ctx.id,
|
|
747
|
+
transition: t,
|
|
748
|
+
data: ctx.data
|
|
749
|
+
})) return;
|
|
750
|
+
throwViolation({
|
|
751
|
+
id: ctx.id,
|
|
752
|
+
operation: "claim",
|
|
753
|
+
state
|
|
754
|
+
});
|
|
755
|
+
}
|
|
756
|
+
});
|
|
757
|
+
}
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
//#endregion
|
|
760
761
|
//#region src/plugins/lease.plugin.ts
|
|
761
762
|
function leasePlugin(options = {}) {
|
|
762
763
|
const statusField = options.statusField ?? "status";
|
|
@@ -1451,4 +1452,4 @@ function uniqueField(field, errorMessage) {
|
|
|
1451
1452
|
};
|
|
1452
1453
|
}
|
|
1453
1454
|
//#endregion
|
|
1454
|
-
export { cascadePlugin as _, uniqueField as a, subdocumentPlugin as c, mongoOperationsPlugin as d, leasePlugin as f, elasticSearchPlugin as g, fieldFilterPlugin as h, requireField as i, observabilityPlugin as l,
|
|
1455
|
+
export { cascadePlugin as _, uniqueField as a, subdocumentPlugin as c, mongoOperationsPlugin as d, leasePlugin as f, elasticSearchPlugin as g, fieldFilterPlugin as h, requireField as i, observabilityPlugin as l, idempotencyStorePlugin 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, appendOnlyPlugin as v, aggregateHelpersPlugin as y };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@classytic/mongokit",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.30.0",
|
|
4
4
|
"description": "Production-grade MongoDB repositories - smart pagination, events, and plugins. Built on @classytic/repo-core.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -40,6 +40,10 @@
|
|
|
40
40
|
"types": "./dist/better-auth/index.d.mts",
|
|
41
41
|
"default": "./dist/better-auth/index.mjs"
|
|
42
42
|
},
|
|
43
|
+
"./outbox": {
|
|
44
|
+
"types": "./dist/outbox/index.d.mts",
|
|
45
|
+
"default": "./dist/outbox/index.mjs"
|
|
46
|
+
},
|
|
43
47
|
"./lock": {
|
|
44
48
|
"types": "./dist/lock/index.d.mts",
|
|
45
49
|
"default": "./dist/lock/index.mjs"
|
|
@@ -63,12 +67,17 @@
|
|
|
63
67
|
"./testkit": {
|
|
64
68
|
"types": "./dist/testkit/index.d.mts",
|
|
65
69
|
"default": "./dist/testkit/index.mjs"
|
|
70
|
+
},
|
|
71
|
+
"./kernel-conformance": {
|
|
72
|
+
"types": "./dist/kernel-conformance/index.d.mts",
|
|
73
|
+
"default": "./dist/kernel-conformance/index.mjs"
|
|
66
74
|
}
|
|
67
75
|
},
|
|
68
76
|
"files": [
|
|
69
77
|
"dist",
|
|
70
78
|
"README.md",
|
|
71
|
-
"LICENSE"
|
|
79
|
+
"LICENSE",
|
|
80
|
+
"TRADEMARK.md"
|
|
72
81
|
],
|
|
73
82
|
"keywords": [
|
|
74
83
|
"mongodb",
|
|
@@ -113,9 +122,15 @@
|
|
|
113
122
|
},
|
|
114
123
|
"homepage": "https://github.com/classytic/mongokit#readme",
|
|
115
124
|
"peerDependencies": {
|
|
116
|
-
"@classytic/repo-core": ">=0.
|
|
125
|
+
"@classytic/repo-core": ">=0.20.0",
|
|
126
|
+
"mongodb-memory-server": ">=10.4.3",
|
|
117
127
|
"mongoose": ">=9.4.1"
|
|
118
128
|
},
|
|
129
|
+
"peerDependenciesMeta": {
|
|
130
|
+
"mongodb-memory-server": {
|
|
131
|
+
"optional": true
|
|
132
|
+
}
|
|
133
|
+
},
|
|
119
134
|
"engines": {
|
|
120
135
|
"node": ">=22"
|
|
121
136
|
},
|
|
@@ -136,11 +151,12 @@
|
|
|
136
151
|
"typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
137
152
|
"lint": "biome check src/",
|
|
138
153
|
"lint:fix": "biome check src/ --write",
|
|
139
|
-
"
|
|
154
|
+
"check:exports": "node scripts/check-exports.mjs",
|
|
155
|
+
"lint:package": "npm run check:exports && publint && attw --pack . --profile esm-only",
|
|
140
156
|
"format": "biome format src/ --write",
|
|
141
157
|
"check": "biome ci src/ --diagnostic-level=error",
|
|
142
158
|
"check:dead-code": "knip",
|
|
143
|
-
"ci": "npm run check && npm run typecheck && npm run typecheck:tests && npm run build && npm run lint:package && npm run check:dead-code && npm test",
|
|
159
|
+
"ci": "npm run check && npm run typecheck && npm run typecheck:tests && npm run build && npm run lint:package && npm run check:dead-code && npm run check:forgotten-exports && npm test",
|
|
144
160
|
"push": "classytic-push",
|
|
145
161
|
"prepublishOnly": "npm run ci",
|
|
146
162
|
"publish:dry": "npm publish --dry-run --access public",
|
|
@@ -149,7 +165,8 @@
|
|
|
149
165
|
"release": "npm run push -- main && npm run release:tag && npm publish --access public",
|
|
150
166
|
"release:patch": "npm version patch && npm run release",
|
|
151
167
|
"release:minor": "npm version minor && npm run release",
|
|
152
|
-
"release:major": "npm version major && npm run release"
|
|
168
|
+
"release:major": "npm version major && npm run release",
|
|
169
|
+
"check:forgotten-exports": "node scripts/check-forgotten-exports.mjs"
|
|
153
170
|
},
|
|
154
171
|
"devDependencies": {
|
|
155
172
|
"@arethetypeswrong/cli": "^0.18.2",
|
|
@@ -157,24 +174,20 @@
|
|
|
157
174
|
"@better-auth/mongo-adapter": "^1.6.22",
|
|
158
175
|
"@biomejs/biome": "^2.4.10",
|
|
159
176
|
"@classytic/dev-tools": "^0.2.0",
|
|
160
|
-
"@classytic/repo-core": "^0.
|
|
177
|
+
"@classytic/repo-core": "^0.20.0",
|
|
161
178
|
"@types/node": "^22.0.0",
|
|
162
179
|
"@vitest/coverage-v8": "^4.1.4",
|
|
163
180
|
"ajv": "^8.18.0",
|
|
164
181
|
"ajv-formats": "^3.0.1",
|
|
165
182
|
"better-auth": "^1.6.23",
|
|
166
183
|
"dotenv": "^17.4.2",
|
|
167
|
-
"knip": "^6.
|
|
168
|
-
"mongodb": "7.
|
|
184
|
+
"knip": "^6.31.0",
|
|
185
|
+
"mongodb": "^7.5.0",
|
|
169
186
|
"mongodb-memory-server": "^10.4.3",
|
|
170
|
-
"mongoose": "^9.
|
|
187
|
+
"mongoose": "^9.9.1",
|
|
171
188
|
"publint": "^0.3.18",
|
|
172
|
-
"tsdown": "^0.22.
|
|
189
|
+
"tsdown": "^0.22.14",
|
|
173
190
|
"typescript": "~5.9.0",
|
|
174
191
|
"vitest": "^4.1.4"
|
|
175
|
-
},
|
|
176
|
-
"overrides": {
|
|
177
|
-
"mongodb": "7.2.0",
|
|
178
|
-
"bson": "7.2.0"
|
|
179
192
|
}
|
|
180
193
|
}
|