@prisma-next/framework-components 0.5.0-dev.62 → 0.5.0-dev.63
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/dist/codec-BUBJeOk4.d.mts.map +1 -1
- package/dist/control.d.mts +165 -2
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +24 -1
- package/dist/control.mjs.map +1 -1
- package/dist/psl-ast-BlDveJZ4.d.mts.map +1 -1
- package/package.json +4 -4
- package/src/control/control-instances.ts +19 -0
- package/src/control/control-migration-types.ts +70 -1
- package/src/control/control-spaces.ts +82 -0
- package/src/exports/control.ts +8 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-BUBJeOk4.d.mts","names":[],"sources":["../src/shared/codec-types.ts","../src/shared/codec-descriptor.ts","../src/shared/codec.ts"],"sourcesContent":[],"mappings":";;;;KAGY,UAAA;;AAAZ;AAaA;AAYA;;;;;AAOA;AAcA;AAOA;AAOa,UA/CI,gBAAA,CA8DhB;oBA7DmB;;;ACapB;;;;;;;AAgByC,UDlBxB,WAAA,CCkBwB;EAAyB,GAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EDjB/C,KCiB+C,GAAA,SAAA;EAAK,cAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EAAA,SAAA,MAAA,EAAA,GAAA,SAAA;EAS3D,OAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EDxBW,SCwBO,
|
|
1
|
+
{"version":3,"file":"codec-BUBJeOk4.d.mts","names":[],"sources":["../src/shared/codec-types.ts","../src/shared/codec-descriptor.ts","../src/shared/codec.ts"],"sourcesContent":[],"mappings":";;;;KAGY,UAAA;;AAAZ;AAaA;AAYA;;;;;AAOA;AAcA;AAOA;AAOa,UA/CI,gBAAA,CA8DhB;oBA7DmB;;;ACapB;;;;;;;AAgByC,UDlBxB,WAAA,CCkBwB;EAAyB,GAAA,CAAA,EAAA,EAAA,MAAA,CAAA,EDjB/C,KCiB+C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A,EChBvD,SDgBuD;;mBCdjE,YAAY;;AAjB/B;;;;;AAWgB,uBAcM,SAdN,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,gBAAA,SAgBW,UAhBX,EAAA,GAAA,SAgBmC,UAhBnC,EAAA,EAAA,QAAA,OAAA,EAAA,SAAA,OAAA,CAAA,YAmBH,KAnBG,CAmBG,EAnBH,EAmBO,OAnBP,EAmBgB,KAnBhB,EAmBuB,MAnBvB,CAAA,CAAA;EAAa,SAAA,UAAA,EAyBa,eAzBb,CAAA,GAAA,CAAA;EAA2B;;;EAE7B,WAAA,CAAA,UAAA,EAuBe,eAvBf,CAAA,GAAA,CAAA;EAA2B,IAAA,EAAA,CAAA,CAAA,EAyB1C,EAzB0C;EAAR,SAAA,MAAA,CAAA,KAAA,EA6BrB,MA7BqB,EAAA,GAAA,EA6BR,gBA7BQ,CAAA,EA6BW,OA7BX,CA6BmB,KA7BnB,CAAA;EAE1B,SAAA,MAAA,CAAA,IAAA,EA4BI,KA5BJ,EAAA,GAAA,EA4BgB,gBA5BhB,CAAA,EA4BmC,OA5BnC,CA4B2C,MA5B3C,CAAA;EAAS,SAAA,UAAA,CAAA,KAAA,EA6BA,MA7BA,CAAA,EA6BS,SA7BT;EAEV,SAAA,UAAA,CAAA,IAAA,EA4BS,SA5BT,CAAA,EA4BqB,MA5BrB"}
|
package/dist/control.d.mts
CHANGED
|
@@ -179,8 +179,27 @@ interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR> extends Fam
|
|
|
179
179
|
readonly contractPath: string;
|
|
180
180
|
readonly configPath?: string;
|
|
181
181
|
}): Promise<SignDatabaseResult>;
|
|
182
|
+
/**
|
|
183
|
+
* Reads the contract marker for `space` from the database, returning
|
|
184
|
+
* `null` if no marker row exists for that space (or if the marker
|
|
185
|
+
* table itself is missing).
|
|
186
|
+
*
|
|
187
|
+
* `space` is required at every call site so the type system surfaces
|
|
188
|
+
* every place that needs to thread the value: callers in single-app
|
|
189
|
+
* paths pass {@link import('./control-spaces').APP_SPACE_ID}
|
|
190
|
+
* (`'app'`); per-extension callers pass the extension's space id.
|
|
191
|
+
* Defaulting at the family-interface level was a silent bug door —
|
|
192
|
+
* it let multi-space-aware callers forget to pass `space` and
|
|
193
|
+
* collapse onto the app's marker row.
|
|
194
|
+
*
|
|
195
|
+
* Families whose underlying storage doesn't yet support per-space
|
|
196
|
+
* markers (Mongo, today) accept `space` for interface conformance and
|
|
197
|
+
* reject any non-`APP_SPACE_ID` value rather than silently ignoring
|
|
198
|
+
* it; see the family-specific implementation for details.
|
|
199
|
+
*/
|
|
182
200
|
readMarker(options: {
|
|
183
201
|
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
202
|
+
readonly space: string;
|
|
184
203
|
}): Promise<ContractMarkerRecord | null>;
|
|
185
204
|
introspect(options: {
|
|
186
205
|
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
@@ -283,6 +302,61 @@ interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends
|
|
|
283
302
|
}
|
|
284
303
|
//#endregion
|
|
285
304
|
//#region src/control/control-migration-types.d.ts
|
|
305
|
+
/**
|
|
306
|
+
* Planner provenance recorded inside {@link MigrationMetadata}.
|
|
307
|
+
*
|
|
308
|
+
* `used` / `applied` track which migration hints the planner consulted
|
|
309
|
+
* vs. which it actually applied during emission; `plannerVersion`
|
|
310
|
+
* pins the planner build that produced the migration so future
|
|
311
|
+
* verification passes can recognise plans authored against an older
|
|
312
|
+
* planner.
|
|
313
|
+
*/
|
|
314
|
+
interface MigrationHints {
|
|
315
|
+
readonly used: readonly string[];
|
|
316
|
+
readonly applied: readonly string[];
|
|
317
|
+
readonly plannerVersion: string;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* In-memory migration metadata envelope. Every migration is
|
|
321
|
+
* content-addressed: the `migrationHash` is a hash over the metadata
|
|
322
|
+
* envelope plus the operations list, computed at write time. There is no
|
|
323
|
+
* draft state — a migration directory either exists with fully attested
|
|
324
|
+
* metadata or it does not.
|
|
325
|
+
*
|
|
326
|
+
* When the planner cannot lower an operation because of an unfilled
|
|
327
|
+
* `placeholder(...)` slot, the migration is still written with
|
|
328
|
+
* `migrationHash` hashed over `ops: []`. Re-running self-emit after the
|
|
329
|
+
* user fills the placeholder produces a *different* `migrationHash`
|
|
330
|
+
* (committed to the real ops); this is intentional.
|
|
331
|
+
*
|
|
332
|
+
* The on-disk JSON shape in `migration.json` matches this type
|
|
333
|
+
* field-for-field — `JSON.stringify(metadata, null, 2)` is the canonical
|
|
334
|
+
* writer output (defined in `@prisma-next/migration-tools/io`).
|
|
335
|
+
*/
|
|
336
|
+
interface MigrationMetadata {
|
|
337
|
+
readonly migrationHash: string;
|
|
338
|
+
readonly from: string | null;
|
|
339
|
+
readonly to: string;
|
|
340
|
+
readonly fromContract: Contract | null;
|
|
341
|
+
readonly toContract: Contract;
|
|
342
|
+
readonly hints: MigrationHints;
|
|
343
|
+
readonly labels: readonly string[];
|
|
344
|
+
/**
|
|
345
|
+
* Sorted, deduplicated list of `invariantId`s declared by the
|
|
346
|
+
* migration's data-transform ops. Always present; an empty array
|
|
347
|
+
* means the migration has no routing-visible data transforms.
|
|
348
|
+
*/
|
|
349
|
+
readonly providedInvariants: readonly string[];
|
|
350
|
+
readonly authorship?: {
|
|
351
|
+
readonly author?: string;
|
|
352
|
+
readonly email?: string;
|
|
353
|
+
};
|
|
354
|
+
readonly signature?: {
|
|
355
|
+
readonly keyId: string;
|
|
356
|
+
readonly value: string;
|
|
357
|
+
} | null;
|
|
358
|
+
readonly createdAt: string;
|
|
359
|
+
}
|
|
286
360
|
/**
|
|
287
361
|
* Migration operation classes define the safety level of an operation.
|
|
288
362
|
* - 'additive': Adds new structures without modifying existing ones (safe)
|
|
@@ -511,6 +585,13 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
|
|
|
511
585
|
* All components must have matching familyId and targetId.
|
|
512
586
|
*/
|
|
513
587
|
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
588
|
+
/**
|
|
589
|
+
* Contract space this plan applies to. Stamped onto the produced
|
|
590
|
+
* plan so the runner keys the marker row by the right space when
|
|
591
|
+
* executing. App-plan callers pass `APP_SPACE_ID` (`'app'`);
|
|
592
|
+
* per-extension callers pass the extension's space id.
|
|
593
|
+
*/
|
|
594
|
+
readonly spaceId: string;
|
|
514
595
|
}): MigrationPlannerResult;
|
|
515
596
|
/**
|
|
516
597
|
* Produce an empty migration with the target's authoring conventions.
|
|
@@ -518,8 +599,12 @@ interface MigrationPlanner<TFamilyId extends string = string, TTargetId extends
|
|
|
518
599
|
* Used by `migration new` to scaffold a fresh `migration.ts`. The
|
|
519
600
|
* returned plan has no operations; its `renderTypeScript()` yields a
|
|
520
601
|
* stub the user can edit.
|
|
602
|
+
*
|
|
603
|
+
* `spaceId` is stamped onto the produced plan; reconciliation flows
|
|
604
|
+
* (`db init`, `db update`) and authoring flows (`migration new`) all
|
|
605
|
+
* pass it explicitly.
|
|
521
606
|
*/
|
|
522
|
-
emptyMigration(context: MigrationScaffoldContext): MigrationPlanWithAuthoringSurface;
|
|
607
|
+
emptyMigration(context: MigrationScaffoldContext, spaceId: string): MigrationPlanWithAuthoringSurface;
|
|
523
608
|
}
|
|
524
609
|
/**
|
|
525
610
|
* Migration runner interface for executing migration plans.
|
|
@@ -698,5 +783,83 @@ interface OperationPreviewCapable {
|
|
|
698
783
|
}
|
|
699
784
|
declare function hasOperationPreview<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & OperationPreviewCapable;
|
|
700
785
|
//#endregion
|
|
701
|
-
|
|
786
|
+
//#region src/control/control-spaces.d.ts
|
|
787
|
+
/**
|
|
788
|
+
* Canonical control-plane identifiers for contract spaces.
|
|
789
|
+
*
|
|
790
|
+
* A contract space is the disjoint `(contract.json, migration-graph)` unit
|
|
791
|
+
* the per-space planner / runner / verifier (project: extension contract
|
|
792
|
+
* spaces, TML-2397) operates on. The application owns one well-known
|
|
793
|
+
* space — the value below — and each loaded extension that contributes
|
|
794
|
+
* schema owns a uniquely-named space.
|
|
795
|
+
*
|
|
796
|
+
* Lives in `framework-components/control` so every layer that has to
|
|
797
|
+
* reason about space identity (the migration tooling, the SQL runtime's
|
|
798
|
+
* marker reader, target-side statement builders, target-side adapters)
|
|
799
|
+
* can import a single value rather than duplicating the literal. Raw
|
|
800
|
+
* `'app'` string literals in framework / target / runtime / adapter
|
|
801
|
+
* source code are forbidden and policed by
|
|
802
|
+
* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).
|
|
803
|
+
*
|
|
804
|
+
* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).
|
|
805
|
+
*/
|
|
806
|
+
declare const APP_SPACE_ID: "app";
|
|
807
|
+
/**
|
|
808
|
+
* Pinned head ref for a contract space — the `(hash, invariants)` tuple
|
|
809
|
+
* a runner targets when applying that space's migration graph. Identical
|
|
810
|
+
* in shape to the on-disk `migrations/<space-id>/refs/head.json` the
|
|
811
|
+
* framework writes per loaded extension, and to the app-space
|
|
812
|
+
* `<projectRoot>/refs/head.json`. Family-agnostic: SQL, Mongo, and any
|
|
813
|
+
* future family share the same head-ref shape.
|
|
814
|
+
*
|
|
815
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
816
|
+
*/
|
|
817
|
+
interface ContractSpaceHeadRef {
|
|
818
|
+
readonly hash: string;
|
|
819
|
+
readonly invariants: readonly string[];
|
|
820
|
+
}
|
|
821
|
+
/**
|
|
822
|
+
* Canonical structural shape of a migration package — the unit a planner
|
|
823
|
+
* produces and a runner consumes: a directory name, the ADR 197 metadata
|
|
824
|
+
* envelope (which carries the `toContract` snapshot), and the operation
|
|
825
|
+
* list.
|
|
826
|
+
*
|
|
827
|
+
* In-memory by default. Readers in `@prisma-next/migration-tools`
|
|
828
|
+
* (`readMigrationPackage` / `readMigrationsDir`) return the augmented
|
|
829
|
+
* {@link import('@prisma-next/migration-tools/package').OnDiskMigrationPackage}
|
|
830
|
+
* variant which adds `dirPath`; everything else operates against the
|
|
831
|
+
* canonical shape so the same value flows through pre-emission
|
|
832
|
+
* authoring, on-disk loading, and runner execution without conversion.
|
|
833
|
+
*
|
|
834
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
835
|
+
*/
|
|
836
|
+
interface MigrationPackage {
|
|
837
|
+
readonly dirName: string;
|
|
838
|
+
readonly metadata: MigrationMetadata;
|
|
839
|
+
readonly ops: readonly MigrationPlanOperation[];
|
|
840
|
+
}
|
|
841
|
+
/**
|
|
842
|
+
* Canonical structural shape of a contract space — one disjoint
|
|
843
|
+
* `(contractJson, migration-graph)` unit the per-space planner / runner
|
|
844
|
+
* / verifier operates on. The application owns one well-known space
|
|
845
|
+
* ({@link APP_SPACE_ID}); each loaded extension that contributes schema
|
|
846
|
+
* owns a uniquely-named space. Whether a value is the app's space or an
|
|
847
|
+
* extension's space is a control-plane concern; the type carries no
|
|
848
|
+
* such distinction.
|
|
849
|
+
*
|
|
850
|
+
* Generic over the contract so each family pins a typed contract value
|
|
851
|
+
* at consumption time. The SQL family specialises to
|
|
852
|
+
* `ContractSpace<Contract<SqlStorage>>` at the descriptor surface;
|
|
853
|
+
* Mongo's symmetrical `ContractSpace<Contract<MongoStorage>>` will land
|
|
854
|
+
* with that family.
|
|
855
|
+
*
|
|
856
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
857
|
+
*/
|
|
858
|
+
interface ContractSpace<TContract extends Contract = Contract> {
|
|
859
|
+
readonly contractJson: TContract;
|
|
860
|
+
readonly migrations: readonly MigrationPackage[];
|
|
861
|
+
readonly headRef: ContractSpaceHeadRef;
|
|
862
|
+
}
|
|
863
|
+
//#endregion
|
|
864
|
+
export { APP_SPACE_ID, type AssembledAuthoringContributions, type BaseSchemaIssue, type ContractSpace, type ContractSpaceHeadRef, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlMutationDefaultEntry, type ControlMutationDefaultRegistry, type ControlMutationDefaults, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DefaultFunctionLoweringContext, type DefaultFunctionLoweringHandler, type DefaultFunctionRegistry, type DefaultFunctionRegistryEntry, type EmitContractResult, type EnumValuesChangedIssue, type IntrospectSchemaResult, type LoweredDefaultResult, type LoweredDefaultValue, type MigratableTargetDescriptor, type MigrationHints, type MigrationMetadata, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPackage, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanWithAuthoringSurface, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type MigrationScaffoldContext, type MutationDefaultGeneratorDescriptor, type OpFactoryCall, type OperationContext, type OperationPreview, type OperationPreviewCapable, type OperationPreviewStatement, type ParsedDefaultFunctionCall, type PslContractInferCapable, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type SourceDiagnostic, type SourceSpan, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaView };
|
|
702
865
|
//# sourceMappingURL=control.d.mts.map
|
package/dist/control.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control/control-result-types.ts","../src/control/control-instances.ts","../src/control/control-stack.ts","../src/control/control-descriptors.ts","../src/control/control-migration-types.ts","../src/control/control-operation-preview.ts","../src/control/control-schema-view.ts","../src/control/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;EAXJ,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EACA,SAAA,QAAA,EAAA;IAEI,SAAA,WAAgB,EAAA,MAGN;IAGV,SAAA,WAAoB,CAAA,EAAA,MAAA;EA2BpB,CAAA;EAiCA,SAAA,MAAA,CAAA,EAAA;IAQL,SAAA,WAAW,CAAA,EAAG,MAAA;IAET,SAAA,WAAA,CAAsB,EAAA,MAAA;EAYtB,CAAA;EAgCA,SAAA,MAAA,EAAA;IAQA,SAAA,QAAA,EAAA,MAAsB;IAiBtB,SAAA,MAAA,CAAA,EAAkB,MAAA;;;;ECvIlB,SAAA,IAAA,CAAA,EAAA;IACQ,SAAA,UAAA,CAAA,EAAA,MAAA;IACkB,SAAA,YAAA,EAAA,MAAA;EAGA,CAAA;EAAtB,SAAA,OAAA,EAAA;IAKP,SAAA,KAAA,EAAA,MAAA;EAAR,CAAA;;AAGe,UDUJ,eAAA,CCVI;EAK0D,SAAA,IAAA,EAAA,eAAA,GAAA,gBAAA,GAAA,aAAA,GAAA,cAAA,GAAA,mBAAA,GAAA,mBAAA,GAAA,yBAAA,GAAA,aAAA,GAAA,iBAAA,GAAA,eAAA,GAAA,cAAA,GAAA,sBAAA,GAAA,sBAAA,GAAA,sBAAA,GAAA,sBAAA,GAAA,4BAAA,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2BA;AAiCA;AAQY,UOtCK,uBPsCS,CAAA,YAAkB,OAAA,CAAA,CAAA;EAE3B,gBAAA,CAAA,QAAsB,EOvCV,SPuCU,CAAA,EOvCE,cPgDX;AAG9B;AAgCiB,iBOhFD,mBPgFmB,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EO/EvB,qBP+EuB,CO/ED,SP+EC,EO/EU,SP+EV,CAAA,CAAA,EAAA,QAAA,IO9EpB,qBP8EoB,CO9EE,SP8EF,EO9Ea,SP8Eb,CAAA,GO9E0B,uBP8E1B,CO9EkD,SP8ElD,CAAA;AAQnC;AAiBA;;;;ACvIiB,UM4CA,uBAAA,CN5CqB;EACb,kBAAA,CAAA,UAAA,EAAA,SM4CiB,sBN5CjB,EAAA,CAAA,EM4C4C,gBN5C5C;;AAIkB,iBM2C3B,mBN3C2B,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EM4C/B,qBN5C+B,CM4CT,SN5CS,EM4CE,SN5CF,CAAA,CAAA,EAAA,QAAA,IM6C5B,qBN7C4B,CM6CN,SN7CM,EM6CK,SN7CL,CAAA,GM6CkB,uBN7ClB"}
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control/control-result-types.ts","../src/control/control-instances.ts","../src/control/control-stack.ts","../src/control/control-descriptors.ts","../src/control/control-migration-types.ts","../src/control/control-operation-preview.ts","../src/control/control-schema-view.ts","../src/control/control-capabilities.ts","../src/control/control-spaces.ts"],"sourcesContent":[],"mappings":";;;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;UAGV,oBAAA;EAXJ,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EACA,SAAA,QAAA,EAAA;IAEI,SAAA,WAAgB,EAAA,MAGN;IAGV,SAAA,WAAoB,CAAA,EAAA,M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;;;AAyC7B,UOfG,gBAAA,CPeH;EAAR,SAAA,OAAA,EAAA,MAAA;EArDI,SAAA,QAAA,EOwCW,iBPxCX;EAAc,SAAA,GAAA,EAAA,SOyCC,sBPzCD,EAAA;AAwDxB;;;;;AAGA;;;;;AAGA;;;;;;;;AACwB,UOFP,aPEO,CAAA,kBOFyB,QPEzB,GOFoC,QPEpC,CAAA,CAAA;EAQP,SAAA,YAAA,EOTQ,SPSgB;EACb,SAAA,UAAA,EAAA,SOTI,gBPSJ,EAAA;EAAW,SAAA,OAAA,EORnB,oBPQmB"}
|
package/dist/control.mjs
CHANGED
|
@@ -42,6 +42,29 @@ var SchemaTreeNode = class {
|
|
|
42
42
|
}
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
+
//#endregion
|
|
46
|
+
//#region src/control/control-spaces.ts
|
|
47
|
+
/**
|
|
48
|
+
* Canonical control-plane identifiers for contract spaces.
|
|
49
|
+
*
|
|
50
|
+
* A contract space is the disjoint `(contract.json, migration-graph)` unit
|
|
51
|
+
* the per-space planner / runner / verifier (project: extension contract
|
|
52
|
+
* spaces, TML-2397) operates on. The application owns one well-known
|
|
53
|
+
* space — the value below — and each loaded extension that contributes
|
|
54
|
+
* schema owns a uniquely-named space.
|
|
55
|
+
*
|
|
56
|
+
* Lives in `framework-components/control` so every layer that has to
|
|
57
|
+
* reason about space identity (the migration tooling, the SQL runtime's
|
|
58
|
+
* marker reader, target-side statement builders, target-side adapters)
|
|
59
|
+
* can import a single value rather than duplicating the literal. Raw
|
|
60
|
+
* `'app'` string literals in framework / target / runtime / adapter
|
|
61
|
+
* source code are forbidden and policed by
|
|
62
|
+
* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).
|
|
63
|
+
*
|
|
64
|
+
* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).
|
|
65
|
+
*/
|
|
66
|
+
const APP_SPACE_ID = "app";
|
|
67
|
+
|
|
45
68
|
//#endregion
|
|
46
69
|
//#region src/control/control-stack.ts
|
|
47
70
|
function addUniqueId(ids, seen, id) {
|
|
@@ -213,5 +236,5 @@ function createControlStack(input) {
|
|
|
213
236
|
}
|
|
214
237
|
|
|
215
238
|
//#endregion
|
|
216
|
-
export { SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaView };
|
|
239
|
+
export { APP_SPACE_ID, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, assembleControlMutationDefaults, assembleScalarTypeDescriptors, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasOperationPreview, hasPslContractInfer, hasSchemaView };
|
|
217
240
|
//# sourceMappingURL=control.mjs.map
|
package/dist/control.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.mjs","names":["imports: TypesImportSpec[]","ids: string[]"],"sources":["../src/control/control-capabilities.ts","../src/control/control-result-types.ts","../src/control/control-schema-view.ts","../src/control/control-stack.ts"],"sourcesContent":["import type { ControlTargetDescriptor } from './control-descriptors';\nimport type { ControlFamilyInstance } from './control-instances';\nimport type { MigrationPlanOperation, TargetMigrationsCapability } from './control-migration-types';\nimport type { OperationPreview } from './control-operation-preview';\nimport type { CoreSchemaView } from './control-schema-view';\nimport type { PslDocumentAst } from './psl-ast';\n\nexport interface MigratableTargetDescriptor<\n TFamilyId extends string,\n TTargetId extends string,\n TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<\n TFamilyId,\n unknown\n >,\n> extends ControlTargetDescriptor<TFamilyId, TTargetId> {\n readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;\n}\n\nexport function hasMigrations<TFamilyId extends string, TTargetId extends string>(\n target: ControlTargetDescriptor<TFamilyId, TTargetId>,\n): target is MigratableTargetDescriptor<TFamilyId, TTargetId> {\n return 'migrations' in target && !!(target as Record<string, unknown>)['migrations'];\n}\n\nexport interface SchemaViewCapable<TSchemaIR = unknown> {\n toSchemaView(schema: TSchemaIR): CoreSchemaView;\n}\n\nexport function hasSchemaView<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR> {\n return (\n 'toSchemaView' in instance &&\n typeof (instance as Record<string, unknown>)['toSchemaView'] === 'function'\n );\n}\n\n/**\n * Capability declaring that a family can infer a PSL contract AST from its\n * opaque introspected schema IR. Consumed by `prisma-next contract infer`.\n */\nexport interface PslContractInferCapable<TSchemaIR = unknown> {\n inferPslContract(schemaIR: TSchemaIR): PslDocumentAst;\n}\n\nexport function hasPslContractInfer<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractInferCapable<TSchemaIR> {\n return (\n 'inferPslContract' in instance &&\n typeof (instance as Record<string, unknown>)['inferPslContract'] === 'function'\n );\n}\n\n/**\n * Capability declaring that a family can render a textual preview of migration\n * operations for the CLI's \"DDL preview\" output. SQL families emit\n * `language: 'sql'` statements; Mongo families emit `language: 'mongodb-shell'`.\n */\nexport interface OperationPreviewCapable {\n toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;\n}\n\nexport function hasOperationPreview<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & OperationPreviewCapable {\n return (\n 'toOperationPreview' in instance &&\n typeof (instance as Record<string, unknown>)['toOperationPreview'] === 'function'\n );\n}\n","export const VERIFY_CODE_MARKER_MISSING = 'PN-RUN-3001';\nexport const VERIFY_CODE_HASH_MISMATCH = 'PN-RUN-3002';\nexport const VERIFY_CODE_TARGET_MISMATCH = 'PN-RUN-3003';\nexport const VERIFY_CODE_SCHEMA_FAILURE = 'PN-RUN-3010';\n\nexport interface OperationContext {\n readonly contractPath?: string;\n readonly configPath?: string;\n readonly meta?: Readonly<Record<string, unknown>>;\n}\n\nexport interface VerifyDatabaseResult {\n readonly ok: boolean;\n readonly code?: string;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly marker?: {\n readonly storageHash?: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly missingCodecs?: readonly string[];\n readonly codecCoverageSkipped?: boolean;\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface BaseSchemaIssue {\n readonly kind:\n | 'missing_table'\n | 'missing_column'\n | 'extra_table'\n | 'extra_column'\n | 'extra_primary_key'\n | 'extra_foreign_key'\n | 'extra_unique_constraint'\n | 'extra_index'\n | 'extra_validator'\n | 'type_mismatch'\n | 'type_missing'\n | 'type_values_mismatch'\n | 'nullability_mismatch'\n | 'primary_key_mismatch'\n | 'foreign_key_mismatch'\n | 'unique_constraint_mismatch'\n | 'index_mismatch'\n | 'dependency_missing'\n | 'default_missing'\n | 'default_mismatch'\n | 'extra_default';\n readonly table?: string;\n readonly column?: string;\n readonly indexOrConstraint?: string;\n readonly typeName?: string;\n readonly dependencyId?: string;\n readonly expected?: string;\n readonly actual?: string;\n readonly message: string;\n}\n\nexport interface EnumValuesChangedIssue {\n readonly kind: 'enum_values_changed';\n readonly typeName: string;\n readonly addedValues: readonly string[];\n readonly removedValues: readonly string[];\n readonly message: string;\n}\n\nexport type SchemaIssue = BaseSchemaIssue | EnumValuesChangedIssue;\n\nexport interface SchemaVerificationNode {\n readonly status: 'pass' | 'warn' | 'fail';\n readonly kind: string;\n readonly name: string;\n readonly contractPath: string;\n readonly code: string;\n readonly message: string;\n readonly expected: unknown;\n readonly actual: unknown;\n readonly children: readonly SchemaVerificationNode[];\n}\n\nexport interface VerifyDatabaseSchemaResult {\n readonly ok: boolean;\n readonly code?: string;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly schema: {\n readonly issues: readonly SchemaIssue[];\n readonly root: SchemaVerificationNode;\n readonly counts: {\n readonly pass: number;\n readonly warn: number;\n readonly fail: number;\n readonly totalNodes: number;\n };\n };\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath?: string;\n readonly strict: boolean;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface EmitContractResult {\n readonly contractJson: string;\n readonly contractDts: string;\n readonly storageHash: string;\n readonly executionHash?: string;\n readonly profileHash: string;\n}\n\nexport interface IntrospectSchemaResult<TSchemaIR> {\n readonly ok: true;\n readonly summary: string;\n readonly target: {\n readonly familyId: string;\n readonly id: string;\n };\n readonly schema: TSchemaIR;\n readonly meta?: {\n readonly configPath?: string;\n readonly dbUrl?: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface SignDatabaseResult {\n readonly ok: boolean;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly marker: {\n readonly created: boolean;\n readonly updated: boolean;\n readonly previous?: {\n readonly storageHash?: string;\n readonly profileHash?: string;\n };\n };\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n","/**\n * Core schema view types for family-agnostic schema visualization.\n *\n * These types provide a minimal, generic, tree-shaped representation of schemas\n * across families, designed for CLI visualization and lightweight tooling.\n *\n * Families can optionally project their family-specific Schema IR into this\n * core view via the `toSchemaView` method on `FamilyInstance`.\n */\n\nexport type SchemaNodeKind =\n | 'root'\n | 'namespace'\n | 'collection'\n | 'entity'\n | 'field'\n | 'index'\n | 'dependency';\n\nexport interface SchemaTreeVisitor<R> {\n visit(node: SchemaTreeNode): R;\n}\n\nexport interface SchemaTreeNodeOptions {\n readonly kind: SchemaNodeKind;\n readonly id: string;\n readonly label: string;\n readonly meta?: Record<string, unknown>;\n readonly children?: readonly SchemaTreeNode[];\n}\n\nexport class SchemaTreeNode {\n readonly kind: SchemaNodeKind;\n readonly id: string;\n readonly label: string;\n readonly meta?: Record<string, unknown>;\n readonly children?: readonly SchemaTreeNode[];\n\n constructor(options: SchemaTreeNodeOptions) {\n this.kind = options.kind;\n this.id = options.id;\n this.label = options.label;\n if (options.meta !== undefined) this.meta = options.meta;\n if (options.children !== undefined) this.children = options.children;\n Object.freeze(this);\n }\n\n accept<R>(visitor: SchemaTreeVisitor<R>): R {\n return visitor.visit(this);\n }\n}\n\n/**\n * Core schema view providing a family-agnostic tree representation of a schema.\n * Used by CLI and cross-family tooling for visualization.\n */\nexport interface CoreSchemaView {\n readonly root: SchemaTreeNode;\n}\n","import type { Codec } from '../shared/codec';\nimport type { CodecLookup, CodecMeta } from '../shared/codec-types';\nimport type {\n AuthoringContributions,\n AuthoringFieldNamespace,\n AuthoringTypeNamespace,\n} from '../shared/framework-authoring';\nimport {\n assertNoCrossRegistryCollisions,\n isAuthoringFieldPresetDescriptor,\n isAuthoringTypeConstructorDescriptor,\n mergeAuthoringNamespaces,\n} from '../shared/framework-authoring';\nimport type { ComponentMetadata } from '../shared/framework-components';\nimport type {\n ControlMutationDefaultEntry,\n ControlMutationDefaults,\n MutationDefaultGeneratorDescriptor,\n} from '../shared/mutation-default-types';\nimport type { TypesImportSpec } from '../shared/types-import-spec';\nimport type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlFamilyDescriptor,\n ControlTargetDescriptor,\n} from './control-descriptors';\n\nexport interface AssembledAuthoringContributions {\n readonly field: AuthoringFieldNamespace;\n readonly type: AuthoringTypeNamespace;\n}\n\nexport interface ControlStack<\n TFamilyId extends string = string,\n TTargetId extends string = string,\n> {\n readonly family: ControlFamilyDescriptor<TFamilyId>;\n readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;\n readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;\n readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;\n readonly extensionPacks: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];\n\n readonly codecTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly operationTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly queryOperationTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly extensionIds: ReadonlyArray<string>;\n readonly codecLookup: CodecLookup;\n readonly authoringContributions: AssembledAuthoringContributions;\n readonly scalarTypeDescriptors: ReadonlyMap<string, string>;\n readonly controlMutationDefaults: ControlMutationDefaults;\n}\n\nexport interface CreateControlStackInput<\n TFamilyId extends string = string,\n TTargetId extends string = string,\n> {\n readonly family: ControlFamilyDescriptor<TFamilyId>;\n readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;\n readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;\n readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;\n readonly extensionPacks?:\n | ReadonlyArray<ControlExtensionDescriptor<TFamilyId, TTargetId>>\n | undefined;\n}\n\nfunction addUniqueId(ids: string[], seen: Set<string>, id: string): void {\n if (!seen.has(id)) {\n ids.push(id);\n seen.add(id);\n }\n}\n\nexport function assertUniqueCodecOwner(options: {\n readonly codecId: string;\n readonly owners: Map<string, string>;\n readonly descriptorId: string;\n readonly entityLabel: string;\n readonly entityOwnershipLabel: string;\n}): void {\n const existingOwner = options.owners.get(options.codecId);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate ${options.entityLabel} for codecId \"${options.codecId}\". ` +\n `Descriptor \"${options.descriptorId}\" conflicts with \"${existingOwner}\". ` +\n `Each codecId can only have one ${options.entityOwnershipLabel}.`,\n );\n }\n}\n\nexport function extractCodecTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const codecTypes = descriptor.types?.codecTypes;\n if (codecTypes?.import) {\n imports.push(codecTypes.import);\n }\n if (codecTypes?.typeImports) {\n imports.push(...codecTypes.typeImports);\n }\n }\n\n return imports;\n}\n\nexport function extractOperationTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const operationTypes = descriptor.types?.operationTypes;\n if (operationTypes?.import) {\n imports.push(operationTypes.import);\n }\n }\n\n return imports;\n}\n\nexport function extractQueryOperationTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const queryOperationTypes = descriptor.types?.queryOperationTypes;\n if (queryOperationTypes?.import) {\n imports.push(queryOperationTypes.import);\n }\n }\n\n return imports;\n}\n\nexport function extractComponentIds(\n family: { readonly id: string },\n target: { readonly id: string },\n adapter: { readonly id: string } | undefined,\n extensions: ReadonlyArray<{ readonly id: string }>,\n): ReadonlyArray<string> {\n const ids: string[] = [];\n const seen = new Set<string>();\n\n addUniqueId(ids, seen, family.id);\n addUniqueId(ids, seen, target.id);\n if (adapter) {\n addUniqueId(ids, seen, adapter.id);\n }\n\n for (const ext of extensions) {\n addUniqueId(ids, seen, ext.id);\n }\n\n return ids;\n}\n\nexport function assembleAuthoringContributions(\n descriptors: ReadonlyArray<{ readonly authoring?: AuthoringContributions }>,\n): AssembledAuthoringContributions {\n const field = {} as Record<string, unknown>;\n const type = {} as Record<string, unknown>;\n\n for (const descriptor of descriptors) {\n if (descriptor.authoring?.field) {\n mergeAuthoringNamespaces(\n field,\n descriptor.authoring.field,\n [],\n isAuthoringFieldPresetDescriptor,\n 'field',\n );\n }\n if (!descriptor.authoring?.type) {\n continue;\n }\n mergeAuthoringNamespaces(\n type,\n descriptor.authoring.type,\n [],\n isAuthoringTypeConstructorDescriptor,\n 'type',\n );\n }\n\n const fieldNamespace = field as AuthoringFieldNamespace;\n const typeNamespace = type as AuthoringTypeNamespace;\n assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace);\n\n return {\n field: fieldNamespace,\n type: typeNamespace,\n };\n}\n\nexport function assembleScalarTypeDescriptors(\n descriptors: ReadonlyArray<\n Pick<ComponentMetadata, 'scalarTypeDescriptors'> & { readonly id?: string }\n >,\n): ReadonlyMap<string, string> {\n const result = new Map<string, string>();\n const owners = new Map<string, string>();\n\n for (const descriptor of descriptors) {\n const descriptorMap = descriptor.scalarTypeDescriptors;\n if (!descriptorMap) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n for (const [typeName, codecId] of descriptorMap) {\n const existingOwner = owners.get(typeName);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate scalar type descriptor \"${typeName}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n result.set(typeName, codecId);\n owners.set(typeName, descriptorId);\n }\n }\n\n return result;\n}\n\nexport function assembleControlMutationDefaults(\n descriptors: ReadonlyArray<\n Pick<ComponentMetadata, 'controlMutationDefaults'> & { readonly id?: string }\n >,\n): ControlMutationDefaults {\n const defaultFunctionRegistry = new Map<string, ControlMutationDefaultEntry>();\n const functionOwners = new Map<string, string>();\n const generatorMap = new Map<string, MutationDefaultGeneratorDescriptor>();\n const generatorOwners = new Map<string, string>();\n\n for (const descriptor of descriptors) {\n const contributions = descriptor.controlMutationDefaults;\n if (!contributions) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n\n for (const generatorDescriptor of contributions.generatorDescriptors) {\n const existingOwner = generatorOwners.get(generatorDescriptor.id);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate mutation default generator id \"${generatorDescriptor.id}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n generatorMap.set(generatorDescriptor.id, generatorDescriptor);\n generatorOwners.set(generatorDescriptor.id, descriptorId);\n }\n\n for (const [functionName, handler] of contributions.defaultFunctionRegistry) {\n const existingOwner = functionOwners.get(functionName);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate mutation default function \"${functionName}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n defaultFunctionRegistry.set(functionName, handler);\n functionOwners.set(functionName, descriptorId);\n }\n }\n\n return {\n defaultFunctionRegistry,\n generatorDescriptors: Array.from(generatorMap.values()),\n };\n}\n\nexport function extractCodecLookup(\n descriptors: ReadonlyArray<Pick<ComponentMetadata & { id: string }, 'types' | 'id'>>,\n): CodecLookup {\n const byId = new Map<string, Codec>();\n const targetTypesById = new Map<string, readonly string[]>();\n const metaById = new Map<string, CodecMeta>();\n const renderersById = new Map<string, (params: Record<string, unknown>) => string | undefined>();\n const owners = new Map<string, string>();\n for (const descriptor of descriptors) {\n const codecTypes = descriptor.types?.codecTypes;\n const descriptorId = descriptor.id;\n // Descriptor-side metadata is the single source of truth for `targetTypes` / `meta` / `renderOutputType`. Every contributor ships a `codecDescriptors` list on `types.codecTypes`.\n for (const codecDescriptor of codecTypes?.codecDescriptors ?? []) {\n assertUniqueCodecOwner({\n codecId: codecDescriptor.codecId,\n owners,\n descriptorId,\n entityLabel: 'codec descriptor',\n entityOwnershipLabel: 'codec descriptor provider',\n });\n owners.set(codecDescriptor.codecId, descriptorId);\n if (Array.isArray(codecDescriptor.targetTypes)) {\n targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);\n }\n if (codecDescriptor.meta !== undefined) {\n metaById.set(codecDescriptor.codecId, codecDescriptor.meta);\n }\n if (typeof codecDescriptor.renderOutputType === 'function') {\n renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);\n }\n // Materialize a representative `Codec` instance for `byId.get()` so consumers reading the lookup's instance side (e.g. SQL renderer's cast-policy lookup, or the contract emitter's literal-default `encodeJson` resolver) keep finding the codec.\n //\n // Two cohorts:\n // - Non-parameterized descriptors: factory must succeed; any throw is a real bug and we let it propagate (no silent try/catch).\n // - Parameterized descriptors: try with empty params. Many parameterized codecs treat params as advisory (e.g. `pg/timestamptz@1` whose precision is rendered into the `nativeType` only and never read by the runtime codec), so an empty-params construction yields a usable representative for id-keyed lookups (e.g. emit-time literal-default encoding). Codecs whose factory genuinely requires params (e.g. `pg/vector@1` threading `length` into the runtime codec) will throw; for those, per-column instances are materialized at runtime by `buildContractCodecRegistry` and the id-keyed lookup miss is correct (the column-aware path resolves them).\n if (!byId.has(codecDescriptor.codecId)) {\n if (codecDescriptor.isParameterized) {\n try {\n const representative = codecDescriptor.factory({} as never)({\n name: `<lookup:${codecDescriptor.codecId}>`,\n } as Parameters<ReturnType<typeof codecDescriptor.factory>>[0]);\n byId.set(codecDescriptor.codecId, representative);\n } catch {\n // Factory requires concrete params; skip representative materialization. Per-column instances are built at runtime; id-keyed lookup miss is the correct outcome here.\n }\n } else {\n const representative = codecDescriptor.factory(undefined as never)({\n name: `<lookup:${codecDescriptor.codecId}>`,\n } as Parameters<ReturnType<typeof codecDescriptor.factory>>[0]);\n byId.set(codecDescriptor.codecId, representative);\n }\n }\n }\n }\n return {\n get: (id) => byId.get(id),\n targetTypesFor: (id) => targetTypesById.get(id),\n metaFor: (id) => metaById.get(id),\n renderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),\n };\n}\n\nexport function validateScalarTypeCodecIds(\n scalarTypeDescriptors: ReadonlyMap<string, string>,\n codecLookup: CodecLookup,\n): string[] {\n const errors: string[] = [];\n for (const [typeName, codecId] of scalarTypeDescriptors) {\n if (!codecLookup.get(codecId)) {\n errors.push(\n `Scalar type \"${typeName}\" references codec \"${codecId}\" which is not registered by any component.`,\n );\n }\n }\n return errors;\n}\n\nexport function createControlStack<TFamilyId extends string, TTargetId extends string>(\n input: CreateControlStackInput<TFamilyId, TTargetId>,\n): ControlStack<TFamilyId, TTargetId> {\n const { family, target, adapter, driver, extensionPacks = [] } = input;\n\n const allDescriptors = [family, target, ...(adapter ? [adapter] : []), ...extensionPacks];\n\n const codecLookup = extractCodecLookup(allDescriptors);\n const scalarTypeDescriptors = assembleScalarTypeDescriptors(allDescriptors);\n\n return {\n family,\n target,\n adapter,\n driver,\n extensionPacks: extensionPacks as readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[],\n\n codecTypeImports: extractCodecTypeImports(allDescriptors),\n operationTypeImports: extractOperationTypeImports(allDescriptors),\n queryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),\n extensionIds: extractComponentIds(family, target, adapter, extensionPacks),\n codecLookup,\n authoringContributions: assembleAuthoringContributions(allDescriptors),\n scalarTypeDescriptors,\n controlMutationDefaults: assembleControlMutationDefaults(allDescriptors),\n };\n}\n"],"mappings":";;;AAkBA,SAAgB,cACd,QAC4D;AAC5D,QAAO,gBAAgB,UAAU,CAAC,CAAE,OAAmC;;AAOzE,SAAgB,cACd,UACwF;AACxF,QACE,kBAAkB,YAClB,OAAQ,SAAqC,oBAAoB;;AAYrE,SAAgB,oBACd,UAC8F;AAC9F,QACE,sBAAsB,YACtB,OAAQ,SAAqC,wBAAwB;;AAazE,SAAgB,oBACd,UACmF;AACnF,QACE,wBAAwB,YACxB,OAAQ,SAAqC,0BAA0B;;;;;ACpE3E,MAAa,6BAA6B;AAC1C,MAAa,4BAA4B;AACzC,MAAa,8BAA8B;AAC3C,MAAa,6BAA6B;;;;AC4B1C,IAAa,iBAAb,MAA4B;CAC1B,AA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ACjE,2BAA2B,iCAAiC,eAAe;EAC3E,cAAc,oBAAoB,QAAQ,QAAQ,SAAS,eAAe;EAC1E;EACA,wBAAwB,+BAA+B,eAAe;EACtE;EACA,yBAAyB,gCAAgC,eAAe;EACzE"}
|
|
1
|
+
{"version":3,"file":"control.mjs","names":["imports: TypesImportSpec[]","ids: string[]"],"sources":["../src/control/control-capabilities.ts","../src/control/control-result-types.ts","../src/control/control-schema-view.ts","../src/control/control-spaces.ts","../src/control/control-stack.ts"],"sourcesContent":["import type { ControlTargetDescriptor } from './control-descriptors';\nimport type { ControlFamilyInstance } from './control-instances';\nimport type { MigrationPlanOperation, TargetMigrationsCapability } from './control-migration-types';\nimport type { OperationPreview } from './control-operation-preview';\nimport type { CoreSchemaView } from './control-schema-view';\nimport type { PslDocumentAst } from './psl-ast';\n\nexport interface MigratableTargetDescriptor<\n TFamilyId extends string,\n TTargetId extends string,\n TFamilyInstance extends ControlFamilyInstance<TFamilyId, unknown> = ControlFamilyInstance<\n TFamilyId,\n unknown\n >,\n> extends ControlTargetDescriptor<TFamilyId, TTargetId> {\n readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, TFamilyInstance>;\n}\n\nexport function hasMigrations<TFamilyId extends string, TTargetId extends string>(\n target: ControlTargetDescriptor<TFamilyId, TTargetId>,\n): target is MigratableTargetDescriptor<TFamilyId, TTargetId> {\n return 'migrations' in target && !!(target as Record<string, unknown>)['migrations'];\n}\n\nexport interface SchemaViewCapable<TSchemaIR = unknown> {\n toSchemaView(schema: TSchemaIR): CoreSchemaView;\n}\n\nexport function hasSchemaView<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR> {\n return (\n 'toSchemaView' in instance &&\n typeof (instance as Record<string, unknown>)['toSchemaView'] === 'function'\n );\n}\n\n/**\n * Capability declaring that a family can infer a PSL contract AST from its\n * opaque introspected schema IR. Consumed by `prisma-next contract infer`.\n */\nexport interface PslContractInferCapable<TSchemaIR = unknown> {\n inferPslContract(schemaIR: TSchemaIR): PslDocumentAst;\n}\n\nexport function hasPslContractInfer<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & PslContractInferCapable<TSchemaIR> {\n return (\n 'inferPslContract' in instance &&\n typeof (instance as Record<string, unknown>)['inferPslContract'] === 'function'\n );\n}\n\n/**\n * Capability declaring that a family can render a textual preview of migration\n * operations for the CLI's \"DDL preview\" output. SQL families emit\n * `language: 'sql'` statements; Mongo families emit `language: 'mongodb-shell'`.\n */\nexport interface OperationPreviewCapable {\n toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;\n}\n\nexport function hasOperationPreview<TFamilyId extends string, TSchemaIR>(\n instance: ControlFamilyInstance<TFamilyId, TSchemaIR>,\n): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & OperationPreviewCapable {\n return (\n 'toOperationPreview' in instance &&\n typeof (instance as Record<string, unknown>)['toOperationPreview'] === 'function'\n );\n}\n","export const VERIFY_CODE_MARKER_MISSING = 'PN-RUN-3001';\nexport const VERIFY_CODE_HASH_MISMATCH = 'PN-RUN-3002';\nexport const VERIFY_CODE_TARGET_MISMATCH = 'PN-RUN-3003';\nexport const VERIFY_CODE_SCHEMA_FAILURE = 'PN-RUN-3010';\n\nexport interface OperationContext {\n readonly contractPath?: string;\n readonly configPath?: string;\n readonly meta?: Readonly<Record<string, unknown>>;\n}\n\nexport interface VerifyDatabaseResult {\n readonly ok: boolean;\n readonly code?: string;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly marker?: {\n readonly storageHash?: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly missingCodecs?: readonly string[];\n readonly codecCoverageSkipped?: boolean;\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface BaseSchemaIssue {\n readonly kind:\n | 'missing_table'\n | 'missing_column'\n | 'extra_table'\n | 'extra_column'\n | 'extra_primary_key'\n | 'extra_foreign_key'\n | 'extra_unique_constraint'\n | 'extra_index'\n | 'extra_validator'\n | 'type_mismatch'\n | 'type_missing'\n | 'type_values_mismatch'\n | 'nullability_mismatch'\n | 'primary_key_mismatch'\n | 'foreign_key_mismatch'\n | 'unique_constraint_mismatch'\n | 'index_mismatch'\n | 'dependency_missing'\n | 'default_missing'\n | 'default_mismatch'\n | 'extra_default';\n readonly table?: string;\n readonly column?: string;\n readonly indexOrConstraint?: string;\n readonly typeName?: string;\n readonly dependencyId?: string;\n readonly expected?: string;\n readonly actual?: string;\n readonly message: string;\n}\n\nexport interface EnumValuesChangedIssue {\n readonly kind: 'enum_values_changed';\n readonly typeName: string;\n readonly addedValues: readonly string[];\n readonly removedValues: readonly string[];\n readonly message: string;\n}\n\nexport type SchemaIssue = BaseSchemaIssue | EnumValuesChangedIssue;\n\nexport interface SchemaVerificationNode {\n readonly status: 'pass' | 'warn' | 'fail';\n readonly kind: string;\n readonly name: string;\n readonly contractPath: string;\n readonly code: string;\n readonly message: string;\n readonly expected: unknown;\n readonly actual: unknown;\n readonly children: readonly SchemaVerificationNode[];\n}\n\nexport interface VerifyDatabaseSchemaResult {\n readonly ok: boolean;\n readonly code?: string;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly schema: {\n readonly issues: readonly SchemaIssue[];\n readonly root: SchemaVerificationNode;\n readonly counts: {\n readonly pass: number;\n readonly warn: number;\n readonly fail: number;\n readonly totalNodes: number;\n };\n };\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath?: string;\n readonly strict: boolean;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface EmitContractResult {\n readonly contractJson: string;\n readonly contractDts: string;\n readonly storageHash: string;\n readonly executionHash?: string;\n readonly profileHash: string;\n}\n\nexport interface IntrospectSchemaResult<TSchemaIR> {\n readonly ok: true;\n readonly summary: string;\n readonly target: {\n readonly familyId: string;\n readonly id: string;\n };\n readonly schema: TSchemaIR;\n readonly meta?: {\n readonly configPath?: string;\n readonly dbUrl?: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n\nexport interface SignDatabaseResult {\n readonly ok: boolean;\n readonly summary: string;\n readonly contract: {\n readonly storageHash: string;\n readonly profileHash?: string;\n };\n readonly target: {\n readonly expected: string;\n readonly actual?: string;\n };\n readonly marker: {\n readonly created: boolean;\n readonly updated: boolean;\n readonly previous?: {\n readonly storageHash?: string;\n readonly profileHash?: string;\n };\n };\n readonly meta?: {\n readonly configPath?: string;\n readonly contractPath: string;\n };\n readonly timings: {\n readonly total: number;\n };\n}\n","/**\n * Core schema view types for family-agnostic schema visualization.\n *\n * These types provide a minimal, generic, tree-shaped representation of schemas\n * across families, designed for CLI visualization and lightweight tooling.\n *\n * Families can optionally project their family-specific Schema IR into this\n * core view via the `toSchemaView` method on `FamilyInstance`.\n */\n\nexport type SchemaNodeKind =\n | 'root'\n | 'namespace'\n | 'collection'\n | 'entity'\n | 'field'\n | 'index'\n | 'dependency';\n\nexport interface SchemaTreeVisitor<R> {\n visit(node: SchemaTreeNode): R;\n}\n\nexport interface SchemaTreeNodeOptions {\n readonly kind: SchemaNodeKind;\n readonly id: string;\n readonly label: string;\n readonly meta?: Record<string, unknown>;\n readonly children?: readonly SchemaTreeNode[];\n}\n\nexport class SchemaTreeNode {\n readonly kind: SchemaNodeKind;\n readonly id: string;\n readonly label: string;\n readonly meta?: Record<string, unknown>;\n readonly children?: readonly SchemaTreeNode[];\n\n constructor(options: SchemaTreeNodeOptions) {\n this.kind = options.kind;\n this.id = options.id;\n this.label = options.label;\n if (options.meta !== undefined) this.meta = options.meta;\n if (options.children !== undefined) this.children = options.children;\n Object.freeze(this);\n }\n\n accept<R>(visitor: SchemaTreeVisitor<R>): R {\n return visitor.visit(this);\n }\n}\n\n/**\n * Core schema view providing a family-agnostic tree representation of a schema.\n * Used by CLI and cross-family tooling for visualization.\n */\nexport interface CoreSchemaView {\n readonly root: SchemaTreeNode;\n}\n","import type { Contract } from '@prisma-next/contract/types';\nimport type { MigrationMetadata, MigrationPlanOperation } from './control-migration-types';\n\n/**\n * Canonical control-plane identifiers for contract spaces.\n *\n * A contract space is the disjoint `(contract.json, migration-graph)` unit\n * the per-space planner / runner / verifier (project: extension contract\n * spaces, TML-2397) operates on. The application owns one well-known\n * space — the value below — and each loaded extension that contributes\n * schema owns a uniquely-named space.\n *\n * Lives in `framework-components/control` so every layer that has to\n * reason about space identity (the migration tooling, the SQL runtime's\n * marker reader, target-side statement builders, target-side adapters)\n * can import a single value rather than duplicating the literal. Raw\n * `'app'` string literals in framework / target / runtime / adapter\n * source code are forbidden and policed by\n * `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).\n *\n * @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).\n */\nexport const APP_SPACE_ID = 'app' as const;\n\n/**\n * Pinned head ref for a contract space — the `(hash, invariants)` tuple\n * a runner targets when applying that space's migration graph. Identical\n * in shape to the on-disk `migrations/<space-id>/refs/head.json` the\n * framework writes per loaded extension, and to the app-space\n * `<projectRoot>/refs/head.json`. Family-agnostic: SQL, Mongo, and any\n * future family share the same head-ref shape.\n *\n * @see specs/framework-mechanism.spec.md § 1.\n */\nexport interface ContractSpaceHeadRef {\n readonly hash: string;\n readonly invariants: readonly string[];\n}\n\n/**\n * Canonical structural shape of a migration package — the unit a planner\n * produces and a runner consumes: a directory name, the ADR 197 metadata\n * envelope (which carries the `toContract` snapshot), and the operation\n * list.\n *\n * In-memory by default. Readers in `@prisma-next/migration-tools`\n * (`readMigrationPackage` / `readMigrationsDir`) return the augmented\n * {@link import('@prisma-next/migration-tools/package').OnDiskMigrationPackage}\n * variant which adds `dirPath`; everything else operates against the\n * canonical shape so the same value flows through pre-emission\n * authoring, on-disk loading, and runner execution without conversion.\n *\n * @see specs/framework-mechanism.spec.md § 1.\n */\nexport interface MigrationPackage {\n readonly dirName: string;\n readonly metadata: MigrationMetadata;\n readonly ops: readonly MigrationPlanOperation[];\n}\n\n/**\n * Canonical structural shape of a contract space — one disjoint\n * `(contractJson, migration-graph)` unit the per-space planner / runner\n * / verifier operates on. The application owns one well-known space\n * ({@link APP_SPACE_ID}); each loaded extension that contributes schema\n * owns a uniquely-named space. Whether a value is the app's space or an\n * extension's space is a control-plane concern; the type carries no\n * such distinction.\n *\n * Generic over the contract so each family pins a typed contract value\n * at consumption time. The SQL family specialises to\n * `ContractSpace<Contract<SqlStorage>>` at the descriptor surface;\n * Mongo's symmetrical `ContractSpace<Contract<MongoStorage>>` will land\n * with that family.\n *\n * @see specs/framework-mechanism.spec.md § 1.\n */\nexport interface ContractSpace<TContract extends Contract = Contract> {\n readonly contractJson: TContract;\n readonly migrations: readonly MigrationPackage[];\n readonly headRef: ContractSpaceHeadRef;\n}\n","import type { Codec } from '../shared/codec';\nimport type { CodecLookup, CodecMeta } from '../shared/codec-types';\nimport type {\n AuthoringContributions,\n AuthoringFieldNamespace,\n AuthoringTypeNamespace,\n} from '../shared/framework-authoring';\nimport {\n assertNoCrossRegistryCollisions,\n isAuthoringFieldPresetDescriptor,\n isAuthoringTypeConstructorDescriptor,\n mergeAuthoringNamespaces,\n} from '../shared/framework-authoring';\nimport type { ComponentMetadata } from '../shared/framework-components';\nimport type {\n ControlMutationDefaultEntry,\n ControlMutationDefaults,\n MutationDefaultGeneratorDescriptor,\n} from '../shared/mutation-default-types';\nimport type { TypesImportSpec } from '../shared/types-import-spec';\nimport type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlFamilyDescriptor,\n ControlTargetDescriptor,\n} from './control-descriptors';\n\nexport interface AssembledAuthoringContributions {\n readonly field: AuthoringFieldNamespace;\n readonly type: AuthoringTypeNamespace;\n}\n\nexport interface ControlStack<\n TFamilyId extends string = string,\n TTargetId extends string = string,\n> {\n readonly family: ControlFamilyDescriptor<TFamilyId>;\n readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;\n readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;\n readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;\n readonly extensionPacks: readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[];\n\n readonly codecTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly operationTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly queryOperationTypeImports: ReadonlyArray<TypesImportSpec>;\n readonly extensionIds: ReadonlyArray<string>;\n readonly codecLookup: CodecLookup;\n readonly authoringContributions: AssembledAuthoringContributions;\n readonly scalarTypeDescriptors: ReadonlyMap<string, string>;\n readonly controlMutationDefaults: ControlMutationDefaults;\n}\n\nexport interface CreateControlStackInput<\n TFamilyId extends string = string,\n TTargetId extends string = string,\n> {\n readonly family: ControlFamilyDescriptor<TFamilyId>;\n readonly target: ControlTargetDescriptor<TFamilyId, TTargetId>;\n readonly adapter?: ControlAdapterDescriptor<TFamilyId, TTargetId> | undefined;\n readonly driver?: ControlDriverDescriptor<TFamilyId, TTargetId> | undefined;\n readonly extensionPacks?:\n | ReadonlyArray<ControlExtensionDescriptor<TFamilyId, TTargetId>>\n | undefined;\n}\n\nfunction addUniqueId(ids: string[], seen: Set<string>, id: string): void {\n if (!seen.has(id)) {\n ids.push(id);\n seen.add(id);\n }\n}\n\nexport function assertUniqueCodecOwner(options: {\n readonly codecId: string;\n readonly owners: Map<string, string>;\n readonly descriptorId: string;\n readonly entityLabel: string;\n readonly entityOwnershipLabel: string;\n}): void {\n const existingOwner = options.owners.get(options.codecId);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate ${options.entityLabel} for codecId \"${options.codecId}\". ` +\n `Descriptor \"${options.descriptorId}\" conflicts with \"${existingOwner}\". ` +\n `Each codecId can only have one ${options.entityOwnershipLabel}.`,\n );\n }\n}\n\nexport function extractCodecTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const codecTypes = descriptor.types?.codecTypes;\n if (codecTypes?.import) {\n imports.push(codecTypes.import);\n }\n if (codecTypes?.typeImports) {\n imports.push(...codecTypes.typeImports);\n }\n }\n\n return imports;\n}\n\nexport function extractOperationTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const operationTypes = descriptor.types?.operationTypes;\n if (operationTypes?.import) {\n imports.push(operationTypes.import);\n }\n }\n\n return imports;\n}\n\nexport function extractQueryOperationTypeImports(\n descriptors: ReadonlyArray<Pick<ComponentMetadata, 'types'>>,\n): ReadonlyArray<TypesImportSpec> {\n const imports: TypesImportSpec[] = [];\n\n for (const descriptor of descriptors) {\n const queryOperationTypes = descriptor.types?.queryOperationTypes;\n if (queryOperationTypes?.import) {\n imports.push(queryOperationTypes.import);\n }\n }\n\n return imports;\n}\n\nexport function extractComponentIds(\n family: { readonly id: string },\n target: { readonly id: string },\n adapter: { readonly id: string } | undefined,\n extensions: ReadonlyArray<{ readonly id: string }>,\n): ReadonlyArray<string> {\n const ids: string[] = [];\n const seen = new Set<string>();\n\n addUniqueId(ids, seen, family.id);\n addUniqueId(ids, seen, target.id);\n if (adapter) {\n addUniqueId(ids, seen, adapter.id);\n }\n\n for (const ext of extensions) {\n addUniqueId(ids, seen, ext.id);\n }\n\n return ids;\n}\n\nexport function assembleAuthoringContributions(\n descriptors: ReadonlyArray<{ readonly authoring?: AuthoringContributions }>,\n): AssembledAuthoringContributions {\n const field = {} as Record<string, unknown>;\n const type = {} as Record<string, unknown>;\n\n for (const descriptor of descriptors) {\n if (descriptor.authoring?.field) {\n mergeAuthoringNamespaces(\n field,\n descriptor.authoring.field,\n [],\n isAuthoringFieldPresetDescriptor,\n 'field',\n );\n }\n if (!descriptor.authoring?.type) {\n continue;\n }\n mergeAuthoringNamespaces(\n type,\n descriptor.authoring.type,\n [],\n isAuthoringTypeConstructorDescriptor,\n 'type',\n );\n }\n\n const fieldNamespace = field as AuthoringFieldNamespace;\n const typeNamespace = type as AuthoringTypeNamespace;\n assertNoCrossRegistryCollisions(typeNamespace, fieldNamespace);\n\n return {\n field: fieldNamespace,\n type: typeNamespace,\n };\n}\n\nexport function assembleScalarTypeDescriptors(\n descriptors: ReadonlyArray<\n Pick<ComponentMetadata, 'scalarTypeDescriptors'> & { readonly id?: string }\n >,\n): ReadonlyMap<string, string> {\n const result = new Map<string, string>();\n const owners = new Map<string, string>();\n\n for (const descriptor of descriptors) {\n const descriptorMap = descriptor.scalarTypeDescriptors;\n if (!descriptorMap) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n for (const [typeName, codecId] of descriptorMap) {\n const existingOwner = owners.get(typeName);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate scalar type descriptor \"${typeName}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n result.set(typeName, codecId);\n owners.set(typeName, descriptorId);\n }\n }\n\n return result;\n}\n\nexport function assembleControlMutationDefaults(\n descriptors: ReadonlyArray<\n Pick<ComponentMetadata, 'controlMutationDefaults'> & { readonly id?: string }\n >,\n): ControlMutationDefaults {\n const defaultFunctionRegistry = new Map<string, ControlMutationDefaultEntry>();\n const functionOwners = new Map<string, string>();\n const generatorMap = new Map<string, MutationDefaultGeneratorDescriptor>();\n const generatorOwners = new Map<string, string>();\n\n for (const descriptor of descriptors) {\n const contributions = descriptor.controlMutationDefaults;\n if (!contributions) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n\n for (const generatorDescriptor of contributions.generatorDescriptors) {\n const existingOwner = generatorOwners.get(generatorDescriptor.id);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate mutation default generator id \"${generatorDescriptor.id}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n generatorMap.set(generatorDescriptor.id, generatorDescriptor);\n generatorOwners.set(generatorDescriptor.id, descriptorId);\n }\n\n for (const [functionName, handler] of contributions.defaultFunctionRegistry) {\n const existingOwner = functionOwners.get(functionName);\n if (existingOwner !== undefined) {\n throw new Error(\n `Duplicate mutation default function \"${functionName}\". ` +\n `Descriptor \"${descriptorId}\" conflicts with \"${existingOwner}\".`,\n );\n }\n defaultFunctionRegistry.set(functionName, handler);\n functionOwners.set(functionName, descriptorId);\n }\n }\n\n return {\n defaultFunctionRegistry,\n generatorDescriptors: Array.from(generatorMap.values()),\n };\n}\n\nexport function extractCodecLookup(\n descriptors: ReadonlyArray<Pick<ComponentMetadata & { id: string }, 'types' | 'id'>>,\n): CodecLookup {\n const byId = new Map<string, Codec>();\n const targetTypesById = new Map<string, readonly string[]>();\n const metaById = new Map<string, CodecMeta>();\n const renderersById = new Map<string, (params: Record<string, unknown>) => string | undefined>();\n const owners = new Map<string, string>();\n for (const descriptor of descriptors) {\n const codecTypes = descriptor.types?.codecTypes;\n const descriptorId = descriptor.id;\n // Descriptor-side metadata is the single source of truth for `targetTypes` / `meta` / `renderOutputType`. Every contributor ships a `codecDescriptors` list on `types.codecTypes`.\n for (const codecDescriptor of codecTypes?.codecDescriptors ?? []) {\n assertUniqueCodecOwner({\n codecId: codecDescriptor.codecId,\n owners,\n descriptorId,\n entityLabel: 'codec descriptor',\n entityOwnershipLabel: 'codec descriptor provider',\n });\n owners.set(codecDescriptor.codecId, descriptorId);\n if (Array.isArray(codecDescriptor.targetTypes)) {\n targetTypesById.set(codecDescriptor.codecId, codecDescriptor.targetTypes);\n }\n if (codecDescriptor.meta !== undefined) {\n metaById.set(codecDescriptor.codecId, codecDescriptor.meta);\n }\n if (typeof codecDescriptor.renderOutputType === 'function') {\n renderersById.set(codecDescriptor.codecId, codecDescriptor.renderOutputType);\n }\n // Materialize a representative `Codec` instance for `byId.get()` so consumers reading the lookup's instance side (e.g. SQL renderer's cast-policy lookup, or the contract emitter's literal-default `encodeJson` resolver) keep finding the codec.\n //\n // Two cohorts:\n // - Non-parameterized descriptors: factory must succeed; any throw is a real bug and we let it propagate (no silent try/catch).\n // - Parameterized descriptors: try with empty params. Many parameterized codecs treat params as advisory (e.g. `pg/timestamptz@1` whose precision is rendered into the `nativeType` only and never read by the runtime codec), so an empty-params construction yields a usable representative for id-keyed lookups (e.g. emit-time literal-default encoding). Codecs whose factory genuinely requires params (e.g. `pg/vector@1` threading `length` into the runtime codec) will throw; for those, per-column instances are materialized at runtime by `buildContractCodecRegistry` and the id-keyed lookup miss is correct (the column-aware path resolves them).\n if (!byId.has(codecDescriptor.codecId)) {\n if (codecDescriptor.isParameterized) {\n try {\n const representative = codecDescriptor.factory({} as never)({\n name: `<lookup:${codecDescriptor.codecId}>`,\n } as Parameters<ReturnType<typeof codecDescriptor.factory>>[0]);\n byId.set(codecDescriptor.codecId, representative);\n } catch {\n // Factory requires concrete params; skip representative materialization. Per-column instances are built at runtime; id-keyed lookup miss is the correct outcome here.\n }\n } else {\n const representative = codecDescriptor.factory(undefined as never)({\n name: `<lookup:${codecDescriptor.codecId}>`,\n } as Parameters<ReturnType<typeof codecDescriptor.factory>>[0]);\n byId.set(codecDescriptor.codecId, representative);\n }\n }\n }\n }\n return {\n get: (id) => byId.get(id),\n targetTypesFor: (id) => targetTypesById.get(id),\n metaFor: (id) => metaById.get(id),\n renderOutputTypeFor: (id, params) => renderersById.get(id)?.(params),\n };\n}\n\nexport function validateScalarTypeCodecIds(\n scalarTypeDescriptors: ReadonlyMap<string, string>,\n codecLookup: CodecLookup,\n): string[] {\n const errors: string[] = [];\n for (const [typeName, codecId] of scalarTypeDescriptors) {\n if (!codecLookup.get(codecId)) {\n errors.push(\n `Scalar type \"${typeName}\" references codec \"${codecId}\" which is not registered by any component.`,\n );\n }\n }\n return errors;\n}\n\nexport function createControlStack<TFamilyId extends string, TTargetId extends string>(\n input: CreateControlStackInput<TFamilyId, TTargetId>,\n): ControlStack<TFamilyId, TTargetId> {\n const { family, target, adapter, driver, extensionPacks = [] } = input;\n\n const allDescriptors = [family, target, ...(adapter ? [adapter] : []), ...extensionPacks];\n\n const codecLookup = extractCodecLookup(allDescriptors);\n const scalarTypeDescriptors = assembleScalarTypeDescriptors(allDescriptors);\n\n return {\n family,\n target,\n adapter,\n driver,\n extensionPacks: extensionPacks as readonly ControlExtensionDescriptor<TFamilyId, TTargetId>[],\n\n codecTypeImports: extractCodecTypeImports(allDescriptors),\n operationTypeImports: extractOperationTypeImports(allDescriptors),\n queryOperationTypeImports: extractQueryOperationTypeImports(allDescriptors),\n extensionIds: extractComponentIds(family, target, adapter, extensionPacks),\n codecLookup,\n authoringContributions: assembleAuthoringContributions(allDescriptors),\n scalarTypeDescriptors,\n controlMutationDefaults: assembleControlMutationDefaults(allDescriptors),\n };\n}\n"],"mappings":";;;AAkBA,SAAgB,cACd,QAC4D;AAC5D,QAAO,gBAAgB,UAAU,CAAC,CAAE,OAAmC;;AAOzE,SAAgB,cACd,UACwF;AACxF,QACE,kBAAkB,YAClB,OAAQ,SAAqC,oBAAoB;;AAYrE,SAAgB,oBACd,UAC8F;AAC9F,QACE,sBAAsB,YACtB,OAAQ,SAAqC,wBAAwB;;AAazE,SAAgB,oBACd,UACmF;AACnF,QACE,wBAAwB,YACxB,OAAQ,SAAqC,0BAA0B;;;;;ACpE3E,MAAa,6BAA6B;AAC1C,MAAa,4BAA4B;AACzC,MAAa,8BAA8B;AAC3C,MAAa,6BAA6B;;;;AC4B1C,IAAa,iBAAb,MAA4B;CAC1B,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CACT,AAAS;CAET,YAAY,SAAgC;AAC1C,OAAK,OAAO,QAAQ;AACpB,OAAK,KAAK,QAAQ;AAClB,OAAK,QAAQ,QAAQ;AACrB,MAAI,QAAQ,SAAS,OAAW,MAA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CAAgC,eAAe;EACzE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"psl-ast-BlDveJZ4.d.mts","names":[],"sources":["../src/control/psl-ast.ts"],"sourcesContent":[],"mappings":";UAAiB,WAAA;EAAA,SAAA,MAAW,EAAA,MAAA;EAMX,SAAA,IAAO,EAAA,
|
|
1
|
+
{"version":3,"file":"psl-ast-BlDveJZ4.d.mts","names":[],"sources":["../src/control/psl-ast.ts"],"sourcesContent":[],"mappings":";UAAiB,WAAA;EAAA,SAAA,MAAW,EAAA,MAAA;EAMX,SAAA,IAAO,EAAA,MAAA;EAKZ,SAAA,MAAA,EAAA,MAAiB;AAa7B;AAOiB,UAzBA,OAAA,CAyBA;EAKA,SAAA,KAAA,EA7BC,WA6BqB;EAK3B,SAAA,GAAA,EAjCI,WAiCW;AAE3B;AAEiB,KAlCL,iBAAA,GAkCK,wBAGA,GAAO,iCAAA,GAAA,8BAAA,GAAA,0BAAA,GAAA,iCAAA,GAAA,iCAAA,GAAA,gCAAA,GAAA,gCAAA,GAAA,2BAAA,GAAA,yBAAA,GAAA,0BAAA;AAGP,UA3BA,aAAA,CA2BA;EAOL,SAAA,IAAA,EAjCK,iBAiCe;EAEf,SAAA,OAAA,EAAA,MAAA;EAOA,SAAA,QAAY,EAAA,MAAA;EAEV,SAAA,IAAA,EAzCF,OAyCE;;AAGF,UAzCA,uBAAA,CAyCA;EAAO,SAAA,IAAA,EAAA,UAAA;EAGZ,SAAA,IAAA,EAAA,eAAoB,GAAA,KAAA;AAEhC;AAEiB,UA3CA,sBAAA,CA2CQ;EAII,SAAA,IAAA,EAAA,SAAA;EAIG,SAAA,KAAA,EAAA,MAAA,GAAA,MAAA,GAAA,OAAA;;AACR,KA/CZ,eAAA,GAAkB,uBA+CN,GA/CgC,sBA+ChC;AAGP,KAhDL,kBAAA,GAgDwB,OAGnB,GAAA,OAAO,GAAA,MAAA,GAAA,WAAA;AAGP,UApDA,8BAAA,CAuDO;EAGZ,SAAA,I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;iBACjB;;UAGA,cAAA;;;4BAGW;2BACD;oCACS;mBACjB;iBACF;;UAGA,qBAAA;;;;UAKA,sBAAA;gBACD;iCACiB"}
|
package/package.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/framework-components",
|
|
3
|
-
"version": "0.5.0-dev.
|
|
3
|
+
"version": "0.5.0-dev.63",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
7
7
|
"description": "Framework component types, assembly logic, and stack creation for Prisma Next",
|
|
8
8
|
"dependencies": {
|
|
9
9
|
"@standard-schema/spec": "^1.1.0",
|
|
10
|
-
"@prisma-next/
|
|
11
|
-
"@prisma-next/
|
|
12
|
-
"@prisma-next/utils": "0.5.0-dev.
|
|
10
|
+
"@prisma-next/operations": "0.5.0-dev.63",
|
|
11
|
+
"@prisma-next/contract": "0.5.0-dev.63",
|
|
12
|
+
"@prisma-next/utils": "0.5.0-dev.63"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"tsdown": "0.18.4",
|
|
@@ -41,8 +41,27 @@ export interface ControlFamilyInstance<TFamilyId extends string, TSchemaIR>
|
|
|
41
41
|
readonly configPath?: string;
|
|
42
42
|
}): Promise<SignDatabaseResult>;
|
|
43
43
|
|
|
44
|
+
/**
|
|
45
|
+
* Reads the contract marker for `space` from the database, returning
|
|
46
|
+
* `null` if no marker row exists for that space (or if the marker
|
|
47
|
+
* table itself is missing).
|
|
48
|
+
*
|
|
49
|
+
* `space` is required at every call site so the type system surfaces
|
|
50
|
+
* every place that needs to thread the value: callers in single-app
|
|
51
|
+
* paths pass {@link import('./control-spaces').APP_SPACE_ID}
|
|
52
|
+
* (`'app'`); per-extension callers pass the extension's space id.
|
|
53
|
+
* Defaulting at the family-interface level was a silent bug door —
|
|
54
|
+
* it let multi-space-aware callers forget to pass `space` and
|
|
55
|
+
* collapse onto the app's marker row.
|
|
56
|
+
*
|
|
57
|
+
* Families whose underlying storage doesn't yet support per-space
|
|
58
|
+
* markers (Mongo, today) accept `space` for interface conformance and
|
|
59
|
+
* reject any non-`APP_SPACE_ID` value rather than silently ignoring
|
|
60
|
+
* it; see the family-specific implementation for details.
|
|
61
|
+
*/
|
|
44
62
|
readMarker(options: {
|
|
45
63
|
readonly driver: ControlDriverInstance<TFamilyId, string>;
|
|
64
|
+
readonly space: string;
|
|
46
65
|
}): Promise<ContractMarkerRecord | null>;
|
|
47
66
|
|
|
48
67
|
introspect(options: {
|
|
@@ -14,6 +14,61 @@ import type { Result } from '@prisma-next/utils/result';
|
|
|
14
14
|
import type { TargetBoundComponentDescriptor } from '../shared/framework-components';
|
|
15
15
|
import type { ControlDriverInstance, ControlFamilyInstance } from './control-instances';
|
|
16
16
|
|
|
17
|
+
// ============================================================================
|
|
18
|
+
// Migration Package Metadata
|
|
19
|
+
// ============================================================================
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Planner provenance recorded inside {@link MigrationMetadata}.
|
|
23
|
+
*
|
|
24
|
+
* `used` / `applied` track which migration hints the planner consulted
|
|
25
|
+
* vs. which it actually applied during emission; `plannerVersion`
|
|
26
|
+
* pins the planner build that produced the migration so future
|
|
27
|
+
* verification passes can recognise plans authored against an older
|
|
28
|
+
* planner.
|
|
29
|
+
*/
|
|
30
|
+
export interface MigrationHints {
|
|
31
|
+
readonly used: readonly string[];
|
|
32
|
+
readonly applied: readonly string[];
|
|
33
|
+
readonly plannerVersion: string;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* In-memory migration metadata envelope. Every migration is
|
|
38
|
+
* content-addressed: the `migrationHash` is a hash over the metadata
|
|
39
|
+
* envelope plus the operations list, computed at write time. There is no
|
|
40
|
+
* draft state — a migration directory either exists with fully attested
|
|
41
|
+
* metadata or it does not.
|
|
42
|
+
*
|
|
43
|
+
* When the planner cannot lower an operation because of an unfilled
|
|
44
|
+
* `placeholder(...)` slot, the migration is still written with
|
|
45
|
+
* `migrationHash` hashed over `ops: []`. Re-running self-emit after the
|
|
46
|
+
* user fills the placeholder produces a *different* `migrationHash`
|
|
47
|
+
* (committed to the real ops); this is intentional.
|
|
48
|
+
*
|
|
49
|
+
* The on-disk JSON shape in `migration.json` matches this type
|
|
50
|
+
* field-for-field — `JSON.stringify(metadata, null, 2)` is the canonical
|
|
51
|
+
* writer output (defined in `@prisma-next/migration-tools/io`).
|
|
52
|
+
*/
|
|
53
|
+
export interface MigrationMetadata {
|
|
54
|
+
readonly migrationHash: string;
|
|
55
|
+
readonly from: string | null;
|
|
56
|
+
readonly to: string;
|
|
57
|
+
readonly fromContract: Contract | null;
|
|
58
|
+
readonly toContract: Contract;
|
|
59
|
+
readonly hints: MigrationHints;
|
|
60
|
+
readonly labels: readonly string[];
|
|
61
|
+
/**
|
|
62
|
+
* Sorted, deduplicated list of `invariantId`s declared by the
|
|
63
|
+
* migration's data-transform ops. Always present; an empty array
|
|
64
|
+
* means the migration has no routing-visible data transforms.
|
|
65
|
+
*/
|
|
66
|
+
readonly providedInvariants: readonly string[];
|
|
67
|
+
readonly authorship?: { readonly author?: string; readonly email?: string };
|
|
68
|
+
readonly signature?: { readonly keyId: string; readonly value: string } | null;
|
|
69
|
+
readonly createdAt: string;
|
|
70
|
+
}
|
|
71
|
+
|
|
17
72
|
// ============================================================================
|
|
18
73
|
// Operation Classes and Policy
|
|
19
74
|
// ============================================================================
|
|
@@ -298,6 +353,13 @@ export interface MigrationPlanner<
|
|
|
298
353
|
readonly frameworkComponents: ReadonlyArray<
|
|
299
354
|
TargetBoundComponentDescriptor<TFamilyId, TTargetId>
|
|
300
355
|
>;
|
|
356
|
+
/**
|
|
357
|
+
* Contract space this plan applies to. Stamped onto the produced
|
|
358
|
+
* plan so the runner keys the marker row by the right space when
|
|
359
|
+
* executing. App-plan callers pass `APP_SPACE_ID` (`'app'`);
|
|
360
|
+
* per-extension callers pass the extension's space id.
|
|
361
|
+
*/
|
|
362
|
+
readonly spaceId: string;
|
|
301
363
|
}): MigrationPlannerResult;
|
|
302
364
|
|
|
303
365
|
/**
|
|
@@ -306,8 +368,15 @@ export interface MigrationPlanner<
|
|
|
306
368
|
* Used by `migration new` to scaffold a fresh `migration.ts`. The
|
|
307
369
|
* returned plan has no operations; its `renderTypeScript()` yields a
|
|
308
370
|
* stub the user can edit.
|
|
371
|
+
*
|
|
372
|
+
* `spaceId` is stamped onto the produced plan; reconciliation flows
|
|
373
|
+
* (`db init`, `db update`) and authoring flows (`migration new`) all
|
|
374
|
+
* pass it explicitly.
|
|
309
375
|
*/
|
|
310
|
-
emptyMigration(
|
|
376
|
+
emptyMigration(
|
|
377
|
+
context: MigrationScaffoldContext,
|
|
378
|
+
spaceId: string,
|
|
379
|
+
): MigrationPlanWithAuthoringSurface;
|
|
311
380
|
}
|
|
312
381
|
|
|
313
382
|
/**
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Contract } from '@prisma-next/contract/types';
|
|
2
|
+
import type { MigrationMetadata, MigrationPlanOperation } from './control-migration-types';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Canonical control-plane identifiers for contract spaces.
|
|
6
|
+
*
|
|
7
|
+
* A contract space is the disjoint `(contract.json, migration-graph)` unit
|
|
8
|
+
* the per-space planner / runner / verifier (project: extension contract
|
|
9
|
+
* spaces, TML-2397) operates on. The application owns one well-known
|
|
10
|
+
* space — the value below — and each loaded extension that contributes
|
|
11
|
+
* schema owns a uniquely-named space.
|
|
12
|
+
*
|
|
13
|
+
* Lives in `framework-components/control` so every layer that has to
|
|
14
|
+
* reason about space identity (the migration tooling, the SQL runtime's
|
|
15
|
+
* marker reader, target-side statement builders, target-side adapters)
|
|
16
|
+
* can import a single value rather than duplicating the literal. Raw
|
|
17
|
+
* `'app'` string literals in framework / target / runtime / adapter
|
|
18
|
+
* source code are forbidden and policed by
|
|
19
|
+
* `scripts/lint-app-space-id.mjs` (wired into `pnpm lint:deps`).
|
|
20
|
+
*
|
|
21
|
+
* @see specs/framework-mechanism.spec.md § 3 — Layout convention (γ).
|
|
22
|
+
*/
|
|
23
|
+
export const APP_SPACE_ID = 'app' as const;
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* Pinned head ref for a contract space — the `(hash, invariants)` tuple
|
|
27
|
+
* a runner targets when applying that space's migration graph. Identical
|
|
28
|
+
* in shape to the on-disk `migrations/<space-id>/refs/head.json` the
|
|
29
|
+
* framework writes per loaded extension, and to the app-space
|
|
30
|
+
* `<projectRoot>/refs/head.json`. Family-agnostic: SQL, Mongo, and any
|
|
31
|
+
* future family share the same head-ref shape.
|
|
32
|
+
*
|
|
33
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
34
|
+
*/
|
|
35
|
+
export interface ContractSpaceHeadRef {
|
|
36
|
+
readonly hash: string;
|
|
37
|
+
readonly invariants: readonly string[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Canonical structural shape of a migration package — the unit a planner
|
|
42
|
+
* produces and a runner consumes: a directory name, the ADR 197 metadata
|
|
43
|
+
* envelope (which carries the `toContract` snapshot), and the operation
|
|
44
|
+
* list.
|
|
45
|
+
*
|
|
46
|
+
* In-memory by default. Readers in `@prisma-next/migration-tools`
|
|
47
|
+
* (`readMigrationPackage` / `readMigrationsDir`) return the augmented
|
|
48
|
+
* {@link import('@prisma-next/migration-tools/package').OnDiskMigrationPackage}
|
|
49
|
+
* variant which adds `dirPath`; everything else operates against the
|
|
50
|
+
* canonical shape so the same value flows through pre-emission
|
|
51
|
+
* authoring, on-disk loading, and runner execution without conversion.
|
|
52
|
+
*
|
|
53
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
54
|
+
*/
|
|
55
|
+
export interface MigrationPackage {
|
|
56
|
+
readonly dirName: string;
|
|
57
|
+
readonly metadata: MigrationMetadata;
|
|
58
|
+
readonly ops: readonly MigrationPlanOperation[];
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Canonical structural shape of a contract space — one disjoint
|
|
63
|
+
* `(contractJson, migration-graph)` unit the per-space planner / runner
|
|
64
|
+
* / verifier operates on. The application owns one well-known space
|
|
65
|
+
* ({@link APP_SPACE_ID}); each loaded extension that contributes schema
|
|
66
|
+
* owns a uniquely-named space. Whether a value is the app's space or an
|
|
67
|
+
* extension's space is a control-plane concern; the type carries no
|
|
68
|
+
* such distinction.
|
|
69
|
+
*
|
|
70
|
+
* Generic over the contract so each family pins a typed contract value
|
|
71
|
+
* at consumption time. The SQL family specialises to
|
|
72
|
+
* `ContractSpace<Contract<SqlStorage>>` at the descriptor surface;
|
|
73
|
+
* Mongo's symmetrical `ContractSpace<Contract<MongoStorage>>` will land
|
|
74
|
+
* with that family.
|
|
75
|
+
*
|
|
76
|
+
* @see specs/framework-mechanism.spec.md § 1.
|
|
77
|
+
*/
|
|
78
|
+
export interface ContractSpace<TContract extends Contract = Contract> {
|
|
79
|
+
readonly contractJson: TContract;
|
|
80
|
+
readonly migrations: readonly MigrationPackage[];
|
|
81
|
+
readonly headRef: ContractSpaceHeadRef;
|
|
82
|
+
}
|
package/src/exports/control.ts
CHANGED
|
@@ -25,6 +25,8 @@ export type {
|
|
|
25
25
|
ControlTargetInstance,
|
|
26
26
|
} from '../control/control-instances';
|
|
27
27
|
export type {
|
|
28
|
+
MigrationHints,
|
|
29
|
+
MigrationMetadata,
|
|
28
30
|
MigrationOperationClass,
|
|
29
31
|
MigrationOperationPolicy,
|
|
30
32
|
MigrationPlan,
|
|
@@ -74,6 +76,12 @@ export type {
|
|
|
74
76
|
SchemaTreeVisitor,
|
|
75
77
|
} from '../control/control-schema-view';
|
|
76
78
|
export { SchemaTreeNode } from '../control/control-schema-view';
|
|
79
|
+
export type {
|
|
80
|
+
ContractSpace,
|
|
81
|
+
ContractSpaceHeadRef,
|
|
82
|
+
MigrationPackage,
|
|
83
|
+
} from '../control/control-spaces';
|
|
84
|
+
export { APP_SPACE_ID } from '../control/control-spaces';
|
|
77
85
|
export type {
|
|
78
86
|
AssembledAuthoringContributions,
|
|
79
87
|
ControlStack,
|