@happyvertical/smrt-core 0.51.32 → 0.51.34
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/agents/build-knowledge.md +13 -0
- package/dist/__tests__/fixtures/collection-coverage-fixtures.d.ts +8 -0
- package/dist/__tests__/fixtures/inheritance-resolver-fixtures.d.ts +9 -0
- package/dist/__tests__/fixtures/inheritance-test-classes.d.ts +5 -0
- package/dist/__tests__/fixtures/object-ai-memory-fixtures.d.ts +10 -0
- package/dist/__typechecks__/collection-read-plan.d.ts +2 -2
- package/dist/adapters/ai-usage.d.ts +5 -2
- package/dist/adapters/cost-rates.d.ts +1 -1
- package/dist/adapters/metrics.d.ts +7 -1
- package/dist/adapters/pubsub.d.ts +7 -1
- package/dist/cascade.d.ts +69 -3
- package/dist/change-feed-authz.d.ts +85 -2
- package/dist/change-feed.d.ts +133 -2
- package/dist/change-signals.d.ts +66 -1
- package/dist/child-accessors.d.ts +39 -1
- package/dist/class.d.ts +8 -8
- package/dist/collection-cache.d.ts +47 -1
- package/dist/collection-read-plan.d.ts +3 -3
- package/dist/collection.d.ts +4 -3
- package/dist/config.d.ts +15 -6
- package/dist/consumer-plugin/index.d.ts +7 -3
- package/dist/consumer-plugin/index.d.ts.map +1 -1
- package/dist/consumer-plugin/index.js +2 -0
- package/dist/consumer-plugin/index.js.map +1 -1
- package/dist/data-query.d.ts +12 -1
- package/dist/database.d.ts +10 -2
- package/dist/decisions.d.ts +9 -2
- package/dist/decorators/index.d.ts +11 -5
- package/dist/dispatch/bus.d.ts +27 -2
- package/dist/dispatch/collections/DispatchSubscriptions.d.ts +7 -2
- package/dist/dispatch/collections/Dispatches.d.ts +8 -3
- package/dist/dispatch/models/Dispatch.d.ts +7 -1
- package/dist/dispatch/types.d.ts +7 -2
- package/dist/embedded-write-queue.d.ts +1 -1
- package/dist/embeddings/provider.d.ts +8 -1
- package/dist/embeddings/storage.d.ts +8 -2
- package/dist/filesystem-loader.d.ts +16 -1
- package/dist/generators/changes-route.d.ts +34 -1
- package/dist/generators/custom-action.d.ts +10 -2
- package/dist/generators/events-route.d.ts +41 -4
- package/dist/generators/mcp-runtime-template.d.ts +13 -2
- package/dist/generators/mcp.d.ts +6 -1
- package/dist/generators/rest.d.ts +10 -5
- package/dist/generators/tool-schema.d.ts +1 -1
- package/dist/hierarchical.d.ts +37 -1
- package/dist/interceptors.d.ts +45 -1
- package/dist/junction.d.ts +24 -0
- package/dist/knowledge-config.d.ts +1 -1
- package/dist/knowledge-discovery.d.ts +2 -25
- package/dist/knowledge-discovery.d.ts.map +1 -1
- package/dist/knowledge-discovery.js +1 -53
- package/dist/knowledge-graph.d.ts +2 -94
- package/dist/knowledge-graph.d.ts.map +1 -1
- package/dist/knowledge-graph.js +1 -267
- package/dist/knowledge.d.ts +4 -23
- package/dist/knowledge.d.ts.map +1 -1
- package/dist/knowledge.js +3 -52
- package/dist/knowledge.js.map +1 -1
- package/dist/learning/memory.d.ts +21 -1
- package/dist/manifest/generator.d.ts +5 -1
- package/dist/manifest/index.d.ts +5 -1
- package/dist/manifest/manager.d.ts +1 -1
- package/dist/manifest/manifest-loader.d.ts +24 -2
- package/dist/manifest/sources/composite.d.ts +17 -1
- package/dist/manifest/sources/embedded.d.ts +10 -1
- package/dist/manifest/sources/explicit-paths.d.ts +13 -1
- package/dist/manifest/sources/fallback.d.ts +15 -1
- package/dist/manifest/sources/local-test.d.ts +10 -1
- package/dist/manifest/sources/static.d.ts +12 -1
- package/dist/manifest/sources/test.d.ts +9 -1
- package/dist/manifest/sources/types.d.ts +7 -1
- package/dist/manifest/static-manifest.d.ts +6 -1
- package/dist/manifest/static-manifest.js +1 -1
- package/dist/manifest/static-manifest.js.map +1 -1
- package/dist/manifest/store.d.ts +22 -3
- package/dist/manifest/store.js +1 -1
- package/dist/manifest.json +1 -1
- package/dist/migrations/backfill-tracker.d.ts +15 -1
- package/dist/migrations/differ.d.ts +8 -2
- package/dist/migrations/framework-base-tables.d.ts +57 -2
- package/dist/migrations/generator.d.ts +8 -2
- package/dist/migrations/integer-width.d.ts +10 -2
- package/dist/migrations/minor-units.d.ts +40 -1
- package/dist/migrations/null-equal-indexes.d.ts +3 -2
- package/dist/migrations/orchestrate.d.ts +15 -3
- package/dist/migrations/sqlite-rebuild.d.ts +67 -2
- package/dist/migrations/tracker.d.ts +9 -3
- package/dist/migrations/types.d.ts +7 -2
- package/dist/object.d.ts +7 -6
- package/dist/polymorphic-association.d.ts +44 -1
- package/dist/postgres-permissions.d.ts +1 -1
- package/dist/prebuild/index.d.ts +5 -1
- package/dist/query-bounds.d.ts +26 -0
- package/dist/registry/cache-config.d.ts +10 -1
- package/dist/registry/class-registration.d.ts +10 -2
- package/dist/registry/collection-resolution.d.ts +1 -1
- package/dist/registry/embedding-manager.d.ts +9 -1
- package/dist/registry/inheritance-resolver.d.ts +8 -3
- package/dist/registry/manifest-field-merge.d.ts +2 -2
- package/dist/registry/name-resolver.d.ts +22 -2
- package/dist/registry/relationship-graph.d.ts +9 -1
- package/dist/registry/schema-builder.d.ts +8 -3
- package/dist/registry/shared-state.d.ts +12 -2
- package/dist/registry/types.d.ts +15 -7
- package/dist/registry/validator.d.ts +10 -2
- package/dist/registry.d.ts +40 -11
- package/dist/relationship-loader.d.ts +1 -1
- package/dist/run-once.d.ts +110 -1
- package/dist/runtime/client.d.ts +4 -1
- package/dist/runtime/server.d.ts +5 -2
- package/dist/scanner/import-scanner.d.ts +1 -1
- package/dist/scanner/manifest-generator.d.ts +4 -1
- package/dist/scanner/types.d.ts +4 -1
- package/dist/schema/code-generator.d.ts +6 -2
- package/dist/schema/column-data-probes.d.ts +27 -2
- package/dist/schema/ddl/base-strategy.d.ts +8 -2
- package/dist/schema/ddl/duckdb-strategy.d.ts +14 -2
- package/dist/schema/ddl/index.d.ts +2 -2
- package/dist/schema/ddl/json-duckdb-strategy.d.ts +10 -2
- package/dist/schema/ddl/materialize-manifest.d.ts +1 -1
- package/dist/schema/ddl/null-equal-index.d.ts +1 -1
- package/dist/schema/ddl/postgres-strategy.d.ts +12 -2
- package/dist/schema/ddl/sqlite-strategy.d.ts +12 -2
- package/dist/schema/ddl/types.d.ts +10 -1
- package/dist/schema/foreign-key-ddl.d.ts +2 -2
- package/dist/schema/foreign-key-orphan-report.d.ts +25 -3
- package/dist/schema/foreign-key-planner.d.ts +2 -2
- package/dist/schema/foreign-key-policy.d.ts +1 -1
- package/dist/schema/generator.d.ts +7 -3
- package/dist/schema/index-utils.d.ts +11 -2
- package/dist/schema/live-parity.d.ts +27 -3
- package/dist/schema/manifest-schema.d.ts +21 -2
- package/dist/schema/schema-aggregator.d.ts +35 -2
- package/dist/schema/schema-manager.d.ts +13 -4
- package/dist/schema/system-table-shapes.d.ts +20 -1
- package/dist/schema/table-verifier.d.ts +1 -1
- package/dist/schema/text-cast-probe.d.ts +24 -1
- package/dist/schema/utils.d.ts +13 -4
- package/dist/schema/uuid-convergence.d.ts +32 -1
- package/dist/signals/bus.d.ts +8 -2
- package/dist/signals/sanitizer.d.ts +7 -1
- package/dist/smrt-knowledge.json +8 -9
- package/dist/system/bootstrap.d.ts +2 -1
- package/dist/system/compatibility.d.ts +1 -1
- package/dist/system/diagnostics.d.ts +17 -2
- package/dist/system/retention.d.ts +46 -1
- package/dist/system/schema.d.ts +7 -1
- package/dist/system-fields.d.ts +9 -1
- package/dist/test-utils.d.ts +7 -1
- package/dist/testing/database.d.ts +18 -1
- package/dist/testing/notifications-stub.d.ts +15 -1
- package/dist/tools/tool-executor.d.ts +6 -1
- package/dist/tools/tool-generator.d.ts +8 -2
- package/dist/utils/json.d.ts +9 -1
- package/dist/utils/qualified-names.d.ts +10 -1
- package/dist/utils/scanner-module.d.ts +2 -2
- package/dist/utils.d.ts +1 -1
- package/dist/vite-plugin/api-client-entries.d.ts +9 -1
- package/dist/vite-plugin/changes-route.d.ts +33 -2
- package/dist/vite-plugin/dev-plane-route.d.ts +12 -1
- package/dist/vite-plugin/events-route.d.ts +37 -2
- package/dist/vite-plugin/generated-client.d.ts +9 -1
- package/dist/vite-plugin/index.d.ts +9 -5
- package/dist/vite-plugin/resources-route.d.ts +82 -1
- package/dist/vite-plugin/sveltekit-generator.d.ts +8 -4
- package/dist/vite-plugin/sveltekit-route-coordinator.d.ts +3 -3
- package/dist/vite-plugin/sync-apply-route.d.ts +19 -2
- package/dist/vite-plugin/web-collections.d.ts +25 -2
- package/dist/vite-plugin/worker-registration.d.ts +21 -1
- package/package.json +7 -8
- package/dist/knowledge-discovery.js.map +0 -1
- package/dist/knowledge-graph.js.map +0 -1
package/dist/registry.d.ts
CHANGED
|
@@ -1,14 +1,43 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
import {
|
|
1
|
+
/**
|
|
2
|
+
* Global object registry for SMRT classes
|
|
3
|
+
*
|
|
4
|
+
* Maintains a central registry of all @smrt decorated classes, enabling
|
|
5
|
+
* module awareness, automatic API generation, and runtime introspection.
|
|
6
|
+
* The registry tracks class definitions, field metadata, and configuration
|
|
7
|
+
* options for code generation and runtime operations.
|
|
8
|
+
*
|
|
9
|
+
* @example Registering a class manually
|
|
10
|
+
* ```typescript
|
|
11
|
+
* import { ObjectRegistry } from '@happyvertical/smrt-core';
|
|
12
|
+
*
|
|
13
|
+
* ObjectRegistry.register(MyClass, {
|
|
14
|
+
* api: { exclude: ['delete'] },
|
|
15
|
+
* cli: true
|
|
16
|
+
* });
|
|
17
|
+
* ```
|
|
18
|
+
*
|
|
19
|
+
* @example Using the decorator (recommended)
|
|
20
|
+
* ```typescript
|
|
21
|
+
* import { smrt, field } from '@happyvertical/smrt-core';
|
|
22
|
+
*
|
|
23
|
+
* @smrt({ api: { exclude: ['delete'] } })
|
|
24
|
+
* class Product extends SmrtObject {
|
|
25
|
+
* @field({ required: true })
|
|
26
|
+
* name: string = '';
|
|
27
|
+
* }
|
|
28
|
+
* ```
|
|
29
|
+
*/
|
|
30
|
+
import { SmrtCollection, type SmrtCollectionOptions } from './collection';
|
|
31
|
+
import type { CollectionCacheConfig } from './collection-cache';
|
|
32
|
+
import type { FieldOptions, MethodOptions } from './decorators/index.js';
|
|
33
|
+
import type { ClassEmbeddingConfig, ProjectEmbeddingConfig, ResolvedEmbeddingConfig } from './embeddings/types';
|
|
34
|
+
import type { ValidationError } from './errors';
|
|
35
|
+
import type { SmrtObject } from './object';
|
|
36
|
+
import { type RegistryDiagnostic } from './registry/diagnostics';
|
|
37
|
+
import type { RegisteredClass, RegisteredField, RelationshipMetadata, SmartObjectConfig, SmrtObjectConstructor, ValidatorFunction } from './registry/types';
|
|
38
|
+
import type { MethodDefinition, QualifiedClassName, SmartObjectDefinition, SmartObjectManifest, SmrtVisibility, ValidationRule } from './scanner/types.js';
|
|
39
|
+
import type { DatabaseEngine } from './schema/ddl/types.js';
|
|
40
|
+
import type { SchemaDefinition } from './schema/types.js';
|
|
12
41
|
export { isSmrtCollectionExtendsName, SMRT_COLLECTION_BASE_NAMES, } from './registry/collection-resolution';
|
|
13
42
|
export { isFrameworkBaseClass } from './registry/framework-base-classes';
|
|
14
43
|
export type { RelationshipMetadata, RelationshipType, SmartObjectConfig, } from './registry/types';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RelationshipMetadata } from './registry';
|
|
1
|
+
import { type RelationshipMetadata } from './registry';
|
|
2
2
|
/** Resolve the identity used for I/O, never the public display-name alias. */
|
|
3
3
|
export declare function resolveRelationshipTargetName(relationship: RelationshipMetadata): Promise<string>;
|
|
4
4
|
/** One inverse selection contract for lazy, eager and joined readers. */
|
package/dist/run-once.d.ts
CHANGED
|
@@ -1,4 +1,113 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Idempotency seam: run an action exactly once per submission (#3080).
|
|
3
|
+
*
|
|
4
|
+
* Every consumer with a form, a retried request, or a double-tapped button
|
|
5
|
+
* needs the same guard: a claim row, insert-only against a UNIQUE column
|
|
6
|
+
* (`claim_key`) in the SAME transaction as the work it guards, so a retry
|
|
7
|
+
* either runs the work once or replays the first attempt's stored result.
|
|
8
|
+
* This module is that primitive. It is DB/transaction-level — it takes a
|
|
9
|
+
* `DatabaseInterface`, not a `SmrtObject`/`SmrtCollection` — so it works
|
|
10
|
+
* outside SvelteKit and outside the ORM: any caller with a database handle
|
|
11
|
+
* and a JSON-serializable work result can use it. The claim insert itself
|
|
12
|
+
* is raw SQL (`## Concurrent submissions` below explains why), not the
|
|
13
|
+
* ORM's `SmrtObject`-level `_insertOnly` option.
|
|
14
|
+
*
|
|
15
|
+
* ## Key derivation (not the token alone)
|
|
16
|
+
*
|
|
17
|
+
* The claim key is the sha256 hex digest of the sorted-key-JSON encoding of
|
|
18
|
+
* `[tenantId, actor, token, contentDigest]`, where `contentDigest` is itself
|
|
19
|
+
* the sha256 hex digest of the sorted-key-JSON encoding of `content`
|
|
20
|
+
* ({@link digestRunOnceContent}). Sorted-key JSON ({@link stableStringify},
|
|
21
|
+
* `./knowledge-graph.ts`) makes the digest stable regardless of property
|
|
22
|
+
* insertion order.
|
|
23
|
+
*
|
|
24
|
+
* The token alone is NOT the key. A first attempt at this exact problem
|
|
25
|
+
* (reported against #3080) keyed on the token alone and silently collapsed
|
|
26
|
+
* two genuinely different submissions that happened to reuse one form's
|
|
27
|
+
* token. Folding in the content digest means a retry of the SAME submission
|
|
28
|
+
* (same token, same content) replays; a DIFFERENT submission through the
|
|
29
|
+
* same token (edited content before a resubmit) runs as its own claim.
|
|
30
|
+
* Folding in `tenantId` and `actor` means two tenants or two actors can never
|
|
31
|
+
* collide on the same claim even if a token were somehow shared between them.
|
|
32
|
+
*
|
|
33
|
+
* Neither the raw token nor the raw content is ever persisted — only their
|
|
34
|
+
* digests — so the claims table (`_smrt_run_once_claims`,
|
|
35
|
+
* `./system/schema.ts`) cannot leak submitted business data.
|
|
36
|
+
*
|
|
37
|
+
* ## Atomicity
|
|
38
|
+
*
|
|
39
|
+
* `runOnce()` opens its own `db.transaction()` (or nests under the caller's,
|
|
40
|
+
* per `@happyvertical/sql`'s own SAVEPOINT/`NestedTransactionError` rules —
|
|
41
|
+
* see that package's `DatabaseInterface.transaction` doc) and, inside it:
|
|
42
|
+
*
|
|
43
|
+
* 1. Inserts the claim row (`status: 'in_progress'`).
|
|
44
|
+
* 2. Runs `work(tx)`, passing the SAME transaction-bound handle, so the
|
|
45
|
+
* caller's writes and the claim insert commit or roll back together.
|
|
46
|
+
* 3. Updates the claim row to `status: 'completed'` with the JSON-serialized
|
|
47
|
+
* result, still inside the same transaction.
|
|
48
|
+
*
|
|
49
|
+
* If `work()` throws, the callback throws, and `db.transaction()`'s own
|
|
50
|
+
* "commits on success, rolls back on error" contract undoes the claim insert
|
|
51
|
+
* along with whatever `work()` partially wrote — a claim is never stranded
|
|
52
|
+
* `'in_progress'` by a failed attempt, and a retry with the same key can
|
|
53
|
+
* always run again.
|
|
54
|
+
*
|
|
55
|
+
* ## Concurrent submissions
|
|
56
|
+
*
|
|
57
|
+
* The claim insert uses `INSERT ... ON CONFLICT (claim_key) DO NOTHING
|
|
58
|
+
* RETURNING claim_key` (the same portable idiom `_smrt_migrations` already
|
|
59
|
+
* uses in `system/bootstrap.ts`), not a plain `INSERT` caught for a
|
|
60
|
+
* classified `unique_violation`. This matters on PostgreSQL specifically: a
|
|
61
|
+
* statement that raises an error aborts the WHOLE transaction ("current
|
|
62
|
+
* transaction is aborted, commands ignored until end of transaction block"),
|
|
63
|
+
* so a plain `INSERT` failing on the claim key would make every subsequent
|
|
64
|
+
* statement in the same transaction — including the very `SELECT` this
|
|
65
|
+
* function needs to read the winner's stored result back — fail too.
|
|
66
|
+
* `DO NOTHING` never raises: it returns zero rows instead, which this
|
|
67
|
+
* function reads as "lost the race" without ever touching the transaction's
|
|
68
|
+
* error state. SQLite and DuckDB both support the same `ON CONFLICT ... DO
|
|
69
|
+
* NOTHING` / `RETURNING` syntax, so one query works on every adapter.
|
|
70
|
+
*
|
|
71
|
+
* `@happyvertical/sql`'s single-connection adapters (SQLite, DuckDB, JSON)
|
|
72
|
+
* serialize `transaction()` calls on one connection: a second, concurrent
|
|
73
|
+
* `runOnce()` call does not begin its own transaction until the first one
|
|
74
|
+
* ends. PostgreSQL pools, but this `INSERT`'s arbiter still has to check the
|
|
75
|
+
* unique index against another transaction's uncommitted row of the same
|
|
76
|
+
* PRIMARY KEY, and blocks until that transaction resolves, then either
|
|
77
|
+
* no-ops (committed — the row exists) or inserts (rolled back — no row).
|
|
78
|
+
* Either way, two concurrent callers with the same key never both run
|
|
79
|
+
* `work()`: exactly one does, and the loser's `INSERT` returns zero rows —
|
|
80
|
+
* never an error — at which point it reads the now-committed claim row back
|
|
81
|
+
* and replays its stored result.
|
|
82
|
+
*
|
|
83
|
+
* ## Typed answers for a claim that is not (yet) a definite result
|
|
84
|
+
*
|
|
85
|
+
* A `runOnce()` conflict is a *definite* decision — the row exists — but
|
|
86
|
+
* whether it is safe to hand back a result depends on `status`. This mirrors
|
|
87
|
+
* the "refused vs unknown outcome" distinction #2990 drew for AssistantDock
|
|
88
|
+
* actions (`./errors.ts#RunOnceClaimError` carries the two codes):
|
|
89
|
+
*
|
|
90
|
+
* - `status: 'completed'` — replay the stored `result`. No error.
|
|
91
|
+
* - `status` anything else (still `'in_progress'`) — some execution holds
|
|
92
|
+
* this key right now. `RunOnceClaimError.inFlight()`. Under this module's
|
|
93
|
+
* own transaction semantics this is normally unreachable through
|
|
94
|
+
* `runOnce()`-to-`runOnce()` races alone (the losing transaction can only
|
|
95
|
+
* ever observe a COMMITTED row, and this module only ever commits a row
|
|
96
|
+
* once it is `'completed'`) — it is reachable if a claim row was inserted
|
|
97
|
+
* outside this module's own completion discipline, and is kept as a
|
|
98
|
+
* defined answer rather than an assumption.
|
|
99
|
+
* - the row cannot be read back at all after `DO NOTHING` reported zero
|
|
100
|
+
* rows inserted — `RunOnceClaimError.outcomeUnknown()`. Also normally
|
|
101
|
+
* unreachable (the zero-rows case only happens when a committed row
|
|
102
|
+
* already exists); kept for adapters/drivers where that and a subsequent
|
|
103
|
+
* read are not guaranteed to observe the same committed state.
|
|
104
|
+
*
|
|
105
|
+
* Both errors carry `claimKey` and are safe to retry with the SAME token and
|
|
106
|
+
* content; `runOnce()` never retries them itself.
|
|
107
|
+
*
|
|
108
|
+
* @module
|
|
109
|
+
*/
|
|
110
|
+
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
2
111
|
import { RUN_ONCE_CLAIMS_TABLE } from './system/schema.js';
|
|
3
112
|
export { RUN_ONCE_CLAIMS_TABLE };
|
|
4
113
|
/** Input identifying one submission for {@link runOnce}. */
|
package/dist/runtime/client.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Runtime client implementation for SMRT auto-generated services
|
|
3
|
+
*/
|
|
4
|
+
import type { SmrtClientOptions } from './types';
|
|
2
5
|
export declare class SmrtClient {
|
|
3
6
|
private options;
|
|
4
7
|
constructor(options?: SmrtClientOptions);
|
package/dist/runtime/server.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Runtime server implementation for SMRT auto-generated services
|
|
3
|
+
*/
|
|
4
|
+
import http from 'node:http';
|
|
5
|
+
import type { SmrtRequest, SmrtServerOptions } from './types';
|
|
3
6
|
/**
|
|
4
7
|
* Express-style response object handed to RouteApp-compatibility handlers
|
|
5
8
|
* (registered via {@link SmrtServer.get}/`post`/`put`/`delete`). It mirrors the
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Manifest generator for creating service manifests from AST scan results
|
|
3
|
+
*/
|
|
4
|
+
import type { ScanResult, SmartObjectManifest, SmrtVisibility } from './types.js';
|
|
2
5
|
/** Package.json shape consumed for import-path and component discovery. */
|
|
3
6
|
interface PackageJsonLike {
|
|
4
7
|
name?: string;
|
package/dist/scanner/types.d.ts
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Type definitions for AST scanning and manifest generation
|
|
3
|
+
*/
|
|
4
|
+
import type { SmartObjectConfig } from '../registry.js';
|
|
2
5
|
/**
|
|
3
6
|
* Qualified class name in format "@package/name:ClassName"
|
|
4
7
|
* Example: "@happyvertical/smrt-core:Product"
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Code generator for SMRT schema methods
|
|
3
|
+
* Generates getSchema() static methods for SMRT objects
|
|
4
|
+
*/
|
|
5
|
+
import type { SmartObjectDefinition } from '../scanner/types.js';
|
|
6
|
+
import type { SchemaDefinition } from './types.js';
|
|
3
7
|
export declare class SchemaCodeGenerator {
|
|
4
8
|
/**
|
|
5
9
|
* Generate getSchema() method source code
|
|
@@ -1,5 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Shared live-data column probes (#2874, consolidated for #2878).
|
|
3
|
+
*
|
|
4
|
+
* `detectRenameDataPending()` exists in both `migrations/differ.ts` and
|
|
5
|
+
* `schema/live-parity.ts` — tracked as its own maintenance hazard by #2878,
|
|
6
|
+
* since the #2874 regression had to be fixed twice, in lockstep, in #2876
|
|
7
|
+
* (once per copy). Until now the two batched live-data probes that function
|
|
8
|
+
* depends on were duplicated right along with it: does a named column hold
|
|
9
|
+
* any non-empty value, and does every non-empty value in a named column
|
|
10
|
+
* look UUID-shaped? Both copies used the exact same shape —
|
|
11
|
+
* uncorrelated scalar subqueries, one per column, each with its own
|
|
12
|
+
* `LIMIT 1` early exit (#2874 review finding F1: never an aggregate over
|
|
13
|
+
* the whole table, which would force a full scan per probed column even
|
|
14
|
+
* when the very first row already answers it), and the same positional
|
|
15
|
+
* `c<index>` aliasing to sidestep PostgreSQL's 63-byte identifier
|
|
16
|
+
* truncation (#2874 review finding F2'). Extracted here so the two call
|
|
17
|
+
* sites can never drift out of lockstep again.
|
|
18
|
+
*
|
|
19
|
+
* Both functions fall back to isolated per-column probing when the batched
|
|
20
|
+
* statement itself fails, so one bad column (dropped concurrently, a `CAST`
|
|
21
|
+
* the engine rejects) withholds only that column's result rather than the
|
|
22
|
+
* whole table's (#2874 review finding F2). A column absent from the
|
|
23
|
+
* returned map means "could not be probed" — callers apply their own
|
|
24
|
+
* fail-closed default, not this module.
|
|
25
|
+
*/
|
|
26
|
+
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
27
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
3
28
|
/**
|
|
4
29
|
* SQL predicate: a quoted column holds a non-null, non-empty value. Shared
|
|
5
30
|
* by every probe below (single-table batch, single-column fallback, and
|
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Base DDL Strategy - Shared logic for all database engines
|
|
3
|
+
*
|
|
4
|
+
* Provides common DDL generation logic that engine-specific strategies
|
|
5
|
+
* can override for their particular requirements.
|
|
6
|
+
*/
|
|
7
|
+
import type { ColumnDefinition, IndexDefinition, SchemaDefinition, SQLDataType, TriggerDefinition } from '../types.js';
|
|
8
|
+
import type { DatabaseEngine, DDLStrategy } from './types.js';
|
|
3
9
|
/**
|
|
4
10
|
* Abstract base class for DDL strategies
|
|
5
11
|
*
|
|
@@ -1,6 +1,18 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* DuckDB DDL Strategy
|
|
3
|
+
*
|
|
4
|
+
* DuckDB-specific DDL generation with the following characteristics:
|
|
5
|
+
* - UNIQUE constraints MUST be inline for UPSERT to work (DuckDB issue #12684)
|
|
6
|
+
* - Supports CAST in DEFAULT values
|
|
7
|
+
* - Native BOOLEAN, JSON types
|
|
8
|
+
* - Does NOT support triggers
|
|
9
|
+
*
|
|
10
|
+
* CRITICAL: DuckDB's ON CONFLICT clause only works with inline UNIQUE constraints,
|
|
11
|
+
* not with separate UNIQUE indexes. This is a known DuckDB limitation.
|
|
12
|
+
*/
|
|
13
|
+
import type { SchemaDefinition, SQLDataType } from '../types.js';
|
|
2
14
|
import { BaseDDLStrategy } from './base-strategy.js';
|
|
3
|
-
import { DatabaseEngine } from './types.js';
|
|
15
|
+
import type { DatabaseEngine } from './types.js';
|
|
4
16
|
export declare class DuckDBStrategy extends BaseDDLStrategy {
|
|
5
17
|
readonly engine: DatabaseEngine;
|
|
6
18
|
generateCreateTable(schema: SchemaDefinition): string;
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
import { SchemaDefinition } from '../types.js';
|
|
2
|
-
import { DatabaseEngine, DDLStrategy, EngineSpecificDDL, MultiEngineDDL } from './types.js';
|
|
3
1
|
/**
|
|
4
2
|
* DDL Generator Module
|
|
5
3
|
*
|
|
@@ -12,6 +10,8 @@ export { JsonDuckDBStrategy } from './json-duckdb-strategy.js';
|
|
|
12
10
|
export { PostgresStrategy } from './postgres-strategy.js';
|
|
13
11
|
export { SQLiteStrategy } from './sqlite-strategy.js';
|
|
14
12
|
export * from './types.js';
|
|
13
|
+
import type { SchemaDefinition } from '../types.js';
|
|
14
|
+
import type { DatabaseEngine, DDLStrategy, EngineSpecificDDL, MultiEngineDDL } from './types.js';
|
|
15
15
|
/**
|
|
16
16
|
* Get the DDL strategy for a specific database engine
|
|
17
17
|
*
|
|
@@ -1,6 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* JSON Adapter DDL Strategy
|
|
3
|
+
*
|
|
4
|
+
* The JSON adapter is backed by DuckDB, so it needs DuckDB's inline UNIQUE
|
|
5
|
+
* constraints for UPSERT. However, DuckDB's Node API currently round-trips
|
|
6
|
+
* native UUID values as their 128-bit numeric representation, so SMRT stores
|
|
7
|
+
* UUID columns as TEXT for JSON-backed databases.
|
|
8
|
+
*/
|
|
9
|
+
import type { SQLDataType } from '../types.js';
|
|
2
10
|
import { DuckDBStrategy } from './duckdb-strategy.js';
|
|
3
|
-
import { DatabaseEngine } from './types.js';
|
|
11
|
+
import type { DatabaseEngine } from './types.js';
|
|
4
12
|
export declare class JsonDuckDBStrategy extends DuckDBStrategy {
|
|
5
13
|
readonly engine: DatabaseEngine;
|
|
6
14
|
mapType(type: SQLDataType): string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IndexDefinition } from '../types.js';
|
|
1
|
+
import type { IndexDefinition } from '../types.js';
|
|
2
2
|
/** Identifies version-gated, transaction-only framework index DDL to the planner. */
|
|
3
3
|
export declare const NULL_EQUAL_INDEX_MARKER = "-- smrt:null-equal-conflict-index";
|
|
4
4
|
export declare function renderNullEqualConflictIndex(tableName: string, index: IndexDefinition): string;
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* PostgreSQL DDL Strategy
|
|
3
|
+
*
|
|
4
|
+
* PostgreSQL-specific DDL generation with the following characteristics:
|
|
5
|
+
* - JSONB type for JSON columns (more efficient than JSON)
|
|
6
|
+
* - Native BOOLEAN type
|
|
7
|
+
* - Full trigger support with PL/pgSQL functions
|
|
8
|
+
* - UNIQUE can be inline or separate indexes
|
|
9
|
+
* - Supports CAST in DEFAULT values
|
|
10
|
+
*/
|
|
11
|
+
import type { SchemaDefinition, SQLDataType, TriggerDefinition } from '../types.js';
|
|
2
12
|
import { BaseDDLStrategy } from './base-strategy.js';
|
|
3
|
-
import { DatabaseEngine } from './types.js';
|
|
13
|
+
import type { DatabaseEngine } from './types.js';
|
|
4
14
|
export declare class PostgresStrategy extends BaseDDLStrategy {
|
|
5
15
|
readonly engine: DatabaseEngine;
|
|
6
16
|
generateIndexes(schema: SchemaDefinition): string[];
|
|
@@ -1,6 +1,16 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* SQLite DDL Strategy
|
|
3
|
+
*
|
|
4
|
+
* SQLite-specific DDL generation with the following characteristics:
|
|
5
|
+
* - No CAST expressions in DEFAULT values
|
|
6
|
+
* - BOOLEAN stored as INTEGER (0/1)
|
|
7
|
+
* - JSON stored as TEXT (with JSON1 extension functions)
|
|
8
|
+
* - Supports triggers with SQLite syntax
|
|
9
|
+
* - UNIQUE can be inline or separate indexes
|
|
10
|
+
*/
|
|
11
|
+
import type { SQLDataType } from '../types.js';
|
|
2
12
|
import { BaseDDLStrategy } from './base-strategy.js';
|
|
3
|
-
import { DatabaseEngine } from './types.js';
|
|
13
|
+
import type { DatabaseEngine } from './types.js';
|
|
4
14
|
export declare class SQLiteStrategy extends BaseDDLStrategy {
|
|
5
15
|
readonly engine: DatabaseEngine;
|
|
6
16
|
/**
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* DDL Generator Types for Per-Engine SQL Generation
|
|
3
|
+
*
|
|
4
|
+
* SMRT handles ALL database maintenance directly. SDK SQL remains a pure query/CRUD layer.
|
|
5
|
+
* Each database engine has different DDL requirements:
|
|
6
|
+
* - SQLite: No CAST in DEFAULT, INTEGER for booleans
|
|
7
|
+
* - DuckDB: Inline UNIQUE constraints required for UPSERT to work
|
|
8
|
+
* - PostgreSQL: JSONB type, full trigger support
|
|
9
|
+
*/
|
|
10
|
+
import type { SchemaDefinition, SQLDataType } from '../types.js';
|
|
2
11
|
/**
|
|
3
12
|
* Supported database engines
|
|
4
13
|
* - sqlite: SQLite/LibSQL databases
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatabaseEngine } from './ddl/types.js';
|
|
2
|
-
import { ForeignKeyDefinition, SchemaDefinition } from './types.js';
|
|
1
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
2
|
+
import type { ForeignKeyDefinition, SchemaDefinition } from './types.js';
|
|
3
3
|
export type ForeignKeyUuidCastSide = 'child' | 'parent' | 'both' | 'none';
|
|
4
4
|
export declare function foreignKeyConstraintName(tableName: string, foreignKey: ForeignKeyDefinition): string;
|
|
5
5
|
export declare function renderForeignKeyConstraint(tableName: string, foreignKey: ForeignKeyDefinition): string;
|
|
@@ -1,6 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Per-foreign-key orphan count report (#2753)
|
|
3
|
+
*
|
|
4
|
+
* `foreign-key-ddl.ts` already builds the orphan probe SQL and the suggested
|
|
5
|
+
* repair the migration differ uses to gate `ADD CONSTRAINT` — deliberately
|
|
6
|
+
* refusing to repair anything, since only the relationship's owner knows
|
|
7
|
+
* whether an orphan should be reassigned, nulled, or deleted. What is
|
|
8
|
+
* missing is the counting: `renderForeignKeyOrphanDetector({ limitOne: true })`
|
|
9
|
+
* makes the probe a gate, not a report.
|
|
10
|
+
*
|
|
11
|
+
* This module runs the same probe as a `COUNT(*)` aggregate (via
|
|
12
|
+
* `renderForeignKeyOrphanDetector({ countOnly: true })`, so the exact
|
|
13
|
+
* FROM/JOIN/WHERE predicate is never duplicated) for every manifest-declared
|
|
14
|
+
* foreign key, and reports child/parent table and column, the orphan count,
|
|
15
|
+
* and whether the child column is nullable — so the two dispositions the
|
|
16
|
+
* repair-SQL builder already distinguishes (manual repair vs. null-out) are
|
|
17
|
+
* visible up front.
|
|
18
|
+
*
|
|
19
|
+
* Strictly read-only and diagnostic: it never repairs, and a relationship
|
|
20
|
+
* whose child or parent table does not exist live is skipped and reported
|
|
21
|
+
* separately rather than failing the whole report.
|
|
22
|
+
*/
|
|
23
|
+
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
24
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
25
|
+
import type { SchemaDefinition } from './types.js';
|
|
4
26
|
/** One manifest foreign key's live orphan count. */
|
|
5
27
|
export interface ForeignKeyOrphanCount {
|
|
6
28
|
childTable: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DatabaseEngine } from './ddl/types.js';
|
|
2
|
-
import { ForeignKeyDefinition, SchemaDefinition } from './types.js';
|
|
1
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
2
|
+
import type { ForeignKeyDefinition, SchemaDefinition } from './types.js';
|
|
3
3
|
export interface ForeignKeyCreationPlan {
|
|
4
4
|
schemas: SchemaDefinition[];
|
|
5
5
|
deferredStatements: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ForeignKeyAction } from './types.js';
|
|
1
|
+
import type { ForeignKeyAction } from './types.js';
|
|
2
2
|
/** Normalize decorator action spelling into the SQL vocabulary. */
|
|
3
3
|
export declare function normalizeForeignKeyAction(value: unknown): ForeignKeyAction | undefined;
|
|
4
4
|
/** Validate an externally supplied action rather than interpolating raw SQL. */
|
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema generator for SMRT objects
|
|
3
|
+
* Converts AST field definitions to database schema definitions
|
|
4
|
+
*/
|
|
5
|
+
import type { FieldDefinition, FieldMeta, ManifestSchema, SmartObjectManifest } from '../scanner/types.js';
|
|
6
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
7
|
+
import type { DeclaredIndexDefinition, SchemaDefinition } from './types.js';
|
|
4
8
|
/**
|
|
5
9
|
* Structural shape of a field as read from either the build-time manifest
|
|
6
10
|
* (`FieldDefinition`) or the runtime ObjectRegistry (`getAllFields()` returns
|
|
@@ -1,5 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Index-rendering helpers shared across DDL strategies, schema aggregator,
|
|
3
|
+
* and the migration generator/differ.
|
|
4
|
+
*
|
|
5
|
+
* IMPORTANT: this module must remain a pure utility with **type-only
|
|
6
|
+
* imports** to avoid introducing a cycle with `registry.ts` /
|
|
7
|
+
* `collection.ts`. Don't add runtime imports that pull SmrtClass /
|
|
8
|
+
* SmrtCollection / ObjectRegistry through here.
|
|
9
|
+
*/
|
|
10
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
11
|
+
import type { IndexDefinition } from './types.js';
|
|
3
12
|
/**
|
|
4
13
|
* Render the SQL target of a CREATE INDEX statement.
|
|
5
14
|
*
|
|
@@ -1,6 +1,30 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Live-schema parity check (#2368)
|
|
3
|
+
*
|
|
4
|
+
* Compares a **live** database against the shape the model layer assumes.
|
|
5
|
+
* Three inputs define "expected":
|
|
6
|
+
*
|
|
7
|
+
* 1. **Declared table shapes** — the manifest schemas the caller passes in.
|
|
8
|
+
* These give tables, columns, types, nullability, and declared indexes.
|
|
9
|
+
* 2. **Hand-DDL system tables** — `_smrt_*` tables parsed out of
|
|
10
|
+
* `src/system/schema.ts` (see `system-table-shapes.ts`). They never enter
|
|
11
|
+
* the manifest, so nothing else has ever diffed them.
|
|
12
|
+
* 3. **An expected-shape index policy that does not consult the manifest** —
|
|
13
|
+
* every foreign-key / cross-package-ref / tenant column carries a leading
|
|
14
|
+
* index, every declared upsert conflict target is backed by a matching
|
|
15
|
+
* UNIQUE index, and every `unique: true` column is actually unique in the
|
|
16
|
+
* live database.
|
|
17
|
+
*
|
|
18
|
+
* Point 3 is the reason this module exists rather than reusing the migration
|
|
19
|
+
* differ: the differ compares the live database to the manifest, i.e. to the
|
|
20
|
+
* artifact that dropped the index in the first place, which is why a database
|
|
21
|
+
* missing 164 tenant-column indexes reported "in sync" (#2356).
|
|
22
|
+
*
|
|
23
|
+
* This module is read-only. It emits findings; it never repairs.
|
|
24
|
+
*/
|
|
25
|
+
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
26
|
+
import type { DatabaseEngine } from './ddl/types.js';
|
|
27
|
+
import type { SchemaDefinition } from './types.js';
|
|
4
28
|
/** How badly a finding breaks the deployment. */
|
|
5
29
|
export type LiveParitySeverity = 'error' | 'warning' | 'info';
|
|
6
30
|
/** The class of drift a finding describes. */
|
|
@@ -1,5 +1,24 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Manifest schema → structured `SchemaDefinition` helpers (#2358).
|
|
3
|
+
*
|
|
4
|
+
* A manifest's `schema.ddl` string is an engine-neutral CREATE TABLE preview:
|
|
5
|
+
* it carries no indexes and no per-engine type mapping, so nothing that needs
|
|
6
|
+
* an executable schema may treat it as authoritative. Every consumer that
|
|
7
|
+
* reads raw manifest JSON — `SchemaAggregator`, `createIsolatedTestDbFromManifest`
|
|
8
|
+
* in `@happyvertical/smrt-vitest`, third-party tooling — should collect the
|
|
9
|
+
* structured `columns` / `indexes` through this module and render them with
|
|
10
|
+
* `getDDLStrategy(engine)`, exactly as `db:migrate` does.
|
|
11
|
+
*
|
|
12
|
+
* The cached `ddl` string is used only when a manifest object exposes no
|
|
13
|
+
* structured columns at all (hand-authored or pre-structured manifests); that
|
|
14
|
+
* legacy path keeps working but is not engine-complete.
|
|
15
|
+
*
|
|
16
|
+
* Keep this module light — type-only imports plus the DDL strategies and the
|
|
17
|
+
* logger — so it can be re-exported from lightweight entry points without
|
|
18
|
+
* pulling the registry/collection module graph in by itself.
|
|
19
|
+
*/
|
|
20
|
+
import type { DatabaseEngine, EngineSpecificDDL } from './ddl/types.js';
|
|
21
|
+
import type { ColumnDefinition, IndexDefinition, SchemaDefinition } from './types.js';
|
|
3
22
|
/**
|
|
4
23
|
* Column shape as it appears in raw manifest JSON. `ManifestColumnDefinition`
|
|
5
24
|
* spells the default `default`; registry-side `ColumnDefinition` spells it
|
|
@@ -1,5 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema Aggregator
|
|
3
|
+
*
|
|
4
|
+
* Aggregates database schemas across multiple SMRT package manifests.
|
|
5
|
+
* Handles STI table deduplication, index merging, and sorting for deterministic output.
|
|
6
|
+
*
|
|
7
|
+
* Tables and indexes are rendered from the manifests' structured `columns` /
|
|
8
|
+
* `indexes` through the dialect's DDL strategy (`getDDLStrategy`), the same
|
|
9
|
+
* renderer `smrt db:migrate` uses — never from the cached `schema.ddl` string,
|
|
10
|
+
* which carries no indexes and no per-engine types (#2358). Objects that expose
|
|
11
|
+
* no structured columns fall back to their cached `ddl` for the CREATE TABLE.
|
|
12
|
+
*
|
|
13
|
+
* This replaces the manual generate-schema.ts pattern used by downstream
|
|
14
|
+
* projects like blindmanpress.com (Issue #1013).
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```typescript
|
|
18
|
+
* import { SchemaAggregator } from '@happyvertical/smrt-core/schema';
|
|
19
|
+
*
|
|
20
|
+
* // Auto-discover from installed @happyvertical packages in node_modules
|
|
21
|
+
* const aggregator = new SchemaAggregator();
|
|
22
|
+
* const result = aggregator.aggregate();
|
|
23
|
+
*
|
|
24
|
+
* // Or with explicit packages
|
|
25
|
+
* const result = aggregator.aggregate({
|
|
26
|
+
* packages: ['@happyvertical/smrt-profiles', '@happyvertical/smrt-events'],
|
|
27
|
+
* });
|
|
28
|
+
*
|
|
29
|
+
* console.log(result.sql); // Combined CREATE TABLE + INDEX SQL
|
|
30
|
+
* console.log(result.tables); // Map of table info
|
|
31
|
+
* console.log(result.manifests); // Loaded manifests by package
|
|
32
|
+
* ```
|
|
33
|
+
*/
|
|
34
|
+
import type { SmartObjectManifest } from '../scanner/types.js';
|
|
35
|
+
import { type CollectedManifestTable, type ManifestColumnLike } from './manifest-schema.js';
|
|
3
36
|
/**
|
|
4
37
|
* Aggregated table information including DDL, indexes, and source tracking.
|
|
5
38
|
*/
|
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Schema Manager - Direct DDL Execution for SMRT
|
|
3
|
+
*
|
|
4
|
+
* SMRT handles ALL database maintenance directly.
|
|
5
|
+
* SDK SQL remains a pure query/CRUD layer.
|
|
6
|
+
*
|
|
7
|
+
* This module replaces the use of SDK's syncSchema() with direct DDL execution
|
|
8
|
+
* using engine-specific DDL strategies.
|
|
9
|
+
*/
|
|
10
|
+
import type { DatabaseInterface } from '@happyvertical/sql';
|
|
11
|
+
import { type DatabaseEngine, type EngineSpecificDDL } from './ddl/index.js';
|
|
12
|
+
import { type ForeignKeyUuidCastSide } from './foreign-key-ddl.js';
|
|
13
|
+
import type { ForeignKeyDefinition, SchemaDefinition } from './types.js';
|
|
5
14
|
/**
|
|
6
15
|
* Schema Manager Options
|
|
7
16
|
*/
|