@prisma-next/cli 0.3.0-pr.94.3 → 0.3.0-pr.95.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-AGOTG4L3.js +965 -0
- package/dist/chunk-AGOTG4L3.js.map +1 -0
- package/dist/chunk-HLLI4YL7.js +180 -0
- package/dist/chunk-HLLI4YL7.js.map +1 -0
- package/dist/chunk-HWYQOCAJ.js +47 -0
- package/dist/chunk-HWYQOCAJ.js.map +1 -0
- package/dist/chunk-VG2R7DGF.js +735 -0
- package/dist/chunk-VG2R7DGF.js.map +1 -0
- package/dist/cli.d.ts +2 -2
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +2764 -2522
- package/dist/cli.js.map +1 -1
- package/dist/commands/contract-emit.d.ts +3 -0
- package/dist/commands/contract-emit.d.ts.map +1 -0
- package/dist/commands/contract-emit.js +10 -0
- package/dist/commands/contract-emit.js.map +1 -0
- package/dist/commands/db-init.d.ts +3 -0
- package/dist/commands/db-init.d.ts.map +1 -0
- package/dist/commands/db-init.js +257 -0
- package/dist/commands/db-init.js.map +1 -0
- package/dist/commands/db-introspect.d.ts +3 -0
- package/dist/commands/db-introspect.d.ts.map +1 -0
- package/dist/commands/db-introspect.js +155 -0
- package/dist/commands/db-introspect.js.map +1 -0
- package/dist/commands/db-schema-verify.d.ts +3 -0
- package/dist/commands/db-schema-verify.d.ts.map +1 -0
- package/dist/commands/db-schema-verify.js +171 -0
- package/dist/commands/db-schema-verify.js.map +1 -0
- package/dist/commands/db-sign.d.ts +3 -0
- package/dist/commands/db-sign.d.ts.map +1 -0
- package/dist/commands/db-sign.js +195 -0
- package/dist/commands/db-sign.js.map +1 -0
- package/dist/commands/db-verify.d.ts +3 -0
- package/dist/commands/db-verify.d.ts.map +1 -0
- package/dist/commands/db-verify.js +193 -0
- package/dist/commands/db-verify.js.map +1 -0
- package/dist/{config-loader.d.mts → config-loader.d.ts} +3 -8
- package/dist/config-loader.d.ts.map +1 -0
- package/dist/config-loader.js +7 -0
- package/dist/config-loader.js.map +1 -0
- package/dist/control-api/client.d.ts +13 -0
- package/dist/control-api/client.d.ts.map +1 -0
- package/dist/control-api/operations/db-init.d.ts +29 -0
- package/dist/control-api/operations/db-init.d.ts.map +1 -0
- package/dist/control-api/types.d.ts +387 -0
- package/dist/control-api/types.d.ts.map +1 -0
- package/dist/exports/config-types.d.ts +3 -0
- package/dist/exports/config-types.d.ts.map +1 -0
- package/dist/exports/config-types.js +6 -0
- package/dist/exports/config-types.js.map +1 -0
- package/dist/exports/control-api.d.ts +13 -0
- package/dist/exports/control-api.d.ts.map +1 -0
- package/dist/exports/control-api.js +7 -0
- package/dist/exports/control-api.js.map +1 -0
- package/dist/exports/index.d.ts +4 -0
- package/dist/exports/index.d.ts.map +1 -0
- package/dist/exports/index.js +176 -0
- package/dist/exports/index.js.map +1 -0
- package/dist/{exports/index.d.mts → load-ts-contract.d.ts} +5 -10
- package/dist/load-ts-contract.d.ts.map +1 -0
- package/dist/utils/cli-errors.d.ts +7 -0
- package/dist/utils/cli-errors.d.ts.map +1 -0
- package/dist/utils/command-helpers.d.ts +12 -0
- package/dist/utils/command-helpers.d.ts.map +1 -0
- package/dist/utils/framework-components.d.ts +70 -0
- package/dist/utils/framework-components.d.ts.map +1 -0
- package/dist/utils/global-flags.d.ts +25 -0
- package/dist/utils/global-flags.d.ts.map +1 -0
- package/dist/utils/output.d.ts +142 -0
- package/dist/utils/output.d.ts.map +1 -0
- package/dist/utils/progress-adapter.d.ts +26 -0
- package/dist/utils/progress-adapter.d.ts.map +1 -0
- package/dist/utils/result-handler.d.ts +15 -0
- package/dist/utils/result-handler.d.ts.map +1 -0
- package/package.json +54 -29
- package/dist/client-CoxxGz_7.mjs +0 -692
- package/dist/client-CoxxGz_7.mjs.map +0 -1
- package/dist/commands/contract-emit.d.mts +0 -7
- package/dist/commands/contract-emit.d.mts.map +0 -1
- package/dist/commands/contract-emit.mjs +0 -139
- package/dist/commands/contract-emit.mjs.map +0 -1
- package/dist/commands/db-init.d.mts +0 -7
- package/dist/commands/db-init.d.mts.map +0 -1
- package/dist/commands/db-init.mjs +0 -178
- package/dist/commands/db-init.mjs.map +0 -1
- package/dist/commands/db-introspect.d.mts +0 -7
- package/dist/commands/db-introspect.d.mts.map +0 -1
- package/dist/commands/db-introspect.mjs +0 -120
- package/dist/commands/db-introspect.mjs.map +0 -1
- package/dist/commands/db-schema-verify.d.mts +0 -7
- package/dist/commands/db-schema-verify.d.mts.map +0 -1
- package/dist/commands/db-schema-verify.mjs +0 -116
- package/dist/commands/db-schema-verify.mjs.map +0 -1
- package/dist/commands/db-sign.d.mts +0 -7
- package/dist/commands/db-sign.d.mts.map +0 -1
- package/dist/commands/db-sign.mjs +0 -138
- package/dist/commands/db-sign.mjs.map +0 -1
- package/dist/commands/db-verify.d.mts +0 -7
- package/dist/commands/db-verify.d.mts.map +0 -1
- package/dist/commands/db-verify.mjs +0 -128
- package/dist/commands/db-verify.mjs.map +0 -1
- package/dist/config-loader-B-pobG0R.mjs +0 -42
- package/dist/config-loader-B-pobG0R.mjs.map +0 -1
- package/dist/config-loader.d.mts.map +0 -1
- package/dist/config-loader.mjs +0 -3
- package/dist/exports/config-types.d.mts +0 -2
- package/dist/exports/config-types.mjs +0 -3
- package/dist/exports/control-api.d.mts +0 -405
- package/dist/exports/control-api.d.mts.map +0 -1
- package/dist/exports/control-api.mjs +0 -3
- package/dist/exports/index.d.mts.map +0 -1
- package/dist/exports/index.mjs +0 -128
- package/dist/exports/index.mjs.map +0 -1
- package/dist/result-handler-Do_4Fi4U.mjs +0 -959
- package/dist/result-handler-Do_4Fi4U.mjs.map +0 -1
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
import { PrismaNextConfig } from
|
|
2
|
-
|
|
3
|
-
//#region src/config-loader.d.ts
|
|
4
|
-
|
|
1
|
+
import type { PrismaNextConfig } from '@prisma-next/core-control-plane/config-types';
|
|
5
2
|
/**
|
|
6
3
|
* Loads the Prisma Next config from a TypeScript file.
|
|
7
4
|
* Supports both default export and named export.
|
|
@@ -11,7 +8,5 @@ import { PrismaNextConfig } from "@prisma-next/core-control-plane/config-types";
|
|
|
11
8
|
* @returns The loaded config object.
|
|
12
9
|
* @throws Error if config file doesn't exist or is invalid.
|
|
13
10
|
*/
|
|
14
|
-
declare function loadConfig(configPath?: string): Promise<PrismaNextConfig>;
|
|
15
|
-
//#
|
|
16
|
-
export { loadConfig };
|
|
17
|
-
//# sourceMappingURL=config-loader.d.mts.map
|
|
11
|
+
export declare function loadConfig(configPath?: string): Promise<PrismaNextConfig>;
|
|
12
|
+
//# sourceMappingURL=config-loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-loader.d.ts","sourceRoot":"","sources":["../src/config-loader.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAKrF;;;;;;;;GAQG;AACH,wBAAsB,UAAU,CAAC,UAAU,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA4D/E"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ControlClient, ControlClientOptions } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Creates a programmatic control client for Prisma Next operations.
|
|
4
|
+
*
|
|
5
|
+
* The client accepts framework component descriptors at creation time,
|
|
6
|
+
* manages driver lifecycle via connect()/close(), and exposes domain
|
|
7
|
+
* operations that delegate to the existing family instance methods.
|
|
8
|
+
*
|
|
9
|
+
* @see {@link ControlClient} for the client interface
|
|
10
|
+
* @see README.md "Programmatic Control API" section for usage examples
|
|
11
|
+
*/
|
|
12
|
+
export declare function createControlClient(options: ControlClientOptions): ControlClient;
|
|
13
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/control-api/client.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EACV,aAAa,EACb,oBAAoB,EASrB,MAAM,SAAS,CAAC;AAEjB;;;;;;;;;GASG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,oBAAoB,GAAG,aAAa,CAEhF"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { TargetBoundComponentDescriptor } from '@prisma-next/contract/framework-components';
|
|
2
|
+
import type { ContractIR } from '@prisma-next/contract/ir';
|
|
3
|
+
import type { ControlDriverInstance, ControlFamilyInstance, TargetMigrationsCapability } from '@prisma-next/core-control-plane/types';
|
|
4
|
+
import type { DbInitResult, OnControlProgress } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Options for executing dbInit operation.
|
|
7
|
+
*/
|
|
8
|
+
export interface ExecuteDbInitOptions<TFamilyId extends string, TTargetId extends string> {
|
|
9
|
+
readonly driver: ControlDriverInstance<TFamilyId, TTargetId>;
|
|
10
|
+
readonly familyInstance: ControlFamilyInstance<TFamilyId>;
|
|
11
|
+
readonly contractIR: ContractIR;
|
|
12
|
+
readonly mode: 'plan' | 'apply';
|
|
13
|
+
readonly migrations: TargetMigrationsCapability<TFamilyId, TTargetId, ControlFamilyInstance<TFamilyId>>;
|
|
14
|
+
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<TFamilyId, TTargetId>>;
|
|
15
|
+
/** Optional progress callback for observing operation progress */
|
|
16
|
+
readonly onProgress?: OnControlProgress;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Executes the dbInit operation.
|
|
20
|
+
*
|
|
21
|
+
* This is the core logic extracted from the CLI command, without any file I/O,
|
|
22
|
+
* process.exit(), or console output. It uses the Result pattern to return
|
|
23
|
+
* success or failure details.
|
|
24
|
+
*
|
|
25
|
+
* @param options - The options for executing dbInit
|
|
26
|
+
* @returns Result with DbInitSuccess on success, DbInitFailure on failure
|
|
27
|
+
*/
|
|
28
|
+
export declare function executeDbInit<TFamilyId extends string, TTargetId extends string>(options: ExecuteDbInitOptions<TFamilyId, TTargetId>): Promise<DbInitResult>;
|
|
29
|
+
//# sourceMappingURL=db-init.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"db-init.d.ts","sourceRoot":"","sources":["../../../src/control-api/operations/db-init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,4CAA4C,CAAC;AACjG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,KAAK,EACV,qBAAqB,EACrB,qBAAqB,EAKrB,0BAA0B,EAC3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,KAAK,EAAE,YAAY,EAAiB,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE/E;;GAEG;AACH,MAAM,WAAW,oBAAoB,CAAC,SAAS,SAAS,MAAM,EAAE,SAAS,SAAS,MAAM;IACtF,QAAQ,CAAC,MAAM,EAAE,qBAAqB,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;IAC7D,QAAQ,CAAC,cAAc,EAAE,qBAAqB,CAAC,SAAS,CAAC,CAAC;IAC1D,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAC;IAChC,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,0BAA0B,CAC7C,SAAS,EACT,SAAS,EACT,qBAAqB,CAAC,SAAS,CAAC,CACjC,CAAC;IACF,QAAQ,CAAC,mBAAmB,EAAE,aAAa,CAAC,8BAA8B,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC;IAClG,kEAAkE;IAClE,QAAQ,CAAC,UAAU,CAAC,EAAE,iBAAiB,CAAC;CACzC;AAED;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CAAC,SAAS,SAAS,MAAM,EAAE,SAAS,SAAS,MAAM,EACpF,OAAO,EAAE,oBAAoB,CAAC,SAAS,EAAE,SAAS,CAAC,GAClD,OAAO,CAAC,YAAY,CAAC,CA4OvB"}
|
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
import type { CoreSchemaView } from '@prisma-next/core-control-plane/schema-view';
|
|
2
|
+
import type { ControlAdapterDescriptor, ControlDriverDescriptor, ControlExtensionDescriptor, ControlFamilyDescriptor, ControlTargetDescriptor, MigrationPlannerConflict, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from '@prisma-next/core-control-plane/types';
|
|
3
|
+
import type { Result } from '@prisma-next/utils/result';
|
|
4
|
+
/**
|
|
5
|
+
* Options for creating a control client.
|
|
6
|
+
*
|
|
7
|
+
* Note: This is NOT the same as CLI config. There's no `contract` field,
|
|
8
|
+
* no file paths. The client is config-agnostic.
|
|
9
|
+
*
|
|
10
|
+
* The descriptor types use permissive `any` because family-specific descriptors
|
|
11
|
+
* (e.g., SqlFamilyDescriptor) have more specific `create` method signatures that
|
|
12
|
+
* are not compatible with the base ControlFamilyDescriptor type due to TypeScript
|
|
13
|
+
* variance rules. The client implementation casts these internally.
|
|
14
|
+
*/
|
|
15
|
+
export interface ControlClientOptions {
|
|
16
|
+
readonly family: ControlFamilyDescriptor<any, any>;
|
|
17
|
+
readonly target: ControlTargetDescriptor<any, any, any, any>;
|
|
18
|
+
readonly adapter: ControlAdapterDescriptor<any, any, any>;
|
|
19
|
+
/** Optional - control client can be created without driver for offline operations */
|
|
20
|
+
readonly driver?: ControlDriverDescriptor<any, any, any, any>;
|
|
21
|
+
readonly extensionPacks?: ReadonlyArray<ControlExtensionDescriptor<any, any, any>>;
|
|
22
|
+
/**
|
|
23
|
+
* Optional default connection for auto-connect.
|
|
24
|
+
* When provided, operations will auto-connect if not already connected.
|
|
25
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
26
|
+
*/
|
|
27
|
+
readonly connection?: unknown;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Action names for control-api operations that can emit progress events.
|
|
31
|
+
*/
|
|
32
|
+
export type ControlActionName = 'dbInit' | 'verify' | 'schemaVerify' | 'sign' | 'introspect' | 'emit';
|
|
33
|
+
/**
|
|
34
|
+
* Progress event emitted during control-api operation execution.
|
|
35
|
+
*
|
|
36
|
+
* Events model operation progress using a span-based model:
|
|
37
|
+
* - `spanStart`: Begin a timed segment (supports nesting via parentSpanId)
|
|
38
|
+
* - `spanEnd`: Complete a timed segment
|
|
39
|
+
*
|
|
40
|
+
* All operation-specific progress (e.g., per-migration-operation) is modeled
|
|
41
|
+
* as nested spans rather than special event types.
|
|
42
|
+
*
|
|
43
|
+
* Events are delivered via an optional `onProgress` callback to avoid polluting
|
|
44
|
+
* return types. If the callback is absent, operations emit no events (zero overhead).
|
|
45
|
+
*/
|
|
46
|
+
export type ControlProgressEvent = {
|
|
47
|
+
readonly action: ControlActionName;
|
|
48
|
+
readonly kind: 'spanStart';
|
|
49
|
+
readonly spanId: string;
|
|
50
|
+
readonly parentSpanId?: string;
|
|
51
|
+
readonly label: string;
|
|
52
|
+
} | {
|
|
53
|
+
readonly action: ControlActionName;
|
|
54
|
+
readonly kind: 'spanEnd';
|
|
55
|
+
readonly spanId: string;
|
|
56
|
+
readonly outcome: 'ok' | 'skipped' | 'error';
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Callback function for receiving progress events during control-api operations.
|
|
60
|
+
*
|
|
61
|
+
* @param event - The progress event emitted by the operation
|
|
62
|
+
*/
|
|
63
|
+
export type OnControlProgress = (event: ControlProgressEvent) => void;
|
|
64
|
+
/**
|
|
65
|
+
* Options for the verify operation.
|
|
66
|
+
*/
|
|
67
|
+
export interface VerifyOptions {
|
|
68
|
+
/** Contract IR or unvalidated JSON - validated at runtime via familyInstance.validateContractIR() */
|
|
69
|
+
readonly contractIR: unknown;
|
|
70
|
+
/**
|
|
71
|
+
* Database connection. If provided, verify will connect before executing.
|
|
72
|
+
* If omitted, the client must already be connected.
|
|
73
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
74
|
+
*/
|
|
75
|
+
readonly connection?: unknown;
|
|
76
|
+
/** Optional progress callback for observing operation progress */
|
|
77
|
+
readonly onProgress?: OnControlProgress;
|
|
78
|
+
}
|
|
79
|
+
/**
|
|
80
|
+
* Options for the schemaVerify operation.
|
|
81
|
+
*/
|
|
82
|
+
export interface SchemaVerifyOptions {
|
|
83
|
+
/** Contract IR or unvalidated JSON - validated at runtime via familyInstance.validateContractIR() */
|
|
84
|
+
readonly contractIR: unknown;
|
|
85
|
+
/**
|
|
86
|
+
* Whether to use strict mode for schema verification.
|
|
87
|
+
* In strict mode, extra tables/columns are reported as issues.
|
|
88
|
+
* Default: false (tolerant mode - allows superset)
|
|
89
|
+
*/
|
|
90
|
+
readonly strict?: boolean;
|
|
91
|
+
/**
|
|
92
|
+
* Database connection. If provided, schemaVerify will connect before executing.
|
|
93
|
+
* If omitted, the client must already be connected.
|
|
94
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
95
|
+
*/
|
|
96
|
+
readonly connection?: unknown;
|
|
97
|
+
/** Optional progress callback for observing operation progress */
|
|
98
|
+
readonly onProgress?: OnControlProgress;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Options for the sign operation.
|
|
102
|
+
*/
|
|
103
|
+
export interface SignOptions {
|
|
104
|
+
/** Contract IR or unvalidated JSON - validated at runtime via familyInstance.validateContractIR() */
|
|
105
|
+
readonly contractIR: unknown;
|
|
106
|
+
/**
|
|
107
|
+
* Path to the contract file (for metadata in the result).
|
|
108
|
+
*/
|
|
109
|
+
readonly contractPath?: string;
|
|
110
|
+
/**
|
|
111
|
+
* Path to the config file (for metadata in the result).
|
|
112
|
+
*/
|
|
113
|
+
readonly configPath?: string;
|
|
114
|
+
/**
|
|
115
|
+
* Database connection. If provided, sign will connect before executing.
|
|
116
|
+
* If omitted, the client must already be connected.
|
|
117
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
118
|
+
*/
|
|
119
|
+
readonly connection?: unknown;
|
|
120
|
+
/** Optional progress callback for observing operation progress */
|
|
121
|
+
readonly onProgress?: OnControlProgress;
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Options for the dbInit operation.
|
|
125
|
+
*/
|
|
126
|
+
export interface DbInitOptions {
|
|
127
|
+
/** Contract IR or unvalidated JSON - validated at runtime via familyInstance.validateContractIR() */
|
|
128
|
+
readonly contractIR: unknown;
|
|
129
|
+
/**
|
|
130
|
+
* Mode for the dbInit operation.
|
|
131
|
+
* - 'plan': Returns planned operations without applying
|
|
132
|
+
* - 'apply': Applies operations and writes marker
|
|
133
|
+
*/
|
|
134
|
+
readonly mode: 'plan' | 'apply';
|
|
135
|
+
/**
|
|
136
|
+
* Database connection. If provided, dbInit will connect before executing.
|
|
137
|
+
* If omitted, the client must already be connected.
|
|
138
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
139
|
+
*/
|
|
140
|
+
readonly connection?: unknown;
|
|
141
|
+
/** Optional progress callback for observing operation progress */
|
|
142
|
+
readonly onProgress?: OnControlProgress;
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Options for the introspect operation.
|
|
146
|
+
*/
|
|
147
|
+
export interface IntrospectOptions {
|
|
148
|
+
/**
|
|
149
|
+
* Optional schema name to introspect.
|
|
150
|
+
*/
|
|
151
|
+
readonly schema?: string;
|
|
152
|
+
/**
|
|
153
|
+
* Database connection. If provided, introspect will connect before executing.
|
|
154
|
+
* If omitted, the client must already be connected.
|
|
155
|
+
* The type is driver-specific (e.g., string URL for Postgres).
|
|
156
|
+
*/
|
|
157
|
+
readonly connection?: unknown;
|
|
158
|
+
/** Optional progress callback for observing operation progress */
|
|
159
|
+
readonly onProgress?: OnControlProgress;
|
|
160
|
+
}
|
|
161
|
+
/**
|
|
162
|
+
* Contract source as a raw value (any JSON-serializable value).
|
|
163
|
+
*/
|
|
164
|
+
export interface ContractSourceValue {
|
|
165
|
+
readonly kind: 'value';
|
|
166
|
+
readonly value: unknown;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Contract source as a lazy loader function.
|
|
170
|
+
*/
|
|
171
|
+
export interface ContractSourceLoader {
|
|
172
|
+
readonly kind: 'loader';
|
|
173
|
+
readonly load: () => unknown | Promise<unknown>;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Discriminated union for contract source.
|
|
177
|
+
* Use `kind` to determine how to resolve the contract.
|
|
178
|
+
*/
|
|
179
|
+
export type EmitContractSource = ContractSourceValue | ContractSourceLoader;
|
|
180
|
+
/**
|
|
181
|
+
* Contract configuration for emit operation.
|
|
182
|
+
*/
|
|
183
|
+
export interface EmitContractConfig {
|
|
184
|
+
/**
|
|
185
|
+
* Contract source - either a raw value or a loader function.
|
|
186
|
+
* Switch on `source.kind` to determine how to resolve.
|
|
187
|
+
*/
|
|
188
|
+
readonly source: EmitContractSource;
|
|
189
|
+
/**
|
|
190
|
+
* Output path for contract.json.
|
|
191
|
+
* Should be an absolute or relative path.
|
|
192
|
+
*/
|
|
193
|
+
readonly output: string;
|
|
194
|
+
/**
|
|
195
|
+
* Output path for contract.d.ts.
|
|
196
|
+
* Should be an absolute or relative path.
|
|
197
|
+
*/
|
|
198
|
+
readonly types: string;
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Options for the emit operation.
|
|
202
|
+
*/
|
|
203
|
+
export interface EmitOptions {
|
|
204
|
+
/**
|
|
205
|
+
* Contract configuration containing source, output, and types paths.
|
|
206
|
+
*/
|
|
207
|
+
readonly contractConfig: EmitContractConfig;
|
|
208
|
+
/** Optional progress callback for observing operation progress */
|
|
209
|
+
readonly onProgress?: OnControlProgress;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* Successful dbInit result.
|
|
213
|
+
*/
|
|
214
|
+
export interface DbInitSuccess {
|
|
215
|
+
readonly mode: 'plan' | 'apply';
|
|
216
|
+
readonly plan: {
|
|
217
|
+
readonly operations: ReadonlyArray<{
|
|
218
|
+
readonly id: string;
|
|
219
|
+
readonly label: string;
|
|
220
|
+
readonly operationClass: string;
|
|
221
|
+
}>;
|
|
222
|
+
};
|
|
223
|
+
readonly execution?: {
|
|
224
|
+
readonly operationsPlanned: number;
|
|
225
|
+
readonly operationsExecuted: number;
|
|
226
|
+
};
|
|
227
|
+
readonly marker?: {
|
|
228
|
+
readonly coreHash: string;
|
|
229
|
+
readonly profileHash?: string;
|
|
230
|
+
};
|
|
231
|
+
readonly summary: string;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Failure codes for dbInit operation.
|
|
235
|
+
*/
|
|
236
|
+
export type DbInitFailureCode = 'PLANNING_FAILED' | 'MARKER_ORIGIN_MISMATCH' | 'RUNNER_FAILED';
|
|
237
|
+
/**
|
|
238
|
+
* Failure details for dbInit operation.
|
|
239
|
+
*/
|
|
240
|
+
export interface DbInitFailure {
|
|
241
|
+
readonly code: DbInitFailureCode;
|
|
242
|
+
readonly summary: string;
|
|
243
|
+
readonly why: string | undefined;
|
|
244
|
+
readonly conflicts: ReadonlyArray<MigrationPlannerConflict> | undefined;
|
|
245
|
+
readonly meta: Record<string, unknown> | undefined;
|
|
246
|
+
readonly marker?: {
|
|
247
|
+
readonly coreHash?: string;
|
|
248
|
+
readonly profileHash?: string;
|
|
249
|
+
};
|
|
250
|
+
readonly destination?: {
|
|
251
|
+
readonly coreHash: string;
|
|
252
|
+
readonly profileHash?: string | undefined;
|
|
253
|
+
};
|
|
254
|
+
}
|
|
255
|
+
/**
|
|
256
|
+
* Result type for dbInit operation.
|
|
257
|
+
* Uses Result pattern: success returns DbInitSuccess, failure returns DbInitFailure.
|
|
258
|
+
*/
|
|
259
|
+
export type DbInitResult = Result<DbInitSuccess, DbInitFailure>;
|
|
260
|
+
/**
|
|
261
|
+
* Successful emit result.
|
|
262
|
+
* Contains the hashes and paths of emitted files.
|
|
263
|
+
*/
|
|
264
|
+
export interface EmitSuccess {
|
|
265
|
+
/** Core hash of the emitted contract */
|
|
266
|
+
readonly coreHash: string;
|
|
267
|
+
/** Profile hash of the emitted contract (target-specific) */
|
|
268
|
+
readonly profileHash: string;
|
|
269
|
+
/** The emitted contract as JSON string */
|
|
270
|
+
readonly contractJson: string;
|
|
271
|
+
/** The emitted contract TypeScript declarations */
|
|
272
|
+
readonly contractDts: string;
|
|
273
|
+
}
|
|
274
|
+
/**
|
|
275
|
+
* Failure codes for emit operation.
|
|
276
|
+
*/
|
|
277
|
+
export type EmitFailureCode = 'CONTRACT_SOURCE_INVALID' | 'EMIT_FAILED';
|
|
278
|
+
/**
|
|
279
|
+
* Failure details for emit operation.
|
|
280
|
+
*/
|
|
281
|
+
export interface EmitFailure {
|
|
282
|
+
readonly code: EmitFailureCode;
|
|
283
|
+
readonly summary: string;
|
|
284
|
+
readonly why: string | undefined;
|
|
285
|
+
readonly meta: Record<string, unknown> | undefined;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Result type for emit operation.
|
|
289
|
+
* Uses Result pattern: success returns EmitSuccess, failure returns EmitFailure.
|
|
290
|
+
*/
|
|
291
|
+
export type EmitResult = Result<EmitSuccess, EmitFailure>;
|
|
292
|
+
/**
|
|
293
|
+
* Programmatic control client for Prisma Next operations.
|
|
294
|
+
*
|
|
295
|
+
* Lifecycle: `connect(connection)` before operations, `close()` when done.
|
|
296
|
+
* Both `init()` and `connect()` are auto-called by operations if needed,
|
|
297
|
+
* but `connect()` requires a connection so must be called explicitly first
|
|
298
|
+
* unless a default connection was provided in options.
|
|
299
|
+
*
|
|
300
|
+
* @see README.md "Programmatic Control API" section for usage examples
|
|
301
|
+
*/
|
|
302
|
+
export interface ControlClient {
|
|
303
|
+
/**
|
|
304
|
+
* Initializes the client by creating the control plane stack,
|
|
305
|
+
* family instance, and validating framework components.
|
|
306
|
+
*
|
|
307
|
+
* Idempotent (safe to call multiple times).
|
|
308
|
+
* Called automatically by `connect()` if not already initialized.
|
|
309
|
+
*/
|
|
310
|
+
init(): void;
|
|
311
|
+
/**
|
|
312
|
+
* Establishes a database connection.
|
|
313
|
+
* Auto-calls `init()` if not already initialized.
|
|
314
|
+
* Must be called before any database operations unless a default connection
|
|
315
|
+
* was provided in options.
|
|
316
|
+
*
|
|
317
|
+
* @param connection - Driver-specific connection input (e.g., URL string for Postgres).
|
|
318
|
+
* If omitted, uses the default connection from options (if provided).
|
|
319
|
+
* @throws If connection fails, already connected, driver is not configured,
|
|
320
|
+
* or no connection provided and no default connection in options.
|
|
321
|
+
*/
|
|
322
|
+
connect(connection?: unknown): Promise<void>;
|
|
323
|
+
/**
|
|
324
|
+
* Closes the database connection.
|
|
325
|
+
* Idempotent (safe to call multiple times).
|
|
326
|
+
* After close(), can call `connect()` again with same or different URL.
|
|
327
|
+
*/
|
|
328
|
+
close(): Promise<void>;
|
|
329
|
+
/**
|
|
330
|
+
* Verifies database marker matches the contract.
|
|
331
|
+
* Compares coreHash and profileHash.
|
|
332
|
+
*
|
|
333
|
+
* @returns Structured result (ok: false for mismatch, not throwing)
|
|
334
|
+
* @throws If not connected or infrastructure failure
|
|
335
|
+
*/
|
|
336
|
+
verify(options: VerifyOptions): Promise<VerifyDatabaseResult>;
|
|
337
|
+
/**
|
|
338
|
+
* Verifies database schema satisfies the contract requirements.
|
|
339
|
+
*
|
|
340
|
+
* @param options.strict - If true, extra tables/columns are issues. Default: false
|
|
341
|
+
* @returns Structured result with schema issues
|
|
342
|
+
* @throws If not connected or infrastructure failure
|
|
343
|
+
*/
|
|
344
|
+
schemaVerify(options: SchemaVerifyOptions): Promise<VerifyDatabaseSchemaResult>;
|
|
345
|
+
/**
|
|
346
|
+
* Signs the database with a contract marker.
|
|
347
|
+
* Writes or updates the contract marker if schema verification passes.
|
|
348
|
+
* Idempotent (no-op if marker already matches).
|
|
349
|
+
*
|
|
350
|
+
* @returns Structured result
|
|
351
|
+
* @throws If not connected or infrastructure failure
|
|
352
|
+
*/
|
|
353
|
+
sign(options: SignOptions): Promise<SignDatabaseResult>;
|
|
354
|
+
/**
|
|
355
|
+
* Initializes database schema from contract.
|
|
356
|
+
* Uses additive-only policy (no destructive changes).
|
|
357
|
+
*
|
|
358
|
+
* @param options.mode - 'plan' to preview, 'apply' to execute
|
|
359
|
+
* @returns Result pattern: Ok with planned/executed operations, NotOk with failure details
|
|
360
|
+
* @throws If not connected, target doesn't support migrations, or infrastructure failure
|
|
361
|
+
*/
|
|
362
|
+
dbInit(options: DbInitOptions): Promise<DbInitResult>;
|
|
363
|
+
/**
|
|
364
|
+
* Introspects the database schema.
|
|
365
|
+
*
|
|
366
|
+
* @returns Raw schema IR
|
|
367
|
+
* @throws If not connected or infrastructure failure
|
|
368
|
+
*/
|
|
369
|
+
introspect(options?: IntrospectOptions): Promise<unknown>;
|
|
370
|
+
/**
|
|
371
|
+
* Converts a schema IR to a schema view for CLI tree rendering.
|
|
372
|
+
* Delegates to the family instance's toSchemaView method.
|
|
373
|
+
*
|
|
374
|
+
* @param schemaIR - The schema IR from introspect()
|
|
375
|
+
* @returns CoreSchemaView if the family supports it, undefined otherwise
|
|
376
|
+
*/
|
|
377
|
+
toSchemaView(schemaIR: unknown): CoreSchemaView | undefined;
|
|
378
|
+
/**
|
|
379
|
+
* Emits the contract to JSON and TypeScript declarations.
|
|
380
|
+
* This is an offline operation that does NOT require a database connection.
|
|
381
|
+
* Uses `init()` to create the stack but does NOT call `connect()`.
|
|
382
|
+
*
|
|
383
|
+
* @returns Result pattern: Ok with emit details, NotOk with failure details
|
|
384
|
+
*/
|
|
385
|
+
emit(options: EmitOptions): Promise<EmitResult>;
|
|
386
|
+
}
|
|
387
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/control-api/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6CAA6C,CAAC;AAClF,OAAO,KAAK,EACV,wBAAwB,EACxB,uBAAuB,EACvB,0BAA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MG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC;IAE9D;;;;;;OAMG;IACH,YAAY,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAEhF;;;;;;;OAOG;IACH,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;IAExD;;;;;;;OAOG;IACH,MAAM,CAAC,OAAO,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC;IAEtD;;;;;OAKG;IACH,UAAU,CAAC,OAAO,CAAC,EAAE,iBAAiB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE1D;;;;;;OAMG;IACH,YAAY,CAAC,QAAQ,EAAE,OAAO,GAAG,cAAc,GAAG,SAAS,CAAC;IAE5D;;;;;;OAMG;IACH,IAAI,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;CACjD"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config-types.d.ts","sourceRoot":"","sources":["../../src/exports/config-types.ts"],"names":[],"mappings":"AACA,YAAY,EACV,cAAc,EACd,gBAAgB,GACjB,MAAM,8CAA8C,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,8CAA8C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../src/exports/config-types.ts"],"sourcesContent":["// Re-export core-control-plane config types for convenience\nexport type {\n ContractConfig,\n PrismaNextConfig,\n} from '@prisma-next/core-control-plane/config-types';\nexport { defineConfig } from '@prisma-next/core-control-plane/config-types';\n"],"mappings":";AAKA,SAAS,oBAAoB;","names":[]}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Programmatic Control API for Prisma Next.
|
|
3
|
+
*
|
|
4
|
+
* This module exports the control client factory and types for programmatic
|
|
5
|
+
* access to control-plane operations without using the CLI.
|
|
6
|
+
*
|
|
7
|
+
* @see README.md "Programmatic Control API" section for usage examples
|
|
8
|
+
* @module
|
|
9
|
+
*/
|
|
10
|
+
export type { ControlPlaneStack, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult, } from '@prisma-next/core-control-plane/types';
|
|
11
|
+
export { createControlClient } from '../control-api/client';
|
|
12
|
+
export type { ContractSourceLoader, ContractSourceValue, ControlActionName, ControlClient, ControlClientOptions, ControlProgressEvent, DbInitFailure, DbInitFailureCode, DbInitOptions, DbInitResult, DbInitSuccess, EmitContractConfig, EmitContractSource, EmitFailure, EmitFailureCode, EmitOptions, EmitResult, EmitSuccess, IntrospectOptions, OnControlProgress, SchemaVerifyOptions, SignOptions, VerifyOptions, } from '../control-api/types';
|
|
13
|
+
//# sourceMappingURL=control-api.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-api.d.ts","sourceRoot":"","sources":["../../src/exports/control-api.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,YAAY,EACV,iBAAiB,EACjB,kBAAkB,EAClB,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAG5D,YAAY,EACV,oBAAoB,EACpB,mBAAmB,EACnB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,aAAa,EACb,kBAAkB,EAClB,kBAAkB,EAClB,WAAW,EACX,eAAe,EACf,WAAW,EACX,UAAU,EACV,WAAW,EACX,iBAAiB,EACjB,iBAAiB,EACjB,mBAAmB,EACnB,WAAW,EACX,aAAa,GACd,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/exports/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,yBAAyB,EAAE,MAAM,2BAA2B,CAAC;AACtE,YAAY,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC"}
|