@zmdb/core 1.0.0-beta.2
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 +674 -0
- package/README.md +104 -0
- package/dist/app-commands.d.ts +3 -0
- package/dist/app-commands.d.ts.map +1 -0
- package/dist/app-commands.js +3 -0
- package/dist/app-commands.js.map +1 -0
- package/dist/app-cqrs.d.ts +3 -0
- package/dist/app-cqrs.d.ts.map +1 -0
- package/dist/app-cqrs.js +3 -0
- package/dist/app-cqrs.js.map +1 -0
- package/dist/app-data.d.ts +2 -0
- package/dist/app-data.d.ts.map +1 -0
- package/dist/app-data.js +3 -0
- package/dist/app-data.js.map +1 -0
- package/dist/app-di.d.ts +3 -0
- package/dist/app-di.d.ts.map +1 -0
- package/dist/app-di.js +3 -0
- package/dist/app-di.js.map +1 -0
- package/dist/app-events.d.ts +3 -0
- package/dist/app-events.d.ts.map +1 -0
- package/dist/app-events.js +3 -0
- package/dist/app-events.js.map +1 -0
- package/dist/app-health.d.ts +3 -0
- package/dist/app-health.d.ts.map +1 -0
- package/dist/app-health.js +3 -0
- package/dist/app-health.js.map +1 -0
- package/dist/app-lifecycle.d.ts +3 -0
- package/dist/app-lifecycle.d.ts.map +1 -0
- package/dist/app-lifecycle.js +3 -0
- package/dist/app-lifecycle.js.map +1 -0
- package/dist/app-messaging.d.ts +3 -0
- package/dist/app-messaging.d.ts.map +1 -0
- package/dist/app-messaging.js +3 -0
- package/dist/app-messaging.js.map +1 -0
- package/dist/app-modules.d.ts +3 -0
- package/dist/app-modules.d.ts.map +1 -0
- package/dist/app-modules.js +3 -0
- package/dist/app-modules.js.map +1 -0
- package/dist/app-observability.d.ts +3 -0
- package/dist/app-observability.d.ts.map +1 -0
- package/dist/app-observability.js +3 -0
- package/dist/app-observability.js.map +1 -0
- package/dist/app-state.d.ts +3 -0
- package/dist/app-state.d.ts.map +1 -0
- package/dist/app-state.js +3 -0
- package/dist/app-state.js.map +1 -0
- package/dist/app.d.ts +3 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +3 -0
- package/dist/app.js.map +1 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +2 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/compiler.d.ts +13 -0
- package/dist/compiler.d.ts.map +1 -0
- package/dist/compiler.js +8 -0
- package/dist/compiler.js.map +1 -0
- package/dist/config/index.d.ts +3 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +2 -0
- package/dist/config/index.js.map +1 -0
- package/dist/database-cockroach.d.ts +2 -0
- package/dist/database-cockroach.d.ts.map +1 -0
- package/dist/database-cockroach.js +2 -0
- package/dist/database-cockroach.js.map +1 -0
- package/dist/database-mssql.d.ts +2 -0
- package/dist/database-mssql.d.ts.map +1 -0
- package/dist/database-mssql.js +2 -0
- package/dist/database-mssql.js.map +1 -0
- package/dist/database-mysql.d.ts +2 -0
- package/dist/database-mysql.d.ts.map +1 -0
- package/dist/database-mysql.js +2 -0
- package/dist/database-mysql.js.map +1 -0
- package/dist/database-postgres.d.ts +2 -0
- package/dist/database-postgres.d.ts.map +1 -0
- package/dist/database-postgres.js +2 -0
- package/dist/database-postgres.js.map +1 -0
- package/dist/database-singlestore.d.ts +2 -0
- package/dist/database-singlestore.d.ts.map +1 -0
- package/dist/database-singlestore.js +2 -0
- package/dist/database-singlestore.js.map +1 -0
- package/dist/database-sqlite.d.ts +2 -0
- package/dist/database-sqlite.d.ts.map +1 -0
- package/dist/database-sqlite.js +2 -0
- package/dist/database-sqlite.js.map +1 -0
- package/dist/derive.d.ts +2 -0
- package/dist/derive.d.ts.map +1 -0
- package/dist/derive.js +13 -0
- package/dist/derive.js.map +1 -0
- package/dist/dto.d.ts +5 -0
- package/dist/dto.d.ts.map +1 -0
- package/dist/dto.js +7 -0
- package/dist/dto.js.map +1 -0
- package/dist/index.d.ts +27 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/ir.d.ts +3 -0
- package/dist/ir.d.ts.map +1 -0
- package/dist/ir.js +11 -0
- package/dist/ir.js.map +1 -0
- package/dist/migrations.d.ts +9 -0
- package/dist/migrations.d.ts.map +1 -0
- package/dist/migrations.js +9 -0
- package/dist/migrations.js.map +1 -0
- package/dist/orm.d.ts +16 -0
- package/dist/orm.d.ts.map +1 -0
- package/dist/orm.js +18 -0
- package/dist/orm.js.map +1 -0
- package/dist/relations.d.ts +5 -0
- package/dist/relations.d.ts.map +1 -0
- package/dist/relations.js +12 -0
- package/dist/relations.js.map +1 -0
- package/dist/schema.d.ts +25 -0
- package/dist/schema.d.ts.map +1 -0
- package/dist/schema.js +27 -0
- package/dist/schema.js.map +1 -0
- package/dist/sql.d.ts +14 -0
- package/dist/sql.d.ts.map +1 -0
- package/dist/sql.js +16 -0
- package/dist/sql.js.map +1 -0
- package/dist/tags.d.ts +2 -0
- package/dist/tags.d.ts.map +1 -0
- package/dist/tags.js +5 -0
- package/dist/tags.js.map +1 -0
- package/dist/testing/official-dialects.fixture.d.ts +16 -0
- package/dist/testing/official-dialects.fixture.d.ts.map +1 -0
- package/dist/testing/official-dialects.fixture.js +21 -0
- package/dist/testing/official-dialects.fixture.js.map +1 -0
- package/dist/testing.d.ts +5 -0
- package/dist/testing.d.ts.map +1 -0
- package/dist/testing.js +4 -0
- package/dist/testing.js.map +1 -0
- package/dist/validator.d.ts +9 -0
- package/dist/validator.d.ts.map +1 -0
- package/dist/validator.js +11 -0
- package/dist/validator.js.map +1 -0
- package/dist/web-app.d.ts +3 -0
- package/dist/web-app.d.ts.map +1 -0
- package/dist/web-app.js +3 -0
- package/dist/web-app.js.map +1 -0
- package/dist/web-compression.d.ts +3 -0
- package/dist/web-compression.d.ts.map +1 -0
- package/dist/web-compression.js +3 -0
- package/dist/web-compression.js.map +1 -0
- package/dist/web-context.d.ts +3 -0
- package/dist/web-context.d.ts.map +1 -0
- package/dist/web-context.js +3 -0
- package/dist/web-context.js.map +1 -0
- package/dist/web-contract-compiler.d.ts +3 -0
- package/dist/web-contract-compiler.d.ts.map +1 -0
- package/dist/web-contract-compiler.js +3 -0
- package/dist/web-contract-compiler.js.map +1 -0
- package/dist/web-contract.d.ts +3 -0
- package/dist/web-contract.d.ts.map +1 -0
- package/dist/web-contract.js +3 -0
- package/dist/web-contract.js.map +1 -0
- package/dist/web-csrf.d.ts +3 -0
- package/dist/web-csrf.d.ts.map +1 -0
- package/dist/web-csrf.js +3 -0
- package/dist/web-csrf.js.map +1 -0
- package/dist/web-data.d.ts +2 -0
- package/dist/web-data.d.ts.map +1 -0
- package/dist/web-data.js +3 -0
- package/dist/web-data.js.map +1 -0
- package/dist/web-devtools.d.ts +3 -0
- package/dist/web-devtools.d.ts.map +1 -0
- package/dist/web-devtools.js +3 -0
- package/dist/web-devtools.js.map +1 -0
- package/dist/web-dto-pipes.d.ts +3 -0
- package/dist/web-dto-pipes.d.ts.map +1 -0
- package/dist/web-dto-pipes.js +3 -0
- package/dist/web-dto-pipes.js.map +1 -0
- package/dist/web-gateways.d.ts +3 -0
- package/dist/web-gateways.d.ts.map +1 -0
- package/dist/web-gateways.js +3 -0
- package/dist/web-gateways.js.map +1 -0
- package/dist/web-health.d.ts +3 -0
- package/dist/web-health.d.ts.map +1 -0
- package/dist/web-health.js +3 -0
- package/dist/web-health.js.map +1 -0
- package/dist/web-middleware.d.ts +3 -0
- package/dist/web-middleware.d.ts.map +1 -0
- package/dist/web-middleware.js +3 -0
- package/dist/web-middleware.js.map +1 -0
- package/dist/web-openapi.d.ts +3 -0
- package/dist/web-openapi.d.ts.map +1 -0
- package/dist/web-openapi.js +3 -0
- package/dist/web-openapi.js.map +1 -0
- package/dist/web-pipeline.d.ts +3 -0
- package/dist/web-pipeline.d.ts.map +1 -0
- package/dist/web-pipeline.js +3 -0
- package/dist/web-pipeline.js.map +1 -0
- package/dist/web-routing.d.ts +3 -0
- package/dist/web-routing.d.ts.map +1 -0
- package/dist/web-routing.js +3 -0
- package/dist/web-routing.js.map +1 -0
- package/dist/web-static.d.ts +3 -0
- package/dist/web-static.d.ts.map +1 -0
- package/dist/web-static.js +3 -0
- package/dist/web-static.js.map +1 -0
- package/dist/web-testing.d.ts +3 -0
- package/dist/web-testing.d.ts.map +1 -0
- package/dist/web-testing.js +3 -0
- package/dist/web-testing.js.map +1 -0
- package/dist/web-upload.d.ts +3 -0
- package/dist/web-upload.d.ts.map +1 -0
- package/dist/web-upload.js +3 -0
- package/dist/web-upload.js.map +1 -0
- package/dist/web-versioning.d.ts +3 -0
- package/dist/web-versioning.d.ts.map +1 -0
- package/dist/web-versioning.js +3 -0
- package/dist/web-versioning.js.map +1 -0
- package/dist/web.d.ts +5 -0
- package/dist/web.d.ts.map +1 -0
- package/dist/web.js +7 -0
- package/dist/web.js.map +1 -0
- package/package.json +292 -0
- package/src/app-commands.ts +3 -0
- package/src/app-cqrs.ts +10 -0
- package/src/app-data.ts +2 -0
- package/src/app-di.ts +3 -0
- package/src/app-events.ts +3 -0
- package/src/app-health.ts +10 -0
- package/src/app-lifecycle.ts +3 -0
- package/src/app-messaging.ts +43 -0
- package/src/app-modules.ts +11 -0
- package/src/app-observability.ts +25 -0
- package/src/app-state.ts +3 -0
- package/src/app.ts +42 -0
- package/src/cli/index.ts +28 -0
- package/src/compiler.ts +66 -0
- package/src/config/index.ts +13 -0
- package/src/database-cockroach.ts +10 -0
- package/src/database-mssql.ts +20 -0
- package/src/database-mysql.ts +24 -0
- package/src/database-postgres.ts +18 -0
- package/src/database-singlestore.ts +16 -0
- package/src/database-sqlite.ts +10 -0
- package/src/derive.ts +27 -0
- package/src/dto.ts +25 -0
- package/src/index.ts +57 -0
- package/src/ir.ts +62 -0
- package/src/migrations.ts +97 -0
- package/src/orm.ts +90 -0
- package/src/relations.ts +11 -0
- package/src/schema.ts +193 -0
- package/src/sql.ts +130 -0
- package/src/tags.ts +33 -0
- package/src/testing/official-dialects.fixture.ts +24 -0
- package/src/testing.ts +7 -0
- package/src/validator.ts +44 -0
- package/src/web-app.ts +9 -0
- package/src/web-compression.ts +3 -0
- package/src/web-context.ts +3 -0
- package/src/web-contract-compiler.ts +7 -0
- package/src/web-contract.ts +36 -0
- package/src/web-csrf.ts +3 -0
- package/src/web-data.ts +2 -0
- package/src/web-devtools.ts +12 -0
- package/src/web-dto-pipes.ts +3 -0
- package/src/web-gateways.ts +3 -0
- package/src/web-health.ts +3 -0
- package/src/web-middleware.ts +12 -0
- package/src/web-openapi.ts +15 -0
- package/src/web-pipeline.ts +28 -0
- package/src/web-routing.ts +3 -0
- package/src/web-static.ts +3 -0
- package/src/web-testing.ts +3 -0
- package/src/web-upload.ts +3 -0
- package/src/web-versioning.ts +3 -0
- package/src/web.ts +178 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
// zmdb/app/messaging — curated transport-neutral messaging facade.
|
|
2
|
+
export {
|
|
3
|
+
EventPattern,
|
|
4
|
+
InFlight,
|
|
5
|
+
MessageCorrelationError,
|
|
6
|
+
MessagePattern,
|
|
7
|
+
MessageRemoteError,
|
|
8
|
+
MessageTimeoutError,
|
|
9
|
+
TransportUnsupportedError,
|
|
10
|
+
abortError,
|
|
11
|
+
createEventPublisher,
|
|
12
|
+
createMessageClient,
|
|
13
|
+
createMessageDispatcher,
|
|
14
|
+
decodeDelivery,
|
|
15
|
+
decodeReply,
|
|
16
|
+
encodeDelivery,
|
|
17
|
+
encodeReply,
|
|
18
|
+
getMessagePatterns,
|
|
19
|
+
reportTransportError,
|
|
20
|
+
transportExtension,
|
|
21
|
+
withinGrace,
|
|
22
|
+
} from '@zmdb/app/messaging';
|
|
23
|
+
export type {
|
|
24
|
+
ClientPatterns,
|
|
25
|
+
DeliveryMetadata,
|
|
26
|
+
DispatchOutcome,
|
|
27
|
+
DispatcherOptions,
|
|
28
|
+
EventPatterns,
|
|
29
|
+
EventPublisher,
|
|
30
|
+
MessageClient,
|
|
31
|
+
MessageClientOptions,
|
|
32
|
+
MessageContext,
|
|
33
|
+
MessageDispatcher,
|
|
34
|
+
MessageReply,
|
|
35
|
+
RawMessage,
|
|
36
|
+
ResolvedMessagePattern,
|
|
37
|
+
Settlement,
|
|
38
|
+
TransportCapabilities,
|
|
39
|
+
TransportErrorSink,
|
|
40
|
+
TransportRequest,
|
|
41
|
+
TransportStrategy,
|
|
42
|
+
WithHeaders,
|
|
43
|
+
} from '@zmdb/app/messaging';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// zmdb/app/modules — curated application-module facade.
|
|
2
|
+
export { Module, compileModule, lazy, moduleDefOf } from '@zmdb/app/modules';
|
|
3
|
+
export type {
|
|
4
|
+
CompiledModule,
|
|
5
|
+
LazyImport,
|
|
6
|
+
LazyModuleHandle,
|
|
7
|
+
LazyStatus,
|
|
8
|
+
ModuleClass,
|
|
9
|
+
ModuleDef,
|
|
10
|
+
ProviderDef,
|
|
11
|
+
} from '@zmdb/app/modules';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// zmdb/app/observability — curated dependency-free observability facade.
|
|
2
|
+
export {
|
|
3
|
+
SpanKind,
|
|
4
|
+
consumerSpan,
|
|
5
|
+
fromTraceContext,
|
|
6
|
+
fromTraceparent,
|
|
7
|
+
toTraceHeaders,
|
|
8
|
+
toTraceparent,
|
|
9
|
+
tracedDriver,
|
|
10
|
+
} from '@zmdb/app/observability';
|
|
11
|
+
export type {
|
|
12
|
+
Attributes,
|
|
13
|
+
CommentKey,
|
|
14
|
+
CommentKeys,
|
|
15
|
+
CommentPairs,
|
|
16
|
+
ExecutingDriver,
|
|
17
|
+
Meter,
|
|
18
|
+
Observability,
|
|
19
|
+
QueryTelemetry,
|
|
20
|
+
Span,
|
|
21
|
+
SpanContext,
|
|
22
|
+
SpanOptions,
|
|
23
|
+
TraceCarrier,
|
|
24
|
+
Tracer,
|
|
25
|
+
} from '@zmdb/app/observability';
|
package/src/app-state.ts
ADDED
package/src/app.ts
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
// zmdb/app — curated facade over the protocol-neutral application kernel.
|
|
2
|
+
export {
|
|
3
|
+
Container,
|
|
4
|
+
Inject,
|
|
5
|
+
Module,
|
|
6
|
+
UnresolvedTokenError,
|
|
7
|
+
compileModule,
|
|
8
|
+
createApplication,
|
|
9
|
+
createStateUpdatePayload,
|
|
10
|
+
defineStateTransitions,
|
|
11
|
+
defineEntityStateMachine,
|
|
12
|
+
createToken,
|
|
13
|
+
injectionsOf,
|
|
14
|
+
lazy,
|
|
15
|
+
metadataOf,
|
|
16
|
+
moduleDefOf,
|
|
17
|
+
} from '@zmdb/app';
|
|
18
|
+
export type {
|
|
19
|
+
Application,
|
|
20
|
+
StateTransitions,
|
|
21
|
+
AllowedTargetStates,
|
|
22
|
+
StateUpdateDTO,
|
|
23
|
+
EntityStateMachineOptions,
|
|
24
|
+
EntityStateMachine,
|
|
25
|
+
ApplicationExtension,
|
|
26
|
+
ApplicationExtensionContext,
|
|
27
|
+
ApplicationMetadata,
|
|
28
|
+
ApplicationOptions,
|
|
29
|
+
CompiledModule,
|
|
30
|
+
Constructor,
|
|
31
|
+
LazyImport,
|
|
32
|
+
LazyModuleHandle,
|
|
33
|
+
LazyStatus,
|
|
34
|
+
ModuleClass,
|
|
35
|
+
ModuleDef,
|
|
36
|
+
OnApplicationBootstrap,
|
|
37
|
+
OnModuleInit,
|
|
38
|
+
OnShutdown,
|
|
39
|
+
ProviderDef,
|
|
40
|
+
Scope,
|
|
41
|
+
Token,
|
|
42
|
+
} from '@zmdb/app';
|
package/src/cli/index.ts
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export {
|
|
2
|
+
runCli,
|
|
3
|
+
embedMigrations,
|
|
4
|
+
exportSchema,
|
|
5
|
+
generateMigration,
|
|
6
|
+
pullDeclarations,
|
|
7
|
+
generateHttpArtifacts,
|
|
8
|
+
watchHttpArtifacts,
|
|
9
|
+
type CliEnvironment,
|
|
10
|
+
type CliResult,
|
|
11
|
+
type CheckResult,
|
|
12
|
+
type EmbedOptions,
|
|
13
|
+
type EmbedResult,
|
|
14
|
+
type ExportResult,
|
|
15
|
+
type GenerateHttpArtifactsOptions,
|
|
16
|
+
type GenerateOptions,
|
|
17
|
+
type GenerateResult,
|
|
18
|
+
type HttpArtifactGeneration,
|
|
19
|
+
type MigrateResult,
|
|
20
|
+
type PullOptions,
|
|
21
|
+
type PullResult,
|
|
22
|
+
type PushResult,
|
|
23
|
+
type RollbackResult,
|
|
24
|
+
type StatusResult,
|
|
25
|
+
type UpgradeResult,
|
|
26
|
+
type WatchHttpArtifactsOptions,
|
|
27
|
+
type ClientGenerateResult,
|
|
28
|
+
} from '@zmdb/cli';
|
package/src/compiler.ts
ADDED
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
// Logic-free product facade for project compilation and compiler integrations.
|
|
2
|
+
|
|
3
|
+
export { compileProject, watchCodegen, writeCompileResult, zmdbAot } from '@zmdb/compiler';
|
|
4
|
+
export type {
|
|
5
|
+
ConfiguredZmdbAotOptions,
|
|
6
|
+
CodegenOptions,
|
|
7
|
+
CodegenResult,
|
|
8
|
+
CompiledArtifact,
|
|
9
|
+
CompileProjectOptions,
|
|
10
|
+
CompileResult,
|
|
11
|
+
CompilerDiagnostic,
|
|
12
|
+
WatchOptions,
|
|
13
|
+
WriteCompileResult,
|
|
14
|
+
WriteCompileResultOptions,
|
|
15
|
+
} from '@zmdb/compiler';
|
|
16
|
+
|
|
17
|
+
export { transformTypeChecks } from '@zmdb/compiler/unplugin';
|
|
18
|
+
export type { UnpluginLike, WatchChange, ZmdbAotOptions } from '@zmdb/compiler/unplugin';
|
|
19
|
+
|
|
20
|
+
export {
|
|
21
|
+
Emitter,
|
|
22
|
+
discriminantOf,
|
|
23
|
+
escapePattern,
|
|
24
|
+
expectedForConstraint,
|
|
25
|
+
expectedForDiscriminant,
|
|
26
|
+
expectedOf,
|
|
27
|
+
hasExcessCheck,
|
|
28
|
+
messageFor,
|
|
29
|
+
} from '@zmdb/compiler/emit';
|
|
30
|
+
export type {
|
|
31
|
+
ConstraintKeyword,
|
|
32
|
+
Discriminant,
|
|
33
|
+
DiscriminantArm,
|
|
34
|
+
EmitDiagnostic,
|
|
35
|
+
EmitOptions,
|
|
36
|
+
EmitTarget,
|
|
37
|
+
} from '@zmdb/compiler/emit';
|
|
38
|
+
|
|
39
|
+
export { configs, default as lintPlugin } from '@zmdb/compiler/lint';
|
|
40
|
+
export type { LintRule } from '@zmdb/compiler/lint';
|
|
41
|
+
|
|
42
|
+
export {
|
|
43
|
+
DEFAULT_LIMITS,
|
|
44
|
+
ReflectSession,
|
|
45
|
+
Reflector,
|
|
46
|
+
apiInstanceCount,
|
|
47
|
+
irFromType,
|
|
48
|
+
projectSourceFileNames,
|
|
49
|
+
schemaIrFromType,
|
|
50
|
+
withSession,
|
|
51
|
+
} from '@zmdb/compiler/reflect';
|
|
52
|
+
export type {
|
|
53
|
+
GrpcMethodIR,
|
|
54
|
+
GrpcServiceIR,
|
|
55
|
+
NamingStrategy,
|
|
56
|
+
ReflectDiagnostic,
|
|
57
|
+
ReflectLimits,
|
|
58
|
+
ReflectOptions,
|
|
59
|
+
ReflectResult,
|
|
60
|
+
SessionOptions,
|
|
61
|
+
SessionUpdate,
|
|
62
|
+
SourceFileHandle,
|
|
63
|
+
} from '@zmdb/compiler/reflect';
|
|
64
|
+
|
|
65
|
+
export { CALLEES, Rewriter, transformCode, transformFile } from '@zmdb/compiler/transform';
|
|
66
|
+
export type { TransformContext, TransformDiagnostic, TransformResult } from '@zmdb/compiler/transform';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { defineConfig, loadConfig, resolveConfig } from '@zmdb/compiler/config';
|
|
2
|
+
export type {
|
|
3
|
+
HttpGenerationConfig,
|
|
4
|
+
IntrospectOptions,
|
|
5
|
+
LoadConfigOptions,
|
|
6
|
+
NamingStrategy,
|
|
7
|
+
ResolvedConfig,
|
|
8
|
+
ResolvedHttpContractSource,
|
|
9
|
+
ResolvedHttpGenerationConfig,
|
|
10
|
+
ToolingDriver,
|
|
11
|
+
ZmdbConfig,
|
|
12
|
+
ZmdbConfigData,
|
|
13
|
+
} from '@zmdb/compiler/config';
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export {
|
|
2
|
+
MSSQL_TYPES,
|
|
3
|
+
mssql,
|
|
4
|
+
mssqlDriver,
|
|
5
|
+
mssqlIntrospector,
|
|
6
|
+
mssqlVertical,
|
|
7
|
+
type MssqlCatalogColumnSnapshot,
|
|
8
|
+
type MssqlCatalogForeignKeySnapshot,
|
|
9
|
+
type MssqlCatalogIndexSnapshot,
|
|
10
|
+
type MssqlCatalogSchemaSnapshot,
|
|
11
|
+
type MssqlCatalogSequenceSnapshot,
|
|
12
|
+
type MssqlCatalogTableSnapshot,
|
|
13
|
+
type MssqlComputedColumn,
|
|
14
|
+
type MssqlIdentity,
|
|
15
|
+
type MssqlIntrospector,
|
|
16
|
+
type MssqlOptions,
|
|
17
|
+
type MssqlPool,
|
|
18
|
+
type MssqlRequest,
|
|
19
|
+
type MssqlTransaction,
|
|
20
|
+
} from '@zmdb/mssql';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export {
|
|
2
|
+
createMysqlMigrations,
|
|
3
|
+
mysql,
|
|
4
|
+
mysqlDriver,
|
|
5
|
+
mysqlFamilyDriver,
|
|
6
|
+
mysqlFamilyIntrospector,
|
|
7
|
+
mysqlFamilyMigrations,
|
|
8
|
+
mysqlIntrospector,
|
|
9
|
+
mysqlSnapshot,
|
|
10
|
+
mysqlVertical,
|
|
11
|
+
type MysqlCatalogOverrides,
|
|
12
|
+
type MysqlConnection,
|
|
13
|
+
type MysqlDriver,
|
|
14
|
+
type MysqlExecutionResult,
|
|
15
|
+
type MysqlMigrationOverrides,
|
|
16
|
+
type MysqlOptions,
|
|
17
|
+
type MysqlParameter,
|
|
18
|
+
type MysqlPool,
|
|
19
|
+
type MysqlQueryable,
|
|
20
|
+
type MysqlQueryResult,
|
|
21
|
+
type MysqlResultHeader,
|
|
22
|
+
type MysqlTableDdlExtension,
|
|
23
|
+
type MysqlTableDdlHelpers,
|
|
24
|
+
} from '@zmdb/mysql';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export {
|
|
2
|
+
POSTGRES_OUTBOX_TABLE,
|
|
3
|
+
postgres,
|
|
4
|
+
postgresDriver,
|
|
5
|
+
postgresFamilyDriver,
|
|
6
|
+
postgresFamilyIntrospector,
|
|
7
|
+
postgresFamilyMigrations,
|
|
8
|
+
postgresIntrospector,
|
|
9
|
+
postgresOutboxMigration,
|
|
10
|
+
postgresOutboxPendingIndexDdl,
|
|
11
|
+
postgresOutboxTableDdl,
|
|
12
|
+
postgresVertical,
|
|
13
|
+
type PgConnection,
|
|
14
|
+
type PgOptions,
|
|
15
|
+
type PgQueryable,
|
|
16
|
+
type PostgresCatalogOverrides,
|
|
17
|
+
type PostgresMigrationOptions,
|
|
18
|
+
} from '@zmdb/postgres';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export {
|
|
2
|
+
singlestore,
|
|
3
|
+
singlestoreDriver,
|
|
4
|
+
singlestoreIntrospector,
|
|
5
|
+
singlestoreMigrations,
|
|
6
|
+
singlestoreVertical,
|
|
7
|
+
type MysqlConnection,
|
|
8
|
+
type MysqlDriver,
|
|
9
|
+
type MysqlExecutionResult,
|
|
10
|
+
type MysqlOptions,
|
|
11
|
+
type MysqlParameter,
|
|
12
|
+
type MysqlPool,
|
|
13
|
+
type MysqlQueryable,
|
|
14
|
+
type MysqlQueryResult,
|
|
15
|
+
type MysqlResultHeader,
|
|
16
|
+
} from '@zmdb/singlestore';
|
package/src/derive.ts
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// zmdb/derive — explicit named re-exports of the DTO suite derived from a tagged
|
|
2
|
+
// type. (No `export *`: each symbol is enumerated so the compatibility surface is
|
|
3
|
+
// explicit.)
|
|
4
|
+
//
|
|
5
|
+
// Types only; contributes nothing to a bundle.
|
|
6
|
+
//
|
|
7
|
+
// Four of these names — `Entity`, `CreateDTO`, `UpdateDTO`, `PrimaryKeyOf` — are also on
|
|
8
|
+
// `@zmdb/core` itself. They are the same types: the root used to define schema-value twins that
|
|
9
|
+
// deferred here when the value carried a phantom, and those are gone, so both paths now
|
|
10
|
+
// resolve to the definitions in `@zmdb/schema/derive`. Import from whichever reads
|
|
11
|
+
// better at the use site.
|
|
12
|
+
export {
|
|
13
|
+
type CreateDTO,
|
|
14
|
+
type DefaultKeys,
|
|
15
|
+
type Entity,
|
|
16
|
+
type NullableKeys,
|
|
17
|
+
type PrimaryKeyKeys,
|
|
18
|
+
type PrimaryKeyOf,
|
|
19
|
+
type ReadDTO,
|
|
20
|
+
type SensitiveKeys,
|
|
21
|
+
type SerialKeys,
|
|
22
|
+
type UniqueKeys,
|
|
23
|
+
type UpdateDTO,
|
|
24
|
+
type WhereDTO,
|
|
25
|
+
type Wire,
|
|
26
|
+
type WireCreateDTO,
|
|
27
|
+
} from '@zmdb/schema/derive';
|
package/src/dto.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// zmdb/dto — explicit named re-exports of the read/query DTO family.
|
|
2
|
+
// (No `export *`: each symbol is enumerated so the compatibility surface is explicit.)
|
|
3
|
+
export { applyOrderBy, applyPagination, compileWhere } from '@zmdb/orm/dto';
|
|
4
|
+
export { buildListResult, buildSearchResult, describeAggregate, getResult, project } from '@zmdb/schema/dto';
|
|
5
|
+
export {
|
|
6
|
+
type AggFn,
|
|
7
|
+
type AggregateResult,
|
|
8
|
+
type AggregateSpec,
|
|
9
|
+
type ComputedSpec,
|
|
10
|
+
type FieldOps,
|
|
11
|
+
type GetDTO,
|
|
12
|
+
type GetOptions,
|
|
13
|
+
type ListDTO,
|
|
14
|
+
type ListResult,
|
|
15
|
+
type OffsetPage,
|
|
16
|
+
type OrderByDTO,
|
|
17
|
+
type OrderDir,
|
|
18
|
+
type PaginationDTO,
|
|
19
|
+
type Projection,
|
|
20
|
+
type SearchDTO,
|
|
21
|
+
type SearchHit,
|
|
22
|
+
type SearchResult,
|
|
23
|
+
type WhereDTO,
|
|
24
|
+
} from '@zmdb/schema/dto';
|
|
25
|
+
export { type OrderTarget, type WhereTarget } from '@zmdb/orm/dto';
|
package/src/index.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// The application-facing zmdb vocabulary. This file is deliberately only
|
|
2
|
+
// named re-exports: implementations remain in their owning packages, while
|
|
3
|
+
// advanced surfaces live under concern-based `@zmdb/core/*` entry points.
|
|
4
|
+
|
|
5
|
+
export { AssertError, assert, is, validate } from '@zmdb/validator';
|
|
6
|
+
export { type ValidateResult } from '@zmdb/validator';
|
|
7
|
+
|
|
8
|
+
export { Container, Inject, Module, createApplication, createToken } from '@zmdb/app';
|
|
9
|
+
export type {
|
|
10
|
+
Application,
|
|
11
|
+
ApplicationExtension,
|
|
12
|
+
ApplicationExtensionContext,
|
|
13
|
+
ApplicationOptions,
|
|
14
|
+
ModuleClass,
|
|
15
|
+
Token,
|
|
16
|
+
} from '@zmdb/app';
|
|
17
|
+
export { Command, createCommandApp } from '@zmdb/app/commands';
|
|
18
|
+
export type { CommandApp } from '@zmdb/app/commands';
|
|
19
|
+
export { repositoryToken } from '@zmdb/app/data';
|
|
20
|
+
export { OnEvent, createEvents } from '@zmdb/app/events';
|
|
21
|
+
export { EventPattern, MessagePattern } from '@zmdb/app/messaging';
|
|
22
|
+
export type { TransportStrategy } from '@zmdb/app/messaging';
|
|
23
|
+
export type { Observability } from '@zmdb/app/observability';
|
|
24
|
+
|
|
25
|
+
export { defineRepository, IncompleteKeyError, ValidationError } from '@zmdb/orm';
|
|
26
|
+
export { type Driver, type UpdatePatch } from '@zmdb/orm';
|
|
27
|
+
|
|
28
|
+
export { schemaOf } from '@zmdb/schema';
|
|
29
|
+
export { type CreateDTO, type Entity, type PrimaryKeyOf, type ReadDTO, type UpdateDTO } from '@zmdb/schema';
|
|
30
|
+
export { type ValidationIssue } from '@zmdb/validator';
|
|
31
|
+
export {
|
|
32
|
+
type HasDefault,
|
|
33
|
+
type Max,
|
|
34
|
+
type MaxLength,
|
|
35
|
+
type Min,
|
|
36
|
+
type MinLength,
|
|
37
|
+
type Pattern,
|
|
38
|
+
type Physical,
|
|
39
|
+
type PrimaryKey,
|
|
40
|
+
type References,
|
|
41
|
+
type Sensitive,
|
|
42
|
+
type Serial,
|
|
43
|
+
type Sql,
|
|
44
|
+
type Table,
|
|
45
|
+
type Unique,
|
|
46
|
+
} from '@zmdb/schema/tags';
|
|
47
|
+
|
|
48
|
+
export { createApp } from '@zmdb/web/app';
|
|
49
|
+
export type { WebApplication, WebApplicationOptions } from '@zmdb/web/app';
|
|
50
|
+
export type { Ctx } from '@zmdb/web/context';
|
|
51
|
+
export { Gateway, Subscribe } from '@zmdb/web/gateways';
|
|
52
|
+
export type { WebRequest, WebResponse } from '@zmdb/web/pipeline';
|
|
53
|
+
export { Controller, Delete, Get, Patch, Post, Public, Put } from '@zmdb/web/routing';
|
|
54
|
+
export { Version, VersionNeutral } from '@zmdb/web/versioning';
|
|
55
|
+
|
|
56
|
+
export { defineConfig } from '@zmdb/compiler/config/contract';
|
|
57
|
+
export type { ZmdbConfig } from '@zmdb/compiler/config/contract';
|
package/src/ir.ts
ADDED
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// zmdb/ir — explicit named re-exports of the schema IR: the one representation every
|
|
2
|
+
// back-end consumes. (No `export *`: each symbol is enumerated so the compatibility
|
|
3
|
+
// surface is explicit.)
|
|
4
|
+
//
|
|
5
|
+
// Plain data in, plain data out. Exported because a consumer generating its own
|
|
6
|
+
// artefacts — a client SDK, a form builder, an admin UI — needs the same
|
|
7
|
+
// representation the built-in emitters read, and the alternative is reverse-engineering
|
|
8
|
+
// `CoreSchema`.
|
|
9
|
+
export {
|
|
10
|
+
appTypeOf,
|
|
11
|
+
dbDecodedColumns,
|
|
12
|
+
decodeDbValue,
|
|
13
|
+
decodeWire,
|
|
14
|
+
decodeWireValue,
|
|
15
|
+
encodeWire,
|
|
16
|
+
encodeWireValue,
|
|
17
|
+
jsonSchemaForColumn,
|
|
18
|
+
jsonSchemaFromIR,
|
|
19
|
+
jsonSchemaFromShape,
|
|
20
|
+
jsonSchemaFromTypeIR,
|
|
21
|
+
KNOWN_CONSTRAINT_KINDS,
|
|
22
|
+
objectTypeFromIR,
|
|
23
|
+
objectTypeFromShape,
|
|
24
|
+
PROTO_SCALARS,
|
|
25
|
+
RELATION_KINDS,
|
|
26
|
+
schemaFromIR,
|
|
27
|
+
shapeOfVariant,
|
|
28
|
+
SQL_TYPES,
|
|
29
|
+
wireTypeOf,
|
|
30
|
+
} from '@zmdb/schema/ir';
|
|
31
|
+
export {
|
|
32
|
+
type ArrayIR,
|
|
33
|
+
type Codec,
|
|
34
|
+
type CodecRegistry,
|
|
35
|
+
type ColumnIR,
|
|
36
|
+
type ConstraintKind,
|
|
37
|
+
type Constraints,
|
|
38
|
+
type ExtensionType,
|
|
39
|
+
type JsonSchemaObject,
|
|
40
|
+
type JsonValue,
|
|
41
|
+
type Layer,
|
|
42
|
+
type LiteralIR,
|
|
43
|
+
type NullIR,
|
|
44
|
+
type ObjectIR,
|
|
45
|
+
type PropertyIR,
|
|
46
|
+
type ProtoScalar,
|
|
47
|
+
type RefIR,
|
|
48
|
+
type RelationIR,
|
|
49
|
+
type RelationKind,
|
|
50
|
+
type ScalarIR,
|
|
51
|
+
type ScalarKind,
|
|
52
|
+
type SchemaIR,
|
|
53
|
+
type ShapeColumnIR,
|
|
54
|
+
type ShapeIR,
|
|
55
|
+
type TupleIR,
|
|
56
|
+
type TypeIR,
|
|
57
|
+
type UndefinedIR,
|
|
58
|
+
type UnionIR,
|
|
59
|
+
type UnknownIR,
|
|
60
|
+
type UnsupportedIR,
|
|
61
|
+
type Variant,
|
|
62
|
+
} from '@zmdb/schema/ir';
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
// Stable product facade for the independently usable migration engine.
|
|
2
|
+
//
|
|
3
|
+
// Keep this list explicit: a new implementation export must be deliberately
|
|
4
|
+
// admitted to the product vocabulary rather than leaking through `export *`.
|
|
5
|
+
export {
|
|
6
|
+
CHANGE_PHASES,
|
|
7
|
+
ddlType,
|
|
8
|
+
diff,
|
|
9
|
+
down,
|
|
10
|
+
downTo,
|
|
11
|
+
driverMigrationConnection,
|
|
12
|
+
emitDown,
|
|
13
|
+
emitSchemaObject,
|
|
14
|
+
emitUp,
|
|
15
|
+
ensureVersionTable,
|
|
16
|
+
planMigration,
|
|
17
|
+
rollbackTo,
|
|
18
|
+
snapshot,
|
|
19
|
+
status,
|
|
20
|
+
up,
|
|
21
|
+
} from '@zmdb/migrations';
|
|
22
|
+
export type {
|
|
23
|
+
AppliedMigration,
|
|
24
|
+
ChangeOp,
|
|
25
|
+
ColumnSnapshot,
|
|
26
|
+
DdlSqlType,
|
|
27
|
+
DiffOptions,
|
|
28
|
+
ExtensionSnapshot,
|
|
29
|
+
ExtensionType,
|
|
30
|
+
ForeignKeySnapshot,
|
|
31
|
+
Migration,
|
|
32
|
+
MigrationConnection,
|
|
33
|
+
MigrationDialect,
|
|
34
|
+
MigrationDriver,
|
|
35
|
+
MigrationPlan,
|
|
36
|
+
MigrationPlanDialect,
|
|
37
|
+
MigrationProject,
|
|
38
|
+
MigrationRunOptions,
|
|
39
|
+
MigrationStatus,
|
|
40
|
+
MigrationTableOptions,
|
|
41
|
+
ReferentialAction,
|
|
42
|
+
SchemaObjectOperation,
|
|
43
|
+
SchemaSnapshot,
|
|
44
|
+
SnapshotableSchema,
|
|
45
|
+
TableOptions,
|
|
46
|
+
TableSnapshot,
|
|
47
|
+
} from '@zmdb/migrations';
|
|
48
|
+
export { EmbeddedMigrationError, runEmbedded } from '@zmdb/migrations/embedded';
|
|
49
|
+
export type { EmbeddedConnection, EmbeddedMigration } from '@zmdb/migrations/embedded';
|
|
50
|
+
export {
|
|
51
|
+
applyPush,
|
|
52
|
+
checkProject,
|
|
53
|
+
embedMigrations,
|
|
54
|
+
embeddedOutputPath,
|
|
55
|
+
exportSchema,
|
|
56
|
+
generateMigration,
|
|
57
|
+
isDestructive,
|
|
58
|
+
planPush,
|
|
59
|
+
pullDeclarations,
|
|
60
|
+
renderEmbeddedModule,
|
|
61
|
+
upgradeSnapshot,
|
|
62
|
+
} from '@zmdb/migrations/files';
|
|
63
|
+
export type {
|
|
64
|
+
CheckFinding,
|
|
65
|
+
CheckFindingKind,
|
|
66
|
+
CheckResult,
|
|
67
|
+
EmbeddedModuleResult,
|
|
68
|
+
EmbedOptions,
|
|
69
|
+
EmbedResult,
|
|
70
|
+
ExportResult,
|
|
71
|
+
GenerateOptions,
|
|
72
|
+
GenerateResult,
|
|
73
|
+
PullExecution,
|
|
74
|
+
PullFile,
|
|
75
|
+
PullOptions,
|
|
76
|
+
PullOutputFile,
|
|
77
|
+
PullResult,
|
|
78
|
+
PullSkippedFile,
|
|
79
|
+
PushPlan,
|
|
80
|
+
PushResult,
|
|
81
|
+
UpgradeResult,
|
|
82
|
+
} from '@zmdb/migrations/files';
|
|
83
|
+
export { CatalogRowError, createIntrospector, detectDrift, nullableIntegerField } from '@zmdb/migrations/introspect';
|
|
84
|
+
export type {
|
|
85
|
+
CatalogColumnSnapshot,
|
|
86
|
+
CatalogForeignKeySnapshot,
|
|
87
|
+
CatalogIndexColumn,
|
|
88
|
+
CatalogIndexSnapshot,
|
|
89
|
+
CatalogSchemaSnapshot,
|
|
90
|
+
CatalogTableSnapshot,
|
|
91
|
+
CatalogWarning,
|
|
92
|
+
DriftOptions,
|
|
93
|
+
DriftReport,
|
|
94
|
+
IntrospectionDriver,
|
|
95
|
+
Introspector,
|
|
96
|
+
IntrospectOptions,
|
|
97
|
+
} from '@zmdb/migrations/introspect';
|