@classytic/supplier-performance 0.2.0 → 0.3.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/CHANGELOG.md +79 -68
- package/dist/index.d.ts +20 -5
- package/dist/index.js +63 -29
- package/package.json +82 -82
package/CHANGELOG.md
CHANGED
|
@@ -1,68 +1,79 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
## 0.
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
###
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
- **
|
|
45
|
-
`
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## [0.3.0] — unpublished (2026-07-15)
|
|
4
|
+
|
|
5
|
+
### Changed — kit refresh (peer floors: mongokit >=3.22.0, repo-core >=0.13.0, primitives >=0.11.0)
|
|
6
|
+
|
|
7
|
+
- Verified clean against the mongokit 3.22 sweep (no FSM boilerplate, no
|
|
8
|
+
fences needed). Clean registry install; suite green.
|
|
9
|
+
|
|
10
|
+
## 0.2.1
|
|
11
|
+
|
|
12
|
+
Patch — outbox support, §P8.1 session guard, awaited publish, tenant-isolation fix.
|
|
13
|
+
|
|
14
|
+
## 0.2.0
|
|
15
|
+
|
|
16
|
+
Stack upgrade + tenant-isolation fix + PACKAGE_RULES compliance + real test
|
|
17
|
+
coverage. No new features.
|
|
18
|
+
|
|
19
|
+
### Fixed (security)
|
|
20
|
+
|
|
21
|
+
- **Cross-tenant leak — `multiTenantPlugin` was never wired.** Both
|
|
22
|
+
repositories were constructed with only `methodRegistryPlugin()`, so reads
|
|
23
|
+
and writes were NOT tenant-scoped despite the schema carrying an
|
|
24
|
+
`organizationId` field. The engine now derives one resolved tenant config
|
|
25
|
+
(via repo-core's `resolveTenantConfig`) and wires `multiTenantPlugin` on
|
|
26
|
+
every repo — scoping is enforced at POLICY priority and missing
|
|
27
|
+
`organizationId` throws (fail-closed). A `tenant-plugin-probe` integration
|
|
28
|
+
test plus an end-to-end isolation test guard this.
|
|
29
|
+
|
|
30
|
+
### Changed (breaking)
|
|
31
|
+
|
|
32
|
+
- **Peers:** `@classytic/mongokit` `>=3.13.0` → `>=3.16.0`; **added**
|
|
33
|
+
`@classytic/repo-core >=0.6.0` (rule 11 — the code imports
|
|
34
|
+
`@classytic/repo-core/tenant` and `/errors`); **added** `zod >=4.0.0`
|
|
35
|
+
(event catalog). `@classytic/primitives` stays `>=0.5.0` (devDep bumped to
|
|
36
|
+
`^0.7.2`).
|
|
37
|
+
- **Tenant config clean break.** Dropped the legacy
|
|
38
|
+
`{ tenantFieldType, multiTenant }` shape and the `'string'` default. Tenant
|
|
39
|
+
config is now a repo-core `TenantConfig` (or boolean), defaulting to
|
|
40
|
+
repo-core's standard `fieldType: 'objectId'`, `required: true`. Hosts with
|
|
41
|
+
string/UUID org ids pass `{ fieldType: 'string' }`. Mongokit-runtime knobs
|
|
42
|
+
(`skipWhen`, `resolveContext`, `allowDataInjection`, `onMismatch`,
|
|
43
|
+
`skipOperations`) forward through the `tenant` object.
|
|
44
|
+
- **Errors.** Removed `RecordEventValidationError extends Error`. Validation now
|
|
45
|
+
throws `SupplierPerformanceValidationError implements HttpError` (status 400,
|
|
46
|
+
code `supplier_performance.validation.invalid_input`) so arc serializes it
|
|
47
|
+
correctly.
|
|
48
|
+
|
|
49
|
+
### Added
|
|
50
|
+
|
|
51
|
+
- **Zod event catalog (rule 18):** `supplierPerformanceEventDefinitions`
|
|
52
|
+
exported from the package root AND the new `./events` subpath; per-event Zod
|
|
53
|
+
schemas (`z.iso.datetime()` timestamps), a no-drift invariant test, and
|
|
54
|
+
safeParse happy/rejection tests.
|
|
55
|
+
- **Cancellation / retry threading:** `SupplierPerformanceContext` now carries
|
|
56
|
+
`signal` / `retryPolicy`, forwarded to repo calls via `repoOptionsFromCtx`.
|
|
57
|
+
- **Test coverage** raised from one unit file to five files / 21 tests:
|
|
58
|
+
event-catalog no-drift, tenant probe + isolation, computeScore aggregation +
|
|
59
|
+
idempotency (re-run does not double-aggregate, exactly one snapshot row),
|
|
60
|
+
model-collision policy.
|
|
61
|
+
|
|
62
|
+
### Build hygiene
|
|
63
|
+
|
|
64
|
+
- `tsconfig.json`: enabled `exactOptionalPropertyTypes`; disabled
|
|
65
|
+
`declarationMap` and `sourceMap` (no source leaks). `InProcessSupplierPerformanceBus`
|
|
66
|
+
gained `close()`. `CHANGELOG.md` added to published `files`.
|
|
67
|
+
|
|
68
|
+
### Notes (verified, intentionally NOT changed)
|
|
69
|
+
|
|
70
|
+
- **No outbox / P8 dispatch machinery.** Durable delivery is host-composed
|
|
71
|
+
(§5.5 / §16); only a transport is wired, so publish failures are swallowed
|
|
72
|
+
(rule 14). Not a gap.
|
|
73
|
+
- **No capabilities boot gate.** The package uses no transactions — every verb
|
|
74
|
+
is a single-doc read/write/upsert — so the gate (transactions-only) does not
|
|
75
|
+
apply.
|
|
76
|
+
- **No rating-state CAS.** Scorecards are recomputable snapshots, not a state
|
|
77
|
+
machine; `computeScore` idempotency rests on the unique index + upsert.
|
|
78
|
+
- **`recordEvent` dedup stays host-owned** by design (hosts key differently:
|
|
79
|
+
PO-line vs PO+SKU). The kernel does not enforce a metric-dedup unique index.
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { PluginType, Repository, RepositoryContext } from "@classytic/mongokit";
|
|
|
3
3
|
import { ResolvedTenantConfig, TenantConfig } from "@classytic/repo-core/tenant";
|
|
4
4
|
import { ClientSession, Connection, Document, Model, Schema, Types } from "mongoose";
|
|
5
5
|
import { EventTransport } from "@classytic/primitives/events";
|
|
6
|
+
import { OutboxStore } from "@classytic/primitives/outbox";
|
|
6
7
|
import { HttpError } from "@classytic/repo-core/errors";
|
|
7
8
|
|
|
8
9
|
//#region src/models/performance-event.model.d.ts
|
|
@@ -241,6 +242,11 @@ interface ScoreServiceConfig {
|
|
|
241
242
|
events: PerformanceEventRepository;
|
|
242
243
|
scores: SupplierScoreRepository;
|
|
243
244
|
eventTransport?: EventTransport | undefined;
|
|
245
|
+
/**
|
|
246
|
+
* Optional durable outbox. Required for calling verbs under a
|
|
247
|
+
* host-owned ctx.session — see UnmanagedSessionError (§P8.1).
|
|
248
|
+
*/
|
|
249
|
+
outbox?: OutboxStore | undefined;
|
|
244
250
|
logger?: {
|
|
245
251
|
error(message: string, ...args: unknown[]): void;
|
|
246
252
|
} | undefined;
|
|
@@ -249,6 +255,7 @@ declare class ScoreService {
|
|
|
249
255
|
private events;
|
|
250
256
|
private scores;
|
|
251
257
|
private eventTransport;
|
|
258
|
+
private outbox;
|
|
252
259
|
private logger;
|
|
253
260
|
constructor(config: ScoreServiceConfig);
|
|
254
261
|
/**
|
|
@@ -273,11 +280,12 @@ declare class ScoreService {
|
|
|
273
280
|
*/
|
|
274
281
|
getScorecard(supplierId: string, ctx: SupplierPerformanceContext, period?: ScorePeriod): Promise<SupplierScoreDocument | null>;
|
|
275
282
|
/**
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
*
|
|
280
|
-
*
|
|
283
|
+
* P8 dispatch. Outbox save (when wired) runs first, session-bound, and
|
|
284
|
+
* failures PROPAGATE; the transport publish is best-effort (swallowed)
|
|
285
|
+
* and skipped under a host session — the relay delivers the durable
|
|
286
|
+
* row post-commit (§P8.1). A host session with NO outbox throws
|
|
287
|
+
* `UnmanagedSessionError` before any side effect: the pre-guard
|
|
288
|
+
* fire-and-forget publish could leak ghost events on rollback.
|
|
281
289
|
*/
|
|
282
290
|
private publish;
|
|
283
291
|
}
|
|
@@ -308,6 +316,8 @@ interface SupplierPerformanceConfig {
|
|
|
308
316
|
* the bundled `InProcessSupplierPerformanceBus`. Omit to skip event
|
|
309
317
|
* emission entirely.
|
|
310
318
|
*/
|
|
319
|
+
/** Optional durable outbox — enables host-session (relay-only) mode. */
|
|
320
|
+
outbox?: OutboxStore | undefined;
|
|
311
321
|
eventTransport?: EventTransport | undefined;
|
|
312
322
|
/**
|
|
313
323
|
* Tenant scoping config — `TenantConfig` from `@classytic/repo-core/tenant`
|
|
@@ -354,6 +364,11 @@ declare class SupplierPerformanceError extends Error implements HttpError {
|
|
|
354
364
|
readonly status: number;
|
|
355
365
|
constructor(message: string, code: string, status: number);
|
|
356
366
|
}
|
|
367
|
+
/**
|
|
368
|
+
* Thrown when a host passes ctx.session but no OutboxStore is wired —
|
|
369
|
+
* publishing mid-transaction would leak ghost events on rollback (§P8.1).
|
|
370
|
+
*/
|
|
371
|
+
|
|
357
372
|
/** Invalid input to `recordEvent` / `computeScore` (missing supplierId, bad period). */
|
|
358
373
|
declare class SupplierPerformanceValidationError extends SupplierPerformanceError {
|
|
359
374
|
constructor(message: string);
|
package/dist/index.js
CHANGED
|
@@ -360,6 +360,33 @@ var SupplierScoreRepository = class extends Repository {
|
|
|
360
360
|
}
|
|
361
361
|
};
|
|
362
362
|
//#endregion
|
|
363
|
+
//#region src/domain/errors/supplier-performance.errors.ts
|
|
364
|
+
var SupplierPerformanceError = class extends Error {
|
|
365
|
+
code;
|
|
366
|
+
status;
|
|
367
|
+
constructor(message, code, status) {
|
|
368
|
+
super(message);
|
|
369
|
+
this.code = code;
|
|
370
|
+
this.status = status;
|
|
371
|
+
this.name = this.constructor.name;
|
|
372
|
+
}
|
|
373
|
+
};
|
|
374
|
+
/**
|
|
375
|
+
* Thrown when a host passes ctx.session but no OutboxStore is wired —
|
|
376
|
+
* publishing mid-transaction would leak ghost events on rollback (§P8.1).
|
|
377
|
+
*/
|
|
378
|
+
var UnmanagedSessionError = class extends SupplierPerformanceError {
|
|
379
|
+
constructor() {
|
|
380
|
+
super("ctx.session provided but no OutboxStore is wired — events would leak or be lost. Wire an outbox or drop the session.", "supplier_performance.session.unmanaged", 409);
|
|
381
|
+
}
|
|
382
|
+
};
|
|
383
|
+
/** Invalid input to `recordEvent` / `computeScore` (missing supplierId, bad period). */
|
|
384
|
+
var SupplierPerformanceValidationError = class extends SupplierPerformanceError {
|
|
385
|
+
constructor(message) {
|
|
386
|
+
super(message, "supplier_performance.validation.invalid_input", 400);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
//#endregion
|
|
363
390
|
//#region src/calc/score-calculator.ts
|
|
364
391
|
const COMPOSITE_WEIGHTS = {
|
|
365
392
|
onTime: .5,
|
|
@@ -430,34 +457,30 @@ function round(value, digits) {
|
|
|
430
457
|
return Math.round(value * factor) / factor;
|
|
431
458
|
}
|
|
432
459
|
//#endregion
|
|
433
|
-
//#region src/domain/errors/supplier-performance.errors.ts
|
|
434
|
-
var SupplierPerformanceError = class extends Error {
|
|
435
|
-
code;
|
|
436
|
-
status;
|
|
437
|
-
constructor(message, code, status) {
|
|
438
|
-
super(message);
|
|
439
|
-
this.code = code;
|
|
440
|
-
this.status = status;
|
|
441
|
-
this.name = this.constructor.name;
|
|
442
|
-
}
|
|
443
|
-
};
|
|
444
|
-
/** Invalid input to `recordEvent` / `computeScore` (missing supplierId, bad period). */
|
|
445
|
-
var SupplierPerformanceValidationError = class extends SupplierPerformanceError {
|
|
446
|
-
constructor(message) {
|
|
447
|
-
super(message, "supplier_performance.validation.invalid_input", 400);
|
|
448
|
-
}
|
|
449
|
-
};
|
|
450
|
-
//#endregion
|
|
451
460
|
//#region src/services/score.service.ts
|
|
461
|
+
/**
|
|
462
|
+
* ScoreService — orchestration on top of the two repositories.
|
|
463
|
+
*
|
|
464
|
+
* Service-justified per PACKAGE_RULES §2 (multi-repo orchestration + event
|
|
465
|
+
* emission + pure aggregation algorithm). Pure scoring math lives in
|
|
466
|
+
* `calc/score-calculator.ts`; the service handles persistence + events.
|
|
467
|
+
*
|
|
468
|
+
* Verbs:
|
|
469
|
+
* recordEvent(input, ctx) — append to event log + emit `event.recorded`
|
|
470
|
+
* computeScore(input, ctx) — aggregate + upsert + emit `score.computed`
|
|
471
|
+
* getScorecard(supplierId, period?, ctx) — read-or-compute (lazy refresh)
|
|
472
|
+
*/
|
|
452
473
|
var ScoreService = class {
|
|
453
474
|
events;
|
|
454
475
|
scores;
|
|
455
476
|
eventTransport;
|
|
477
|
+
outbox;
|
|
456
478
|
logger;
|
|
457
479
|
constructor(config) {
|
|
458
480
|
this.events = config.events;
|
|
459
481
|
this.scores = config.scores;
|
|
460
482
|
this.eventTransport = config.eventTransport;
|
|
483
|
+
this.outbox = config.outbox;
|
|
461
484
|
this.logger = config.logger ?? console;
|
|
462
485
|
}
|
|
463
486
|
/**
|
|
@@ -479,7 +502,7 @@ var ScoreService = class {
|
|
|
479
502
|
...input.sourceType !== void 0 ? { sourceType: input.sourceType } : {},
|
|
480
503
|
...input.metadata !== void 0 ? { metadata: input.metadata } : {}
|
|
481
504
|
}, repoOptionsFromCtx(ctx));
|
|
482
|
-
this.publish(SupplierPerformanceEvents.EVENT_RECORDED, ctx, {
|
|
505
|
+
await this.publish(SupplierPerformanceEvents.EVENT_RECORDED, ctx, {
|
|
483
506
|
supplierId: input.supplierId,
|
|
484
507
|
type: input.type,
|
|
485
508
|
occurredAt: occurredAt.toISOString(),
|
|
@@ -503,7 +526,7 @@ var ScoreService = class {
|
|
|
503
526
|
metrics,
|
|
504
527
|
eventCount: eventsForCalc.length
|
|
505
528
|
}, ctx);
|
|
506
|
-
this.publish(SupplierPerformanceEvents.SCORE_COMPUTED, ctx, {
|
|
529
|
+
await this.publish(SupplierPerformanceEvents.SCORE_COMPUTED, ctx, {
|
|
507
530
|
supplierId: input.supplierId,
|
|
508
531
|
period: {
|
|
509
532
|
start: period.start.toISOString(),
|
|
@@ -528,18 +551,28 @@ var ScoreService = class {
|
|
|
528
551
|
return this.scores.findLatest(supplierId, ctx);
|
|
529
552
|
}
|
|
530
553
|
/**
|
|
531
|
-
*
|
|
532
|
-
*
|
|
533
|
-
*
|
|
534
|
-
*
|
|
535
|
-
*
|
|
554
|
+
* P8 dispatch. Outbox save (when wired) runs first, session-bound, and
|
|
555
|
+
* failures PROPAGATE; the transport publish is best-effort (swallowed)
|
|
556
|
+
* and skipped under a host session — the relay delivers the durable
|
|
557
|
+
* row post-commit (§P8.1). A host session with NO outbox throws
|
|
558
|
+
* `UnmanagedSessionError` before any side effect: the pre-guard
|
|
559
|
+
* fire-and-forget publish could leak ghost events on rollback.
|
|
536
560
|
*/
|
|
537
|
-
publish(type, ctx, data) {
|
|
538
|
-
if (!this.eventTransport) return;
|
|
561
|
+
async publish(type, ctx, data) {
|
|
562
|
+
if (!this.eventTransport && !this.outbox) return;
|
|
563
|
+
if (ctx.session && !this.outbox) throw new UnmanagedSessionError();
|
|
539
564
|
const event = createEvent(type, data, ctx);
|
|
540
|
-
this.
|
|
565
|
+
if (this.outbox) try {
|
|
566
|
+
await this.outbox.save(event, { session: ctx.session });
|
|
567
|
+
} catch (err) {
|
|
568
|
+
this.logger.error(`[supplier-performance] outbox.save failed for ${type}:`, err);
|
|
569
|
+
throw err;
|
|
570
|
+
}
|
|
571
|
+
if (this.eventTransport && !ctx.session) try {
|
|
572
|
+
await this.eventTransport.publish(event);
|
|
573
|
+
} catch (err) {
|
|
541
574
|
this.logger.error(`[supplier-performance] publish failed for ${type}:`, err);
|
|
542
|
-
}
|
|
575
|
+
}
|
|
543
576
|
}
|
|
544
577
|
};
|
|
545
578
|
function toCalcEvent(doc) {
|
|
@@ -601,6 +634,7 @@ async function createSupplierPerformance(config) {
|
|
|
601
634
|
events: performanceEvent,
|
|
602
635
|
scores: supplierScore,
|
|
603
636
|
eventTransport: events,
|
|
637
|
+
...config.outbox !== void 0 ? { outbox: config.outbox } : {},
|
|
604
638
|
logger
|
|
605
639
|
});
|
|
606
640
|
return {
|
package/package.json
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@classytic/supplier-performance",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "Framework-agnostic supplier performance engine
|
|
5
|
-
"author": "Classytic",
|
|
6
|
-
"license": "MIT",
|
|
7
|
-
"homepage": "https://www.npmjs.com/package/@classytic/supplier-performance",
|
|
8
|
-
"bugs": {
|
|
9
|
-
"url": "https://github.com/classytic/supplier-performance/issues"
|
|
10
|
-
},
|
|
11
|
-
"repository": {
|
|
12
|
-
"type": "git",
|
|
13
|
-
"url": "git+https://github.com/classytic/supplier-performance.git"
|
|
14
|
-
},
|
|
15
|
-
"keywords": [
|
|
16
|
-
"supplier",
|
|
17
|
-
"performance",
|
|
18
|
-
"scorecard",
|
|
19
|
-
"vendor",
|
|
20
|
-
"procurement",
|
|
21
|
-
"on-time-delivery",
|
|
22
|
-
"defect-rate",
|
|
23
|
-
"price-variance",
|
|
24
|
-
"mongodb",
|
|
25
|
-
"classytic"
|
|
26
|
-
],
|
|
27
|
-
"type": "module",
|
|
28
|
-
"sideEffects": false,
|
|
29
|
-
"engines": {
|
|
30
|
-
"node": ">=22"
|
|
31
|
-
},
|
|
32
|
-
"publishConfig": {
|
|
33
|
-
"access": "public"
|
|
34
|
-
},
|
|
35
|
-
"exports": {
|
|
36
|
-
".": {
|
|
37
|
-
"types": "./dist/index.d.ts",
|
|
38
|
-
"default": "./dist/index.js"
|
|
39
|
-
},
|
|
40
|
-
"./events": {
|
|
41
|
-
"types": "./dist/events.d.ts",
|
|
42
|
-
"default": "./dist/events.js"
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
"main": "./dist/index.js",
|
|
46
|
-
"types": "./dist/index.d.ts",
|
|
47
|
-
"files": [
|
|
48
|
-
"dist",
|
|
49
|
-
"README.md",
|
|
50
|
-
"CHANGELOG.md",
|
|
51
|
-
"LICENSE"
|
|
52
|
-
],
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build": "tsdown",
|
|
55
|
-
"typecheck": "tsc --noEmit",
|
|
56
|
-
"test": "vitest run",
|
|
57
|
-
"prepublishOnly": "npm run typecheck && npm run test && npm run build",
|
|
58
|
-
"push": "classytic-push",
|
|
59
|
-
"release:tag": "node -e \"require('child_process').execSync('npm run push -- v'+require('./package.json').version,{stdio:'inherit'})\"",
|
|
60
|
-
"release": "npm run push -- main && npm run release:tag && npm publish"
|
|
61
|
-
},
|
|
62
|
-
"peerDependencies": {
|
|
63
|
-
"@classytic/mongokit": ">=3.
|
|
64
|
-
"@classytic/repo-core": ">=0.
|
|
65
|
-
"@classytic/primitives": ">=0.
|
|
66
|
-
"mongoose": ">=9.4.1",
|
|
67
|
-
"zod": ">=4.0.0"
|
|
68
|
-
},
|
|
69
|
-
"devDependencies": {
|
|
70
|
-
"@classytic/dev-tools": "^0.2.0",
|
|
71
|
-
"@classytic/mongokit": "
|
|
72
|
-
"@classytic/repo-core": "
|
|
73
|
-
"@classytic/primitives": "^0.
|
|
74
|
-
"@types/node": "^25.5.0",
|
|
75
|
-
"mongodb-memory-server": "^10.2.3",
|
|
76
|
-
"mongoose": "^9.4.1",
|
|
77
|
-
"tsdown": "^0.14.2",
|
|
78
|
-
"typescript": "^5.8.2",
|
|
79
|
-
"vitest": "^3.2.4",
|
|
80
|
-
"zod": "^4.0.0"
|
|
81
|
-
}
|
|
82
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@classytic/supplier-performance",
|
|
3
|
+
"version": "0.3.0",
|
|
4
|
+
"description": "Framework-agnostic supplier performance engine \u00e2\u20ac\u201d on-time-delivery, defect, and price-variance tracking with append-only event log + cached scorecards. Powered by MongoDB via @classytic/mongokit. Zero framework deps \u00e2\u20ac\u201d usable from Arc, Express, Nest, Next.js, or raw Node.",
|
|
5
|
+
"author": "Classytic",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"homepage": "https://www.npmjs.com/package/@classytic/supplier-performance",
|
|
8
|
+
"bugs": {
|
|
9
|
+
"url": "https://github.com/classytic/supplier-performance/issues"
|
|
10
|
+
},
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "git+https://github.com/classytic/supplier-performance.git"
|
|
14
|
+
},
|
|
15
|
+
"keywords": [
|
|
16
|
+
"supplier",
|
|
17
|
+
"performance",
|
|
18
|
+
"scorecard",
|
|
19
|
+
"vendor",
|
|
20
|
+
"procurement",
|
|
21
|
+
"on-time-delivery",
|
|
22
|
+
"defect-rate",
|
|
23
|
+
"price-variance",
|
|
24
|
+
"mongodb",
|
|
25
|
+
"classytic"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": false,
|
|
29
|
+
"engines": {
|
|
30
|
+
"node": ">=22"
|
|
31
|
+
},
|
|
32
|
+
"publishConfig": {
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/index.d.ts",
|
|
38
|
+
"default": "./dist/index.js"
|
|
39
|
+
},
|
|
40
|
+
"./events": {
|
|
41
|
+
"types": "./dist/events.d.ts",
|
|
42
|
+
"default": "./dist/events.js"
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"main": "./dist/index.js",
|
|
46
|
+
"types": "./dist/index.d.ts",
|
|
47
|
+
"files": [
|
|
48
|
+
"dist",
|
|
49
|
+
"README.md",
|
|
50
|
+
"CHANGELOG.md",
|
|
51
|
+
"LICENSE"
|
|
52
|
+
],
|
|
53
|
+
"scripts": {
|
|
54
|
+
"build": "tsdown",
|
|
55
|
+
"typecheck": "tsc --noEmit",
|
|
56
|
+
"test": "vitest run",
|
|
57
|
+
"prepublishOnly": "npm run typecheck && npm run test && npm run build",
|
|
58
|
+
"push": "classytic-push",
|
|
59
|
+
"release:tag": "node -e \"require('child_process').execSync('npm run push -- v'+require('./package.json').version,{stdio:'inherit'})\"",
|
|
60
|
+
"release": "npm run push -- main && npm run release:tag && npm publish"
|
|
61
|
+
},
|
|
62
|
+
"peerDependencies": {
|
|
63
|
+
"@classytic/mongokit": ">=3.22.0",
|
|
64
|
+
"@classytic/repo-core": ">=0.13.0",
|
|
65
|
+
"@classytic/primitives": ">=0.11.0",
|
|
66
|
+
"mongoose": ">=9.4.1",
|
|
67
|
+
"zod": ">=4.0.0"
|
|
68
|
+
},
|
|
69
|
+
"devDependencies": {
|
|
70
|
+
"@classytic/dev-tools": "^0.2.0",
|
|
71
|
+
"@classytic/mongokit": "^3.22.1",
|
|
72
|
+
"@classytic/repo-core": "^0.13.0",
|
|
73
|
+
"@classytic/primitives": "^0.11.0",
|
|
74
|
+
"@types/node": "^25.5.0",
|
|
75
|
+
"mongodb-memory-server": "^10.2.3",
|
|
76
|
+
"mongoose": "^9.4.1",
|
|
77
|
+
"tsdown": "^0.14.2",
|
|
78
|
+
"typescript": "^5.8.2",
|
|
79
|
+
"vitest": "^3.2.4",
|
|
80
|
+
"zod": "^4.0.0"
|
|
81
|
+
}
|
|
82
|
+
}
|