@prisma/migrate 6.4.0-dev.53 → 6.4.0-dev.55

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.
Files changed (33) hide show
  1. package/dist/bin.js +31 -31
  2. package/dist/{chunk-YCTXXWZO.js → chunk-44CQ6EM2.js} +41 -12
  3. package/dist/{chunk-VGYN2FAS.js → chunk-7VT3JAGL.js} +7 -7
  4. package/dist/{chunk-QV7SOU3V.js → chunk-A22PVITU.js} +4 -4
  5. package/dist/{chunk-FM4XJBEM.js → chunk-F7CBUAEF.js} +7 -7
  6. package/dist/{chunk-JYXY3OJ6.js → chunk-FYKYZQP6.js} +7 -7
  7. package/dist/{chunk-N3AT4GUM.js → chunk-I5HMDWUT.js} +7 -7
  8. package/dist/{chunk-DGMFIU5S.js → chunk-L7IZKRXP.js} +42 -13
  9. package/dist/{chunk-EYA6AFSF.js → chunk-M5YNQ2NP.js} +5 -5
  10. package/dist/{chunk-T6Y2635A.js → chunk-QJ24Y4KM.js} +7 -7
  11. package/dist/{chunk-EDQWDMXR.js → chunk-SVJJPONC.js} +8 -8
  12. package/dist/{chunk-REKABZBY.js → chunk-Y53OMBJY.js} +8 -8
  13. package/dist/{chunk-KW5YM5ZK.js → chunk-Z5IS6SF4.js} +7 -7
  14. package/dist/{chunk-LPSZG4BL.js → chunk-ZDMMWLNL.js} +12 -12
  15. package/dist/commands/DbDrop.js +3 -3
  16. package/dist/commands/DbExecute.js +3 -3
  17. package/dist/commands/DbPull.js +3 -3
  18. package/dist/commands/DbPush.js +4 -4
  19. package/dist/commands/DbSeed.js +3 -3
  20. package/dist/commands/MigrateDeploy.js +4 -4
  21. package/dist/commands/MigrateDev.js +4 -4
  22. package/dist/commands/MigrateDiff.js +3 -3
  23. package/dist/commands/MigrateReset.js +4 -4
  24. package/dist/commands/MigrateResolve.js +4 -4
  25. package/dist/commands/MigrateStatus.js +4 -4
  26. package/dist/index.js +36 -36
  27. package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +2 -1
  28. package/dist/internals/src/cli/getSchema.d.ts +27 -6
  29. package/dist/internals/src/cli/hashes.d.ts +2 -1
  30. package/dist/internals/src/index.d.ts +1 -1
  31. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +3 -3
  32. package/dist/utils/getSchemaPathAndPrint.js +4 -4
  33. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- import type { GetSchemaResult, LookupResult, SuccessfulLookupResult } from '@prisma/schema-files-loader';
1
+ import type { GetSchemaResult, SuccessfulLookupResult } from '@prisma/schema-files-loader';
2
2
  import type { MultipleSchemas } from '../utils/schemaFileInput';
3
3
  type PackageJsonLookupResult = SuccessfulLookupResult | {
4
4
  ok: false;
@@ -6,6 +6,26 @@ type PackageJsonLookupResult = SuccessfulLookupResult | {
6
6
  kind: 'PackageJsonNotConfigured';
7
7
  };
8
8
  };
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
+ filenamePath: 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
+ folder: string;
28
+ };
9
29
  export type GetSchemaOptions = {
10
30
  cwd?: string;
11
31
  argumentName?: string;
@@ -13,20 +33,21 @@ export type GetSchemaOptions = {
13
33
  /**
14
34
  * Loads the schema, throws an error if it is not found
15
35
  * @param schemaPathFromArgs
36
+ * @param schemaPathFromConfig
16
37
  * @param opts
17
38
  */
18
- export declare function getSchemaWithPath(schemaPathFromArgs?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult>;
39
+ export declare function getSchemaWithPath(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult>;
19
40
  /**
20
41
  * Loads the schema, returns null if it is not found
21
42
  * Throws an error if schema is specified explicitly in
22
43
  * any of the available ways (argument, package.json config), but
23
44
  * can not be loaded
24
45
  * @param schemaPathFromArgs
25
- * @param param1
46
+ * @param schemaPathFromConfig
47
+ * @param opts
26
48
  * @returns
27
49
  */
28
- export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
29
- export declare function readSchemaFromSingleFile(schemaPath: string): Promise<LookupResult>;
50
+ export declare function getSchemaWithPathOptional(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig, { cwd, argumentName }?: GetSchemaOptions): Promise<GetSchemaResult | null>;
30
51
  export type PrismaConfig = {
31
52
  schema?: string;
32
53
  seed?: string;
@@ -40,5 +61,5 @@ export declare function getSchemaFromPackageJson(cwd: string): Promise<PackageJs
40
61
  * Small helper that returns the directory which contains the `schema.prisma` file
41
62
  */
42
63
  export declare function getSchemaDir(schemaPathFromArgs?: string): Promise<string | null>;
43
- export declare function getSchema(schemaPathFromArgs?: string): Promise<MultipleSchemas>;
64
+ export declare function getSchema(schemaPathFromArgs?: string, schemaPathFromConfig?: SchemaPathFromConfig): Promise<MultipleSchemas>;
44
65
  export {};
@@ -1,8 +1,9 @@
1
+ import { type SchemaPathFromConfig } from './getSchema';
1
2
  /**
2
3
  * Get a unique identifier for the project by hashing
3
4
  * the directory with `schema.prisma`
4
5
  */
5
- export declare function getProjectHash(): Promise<string>;
6
+ export declare function getProjectHash(schemaPathFromArgs: string | undefined, schemaPathFromConfig: SchemaPathFromConfig | undefined): Promise<string>;
6
7
  /**
7
8
  * Get a unique identifier for the CLI installation path
8
9
  * which can be either global or local (in project's node_modules)
@@ -1,6 +1,6 @@
1
1
  export { checkUnsupportedDataProxy } from './cli/checkUnsupportedDataProxy';
2
2
  export { getGeneratorSuccessMessage } from './cli/getGeneratorSuccessMessage';
3
- export { getPrismaConfigFromPackageJson, getSchema, getSchemaDir, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, } from './cli/getSchema';
3
+ export { getPrismaConfigFromPackageJson, getSchema, getSchemaDir, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, type SchemaPathFromConfig, } from './cli/getSchema';
4
4
  export { getTypescriptVersion } from './cli/getTypescriptVersion';
5
5
  export { getCLIPathHash, getProjectHash } from './cli/hashes';
6
6
  export { unknownCommand } from './cli/Help';
@@ -1,10 +1,10 @@
1
- import { GetSchemaOptions, type GetSchemaResult } from '@prisma/internals';
1
+ import { type GetSchemaOptions, type GetSchemaResult, type SchemaPathFromConfig } from '@prisma/internals';
2
2
  /**
3
3
  * If a path is provided checks that it exists or error
4
4
  * If no path provided check in default location(s) or error
5
- * Schema found: print to console it's relative path
5
+ * Schema found: print to console its relative path
6
6
  *
7
7
  * @returns {GetSchemaResult}
8
8
  */
9
- export declare function getSchemaPathAndPrint(schemaPathProvided?: string, options?: GetSchemaOptions): Promise<GetSchemaResult>;
9
+ export declare function getSchemaPathAndPrint(schemaPathProvided?: string, schemaPathFromConfig?: SchemaPathFromConfig, options?: GetSchemaOptions): Promise<GetSchemaResult>;
10
10
  export declare function printSchemaLoadedMessage(schemaPath: string): void;
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var getSchemaPathAndPrint_exports = {};
20
20
  __export(getSchemaPathAndPrint_exports, {
21
- getSchemaPathAndPrint: () => import_chunk_EYA6AFSF.getSchemaPathAndPrint,
22
- printSchemaLoadedMessage: () => import_chunk_EYA6AFSF.printSchemaLoadedMessage
21
+ getSchemaPathAndPrint: () => import_chunk_M5YNQ2NP.getSchemaPathAndPrint,
22
+ printSchemaLoadedMessage: () => import_chunk_M5YNQ2NP.printSchemaLoadedMessage
23
23
  });
24
24
  module.exports = __toCommonJS(getSchemaPathAndPrint_exports);
25
- var import_chunk_EYA6AFSF = require("../chunk-EYA6AFSF.js");
25
+ var import_chunk_M5YNQ2NP = require("../chunk-M5YNQ2NP.js");
26
26
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
27
27
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
28
- (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
28
+ (0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/migrate",
3
- "version": "6.4.0-dev.53",
3
+ "version": "6.4.0-dev.55",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/migrate/src/index.d.ts",
@@ -55,13 +55,13 @@
55
55
  "@prisma/internals": "*"
56
56
  },
57
57
  "dependencies": {
58
- "@prisma/engines-version": "6.4.0-25.613555cc0d9606bc115972eeb42c9127e09d23d3",
58
+ "@prisma/engines-version": "6.4.0-26.7e7c9b8394a8c99732582d1f3b0646e95e351267",
59
59
  "prompts": "2.4.2",
60
- "@prisma/config": "6.4.0-dev.53",
61
- "@prisma/generator-helper": "6.4.0-dev.53",
62
- "@prisma/debug": "6.4.0-dev.53",
63
- "@prisma/get-platform": "6.4.0-dev.53",
64
- "@prisma/internals": "6.4.0-dev.53"
60
+ "@prisma/config": "6.4.0-dev.55",
61
+ "@prisma/debug": "6.4.0-dev.55",
62
+ "@prisma/generator-helper": "6.4.0-dev.55",
63
+ "@prisma/get-platform": "6.4.0-dev.55",
64
+ "@prisma/internals": "6.4.0-dev.55"
65
65
  },
66
66
  "files": [
67
67
  "README.md",