@prisma/migrate 6.6.0-dev.7 → 6.6.0-dev.70
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/CLI.js +3 -3
- package/dist/Migrate.js +8 -6
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +47 -46
- package/dist/chunk-23DZXSTI.js +62 -0
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/chunk-33LPBNDX.js +1399 -0
- package/dist/{chunk-P6I3Y7KI.js → chunk-4ACBW57A.js} +371 -530
- package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
- package/dist/{chunk-IR55GBON.js → chunk-5LTDMS3H.js} +18 -18
- package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
- package/dist/{chunk-Q3ZLC44N.js → chunk-63X7FE2R.js} +57 -66
- package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
- package/dist/{chunk-N4XTKFY6.js → chunk-7RM467G7.js} +39 -38
- package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
- package/dist/{chunk-A6PMXMMT.js → chunk-AUGZZ6RT.js} +105 -13
- package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
- package/dist/{chunk-ZOEKRXDP.js → chunk-D2DGSPW6.js} +29 -55
- package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
- package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
- package/dist/{chunk-HCBZB4XC.js → chunk-FFPSJTA6.js} +53 -52
- package/dist/{chunk-N3KYWSX2.js → chunk-FZGPSDP7.js} +55 -49
- package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
- package/dist/{chunk-3GHGKOL4.js → chunk-KJGJMCHL.js} +370 -529
- package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
- package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
- package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
- package/dist/{chunk-MKK3GSDF.js → chunk-NIKXBMZL.js} +5 -5
- package/dist/{chunk-GG54LOYV.js → chunk-O6RQXRWU.js} +45 -44
- package/dist/{chunk-MATFO4ZW.js → chunk-OEWQACEH.js} +38 -39
- package/dist/{chunk-EGPJABTW.js → chunk-QVMYNWAN.js} +257 -103
- package/dist/{chunk-V5TUSOJX.js → chunk-SQKGZVG3.js} +45 -45
- package/dist/{chunk-CQZFVAXC.js → chunk-TN7JMNXD.js} +42 -41
- package/dist/chunk-URKH6SE2.js +479 -0
- package/dist/chunk-V6PVGSDJ.js +76 -0
- package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
- package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
- package/dist/{chunk-KS7IEA6Z.js → chunk-YGBJA7QJ.js} +50 -52
- package/dist/{chunk-WI2A2TQE.js → chunk-ZJ4IDCRR.js} +90 -91
- package/dist/chunk-ZLHWX5PJ.js +883 -0
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +4 -5
- package/dist/commands/DbExecute.js +9 -7
- package/dist/commands/DbPull.js +11 -10
- package/dist/commands/DbPush.js +10 -9
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +12 -11
- package/dist/commands/MigrateDev.js +14 -13
- package/dist/commands/MigrateDiff.js +12 -10
- package/dist/commands/MigrateReset.js +13 -12
- package/dist/commands/MigrateResolve.js +10 -9
- package/dist/commands/MigrateStatus.js +10 -9
- package/dist/index.js +50 -51
- package/dist/internals/src/Generator.d.ts +23 -5
- package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +12 -17
- package/dist/internals/src/cli/directoryConfig.d.ts +7 -0
- 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 +59 -0
- package/dist/internals/src/client/getClientEngineType.d.ts +1 -1
- package/dist/internals/src/convertCredentials.d.ts +1 -1
- package/dist/internals/src/engine-commands/getConfig.d.ts +1 -5
- package/dist/internals/src/engine-commands/getDmmf.d.ts +3 -6
- package/dist/internals/src/engine-commands/lintSchema.d.ts +1 -1
- package/dist/internals/src/errorReporting.d.ts +0 -1
- package/dist/internals/src/get-generators/getGenerators.d.ts +22 -9
- package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
- package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
- package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +1 -1
- package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
- package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
- package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +1 -1
- package/dist/internals/src/index.d.ts +7 -7
- package/dist/internals/src/migrateTypes.d.ts +63 -0
- package/dist/internals/src/panic.d.ts +1 -4
- package/dist/internals/src/resolvePkg.d.ts +7 -0
- package/dist/internals/src/types.d.ts +1 -1
- package/dist/internals/src/utils/extractPreviewFeatures.d.ts +2 -2
- package/dist/internals/src/utils/getEnvPaths.d.ts +1 -1
- package/dist/internals/src/utils/parseEnvValue.d.ts +1 -1
- package/dist/internals/src/utils/schemaFileInput.d.ts +0 -4
- package/dist/internals/src/utils/toSchemasContainer.d.ts +2 -3
- package/dist/migrate/src/Migrate.d.ts +7 -5
- package/dist/migrate/src/SchemaEngine.d.ts +5 -9
- package/dist/migrate/src/index.d.ts +0 -1
- package/dist/migrate/src/types.d.ts +14 -10
- package/dist/migrate/src/utils/createMigration.d.ts +21 -0
- package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
- package/dist/migrate/src/utils/introspectSql.d.ts +3 -2
- package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
- package/dist/migrate/src/utils/printDatasources.d.ts +1 -1
- package/dist/migrate/src/utils/seed.d.ts +0 -2
- package/dist/migrate/src/views/handleViewsIO.d.ts +2 -2
- package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
- package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
- package/dist/types.js +1 -1
- package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
- package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
- package/dist/utils/byline.js +1 -1
- package/dist/utils/captureStdout.js +3 -3
- package/dist/utils/countModelsAndTypes.js +1 -1
- package/dist/utils/{getSchemaPathAndPrint.js → createMigration.js} +8 -8
- package/dist/utils/customColors.js +1 -1
- package/dist/utils/ensureDatabaseExists.js +7 -7
- package/dist/utils/errors.js +1 -1
- package/dist/utils/flagErrors.js +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/handleEvaluateDataloss.js +1 -1
- package/dist/utils/introspectSql.js +5 -5
- package/dist/utils/isSchemaEmpty.js +1 -1
- package/dist/utils/listMigrations.js +25 -0
- package/dist/utils/now.js +1 -1
- package/dist/utils/printDatasource.js +1 -1
- package/dist/utils/printDatasources.js +5 -5
- package/dist/utils/printFiles.js +5 -5
- package/dist/utils/printIntrospectedSchema.js +1 -1
- package/dist/utils/printMigrationId.js +1 -1
- package/dist/utils/promptForMigrationName.js +3 -3
- package/dist/utils/removeSchemaFiles.js +1 -1
- package/dist/utils/replaceOrAddDatasource.js +1 -1
- package/dist/utils/replaceOrAddDatasource.test.js +1 -1
- package/dist/utils/saveSchemaFiles.js +1 -1
- package/dist/utils/seed.js +4 -7
- package/dist/utils/setupCockroach.js +3 -3
- package/dist/utils/setupMSSQL.js +1478 -707
- package/dist/utils/setupMongo.js +553 -552
- package/dist/utils/setupMysql.js +508 -563
- package/dist/utils/setupPostgres.js +3 -3
- package/dist/utils/spinner.js +4 -3
- package/dist/utils/test-handlePanic.js +1 -30
- package/dist/utils/unixSocket.js +1 -1
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +11 -11
- package/dist/chunk-GKDFIHM2.js +0 -45
- package/dist/chunk-J46BJQHT.js +0 -268
- package/dist/chunk-KOF4LGTS.js +0 -1817
- package/dist/chunk-YYPMC5FN.js +0 -1407
- package/dist/internals/src/get-generators/generatorResolvers/generatorResolvers.d.ts +0 -15
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +0 -6
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +0 -9
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +0 -8
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +0 -6
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +0 -1
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +0 -20
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +0 -7
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +0 -20
- package/dist/internals/src/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
- package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
|
@@ -16,16 +16,16 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_KRQEFTDT_exports = {};
|
|
20
|
+
__export(chunk_KRQEFTDT_exports, {
|
|
21
21
|
printFiles: () => printFiles,
|
|
22
22
|
printFilesFromMigrationIds: () => printFilesFromMigrationIds
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_KRQEFTDT_exports);
|
|
25
25
|
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
26
|
-
var
|
|
27
|
-
var
|
|
28
|
-
var import_indent_string = (0,
|
|
26
|
+
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
|
27
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
28
|
+
var import_indent_string = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_2R6DII47.require_indent_string)());
|
|
29
29
|
function printFiles(printPath, files) {
|
|
30
30
|
const fileNames = Object.keys(files);
|
|
31
31
|
const folders = printPath.split("/");
|
|
@@ -16,59 +16,21 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_LLO7YF56_exports = {};
|
|
20
|
+
__export(chunk_LLO7YF56_exports, {
|
|
21
21
|
MigrateCommand: () => MigrateCommand
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_LLO7YF56_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
26
25
|
var import_internals = require("@prisma/internals");
|
|
27
|
-
var
|
|
26
|
+
var MigrateCommand = class _MigrateCommand {
|
|
28
27
|
constructor(cmds) {
|
|
29
28
|
this.cmds = cmds;
|
|
30
29
|
}
|
|
31
30
|
static new(cmds) {
|
|
32
|
-
return new
|
|
31
|
+
return new _MigrateCommand(cmds);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
const args = (0, import_internals.arg)(argv, {
|
|
36
|
-
"--help": Boolean,
|
|
37
|
-
"-h": "--help",
|
|
38
|
-
"--config": String,
|
|
39
|
-
"--preview-feature": Boolean,
|
|
40
|
-
"--telemetry-information": String
|
|
41
|
-
});
|
|
42
|
-
if ((0, import_internals.isError)(args)) {
|
|
43
|
-
return this.help(args.message);
|
|
44
|
-
}
|
|
45
|
-
if (args._.length === 0 || args["--help"]) {
|
|
46
|
-
return this.help();
|
|
47
|
-
}
|
|
48
|
-
const commandName = args._[0];
|
|
49
|
-
const cmd = this.cmds[commandName];
|
|
50
|
-
if (cmd) {
|
|
51
|
-
let argsForCmd;
|
|
52
|
-
if (commandName === "diff") {
|
|
53
|
-
argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
|
|
54
|
-
} else {
|
|
55
|
-
const filteredArgs = args._.filter((item) => item !== "--preview-feature");
|
|
56
|
-
argsForCmd = filteredArgs.slice(1);
|
|
57
|
-
}
|
|
58
|
-
return cmd.parse(argsForCmd, config);
|
|
59
|
-
}
|
|
60
|
-
return (0, import_internals.unknownCommand)(_MigrateCommand2.help, commandName);
|
|
61
|
-
}
|
|
62
|
-
help(error) {
|
|
63
|
-
if (error) {
|
|
64
|
-
return new import_internals.HelpError(`
|
|
65
|
-
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
66
|
-
${_MigrateCommand2.help}`);
|
|
67
|
-
}
|
|
68
|
-
return _MigrateCommand2.help;
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_MigrateCommand, "help", (0, import_internals.format)(`
|
|
33
|
+
static help = (0, import_internals.format)(`
|
|
72
34
|
Update the database schema with migrations
|
|
73
35
|
|
|
74
36
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -119,5 +81,41 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
119
81
|
--from-url "$DATABASE_URL" \\
|
|
120
82
|
--to-url "postgresql://login:password@localhost:5432/db" \\
|
|
121
83
|
--script
|
|
122
|
-
`)
|
|
123
|
-
|
|
84
|
+
`);
|
|
85
|
+
async parse(argv, config) {
|
|
86
|
+
const args = (0, import_internals.arg)(argv, {
|
|
87
|
+
"--help": Boolean,
|
|
88
|
+
"-h": "--help",
|
|
89
|
+
"--config": String,
|
|
90
|
+
"--preview-feature": Boolean,
|
|
91
|
+
"--telemetry-information": String
|
|
92
|
+
});
|
|
93
|
+
if ((0, import_internals.isError)(args)) {
|
|
94
|
+
return this.help(args.message);
|
|
95
|
+
}
|
|
96
|
+
if (args._.length === 0 || args["--help"]) {
|
|
97
|
+
return this.help();
|
|
98
|
+
}
|
|
99
|
+
const commandName = args._[0];
|
|
100
|
+
const cmd = this.cmds[commandName];
|
|
101
|
+
if (cmd) {
|
|
102
|
+
let argsForCmd;
|
|
103
|
+
if (commandName === "diff") {
|
|
104
|
+
argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
|
|
105
|
+
} else {
|
|
106
|
+
const filteredArgs = args._.filter((item) => item !== "--preview-feature");
|
|
107
|
+
argsForCmd = filteredArgs.slice(1);
|
|
108
|
+
}
|
|
109
|
+
return cmd.parse(argsForCmd, config);
|
|
110
|
+
}
|
|
111
|
+
return (0, import_internals.unknownCommand)(_MigrateCommand.help, commandName);
|
|
112
|
+
}
|
|
113
|
+
help(error) {
|
|
114
|
+
if (error) {
|
|
115
|
+
return new import_internals.HelpError(`
|
|
116
|
+
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
117
|
+
${_MigrateCommand.help}`);
|
|
118
|
+
}
|
|
119
|
+
return _MigrateCommand.help;
|
|
120
|
+
}
|
|
121
|
+
};
|
|
@@ -16,20 +16,19 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_NGQA5JTN_exports = {};
|
|
20
|
+
__export(chunk_NGQA5JTN_exports, {
|
|
21
21
|
CLI: () => CLI
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_NGQA5JTN_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
26
25
|
var import_internals = require("@prisma/internals");
|
|
27
|
-
var
|
|
26
|
+
var CLI = class _CLI {
|
|
28
27
|
constructor(cmds) {
|
|
29
28
|
this.cmds = cmds;
|
|
30
29
|
}
|
|
31
30
|
static new(cmds) {
|
|
32
|
-
return new
|
|
31
|
+
return new _CLI(cmds);
|
|
33
32
|
}
|
|
34
33
|
async parse(argv, config) {
|
|
35
34
|
const args = (0, import_internals.arg)(argv, {
|
|
@@ -70,10 +69,9 @@ var _CLI = class _CLI2 {
|
|
|
70
69
|
if (error) {
|
|
71
70
|
return new import_internals.HelpError(`
|
|
72
71
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
73
|
-
${
|
|
72
|
+
${_CLI.help}`);
|
|
74
73
|
}
|
|
75
|
-
return
|
|
74
|
+
return _CLI.help;
|
|
76
75
|
}
|
|
76
|
+
static help = (0, import_internals.format)(`This is the internal CLI for @prisma/migrate`);
|
|
77
77
|
};
|
|
78
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_CLI, "help", (0, import_internals.format)(`This is the internal CLI for @prisma/migrate`));
|
|
79
|
-
var CLI = _CLI;
|
|
@@ -26,19 +26,19 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_NIKXBMZL_exports = {};
|
|
30
|
+
__export(chunk_NIKXBMZL_exports, {
|
|
31
31
|
getDatabaseVersionSafe: () => getDatabaseVersionSafe
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_NIKXBMZL_exports);
|
|
34
|
+
var import_chunk_D2DGSPW6 = require("./chunk-D2DGSPW6.js");
|
|
35
35
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
36
36
|
var debug = (0, import_debug.default)("prisma:cli");
|
|
37
37
|
async function getDatabaseVersionSafe(args) {
|
|
38
38
|
let engine;
|
|
39
39
|
let dbVersion;
|
|
40
40
|
try {
|
|
41
|
-
engine = new
|
|
41
|
+
engine = new import_chunk_D2DGSPW6.SchemaEngine({});
|
|
42
42
|
dbVersion = await engine.getDatabaseVersion(args);
|
|
43
43
|
} catch (e) {
|
|
44
44
|
debug(e);
|
|
@@ -26,24 +26,49 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_O6RQXRWU_exports = {};
|
|
30
|
+
__export(chunk_O6RQXRWU_exports, {
|
|
31
31
|
DbPush: () => DbPush
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_O6RQXRWU_exports);
|
|
34
|
+
var import_chunk_ZLHWX5PJ = require("./chunk-ZLHWX5PJ.js");
|
|
35
35
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
|
-
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
37
36
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
39
38
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
41
39
|
var import_internals = require("@prisma/internals");
|
|
42
40
|
var import_prompts = __toESM(require("prompts"));
|
|
43
|
-
var
|
|
41
|
+
var DbPush = class _DbPush {
|
|
44
42
|
static new() {
|
|
45
|
-
return new
|
|
43
|
+
return new _DbPush();
|
|
46
44
|
}
|
|
45
|
+
static help = (0, import_internals.format)(`
|
|
46
|
+
${process.platform === "win32" ? "" : "\u{1F64C} "}Push the state from your Prisma schema to your database
|
|
47
|
+
|
|
48
|
+
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
49
|
+
|
|
50
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push [options]
|
|
51
|
+
|
|
52
|
+
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
53
|
+
|
|
54
|
+
-h, --help Display this help message
|
|
55
|
+
--config Custom path to your Prisma config file
|
|
56
|
+
--schema Custom path to your Prisma schema
|
|
57
|
+
--accept-data-loss Ignore data loss warnings
|
|
58
|
+
--force-reset Force a reset of the database before push
|
|
59
|
+
--skip-generate Skip triggering generators (e.g. Prisma Client)
|
|
60
|
+
|
|
61
|
+
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
62
|
+
|
|
63
|
+
Push the Prisma schema state to the database
|
|
64
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push
|
|
65
|
+
|
|
66
|
+
Specify a schema
|
|
67
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push --schema=./schema.prisma
|
|
68
|
+
|
|
69
|
+
Ignore data loss warnings
|
|
70
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push --accept-data-loss
|
|
71
|
+
`);
|
|
47
72
|
async parse(argv, config) {
|
|
48
73
|
const args = (0, import_internals.arg)(
|
|
49
74
|
argv,
|
|
@@ -62,17 +87,21 @@ var _DbPush = class _DbPush2 {
|
|
|
62
87
|
if ((0, import_internals.isError)(args)) {
|
|
63
88
|
return this.help(args.message);
|
|
64
89
|
}
|
|
65
|
-
await (0, import_internals.checkUnsupportedDataProxy)("db push", args, config.schema, true);
|
|
66
90
|
if (args["--help"]) {
|
|
67
91
|
return this.help();
|
|
68
92
|
}
|
|
69
93
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
70
|
-
const
|
|
71
|
-
|
|
94
|
+
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
95
|
+
schemaPathFromArg: args["--schema"],
|
|
96
|
+
schemaPathFromConfig: config.schema
|
|
97
|
+
});
|
|
98
|
+
const { migrationsDirPath } = (0, import_internals.inferDirectoryConfig)(schemaContext);
|
|
99
|
+
(0, import_internals.checkUnsupportedDataProxy)({ cmd: "db push", schemaContext });
|
|
100
|
+
const datasourceInfo = (0, import_chunk_74LUB4XX.parseDatasourceInfo)(schemaContext.primaryDatasource);
|
|
72
101
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
73
|
-
const migrate = new
|
|
102
|
+
const migrate = new import_chunk_ZLHWX5PJ.Migrate(schemaContext, migrationsDirPath);
|
|
74
103
|
try {
|
|
75
|
-
const wasDbCreated = await (0,
|
|
104
|
+
const wasDbCreated = await (0, import_chunk_74LUB4XX.ensureDatabaseExists)(schemaContext.primaryDatasource);
|
|
76
105
|
if (wasDbCreated) {
|
|
77
106
|
process.stdout.write("\n" + wasDbCreated + "\n");
|
|
78
107
|
}
|
|
@@ -196,36 +225,8 @@ ${rocketEmoji}${provider === "mongodb" ? migrationSuccessMongoMessage : migratio
|
|
|
196
225
|
if (error) {
|
|
197
226
|
return new import_internals.HelpError(`
|
|
198
227
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
199
|
-
${
|
|
228
|
+
${_DbPush.help}`);
|
|
200
229
|
}
|
|
201
|
-
return
|
|
230
|
+
return _DbPush.help;
|
|
202
231
|
}
|
|
203
232
|
};
|
|
204
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_DbPush, "help", (0, import_internals.format)(`
|
|
205
|
-
${process.platform === "win32" ? "" : "\u{1F64C} "}Push the state from your Prisma schema to your database
|
|
206
|
-
|
|
207
|
-
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
208
|
-
|
|
209
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push [options]
|
|
210
|
-
|
|
211
|
-
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
212
|
-
|
|
213
|
-
-h, --help Display this help message
|
|
214
|
-
--config Custom path to your Prisma config file
|
|
215
|
-
--schema Custom path to your Prisma schema
|
|
216
|
-
--accept-data-loss Ignore data loss warnings
|
|
217
|
-
--force-reset Force a reset of the database before push
|
|
218
|
-
--skip-generate Skip triggering generators (e.g. Prisma Client)
|
|
219
|
-
|
|
220
|
-
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
221
|
-
|
|
222
|
-
Push the Prisma schema state to the database
|
|
223
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push
|
|
224
|
-
|
|
225
|
-
Specify a schema
|
|
226
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push --schema=./schema.prisma
|
|
227
|
-
|
|
228
|
-
Ignore data loss warnings
|
|
229
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push --accept-data-loss
|
|
230
|
-
`));
|
|
231
|
-
var DbPush = _DbPush;
|
|
@@ -26,18 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_OEWQACEH_exports = {};
|
|
30
|
+
__export(chunk_OEWQACEH_exports, {
|
|
31
31
|
N: () => N,
|
|
32
32
|
handleViewsIO: () => handleViewsIO,
|
|
33
33
|
require_function: () => require_function,
|
|
34
34
|
z: () => z
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_OEWQACEH_exports);
|
|
37
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
38
38
|
var import_internals = require("@prisma/internals");
|
|
39
39
|
var import_path = __toESM(require("path"));
|
|
40
|
-
var require_function = (0,
|
|
40
|
+
var require_function = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
41
41
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/function.js"(exports) {
|
|
42
42
|
"use strict";
|
|
43
43
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
@@ -324,7 +324,7 @@ var require_function = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
324
324
|
exports.dual = dual;
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
|
-
var require_internal = (0,
|
|
327
|
+
var require_internal = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
328
328
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/internal.js"(exports) {
|
|
329
329
|
"use strict";
|
|
330
330
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
@@ -463,7 +463,7 @@ var require_internal = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
463
463
|
exports.flatMapReader = flatMapReader;
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
|
-
var require_Apply = (0,
|
|
466
|
+
var require_Apply = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
467
467
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Apply.js"(exports) {
|
|
468
468
|
"use strict";
|
|
469
469
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -705,7 +705,7 @@ var require_Apply = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
});
|
|
708
|
-
var require_Functor = (0,
|
|
708
|
+
var require_Functor = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
709
709
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Functor.js"(exports) {
|
|
710
710
|
"use strict";
|
|
711
711
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -778,7 +778,7 @@ var require_Functor = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
|
-
var require_Applicative = (0,
|
|
781
|
+
var require_Applicative = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
782
782
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Applicative.js"(exports) {
|
|
783
783
|
"use strict";
|
|
784
784
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -811,7 +811,7 @@ var require_Applicative = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
});
|
|
814
|
-
var require_Chain = (0,
|
|
814
|
+
var require_Chain = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
815
815
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Chain.js"(exports) {
|
|
816
816
|
"use strict";
|
|
817
817
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -849,7 +849,7 @@ var require_Chain = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
});
|
|
852
|
-
var require_ChainRec = (0,
|
|
852
|
+
var require_ChainRec = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
853
853
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/ChainRec.js"(exports) {
|
|
854
854
|
"use strict";
|
|
855
855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -864,7 +864,7 @@ var require_ChainRec = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
864
864
|
exports.tailRec = tailRec;
|
|
865
865
|
}
|
|
866
866
|
});
|
|
867
|
-
var require_FromEither = (0,
|
|
867
|
+
var require_FromEither = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
868
868
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromEither.js"(exports) {
|
|
869
869
|
"use strict";
|
|
870
870
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -980,7 +980,7 @@ var require_FromEither = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
});
|
|
983
|
-
var require_Separated = (0,
|
|
983
|
+
var require_Separated = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
984
984
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Separated.js"(exports) {
|
|
985
985
|
"use strict";
|
|
986
986
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1039,7 +1039,7 @@ var require_Separated = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1039
1039
|
exports.right = right;
|
|
1040
1040
|
}
|
|
1041
1041
|
});
|
|
1042
|
-
var require_Witherable = (0,
|
|
1042
|
+
var require_Witherable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1043
1043
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Witherable.js"(exports) {
|
|
1044
1044
|
"use strict";
|
|
1045
1045
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -1106,7 +1106,7 @@ var require_Witherable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
});
|
|
1109
|
-
var require_Either = (0,
|
|
1109
|
+
var require_Either = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1110
1110
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Either.js"(exports) {
|
|
1111
1111
|
"use strict";
|
|
1112
1112
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -1714,7 +1714,7 @@ var require_Either = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
});
|
|
1717
|
-
var require_FromIO = (0,
|
|
1717
|
+
var require_FromIO = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1718
1718
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromIO.js"(exports) {
|
|
1719
1719
|
"use strict";
|
|
1720
1720
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1753,7 +1753,7 @@ var require_FromIO = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
|
-
var require_Task = (0,
|
|
1756
|
+
var require_Task = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1757
1757
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Task.js"(exports) {
|
|
1758
1758
|
"use strict";
|
|
1759
1759
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -2048,7 +2048,7 @@ var require_Task = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2048
2048
|
exports.getMonoid = (0, Applicative_1.getApplicativeMonoid)(exports.ApplicativeSeq);
|
|
2049
2049
|
}
|
|
2050
2050
|
});
|
|
2051
|
-
var require_Predicate = (0,
|
|
2051
|
+
var require_Predicate = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2052
2052
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Predicate.js"(exports) {
|
|
2053
2053
|
"use strict";
|
|
2054
2054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2122,7 +2122,7 @@ var require_Predicate = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2122
2122
|
exports.and = and;
|
|
2123
2123
|
}
|
|
2124
2124
|
});
|
|
2125
|
-
var require_Magma = (0,
|
|
2125
|
+
var require_Magma = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2126
2126
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Magma.js"(exports) {
|
|
2127
2127
|
"use strict";
|
|
2128
2128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2177,7 +2177,7 @@ var require_Magma = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2177
2177
|
exports.concatAll = concatAll;
|
|
2178
2178
|
}
|
|
2179
2179
|
});
|
|
2180
|
-
var require_Eq = (0,
|
|
2180
|
+
var require_Eq = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2181
2181
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Eq.js"(exports) {
|
|
2182
2182
|
"use strict";
|
|
2183
2183
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2271,7 +2271,7 @@ var require_Eq = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2271
2271
|
};
|
|
2272
2272
|
}
|
|
2273
2273
|
});
|
|
2274
|
-
var require_Ord = (0,
|
|
2274
|
+
var require_Ord = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2275
2275
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Ord.js"(exports) {
|
|
2276
2276
|
"use strict";
|
|
2277
2277
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2441,7 +2441,7 @@ var require_Ord = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2441
2441
|
);
|
|
2442
2442
|
}
|
|
2443
2443
|
});
|
|
2444
|
-
var require_Semigroup = (0,
|
|
2444
|
+
var require_Semigroup = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2445
2445
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Semigroup.js"(exports) {
|
|
2446
2446
|
"use strict";
|
|
2447
2447
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -2599,7 +2599,7 @@ var require_Semigroup = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2599
2599
|
};
|
|
2600
2600
|
}
|
|
2601
2601
|
});
|
|
2602
|
-
var require_Zero = (0,
|
|
2602
|
+
var require_Zero = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2603
2603
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Zero.js"(exports) {
|
|
2604
2604
|
"use strict";
|
|
2605
2605
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2611,7 +2611,7 @@ var require_Zero = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
2613
|
});
|
|
2614
|
-
var require_Option = (0,
|
|
2614
|
+
var require_Option = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2615
2615
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Option.js"(exports) {
|
|
2616
2616
|
"use strict";
|
|
2617
2617
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3153,7 +3153,7 @@ var require_Option = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3153
3153
|
exports.getLastMonoid = getLastMonoid;
|
|
3154
3154
|
}
|
|
3155
3155
|
});
|
|
3156
|
-
var require_Compactable = (0,
|
|
3156
|
+
var require_Compactable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3157
3157
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Compactable.js"(exports) {
|
|
3158
3158
|
"use strict";
|
|
3159
3159
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3213,7 +3213,7 @@ var require_Compactable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3213
3213
|
}
|
|
3214
3214
|
}
|
|
3215
3215
|
});
|
|
3216
|
-
var require_EitherT = (0,
|
|
3216
|
+
var require_EitherT = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3217
3217
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/EitherT.js"(exports) {
|
|
3218
3218
|
"use strict";
|
|
3219
3219
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3498,7 +3498,7 @@ var require_EitherT = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3498
3498
|
}
|
|
3499
3499
|
}
|
|
3500
3500
|
});
|
|
3501
|
-
var require_Filterable = (0,
|
|
3501
|
+
var require_Filterable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3502
3502
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Filterable.js"(exports) {
|
|
3503
3503
|
"use strict";
|
|
3504
3504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3581,7 +3581,7 @@ var require_Filterable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3581
3581
|
}
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
|
-
var require_FromTask = (0,
|
|
3584
|
+
var require_FromTask = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3585
3585
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromTask.js"(exports) {
|
|
3586
3586
|
"use strict";
|
|
3587
3587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3620,7 +3620,7 @@ var require_FromTask = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3620
3620
|
}
|
|
3621
3621
|
}
|
|
3622
3622
|
});
|
|
3623
|
-
var require_TaskEither = (0,
|
|
3623
|
+
var require_TaskEither = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3624
3624
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/TaskEither.js"(exports) {
|
|
3625
3625
|
"use strict";
|
|
3626
3626
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -4251,10 +4251,10 @@ var require_TaskEither = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
});
|
|
4254
|
-
var E2 = (0,
|
|
4255
|
-
var import_function = (0,
|
|
4256
|
-
var T2 = (0,
|
|
4257
|
-
var TE = (0,
|
|
4254
|
+
var E2 = (0, import_chunk_2ESYSVXG.__toESM)(require_Either());
|
|
4255
|
+
var import_function = (0, import_chunk_2ESYSVXG.__toESM)(require_function());
|
|
4256
|
+
var T2 = (0, import_chunk_2ESYSVXG.__toESM)(require_Task());
|
|
4257
|
+
var TE = (0, import_chunk_2ESYSVXG.__toESM)(require_TaskEither());
|
|
4258
4258
|
var t = Symbol.for("@ts-pattern/matcher");
|
|
4259
4259
|
var e = Symbol.for("@ts-pattern/isVariadic");
|
|
4260
4260
|
var n = "@ts-pattern/anonymous-select-key";
|
|
@@ -4512,15 +4512,14 @@ var I = class _I {
|
|
|
4512
4512
|
return this;
|
|
4513
4513
|
}
|
|
4514
4514
|
};
|
|
4515
|
-
async function handleViewsIO({ views,
|
|
4516
|
-
const
|
|
4517
|
-
const viewsDir = import_path.default.posix.join(prismaDir, "views");
|
|
4515
|
+
async function handleViewsIO({ views, viewsDirectoryPath }) {
|
|
4516
|
+
const posixViewsDirectoryPath = (0, import_internals.pathToPosix)(viewsDirectoryPath);
|
|
4518
4517
|
if (views.length === 0) {
|
|
4519
|
-
await cleanLeftoversIO(
|
|
4518
|
+
await cleanLeftoversIO(posixViewsDirectoryPath);
|
|
4520
4519
|
return;
|
|
4521
4520
|
}
|
|
4522
|
-
const { viewFilesToKeep } = await createViewsIO(
|
|
4523
|
-
await cleanLeftoversIO(
|
|
4521
|
+
const { viewFilesToKeep } = await createViewsIO(posixViewsDirectoryPath, views);
|
|
4522
|
+
await cleanLeftoversIO(posixViewsDirectoryPath, viewFilesToKeep);
|
|
4524
4523
|
}
|
|
4525
4524
|
async function createViewsIO(viewsDir, views) {
|
|
4526
4525
|
const viewEntries = views.map(({ schema, ...rest }) => {
|