@prisma-next/framework-components 0.3.0-dev.159 → 0.3.0-dev.161
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-types-B58nCJiu.d.mts.map +1 -1
- package/dist/control.d.mts +100 -3
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs.map +1 -1
- package/package.json +6 -6
- package/src/control-migration-types.ts +107 -1
- package/src/control-result-types.ts +12 -1
- package/src/exports/control.ts +5 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codec-types-B58nCJiu.d.mts","names":[],"sources":["../src/codec-types.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;;AAAZ;AAaA;;;;;;;;;AAiBoB,UAjBH,KAiBG,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,gBAAA,SAfO,UAeP,EAAA,GAAA,SAf+B,UAe/B,EAAA,EAAA,QAAA,OAAA,EAAA,MAAA,OAAA,CAAA,CAAA;EAAM;EAEP,SAAA,EAAA,EAZJ,EAYI;EAAY;EAEC,SAAA,WAAA,EAAA,SAAA,MAAA,EAAA;EAAM;EAGrB,SAAA,MAAW,CAAA,EAbR,
|
|
1
|
+
{"version":3,"file":"codec-types-B58nCJiu.d.mts","names":[],"sources":["../src/codec-types.ts"],"sourcesContent":[],"mappings":";;;KAEY,UAAA;;AAAZ;AAaA;;;;;;;;;AAiBoB,UAjBH,KAiBG,CAAA,WAAA,MAAA,GAAA,MAAA,EAAA,gBAAA,SAfO,UAeP,EAAA,GAAA,SAf+B,UAe/B,EAAA,EAAA,QAAA,OAAA,EAAA,MAAA,OAAA,CAAA,CAAA;EAAM;EAEP,SAAA,EAAA,EAZJ,EAYI;EAAY;EAEC,SAAA,WAAA,EAAA,SAAA,MAAA,EAAA;EAAM;EAGrB,SAAA,MAAW,CAAA,EAbR,OAaQ;EAIf;iBAfI,MAAM;;eAER,QAAQ;;oBAEH,MAAM;;mBAEP,YAAY;;gCAEC;;UAGf,WAAA;mBACE;;cAGN,kBAAkB"}
|
package/dist/control.d.mts
CHANGED
|
@@ -42,16 +42,25 @@ interface VerifyDatabaseResult {
|
|
|
42
42
|
readonly total: number;
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
|
-
interface
|
|
45
|
+
interface BaseSchemaIssue {
|
|
46
46
|
readonly kind: 'missing_table' | 'missing_column' | 'extra_table' | 'extra_column' | 'extra_primary_key' | 'extra_foreign_key' | 'extra_unique_constraint' | 'extra_index' | 'extra_validator' | 'type_mismatch' | 'type_missing' | 'type_values_mismatch' | 'nullability_mismatch' | 'primary_key_mismatch' | 'foreign_key_mismatch' | 'unique_constraint_mismatch' | 'index_mismatch' | 'dependency_missing' | 'default_missing' | 'default_mismatch' | 'extra_default';
|
|
47
47
|
readonly table?: string;
|
|
48
48
|
readonly column?: string;
|
|
49
49
|
readonly indexOrConstraint?: string;
|
|
50
50
|
readonly typeName?: string;
|
|
51
|
+
readonly dependencyId?: string;
|
|
51
52
|
readonly expected?: string;
|
|
52
53
|
readonly actual?: string;
|
|
53
54
|
readonly message: string;
|
|
54
55
|
}
|
|
56
|
+
interface EnumValuesChangedIssue {
|
|
57
|
+
readonly kind: 'enum_values_changed';
|
|
58
|
+
readonly typeName: string;
|
|
59
|
+
readonly addedValues: readonly string[];
|
|
60
|
+
readonly removedValues: readonly string[];
|
|
61
|
+
readonly message: string;
|
|
62
|
+
}
|
|
63
|
+
type SchemaIssue = BaseSchemaIssue | EnumValuesChangedIssue;
|
|
55
64
|
interface SchemaVerificationNode {
|
|
56
65
|
readonly status: 'pass' | 'warn' | 'fail';
|
|
57
66
|
readonly kind: string;
|
|
@@ -263,14 +272,74 @@ interface ControlExtensionDescriptor<TFamilyId extends string, TTargetId extends
|
|
|
263
272
|
* - 'additive': Adds new structures without modifying existing ones (safe)
|
|
264
273
|
* - 'widening': Relaxes constraints or expands types (generally safe)
|
|
265
274
|
* - 'destructive': Removes or alters existing structures (potentially unsafe)
|
|
275
|
+
* - 'data': Data transformation operation (e.g., backfill, type conversion)
|
|
276
|
+
*/
|
|
277
|
+
type MigrationOperationClass = 'additive' | 'widening' | 'destructive' | 'data';
|
|
278
|
+
/**
|
|
279
|
+
* A lowered query statement as stored in ops.json.
|
|
280
|
+
* Contains the SQL string and parameter values — ready for execution.
|
|
281
|
+
* Lowering from query builder AST to SQL happens at verify time.
|
|
266
282
|
*/
|
|
267
|
-
|
|
283
|
+
interface SerializedQueryPlan {
|
|
284
|
+
readonly sql: string;
|
|
285
|
+
readonly params: readonly unknown[];
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* A data transform operation within a migration edge.
|
|
289
|
+
*
|
|
290
|
+
* Data transforms are authored in TypeScript using the query builder,
|
|
291
|
+
* serialized to JSON ASTs at verification time, and rendered to SQL
|
|
292
|
+
* by the target adapter at apply time.
|
|
293
|
+
*
|
|
294
|
+
* The `name` serves as the invariant identity — it's recorded in the
|
|
295
|
+
* ledger and used for invariant-aware routing via environment refs.
|
|
296
|
+
*
|
|
297
|
+
* In draft state (before verification), `check` and `run` are null.
|
|
298
|
+
* After verification, they contain the serialized query ASTs.
|
|
299
|
+
*/
|
|
300
|
+
interface DataTransformOperation extends MigrationPlanOperation {
|
|
301
|
+
readonly operationClass: 'data';
|
|
302
|
+
/**
|
|
303
|
+
* The invariant name for this data transform.
|
|
304
|
+
* Recorded in the ledger on successful edge completion.
|
|
305
|
+
* Used by environment refs to declare required invariants.
|
|
306
|
+
*/
|
|
307
|
+
readonly name: string;
|
|
308
|
+
/**
|
|
309
|
+
* Path to the TypeScript source file that produced this operation.
|
|
310
|
+
* Not part of edgeId computation — for traceability only.
|
|
311
|
+
*/
|
|
312
|
+
readonly source: string;
|
|
313
|
+
/**
|
|
314
|
+
* Serialized check query plan, or a boolean literal.
|
|
315
|
+
* - SerializedQueryPlan: describes violations; empty result = already applied.
|
|
316
|
+
* - false: always run (no check).
|
|
317
|
+
* - true: always skip.
|
|
318
|
+
* - null: not yet serialized (draft state).
|
|
319
|
+
*/
|
|
320
|
+
readonly check: SerializedQueryPlan | boolean | null;
|
|
321
|
+
/**
|
|
322
|
+
* Serialized run query plans.
|
|
323
|
+
* - Array of serialized query plans to execute sequentially.
|
|
324
|
+
* - null: not yet serialized (draft state).
|
|
325
|
+
*/
|
|
326
|
+
readonly run: readonly SerializedQueryPlan[] | null;
|
|
327
|
+
}
|
|
268
328
|
/**
|
|
269
329
|
* Policy defining which operation classes are allowed during a migration.
|
|
270
330
|
*/
|
|
271
331
|
interface MigrationOperationPolicy {
|
|
272
332
|
readonly allowedOperationClasses: readonly MigrationOperationClass[];
|
|
273
333
|
}
|
|
334
|
+
/**
|
|
335
|
+
* Minimal shape for operation descriptors at the framework level.
|
|
336
|
+
* Targets produce richer types; this captures just enough for the
|
|
337
|
+
* framework to scaffold migration.ts files and pass descriptors through.
|
|
338
|
+
*/
|
|
339
|
+
interface OperationDescriptor {
|
|
340
|
+
readonly kind: string;
|
|
341
|
+
readonly [key: string]: unknown;
|
|
342
|
+
}
|
|
274
343
|
/**
|
|
275
344
|
* A single migration operation for display purposes.
|
|
276
345
|
* Contains only the fields needed for CLI output (tree view, JSON envelope).
|
|
@@ -451,6 +520,34 @@ interface TargetMigrationsCapability<TFamilyId extends string = string, TTargetI
|
|
|
451
520
|
* @returns Family-specific schema IR (e.g., `SqlSchemaIR` for SQL targets).
|
|
452
521
|
*/
|
|
453
522
|
contractToSchema(contract: Contract | null, frameworkComponents?: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>): unknown;
|
|
523
|
+
/**
|
|
524
|
+
* Plans a migration using the descriptor-based planner.
|
|
525
|
+
* Returns operation descriptors and whether data migration is needed.
|
|
526
|
+
* The caller decides whether to resolve immediately or scaffold migration.ts.
|
|
527
|
+
*/
|
|
528
|
+
planWithDescriptors?(context: {
|
|
529
|
+
readonly fromContract: Contract | null;
|
|
530
|
+
readonly toContract: Contract;
|
|
531
|
+
readonly frameworkComponents?: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
532
|
+
}): {
|
|
533
|
+
readonly ok: true;
|
|
534
|
+
readonly descriptors: readonly OperationDescriptor[];
|
|
535
|
+
readonly needsDataMigration: boolean;
|
|
536
|
+
} | {
|
|
537
|
+
readonly ok: false;
|
|
538
|
+
readonly conflicts: readonly MigrationPlannerConflict[];
|
|
539
|
+
};
|
|
540
|
+
/**
|
|
541
|
+
* Resolves operation descriptors into target-specific migration plan operations
|
|
542
|
+
* with SQL/DDL, prechecks, and postchecks. Called by `migration verify` to
|
|
543
|
+
* serialize migration.ts into ops.json.
|
|
544
|
+
*/
|
|
545
|
+
resolveDescriptors?(descriptors: readonly OperationDescriptor[], context: {
|
|
546
|
+
readonly fromContract: Contract | null;
|
|
547
|
+
readonly toContract: Contract;
|
|
548
|
+
readonly schemaName?: string;
|
|
549
|
+
readonly frameworkComponents?: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
550
|
+
}): readonly MigrationPlanOperation[];
|
|
454
551
|
}
|
|
455
552
|
//#endregion
|
|
456
553
|
//#region src/control-schema-view.d.ts
|
|
@@ -501,5 +598,5 @@ interface SchemaViewCapable<TSchemaIR = unknown> {
|
|
|
501
598
|
}
|
|
502
599
|
declare function hasSchemaView<TFamilyId extends string, TSchemaIR>(instance: ControlFamilyInstance<TFamilyId, TSchemaIR>): instance is ControlFamilyInstance<TFamilyId, TSchemaIR> & SchemaViewCapable<TSchemaIR>;
|
|
503
600
|
//#endregion
|
|
504
|
-
export { type AssembledAuthoringContributions, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type EmitContractResult, type IntrospectSchemaResult, type MigratableTargetDescriptor, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type OperationContext, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SignDatabaseResult, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
|
|
601
|
+
export { type AssembledAuthoringContributions, type BaseSchemaIssue, type ControlAdapterDescriptor, type ControlAdapterInstance, type ControlDriverDescriptor, type ControlDriverInstance, type ControlExtensionDescriptor, type ControlExtensionInstance, type ControlFamilyDescriptor, type ControlFamilyInstance, type ControlStack, type ControlTargetDescriptor, type ControlTargetInstance, type CoreSchemaView, type CreateControlStackInput, type DataTransformOperation, type EmitContractResult, type EnumValuesChangedIssue, type IntrospectSchemaResult, type MigratableTargetDescriptor, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerFailureResult, type MigrationPlannerResult, type MigrationPlannerSuccessResult, type MigrationRunner, type MigrationRunnerExecutionChecks, type MigrationRunnerFailure, type MigrationRunnerResult, type MigrationRunnerSuccessValue, type OperationContext, type OperationDescriptor, type SchemaIssue, type SchemaNodeKind, SchemaTreeNode, type SchemaTreeNodeOptions, type SchemaTreeVisitor, type SchemaVerificationNode, type SchemaViewCapable, type SerializedQueryPlan, type SignDatabaseResult, type TargetMigrationsCapability, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_SCHEMA_FAILURE, VERIFY_CODE_TARGET_MISMATCH, type VerifyDatabaseResult, type VerifyDatabaseSchemaResult, assembleAuthoringContributions, assertUniqueCodecOwner, createControlStack, extractCodecLookup, extractCodecTypeImports, extractComponentIds, extractOperationTypeImports, extractQueryOperationTypeImports, hasMigrations, hasSchemaView };
|
|
505
602
|
//# 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-result-types.ts","../src/control-instances.ts","../src/control-stack.ts","../src/control-descriptors.ts","../src/control-migration-types.ts","../src/control-schema-view.ts","../src/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;UAEI,gBAAA;;;kBAGC,SAAS;;AARd,UAWI,oBAAA,CAXsB;EAC1B,SAAA,EAAA,EAAA,OAAA;EACA,SAAA,IAAA,CAAA,EAAA,MAAA;EACA,SAAA,OAAA,EAAA,MAAA;EAEI,SAAA,QAAA,EAAgB;IAMhB,SAAA,WAAoB,EAAA,MAAA;IA2BpB,SAAA,WAAW,CAAA,EAAA,MAAA;EAgCX,CAAA;EAYA,SAAA,MAAA,CAAA,EAAA;IAgCA,SAAA,WAAkB,CAAA,EAAA,MAAA;IAQlB,SAAA,WAAA,CAAsB,EAAA,MAAA;EAiBtB,CAAA;;;;EC5HA,CAAA;EACQ,SAAA,aAAA,CAAA,EAAA,SAAA,MAAA,EAAA;EACkB,SAAA,oBAAA,CAAA,EAAA,OAAA;EAGA,SAAA,IAAA,CAAA,EAAA;IAAtB,SAAA,UAAA,CAAA,EAAA,MAAA;IAKP,SAAA,YAAA,EAAA,MAAA;EAAR,CAAA;EAGqC,SAAA,OAAA,EAAA;IAAtB,SAAA,KAAA,EAAA,MAAA;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AgCX,SAAA,KAAA,EAAA,MAAA;EAYA,SAAA,IAAA,CAAA,EKvDC,MLuDD,CAAA,MAA0B,EAAA,OAAA,CAAA;EAgC1B,SAAA,QAAA,CAAA,EAAA,SKtFc,cLsFI,EAAA;AAQnC;AAiBiB,cK5GJ,cAAA,CL4GsB;iBK3GlB;;;EJjBA,SAAA,IAAA,CAAA,EIoBC,MJpBD,CAAA,MAAqB,EAAA,OAAA,CAAA;EACb,SAAA,QAAA,CAAA,EAAA,SIoBM,cJpBN,EAAA;EACkB,WAAA,CAAA,OAAA,EIqBpB,qBJrBoB;EAGA,MAAA,CAAA,CAAA,CAAA,CAAA,OAAA,EI2BtB,iBJ3BsB,CI2BJ,CJ3BI,CAAA,CAAA,EI2BC,CJ3BD;;;;;;AAaoC,UIuB9D,cAAA,CJvB8D;EAA/B,SAAA,IAAA,EIwB/B,cJxB+B;;;;UK5B/B,uGAGS,sBAAsB,sBAAsB,sBAClE,6BAGM,wBAAwB,WAAW;uBACtB,2BAA2B,WAAW,WAAW;;iBAGxD,0EACN,wBAAwB,WAAW,uBAChC,2BAA2B,WAAW;UAIlC;ENtBJ,YAAA,CAAA,MAAA,EMuBU,SNvBgB,CAAA,EMuBJ,cNvBI;AACvC;AACa,iBMwBG,aNxBwB,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EMyB5B,qBNzB4B,CMyBN,SNzBM,EMyBK,SNzBL,CAAA,CAAA,EAAA,QAAA,IM0BzB,qBN1ByB,CM0BH,SN1BG,EM0BQ,SN1BR,CAAA,GM0BqB,iBN1BrB,CM0BuC,SN1BvC,CAAA"}
|
|
1
|
+
{"version":3,"file":"control.d.mts","names":[],"sources":["../src/control-result-types.ts","../src/control-instances.ts","../src/control-stack.ts","../src/control-descriptors.ts","../src/control-migration-types.ts","../src/control-schema-view.ts","../src/control-capabilities.ts"],"sourcesContent":[],"mappings":";;;;;;;;;cAAa,0BAAA;cACA,yBAAA;cACA,2BAAA;cACA,0BAAA;U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,EAAA,EAAA,MAAe;EAiCf,SAAA,KAAA,EAAA,MAAA;EAQL,SAAA,IAAA,CAAW,EKpDL,MLoDK,CAAA,MAAG,EAAA,OAAA,CAAA;EAET,SAAA,QAAA,CAAA,EAAA,SKrDc,cL8DD,EAAA;AAG9B;AAgCiB,cK9FJ,cAAA,CL8FsB;EAQlB,SAAA,IAAA,EKrGA,cLqGsB;EAiBtB,SAAA,EAAA,EAAA,MAAA;;kBKnHC;+BACa;EJrBd,WAAA,CAAA,OAAA,EIuBM,qBJvBe;EACb,MAAA,CAAA,CAAA,CAAA,CAAA,OAAA,EI+BJ,iBJ/BI,CI+Bc,CJ/Bd,CAAA,CAAA,EI+BmB,CJ/BnB;;;;;;AAYkB,UI4B1B,cAAA,CJ5B0B;EAAtB,SAAA,IAAA,EI6BJ,cJ7BI;;;;UKvBJ,uGAGS,sBAAsB,sBAAsB,sBAClE,6BAGM,wBAAwB,WAAW;uBACtB,2BAA2B,WAAW,WAAW;;iBAGxD,0EACN,wBAAwB,WAAW,uBAChC,2BAA2B,WAAW;UAIlC;ENtBJ,YAAA,CAAA,MAAA,EMuBU,SNvBgB,CAAA,EMuBJ,cNvBI;AACvC;AACa,iBMwBG,aNxBwB,CAAA,kBAAA,MAAA,EAAA,SAAA,CAAA,CAAA,QAAA,EMyB5B,qBNzB4B,CMyBN,SNzBM,EMyBK,SNzBL,CAAA,CAAA,EAAA,QAAA,IM0BzB,qBN1ByB,CM0BH,SN1BG,EM0BQ,SN1BR,CAAA,GM0BqB,iBN1BrB,CM0BuC,SN1BvC,CAAA"}
|
package/dist/control.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"control.mjs","names":["imports: TypesImportSpec[]","ids: string[]"],"sources":["../src/control-capabilities.ts","../src/control-result-types.ts","../src/control-schema-view.ts","../src/control-stack.ts"],"sourcesContent":["import type { ControlTargetDescriptor } from './control-descriptors';\nimport type { ControlFamilyInstance } from './control-instances';\nimport type { TargetMigrationsCapability } from './control-migration-types';\nimport type { CoreSchemaView } from './control-schema-view';\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","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 SchemaIssue {\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 expected?: string;\n readonly actual?: string;\n readonly message: string;\n}\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 { CodecLookup } from './codec-types';\nimport type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlFamilyDescriptor,\n ControlTargetDescriptor,\n} from './control-descriptors';\nimport type {\n AuthoringContributions,\n AuthoringFieldNamespace,\n AuthoringFieldPresetDescriptor,\n AuthoringTypeConstructorDescriptor,\n AuthoringTypeNamespace,\n} from './framework-authoring';\nimport type { ComponentMetadata } from './framework-components';\nimport type { TypesImportSpec } from './types-import-spec';\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}\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\nfunction isTypeConstructorDescriptor(value: unknown): value is AuthoringTypeConstructorDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'typeConstructor'\n );\n}\n\nfunction isFieldPresetDescriptor(value: unknown): value is AuthoringFieldPresetDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'fieldPreset'\n );\n}\n\nfunction mergeAuthoringNamespaces(\n target: Record<string, unknown>,\n source: Record<string, unknown>,\n path: readonly string[],\n leafGuard: (value: unknown) => boolean,\n label: string,\n): void {\n const assertSafePath = (currentPath: readonly string[]) => {\n const blockedSegment = currentPath.find(\n (segment) => segment === '__proto__' || segment === 'constructor' || segment === 'prototype',\n );\n if (blockedSegment) {\n throw new Error(\n `Invalid authoring ${label} helper \"${currentPath.join('.')}\". Helper path segments must not use \"${blockedSegment}\".`,\n );\n }\n };\n\n for (const [key, sourceValue] of Object.entries(source)) {\n const currentPath = [...path, key];\n assertSafePath(currentPath);\n const hasExistingValue = Object.hasOwn(target, key);\n const existingValue = hasExistingValue ? target[key] : undefined;\n\n if (!hasExistingValue) {\n target[key] = sourceValue;\n continue;\n }\n\n const existingIsLeaf = leafGuard(existingValue);\n const sourceIsLeaf = leafGuard(sourceValue);\n\n if (existingIsLeaf || sourceIsLeaf) {\n throw new Error(\n `Duplicate authoring ${label} helper \"${currentPath.join('.')}\". Descriptor contributions must be unique across composed components.`,\n );\n }\n\n mergeAuthoringNamespaces(\n existingValue as Record<string, unknown>,\n sourceValue as Record<string, unknown>,\n currentPath,\n leafGuard,\n label,\n );\n }\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 isFieldPresetDescriptor,\n 'field',\n );\n }\n if (!descriptor.authoring?.type) {\n continue;\n }\n mergeAuthoringNamespaces(\n type,\n descriptor.authoring.type,\n [],\n isTypeConstructorDescriptor,\n 'type',\n );\n }\n\n return {\n field: field as AuthoringFieldNamespace,\n type: type as AuthoringTypeNamespace,\n };\n}\n\nexport function extractCodecLookup(\n descriptors: ReadonlyArray<Pick<ComponentMetadata & { id?: string }, 'types' | 'id'>>,\n): CodecLookup {\n const byId = new Map<string, import('./codec-types').Codec>();\n const owners = new Map<string, string>();\n for (const descriptor of descriptors) {\n const codecInstances = descriptor.types?.codecTypes?.codecInstances;\n if (!codecInstances) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n for (const codec of codecInstances) {\n assertUniqueCodecOwner({\n codecId: codec.id,\n owners,\n descriptorId,\n entityLabel: 'codec instance',\n entityOwnershipLabel: 'codec instance provider',\n });\n owners.set(codec.id, descriptorId);\n byId.set(codec.id, codec);\n }\n }\n return { get: (id) => byId.get(id) };\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 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: extractCodecLookup(allDescriptors),\n authoringContributions: assembleAuthoringContributions(allDescriptors),\n };\n}\n"],"mappings":";A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AEzF,QAAO;EACL;EACA;EACA;EACA;EACgB;EAEhB,kBAAkB,wBAAwB,eAAe;EACzD,sBAAsB,4BAA4B,eAAe;EACjE,2BAA2B,iCAAiC,eAAe;EAC3E,cAAc,oBAAoB,QAAQ,QAAQ,SAAS,eAAe;EAC1E,aAAa,mBAAmB,eAAe;EAC/C,wBAAwB,+BAA+B,eAAe;EACvE"}
|
|
1
|
+
{"version":3,"file":"control.mjs","names":["imports: TypesImportSpec[]","ids: string[]"],"sources":["../src/control-capabilities.ts","../src/control-result-types.ts","../src/control-schema-view.ts","../src/control-stack.ts"],"sourcesContent":["import type { ControlTargetDescriptor } from './control-descriptors';\nimport type { ControlFamilyInstance } from './control-instances';\nimport type { TargetMigrationsCapability } from './control-migration-types';\nimport type { CoreSchemaView } from './control-schema-view';\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","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 { CodecLookup } from './codec-types';\nimport type {\n ControlAdapterDescriptor,\n ControlDriverDescriptor,\n ControlExtensionDescriptor,\n ControlFamilyDescriptor,\n ControlTargetDescriptor,\n} from './control-descriptors';\nimport type {\n AuthoringContributions,\n AuthoringFieldNamespace,\n AuthoringFieldPresetDescriptor,\n AuthoringTypeConstructorDescriptor,\n AuthoringTypeNamespace,\n} from './framework-authoring';\nimport type { ComponentMetadata } from './framework-components';\nimport type { TypesImportSpec } from './types-import-spec';\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}\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\nfunction isTypeConstructorDescriptor(value: unknown): value is AuthoringTypeConstructorDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'typeConstructor'\n );\n}\n\nfunction isFieldPresetDescriptor(value: unknown): value is AuthoringFieldPresetDescriptor {\n return (\n typeof value === 'object' &&\n value !== null &&\n (value as { kind?: unknown }).kind === 'fieldPreset'\n );\n}\n\nfunction mergeAuthoringNamespaces(\n target: Record<string, unknown>,\n source: Record<string, unknown>,\n path: readonly string[],\n leafGuard: (value: unknown) => boolean,\n label: string,\n): void {\n const assertSafePath = (currentPath: readonly string[]) => {\n const blockedSegment = currentPath.find(\n (segment) => segment === '__proto__' || segment === 'constructor' || segment === 'prototype',\n );\n if (blockedSegment) {\n throw new Error(\n `Invalid authoring ${label} helper \"${currentPath.join('.')}\". Helper path segments must not use \"${blockedSegment}\".`,\n );\n }\n };\n\n for (const [key, sourceValue] of Object.entries(source)) {\n const currentPath = [...path, key];\n assertSafePath(currentPath);\n const hasExistingValue = Object.hasOwn(target, key);\n const existingValue = hasExistingValue ? target[key] : undefined;\n\n if (!hasExistingValue) {\n target[key] = sourceValue;\n continue;\n }\n\n const existingIsLeaf = leafGuard(existingValue);\n const sourceIsLeaf = leafGuard(sourceValue);\n\n if (existingIsLeaf || sourceIsLeaf) {\n throw new Error(\n `Duplicate authoring ${label} helper \"${currentPath.join('.')}\". Descriptor contributions must be unique across composed components.`,\n );\n }\n\n mergeAuthoringNamespaces(\n existingValue as Record<string, unknown>,\n sourceValue as Record<string, unknown>,\n currentPath,\n leafGuard,\n label,\n );\n }\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 isFieldPresetDescriptor,\n 'field',\n );\n }\n if (!descriptor.authoring?.type) {\n continue;\n }\n mergeAuthoringNamespaces(\n type,\n descriptor.authoring.type,\n [],\n isTypeConstructorDescriptor,\n 'type',\n );\n }\n\n return {\n field: field as AuthoringFieldNamespace,\n type: type as AuthoringTypeNamespace,\n };\n}\n\nexport function extractCodecLookup(\n descriptors: ReadonlyArray<Pick<ComponentMetadata & { id?: string }, 'types' | 'id'>>,\n): CodecLookup {\n const byId = new Map<string, import('./codec-types').Codec>();\n const owners = new Map<string, string>();\n for (const descriptor of descriptors) {\n const codecInstances = descriptor.types?.codecTypes?.codecInstances;\n if (!codecInstances) continue;\n const descriptorId = descriptor.id ?? '<unknown>';\n for (const codec of codecInstances) {\n assertUniqueCodecOwner({\n codecId: codec.id,\n owners,\n descriptorId,\n entityLabel: 'codec instance',\n entityOwnershipLabel: 'codec instance provider',\n });\n owners.set(codec.id, descriptorId);\n byId.set(codec.id, codec);\n }\n }\n return { get: (id) => byId.get(id) };\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 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: extractCodecLookup(allDescriptors),\n authoringContributions: assembleAuthoringContributions(allDescriptors),\n };\n}\n"],"mappings":";AAgBA,SAAgB,cACd,QAC4D;AAC5D,QAAO,gBAAgB,UAAU,CAAC,CAAE,OAAmC;;AAOzE,SAAgB,cACd,UACwF;AACxF,QACE,kBAAkB,YAClB,OAAQ,SAAqC,oBAAoB;;;;;AC/BrE,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,MAAK,OAAO,QAAQ;AACpD,MAAI,QAAQ,aAAa,OAAW,MAAK,WAAW,QAAQ;AAC5D,SAAO,OAAO,KAAK;;CAGrB,OAAU,SAAkC;AAC1C,SAAO,QAAQ,MAAM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gB,mBACd,aACa;CACb,MAAM,uBAAO,IAAI,KAA4C;CAC7D,MAAM,yBAAS,IAAI,KAAqB;AACxC,MAAK,MAAM,cAAc,aAAa;EACpC,MAAM,iBAAiB,WAAW,OAAO,YAAY;AACrD,MAAI,CAAC,eAAgB;EACrB,MAAM,eAAe,WAAW,MAAM;AACtC,OAAK,MAAM,SAAS,gBAAgB;AAClC,0BAAuB;IACrB,SAAS,MAAM;IACf;IACA;IACA,aAAa;IACb,sBAAsB;IACvB,CAAC;AACF,UAAO,IAAI,MAAM,IAAI,aAAa;AAClC,QAAK,IAAI,MAAM,IAAI,MAAM;;;AAG7B,QAAO,EAAE,MAAM,OAAO,KAAK,IAAI,GAAG,EAAE;;AAGtC,SAAgB,mBACd,OACoC;CACpC,MAAM,EAAE,QAAQ,QAAQ,SAAS,QAAQ,iBAAiB,EAAE,KAAK;CAEjE,MAAM,iBAAiB;EAAC;EAAQ;EAAQ,GAAI,UAAU,CAAC,QAAQ,GAAG,EAAE;EAAG,GAAG;EAAe;AAEzF,QAAO;EACL;EACA;EACA;EACA;EACgB;EAEhB,kBAAkB,wBAAwB,eAAe;EACzD,sBAAsB,4BAA4B,eAAe;EACjE,2BAA2B,iCAAiC,eAAe;EAC3E,cAAc,oBAAoB,QAAQ,QAAQ,SAAS,eAAe;EAC1E,aAAa,mBAAmB,eAAe;EAC/C,wBAAwB,+BAA+B,eAAe;EACvE"}
|
package/package.json
CHANGED
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma-next/framework-components",
|
|
3
|
-
"version": "0.3.0-dev.
|
|
3
|
+
"version": "0.3.0-dev.161",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"description": "Framework component types, assembly logic, and stack creation for Prisma Next",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@prisma-next/contract": "0.3.0-dev.
|
|
9
|
-
"@prisma-next/operations": "0.3.0-dev.
|
|
10
|
-
"@prisma-next/utils": "0.3.0-dev.
|
|
8
|
+
"@prisma-next/contract": "0.3.0-dev.161",
|
|
9
|
+
"@prisma-next/operations": "0.3.0-dev.161",
|
|
10
|
+
"@prisma-next/utils": "0.3.0-dev.161"
|
|
11
11
|
},
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"tsdown": "0.18.4",
|
|
14
14
|
"typescript": "5.9.3",
|
|
15
15
|
"vitest": "4.0.17",
|
|
16
|
-
"@prisma-next/
|
|
17
|
-
"@prisma-next/
|
|
16
|
+
"@prisma-next/tsconfig": "0.0.0",
|
|
17
|
+
"@prisma-next/tsdown": "0.0.0"
|
|
18
18
|
},
|
|
19
19
|
"files": [
|
|
20
20
|
"dist",
|
|
@@ -23,8 +23,65 @@ import type { TargetBoundComponentDescriptor } from './framework-components';
|
|
|
23
23
|
* - 'additive': Adds new structures without modifying existing ones (safe)
|
|
24
24
|
* - 'widening': Relaxes constraints or expands types (generally safe)
|
|
25
25
|
* - 'destructive': Removes or alters existing structures (potentially unsafe)
|
|
26
|
+
* - 'data': Data transformation operation (e.g., backfill, type conversion)
|
|
26
27
|
*/
|
|
27
|
-
export type MigrationOperationClass = 'additive' | 'widening' | 'destructive';
|
|
28
|
+
export type MigrationOperationClass = 'additive' | 'widening' | 'destructive' | 'data';
|
|
29
|
+
|
|
30
|
+
// ============================================================================
|
|
31
|
+
// Data Transform Operation
|
|
32
|
+
// ============================================================================
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* A lowered query statement as stored in ops.json.
|
|
36
|
+
* Contains the SQL string and parameter values — ready for execution.
|
|
37
|
+
* Lowering from query builder AST to SQL happens at verify time.
|
|
38
|
+
*/
|
|
39
|
+
export interface SerializedQueryPlan {
|
|
40
|
+
readonly sql: string;
|
|
41
|
+
readonly params: readonly unknown[];
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* A data transform operation within a migration edge.
|
|
46
|
+
*
|
|
47
|
+
* Data transforms are authored in TypeScript using the query builder,
|
|
48
|
+
* serialized to JSON ASTs at verification time, and rendered to SQL
|
|
49
|
+
* by the target adapter at apply time.
|
|
50
|
+
*
|
|
51
|
+
* The `name` serves as the invariant identity — it's recorded in the
|
|
52
|
+
* ledger and used for invariant-aware routing via environment refs.
|
|
53
|
+
*
|
|
54
|
+
* In draft state (before verification), `check` and `run` are null.
|
|
55
|
+
* After verification, they contain the serialized query ASTs.
|
|
56
|
+
*/
|
|
57
|
+
export interface DataTransformOperation extends MigrationPlanOperation {
|
|
58
|
+
readonly operationClass: 'data';
|
|
59
|
+
/**
|
|
60
|
+
* The invariant name for this data transform.
|
|
61
|
+
* Recorded in the ledger on successful edge completion.
|
|
62
|
+
* Used by environment refs to declare required invariants.
|
|
63
|
+
*/
|
|
64
|
+
readonly name: string;
|
|
65
|
+
/**
|
|
66
|
+
* Path to the TypeScript source file that produced this operation.
|
|
67
|
+
* Not part of edgeId computation — for traceability only.
|
|
68
|
+
*/
|
|
69
|
+
readonly source: string;
|
|
70
|
+
/**
|
|
71
|
+
* Serialized check query plan, or a boolean literal.
|
|
72
|
+
* - SerializedQueryPlan: describes violations; empty result = already applied.
|
|
73
|
+
* - false: always run (no check).
|
|
74
|
+
* - true: always skip.
|
|
75
|
+
* - null: not yet serialized (draft state).
|
|
76
|
+
*/
|
|
77
|
+
readonly check: SerializedQueryPlan | boolean | null;
|
|
78
|
+
/**
|
|
79
|
+
* Serialized run query plans.
|
|
80
|
+
* - Array of serialized query plans to execute sequentially.
|
|
81
|
+
* - null: not yet serialized (draft state).
|
|
82
|
+
*/
|
|
83
|
+
readonly run: readonly SerializedQueryPlan[] | null;
|
|
84
|
+
}
|
|
28
85
|
|
|
29
86
|
/**
|
|
30
87
|
* Policy defining which operation classes are allowed during a migration.
|
|
@@ -37,6 +94,16 @@ export interface MigrationOperationPolicy {
|
|
|
37
94
|
// Plan Types (Display-Oriented)
|
|
38
95
|
// ============================================================================
|
|
39
96
|
|
|
97
|
+
/**
|
|
98
|
+
* Minimal shape for operation descriptors at the framework level.
|
|
99
|
+
* Targets produce richer types; this captures just enough for the
|
|
100
|
+
* framework to scaffold migration.ts files and pass descriptors through.
|
|
101
|
+
*/
|
|
102
|
+
export interface OperationDescriptor {
|
|
103
|
+
readonly kind: string;
|
|
104
|
+
readonly [key: string]: unknown;
|
|
105
|
+
}
|
|
106
|
+
|
|
40
107
|
/**
|
|
41
108
|
* A single migration operation for display purposes.
|
|
42
109
|
* Contains only the fields needed for CLI output (tree view, JSON envelope).
|
|
@@ -273,4 +340,43 @@ export interface TargetMigrationsCapability<
|
|
|
273
340
|
contract: Contract | null,
|
|
274
341
|
frameworkComponents?: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>,
|
|
275
342
|
): unknown;
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Plans a migration using the descriptor-based planner.
|
|
346
|
+
* Returns operation descriptors and whether data migration is needed.
|
|
347
|
+
* The caller decides whether to resolve immediately or scaffold migration.ts.
|
|
348
|
+
*/
|
|
349
|
+
planWithDescriptors?(context: {
|
|
350
|
+
readonly fromContract: Contract | null;
|
|
351
|
+
readonly toContract: Contract;
|
|
352
|
+
readonly frameworkComponents?: ReadonlyArray<
|
|
353
|
+
TargetBoundComponentDescriptor<TFamilyId, TTargetId>
|
|
354
|
+
>;
|
|
355
|
+
}):
|
|
356
|
+
| {
|
|
357
|
+
readonly ok: true;
|
|
358
|
+
readonly descriptors: readonly OperationDescriptor[];
|
|
359
|
+
readonly needsDataMigration: boolean;
|
|
360
|
+
}
|
|
361
|
+
| {
|
|
362
|
+
readonly ok: false;
|
|
363
|
+
readonly conflicts: readonly MigrationPlannerConflict[];
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
/**
|
|
367
|
+
* Resolves operation descriptors into target-specific migration plan operations
|
|
368
|
+
* with SQL/DDL, prechecks, and postchecks. Called by `migration verify` to
|
|
369
|
+
* serialize migration.ts into ops.json.
|
|
370
|
+
*/
|
|
371
|
+
resolveDescriptors?(
|
|
372
|
+
descriptors: readonly OperationDescriptor[],
|
|
373
|
+
context: {
|
|
374
|
+
readonly fromContract: Contract | null;
|
|
375
|
+
readonly toContract: Contract;
|
|
376
|
+
readonly schemaName?: string;
|
|
377
|
+
readonly frameworkComponents?: ReadonlyArray<
|
|
378
|
+
TargetBoundComponentDescriptor<TFamilyId, TTargetId>
|
|
379
|
+
>;
|
|
380
|
+
},
|
|
381
|
+
): readonly MigrationPlanOperation[];
|
|
276
382
|
}
|
|
@@ -36,7 +36,7 @@ export interface VerifyDatabaseResult {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export interface
|
|
39
|
+
export interface BaseSchemaIssue {
|
|
40
40
|
readonly kind:
|
|
41
41
|
| 'missing_table'
|
|
42
42
|
| 'missing_column'
|
|
@@ -63,11 +63,22 @@ export interface SchemaIssue {
|
|
|
63
63
|
readonly column?: string;
|
|
64
64
|
readonly indexOrConstraint?: string;
|
|
65
65
|
readonly typeName?: string;
|
|
66
|
+
readonly dependencyId?: string;
|
|
66
67
|
readonly expected?: string;
|
|
67
68
|
readonly actual?: string;
|
|
68
69
|
readonly message: string;
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
export interface EnumValuesChangedIssue {
|
|
73
|
+
readonly kind: 'enum_values_changed';
|
|
74
|
+
readonly typeName: string;
|
|
75
|
+
readonly addedValues: readonly string[];
|
|
76
|
+
readonly removedValues: readonly string[];
|
|
77
|
+
readonly message: string;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export type SchemaIssue = BaseSchemaIssue | EnumValuesChangedIssue;
|
|
81
|
+
|
|
71
82
|
export interface SchemaVerificationNode {
|
|
72
83
|
readonly status: 'pass' | 'warn' | 'fail';
|
|
73
84
|
readonly kind: string;
|
package/src/exports/control.ts
CHANGED
|
@@ -15,6 +15,7 @@ export type {
|
|
|
15
15
|
ControlTargetInstance,
|
|
16
16
|
} from '../control-instances';
|
|
17
17
|
export type {
|
|
18
|
+
DataTransformOperation,
|
|
18
19
|
MigrationOperationClass,
|
|
19
20
|
MigrationOperationPolicy,
|
|
20
21
|
MigrationPlan,
|
|
@@ -29,10 +30,14 @@ export type {
|
|
|
29
30
|
MigrationRunnerFailure,
|
|
30
31
|
MigrationRunnerResult,
|
|
31
32
|
MigrationRunnerSuccessValue,
|
|
33
|
+
OperationDescriptor,
|
|
34
|
+
SerializedQueryPlan,
|
|
32
35
|
TargetMigrationsCapability,
|
|
33
36
|
} from '../control-migration-types';
|
|
34
37
|
export type {
|
|
38
|
+
BaseSchemaIssue,
|
|
35
39
|
EmitContractResult,
|
|
40
|
+
EnumValuesChangedIssue,
|
|
36
41
|
IntrospectSchemaResult,
|
|
37
42
|
OperationContext,
|
|
38
43
|
SchemaIssue,
|