-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathcore.ts
More file actions
90 lines (81 loc) · 3.01 KB
/
Copy pathcore.ts
File metadata and controls
90 lines (81 loc) · 3.01 KB
1
2
3
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Copyright (c) 2025 ObjectStack. Licensed under the Apache-2.0 license.
//
// Lean engine entry (ADR-0076). Exposes the data engine surface — engine,
// registry, hooks, validation, in-memory aggregation, utilities — WITHOUT the
// kernel plugin (`ObjectQLPlugin`), the kernel factory, or any metadata
// management (`@objectstack/metadata-protocol`). Embedders that want only the
// engine (e.g. a thin gateway) import from `@objectstack/objectql/core` so the
// 268KB metadata protocol is never pulled into their dependency graph.
//
// A boundary ratchet (ADR-0076 D2) keeps this entry free of protocol/plugin
// imports; do not add `./plugin`, `./kernel-factory`, or `@objectstack/metadata-protocol`
// re-exports here.
// Registry
export {
SchemaRegistry,
applySystemFields,
computeFQN,
parseFQN,
RESERVED_NAMESPACES,
DEFAULT_OWNER_PRIORITY,
DEFAULT_EXTENDER_PRIORITY,
} from './registry.js';
export type { ObjectContributor, SchemaRegistryOptions } from './registry.js';
// Search-normalization companion column (#2486 — pinyin recall)
export {
SEARCH_COMPANION_FIELD,
SEARCH_COMPANION_NORMALIZERS,
provisionSearchCompanion,
resolveSearchCompanionSources,
isCompanionSourceEligible,
isCompanionMatchableTerm,
containsCJK,
} from './search-companion.js';
export type { CompanionFieldMeta, CompanionObjectMeta } from './search-companion.js';
// Engine
export { ObjectQL, ObjectRepository, ScopedContext } from './engine.js';
export type { ObjectQLHostContext, HookHandler, HookEntry, OperationContext, EngineMiddleware } from './engine.js';
// In-memory aggregation fallback
export { applyInMemoryAggregation, bucketDateValue } from './in-memory-aggregation.js';
// Hook binder & wrappers (declarative-metadata → engine glue)
export { bindHooksToEngine } from './hook-binder.js';
export type { BindHooksOptions, BindHooksResult } from './hook-binder.js';
export { wrapDeclarativeHook } from './hook-wrappers.js';
export type { WrapDeclarativeOptions } from './hook-wrappers.js';
// Validation
export { ValidationError, validateRecord } from './validation/record-validator.js';
export type { FieldValidationError } from './validation/record-validator.js';
export { evaluateValidationRules, needsPriorRecord, legalNextStates } from './validation/rule-validator.js';
export type { EvaluateRulesOptions } from './validation/rule-validator.js';
export {
InMemoryHookMetricsRecorder,
noopHookMetricsRecorder,
} from './hook-metrics.js';
export type {
HookMetricsRecorder,
HookMetricLabel,
HookMetricOutcome,
HookSkipReason,
} from './hook-metrics.js';
// MetadataFacade
export { MetadataFacade } from './metadata-facade.js';
// Secret-field channel helpers
export {
SECRET_REF_PREFIX,
SECRET_MASK,
makeSecretRef,
isSecretRef,
parseSecretRef,
collectSecretFields,
} from './secret-fields.js';
// Utilities
export {
toTitleCase,
convertIntrospectedSchemaToObjects,
} from './util.js';
export type {
IntrospectedColumn,
IntrospectedForeignKey,
IntrospectedTable,
IntrospectedSchema,
} from './util.js';