@prisma/migrate 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.5 → 6.6.0-integration-mcp.4
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/bin.js +7 -7
- package/dist/{chunk-ZB5NPOJW.js → chunk-4RKCE4QB.js} +85 -3
- package/dist/{chunk-XPDKMCDT.js → chunk-FOJ77XJL.js} +27 -160
- package/dist/{chunk-L53C3AX3.js → chunk-QSSFEJHM.js} +26 -159
- package/dist/{chunk-TGV6QGEF.js → chunk-QVMYNWAN.js} +191 -37
- package/dist/{chunk-QJT4H5N6.js → chunk-ZJ4IDCRR.js} +4 -4
- package/dist/commands/DbPull.js +3 -3
- package/dist/commands/MigrateDiff.js +3 -3
- package/dist/index.js +7 -10
- package/dist/internals/src/cli/directoryConfig.d.ts +1 -1
- package/dist/internals/src/cli/getSchema.d.ts +3 -28
- package/dist/internals/src/cli/hashes.d.ts +1 -2
- package/dist/internals/src/cli/schemaContext.d.ts +4 -3
- package/dist/internals/src/index.d.ts +1 -1
- package/dist/migrate/src/index.d.ts +0 -1
- package/dist/utils/setupCockroach.js +2 -2
- package/dist/utils/setupMSSQL.js +763 -67
- package/dist/utils/setupPostgres.js +2 -2
- package/package.json +8 -8
- package/dist/chunk-GKDFIHM2.js +0 -45
- package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
- package/dist/utils/getSchemaPathAndPrint.js +0 -27
|
@@ -1,31 +1,10 @@
|
|
|
1
1
|
import type { GetSchemaResult, SuccessfulLookupResult } from '@prisma/schema-files-loader';
|
|
2
|
-
import type { MultipleSchemas } from '../utils/schemaFileInput';
|
|
3
2
|
type PackageJsonLookupResult = SuccessfulLookupResult | {
|
|
4
3
|
ok: false;
|
|
5
4
|
error: {
|
|
6
5
|
kind: 'PackageJsonNotConfigured';
|
|
7
6
|
};
|
|
8
7
|
};
|
|
9
|
-
export type SchemaPathFromConfig = {
|
|
10
|
-
/**
|
|
11
|
-
* Tell Prisma to use a single `.prisma` schema file.
|
|
12
|
-
*/
|
|
13
|
-
kind: 'single';
|
|
14
|
-
/**
|
|
15
|
-
* The path to a single `.prisma` schema file.
|
|
16
|
-
*/
|
|
17
|
-
filePath: string;
|
|
18
|
-
} | {
|
|
19
|
-
/**
|
|
20
|
-
* Tell Prisma to use multiple `.prisma` schema files, via the `prismaSchemaFolder` preview feature.
|
|
21
|
-
*/
|
|
22
|
-
kind: 'multi';
|
|
23
|
-
/**
|
|
24
|
-
* The path to a folder containing multiple `.prisma` schema files.
|
|
25
|
-
* All of the files in this folder will be used.
|
|
26
|
-
*/
|
|
27
|
-
folderPath: string;
|
|
28
|
-
};
|
|
29
8
|
export type GetSchemaOptions = {
|
|
30
9
|
cwd?: string;
|
|
31
10
|
argumentName?: string;
|
|
@@ -36,7 +15,7 @@ export type GetSchemaOptions = {
|
|
|
36
15
|
* @param schemaPathFromConfig
|
|
37
16
|
* @param opts
|
|
38
17
|
*/
|
|
39
|
-
export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPathFromConfig?:
|
|
18
|
+
export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPathFromConfig?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult>;
|
|
40
19
|
/**
|
|
41
20
|
* Loads the schema, returns null if it is not found
|
|
42
21
|
* Throws an error if schema is specified explicitly in
|
|
@@ -47,7 +26,8 @@ export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPat
|
|
|
47
26
|
* @param opts
|
|
48
27
|
* @returns
|
|
49
28
|
*/
|
|
50
|
-
export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?:
|
|
29
|
+
export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
|
|
30
|
+
export declare function printSchemaLoadedMessage(schemaPath: string): void;
|
|
51
31
|
export type PrismaConfig = {
|
|
52
32
|
schema?: string;
|
|
53
33
|
seed?: string;
|
|
@@ -57,9 +37,4 @@ export declare function getPrismaConfigFromPackageJson(cwd: string): Promise<{
|
|
|
57
37
|
packagePath: string;
|
|
58
38
|
} | null>;
|
|
59
39
|
export declare function getSchemaFromPackageJson(cwd: string): Promise<PackageJsonLookupResult>;
|
|
60
|
-
/**
|
|
61
|
-
* Small helper that returns the directory which contains the `schema.prisma` file
|
|
62
|
-
*/
|
|
63
|
-
export declare function getSchemaDir(schemaPathFromArgs?: string): Promise<string | null>;
|
|
64
|
-
export declare function getSchema(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig): Promise<MultipleSchemas>;
|
|
65
40
|
export {};
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
import { type SchemaPathFromConfig } from './getSchema';
|
|
2
1
|
/**
|
|
3
2
|
* Get a unique identifier for the project by hashing
|
|
4
3
|
* the directory with `schema.prisma`
|
|
5
4
|
*/
|
|
6
|
-
export declare function getProjectHash(schemaPathFromArgs: string | undefined, schemaPathFromConfig:
|
|
5
|
+
export declare function getProjectHash(schemaPathFromArgs: string | undefined, schemaPathFromConfig: string | undefined): Promise<string>;
|
|
7
6
|
/**
|
|
8
7
|
* Get a unique identifier for the CLI installation path
|
|
9
8
|
* which can be either global or local (in project's node_modules)
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { DataSource, GeneratorConfig } from '@prisma/generator';
|
|
2
2
|
import { GetSchemaResult, LoadedFile } from '@prisma/schema-files-loader';
|
|
3
|
-
import { SchemaPathFromConfig } from './getSchema';
|
|
4
3
|
export type SchemaContext = {
|
|
5
4
|
/**
|
|
6
5
|
* All loaded schema files and their paths.
|
|
@@ -40,19 +39,21 @@ export type SchemaContext = {
|
|
|
40
39
|
};
|
|
41
40
|
type LoadSchemaContextOptions = {
|
|
42
41
|
schemaPathFromArg?: string;
|
|
43
|
-
schemaPathFromConfig?:
|
|
42
|
+
schemaPathFromConfig?: string;
|
|
44
43
|
printLoadMessage?: boolean;
|
|
45
44
|
ignoreEnvVarErrors?: boolean;
|
|
46
45
|
allowNull?: boolean;
|
|
47
46
|
schemaPathArgumentName?: string;
|
|
47
|
+
cwd?: string;
|
|
48
48
|
};
|
|
49
49
|
export declare function loadSchemaContext(opts: LoadSchemaContextOptions & {
|
|
50
50
|
allowNull: true;
|
|
51
51
|
}): Promise<SchemaContext | null>;
|
|
52
52
|
export declare function loadSchemaContext(opts?: LoadSchemaContextOptions): Promise<SchemaContext>;
|
|
53
|
-
export declare function processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, }: {
|
|
53
|
+
export declare function processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, cwd, }: {
|
|
54
54
|
schemaResult: GetSchemaResult;
|
|
55
55
|
printLoadMessage?: boolean;
|
|
56
56
|
ignoreEnvVarErrors?: boolean;
|
|
57
|
+
cwd?: string;
|
|
57
58
|
}): Promise<SchemaContext>;
|
|
58
59
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { checkUnsupportedDataProxy } from './cli/checkUnsupportedDataProxy';
|
|
2
2
|
export { type DirectoryConfig, inferDirectoryConfig } from './cli/directoryConfig';
|
|
3
3
|
export { getGeneratorSuccessMessage } from './cli/getGeneratorSuccessMessage';
|
|
4
|
-
export { getPrismaConfigFromPackageJson,
|
|
4
|
+
export { getPrismaConfigFromPackageJson, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, printSchemaLoadedMessage, } from './cli/getSchema';
|
|
5
5
|
export { getTypescriptVersion } from './cli/getTypescriptVersion';
|
|
6
6
|
export { getCLIPathHash, getProjectHash } from './cli/hashes';
|
|
7
7
|
export { unknownCommand } from './cli/Help';
|
|
@@ -16,5 +16,4 @@ export { SchemaEngine } from './SchemaEngine';
|
|
|
16
16
|
export * from './types';
|
|
17
17
|
export { default as byline } from './utils/byline';
|
|
18
18
|
export { getDatabaseVersionSafe } from './utils/getDatabaseVersionSafe';
|
|
19
|
-
export { getSchemaPathAndPrint, printSchemaLoadedMessage } from './utils/getSchemaPathAndPrint';
|
|
20
19
|
export { introspectSql, type IntrospectSqlError, type IntrospectSqlInput, type IntrospectSqlResult, } from './utils/introspectSql';
|
|
@@ -32,12 +32,12 @@ __export(setupCockroach_exports, {
|
|
|
32
32
|
tearDownCockroach: () => tearDownCockroach
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(setupCockroach_exports);
|
|
35
|
-
var
|
|
35
|
+
var import_chunk_QVMYNWAN = require("../chunk-QVMYNWAN.js");
|
|
36
36
|
var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
|
|
37
37
|
var import_internals = require("@prisma/internals");
|
|
38
38
|
var import_fs = __toESM(require("fs"));
|
|
39
39
|
var import_path = __toESM(require("path"));
|
|
40
|
-
var import_pg = (0, import_chunk_2ESYSVXG.__toESM)((0,
|
|
40
|
+
var import_pg = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_QVMYNWAN.require_lib)());
|
|
41
41
|
async function setupCockroach(options) {
|
|
42
42
|
const { connectionString } = options;
|
|
43
43
|
const { dirname } = options;
|