@prisma/migrate 5.23.0-dev.12 → 5.23.0-dev.14

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,13 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var DbSeed_exports = {};
20
20
  __export(DbSeed_exports, {
21
- DbSeed: () => import_chunk_ZLGLVUFD.DbSeed
21
+ DbSeed: () => import_chunk_E2XKFV2C.DbSeed
22
22
  });
23
23
  module.exports = __toCommonJS(DbSeed_exports);
24
- var import_chunk_ZLGLVUFD = require("../chunk-ZLGLVUFD.js");
25
- var import_chunk_EFPE3Q7J = require("../chunk-EFPE3Q7J.js");
26
- var import_chunk_WIZM7TFT = require("../chunk-WIZM7TFT.js");
24
+ var import_chunk_E2XKFV2C = require("../chunk-E2XKFV2C.js");
25
+ var import_chunk_YKUZUAXA = require("../chunk-YKUZUAXA.js");
27
26
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
28
27
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
29
28
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
30
- (0, import_chunk_ZLGLVUFD.init_DbSeed)();
29
+ (0, import_chunk_E2XKFV2C.init_DbSeed)();
@@ -18,17 +18,16 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MigrateDev_exports = {};
20
20
  __export(MigrateDev_exports, {
21
- MigrateDev: () => import_chunk_LLGEQ76N.MigrateDev
21
+ MigrateDev: () => import_chunk_O6RO4YUZ.MigrateDev
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateDev_exports);
24
- var import_chunk_LLGEQ76N = require("../chunk-LLGEQ76N.js");
24
+ var import_chunk_O6RO4YUZ = require("../chunk-O6RO4YUZ.js");
25
25
  var import_chunk_IFCV5MY4 = require("../chunk-IFCV5MY4.js");
26
26
  var import_chunk_SGCF5OHF = require("../chunk-SGCF5OHF.js");
27
- var import_chunk_EFPE3Q7J = require("../chunk-EFPE3Q7J.js");
27
+ var import_chunk_YKUZUAXA = require("../chunk-YKUZUAXA.js");
28
28
  var import_chunk_WOOPRG54 = require("../chunk-WOOPRG54.js");
29
29
  var import_chunk_6QFE3AWR = require("../chunk-6QFE3AWR.js");
30
30
  var import_chunk_LKTTJWFT = require("../chunk-LKTTJWFT.js");
31
- var import_chunk_WIZM7TFT = require("../chunk-WIZM7TFT.js");
32
31
  var import_chunk_MWEO3VUS = require("../chunk-MWEO3VUS.js");
33
32
  var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
34
33
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
@@ -42,4 +41,4 @@ var import_chunk_KEBB7UIB = require("../chunk-KEBB7UIB.js");
42
41
  var import_chunk_KPUNMK5W = require("../chunk-KPUNMK5W.js");
43
42
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
44
43
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
45
- (0, import_chunk_LLGEQ76N.init_MigrateDev)();
44
+ (0, import_chunk_O6RO4YUZ.init_MigrateDev)();
@@ -18,14 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MigrateDiff_exports = {};
20
20
  __export(MigrateDiff_exports, {
21
- MigrateDiff: () => import_chunk_T2L5YNPI.MigrateDiff
21
+ MigrateDiff: () => import_chunk_WKQT5TGV.MigrateDiff
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateDiff_exports);
24
- var import_chunk_T2L5YNPI = require("../chunk-T2L5YNPI.js");
24
+ var import_chunk_WKQT5TGV = require("../chunk-WKQT5TGV.js");
25
25
  var import_chunk_VWV2NY26 = require("../chunk-VWV2NY26.js");
26
26
  var import_chunk_XRTNIFND = require("../chunk-XRTNIFND.js");
27
27
  var import_chunk_TKAGMA5K = require("../chunk-TKAGMA5K.js");
28
- var import_chunk_WIZM7TFT = require("../chunk-WIZM7TFT.js");
29
28
  var import_chunk_MWEO3VUS = require("../chunk-MWEO3VUS.js");
30
29
  var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
31
30
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
@@ -34,4 +33,4 @@ var import_chunk_LVFPGUOH = require("../chunk-LVFPGUOH.js");
34
33
  var import_chunk_AAATUOV6 = require("../chunk-AAATUOV6.js");
35
34
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
36
35
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
37
- (0, import_chunk_T2L5YNPI.init_MigrateDiff)();
36
+ (0, import_chunk_WKQT5TGV.init_MigrateDiff)();
@@ -18,15 +18,14 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var MigrateReset_exports = {};
20
20
  __export(MigrateReset_exports, {
21
- MigrateReset: () => import_chunk_XVL5RF2T.MigrateReset
21
+ MigrateReset: () => import_chunk_75AMGQ4R.MigrateReset
22
22
  });
23
23
  module.exports = __toCommonJS(MigrateReset_exports);
24
- var import_chunk_XVL5RF2T = require("../chunk-XVL5RF2T.js");
25
- var import_chunk_EFPE3Q7J = require("../chunk-EFPE3Q7J.js");
24
+ var import_chunk_75AMGQ4R = require("../chunk-75AMGQ4R.js");
25
+ var import_chunk_YKUZUAXA = require("../chunk-YKUZUAXA.js");
26
26
  var import_chunk_WOOPRG54 = require("../chunk-WOOPRG54.js");
27
27
  var import_chunk_6QFE3AWR = require("../chunk-6QFE3AWR.js");
28
28
  var import_chunk_LKTTJWFT = require("../chunk-LKTTJWFT.js");
29
- var import_chunk_WIZM7TFT = require("../chunk-WIZM7TFT.js");
30
29
  var import_chunk_MWEO3VUS = require("../chunk-MWEO3VUS.js");
31
30
  var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
32
31
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
@@ -40,4 +39,4 @@ var import_chunk_KEBB7UIB = require("../chunk-KEBB7UIB.js");
40
39
  var import_chunk_KPUNMK5W = require("../chunk-KPUNMK5W.js");
41
40
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
42
41
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
43
- (0, import_chunk_XVL5RF2T.init_MigrateReset)();
42
+ (0, import_chunk_75AMGQ4R.init_MigrateReset)();
package/dist/index.js CHANGED
@@ -23,14 +23,14 @@ __export(dist_exports, {
23
23
  DbExecute: () => import_chunk_ZBOJAYON.DbExecute,
24
24
  DbPull: () => import_chunk_EXUBPCXZ.DbPull,
25
25
  DbPush: () => import_chunk_76XWADEV.DbPush,
26
- DbSeed: () => import_chunk_ZLGLVUFD.DbSeed,
26
+ DbSeed: () => import_chunk_E2XKFV2C.DbSeed,
27
27
  EngineResults: () => import_chunk_LVR7W5DD.EngineResults,
28
28
  Migrate: () => import_chunk_MWEO3VUS.Migrate,
29
29
  MigrateCommand: () => import_chunk_CK5VLKFM.MigrateCommand,
30
30
  MigrateDeploy: () => import_chunk_UJWMQPUH.MigrateDeploy,
31
- MigrateDev: () => import_chunk_LLGEQ76N.MigrateDev,
32
- MigrateDiff: () => import_chunk_T2L5YNPI.MigrateDiff,
33
- MigrateReset: () => import_chunk_XVL5RF2T.MigrateReset,
31
+ MigrateDev: () => import_chunk_O6RO4YUZ.MigrateDev,
32
+ MigrateDiff: () => import_chunk_WKQT5TGV.MigrateDiff,
33
+ MigrateReset: () => import_chunk_75AMGQ4R.MigrateReset,
34
34
  MigrateResolve: () => import_chunk_BAVMZZAR.MigrateResolve,
35
35
  MigrateStatus: () => import_chunk_SV5GANSI.MigrateStatus,
36
36
  SchemaEngine: () => import_chunk_XLLUFIQK.SchemaEngine,
@@ -43,7 +43,7 @@ __export(dist_exports, {
43
43
  module.exports = __toCommonJS(dist_exports);
44
44
  var import_chunk_YOW3VBYS = require("./chunk-YOW3VBYS.js");
45
45
  var import_chunk_GJN3CSXW = require("./chunk-GJN3CSXW.js");
46
- var import_chunk_XVL5RF2T = require("./chunk-XVL5RF2T.js");
46
+ var import_chunk_75AMGQ4R = require("./chunk-75AMGQ4R.js");
47
47
  var import_chunk_BAVMZZAR = require("./chunk-BAVMZZAR.js");
48
48
  var import_chunk_SV5GANSI = require("./chunk-SV5GANSI.js");
49
49
  var import_chunk_ZBOJAYON = require("./chunk-ZBOJAYON.js");
@@ -59,21 +59,20 @@ var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
59
59
  var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
60
60
  var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
61
61
  var import_chunk_76XWADEV = require("./chunk-76XWADEV.js");
62
- var import_chunk_ZLGLVUFD = require("./chunk-ZLGLVUFD.js");
62
+ var import_chunk_E2XKFV2C = require("./chunk-E2XKFV2C.js");
63
63
  var import_chunk_CK5VLKFM = require("./chunk-CK5VLKFM.js");
64
64
  var import_chunk_UJWMQPUH = require("./chunk-UJWMQPUH.js");
65
- var import_chunk_LLGEQ76N = require("./chunk-LLGEQ76N.js");
65
+ var import_chunk_O6RO4YUZ = require("./chunk-O6RO4YUZ.js");
66
66
  var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
67
67
  var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
68
- var import_chunk_EFPE3Q7J = require("./chunk-EFPE3Q7J.js");
68
+ var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
69
69
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
70
70
  var import_chunk_6QFE3AWR = require("./chunk-6QFE3AWR.js");
71
71
  var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
72
- var import_chunk_T2L5YNPI = require("./chunk-T2L5YNPI.js");
72
+ var import_chunk_WKQT5TGV = require("./chunk-WKQT5TGV.js");
73
73
  var import_chunk_VWV2NY26 = require("./chunk-VWV2NY26.js");
74
74
  var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
75
75
  var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
76
- var import_chunk_WIZM7TFT = require("./chunk-WIZM7TFT.js");
77
76
  var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
78
77
  var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
79
78
  var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
@@ -95,12 +94,12 @@ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
95
94
  (0, import_chunk_ZBOJAYON.init_DbExecute)();
96
95
  (0, import_chunk_EXUBPCXZ.init_DbPull)();
97
96
  (0, import_chunk_76XWADEV.init_DbPush)();
98
- (0, import_chunk_ZLGLVUFD.init_DbSeed)();
97
+ (0, import_chunk_E2XKFV2C.init_DbSeed)();
99
98
  (0, import_chunk_CK5VLKFM.init_MigrateCommand)();
100
99
  (0, import_chunk_UJWMQPUH.init_MigrateDeploy)();
101
- (0, import_chunk_LLGEQ76N.init_MigrateDev)();
102
- (0, import_chunk_T2L5YNPI.init_MigrateDiff)();
103
- (0, import_chunk_XVL5RF2T.init_MigrateReset)();
100
+ (0, import_chunk_O6RO4YUZ.init_MigrateDev)();
101
+ (0, import_chunk_WKQT5TGV.init_MigrateDiff)();
102
+ (0, import_chunk_75AMGQ4R.init_MigrateReset)();
104
103
  (0, import_chunk_BAVMZZAR.init_MigrateResolve)();
105
104
  (0, import_chunk_SV5GANSI.init_MigrateStatus)();
106
105
  (0, import_chunk_MWEO3VUS.init_Migrate)();
@@ -1 +1 @@
1
- export declare function isCurrentBinInstalledGlobally(): 'npm' | 'yarn' | false;
1
+ export declare function isCurrentBinInstalledGlobally(): 'npm' | false;
@@ -18,15 +18,14 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var seed_exports = {};
20
20
  __export(seed_exports, {
21
- executeSeedCommand: () => import_chunk_EFPE3Q7J.executeSeedCommand,
22
- getSeedCommandFromPackageJson: () => import_chunk_EFPE3Q7J.getSeedCommandFromPackageJson,
23
- legacyTsNodeScriptWarning: () => import_chunk_EFPE3Q7J.legacyTsNodeScriptWarning,
24
- verifySeedConfigAndReturnMessage: () => import_chunk_EFPE3Q7J.verifySeedConfigAndReturnMessage
21
+ executeSeedCommand: () => import_chunk_YKUZUAXA.executeSeedCommand,
22
+ getSeedCommandFromPackageJson: () => import_chunk_YKUZUAXA.getSeedCommandFromPackageJson,
23
+ legacyTsNodeScriptWarning: () => import_chunk_YKUZUAXA.legacyTsNodeScriptWarning,
24
+ verifySeedConfigAndReturnMessage: () => import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage
25
25
  });
26
26
  module.exports = __toCommonJS(seed_exports);
27
- var import_chunk_EFPE3Q7J = require("../chunk-EFPE3Q7J.js");
28
- var import_chunk_WIZM7TFT = require("../chunk-WIZM7TFT.js");
27
+ var import_chunk_YKUZUAXA = require("../chunk-YKUZUAXA.js");
29
28
  var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
30
29
  var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
31
30
  var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
32
- (0, import_chunk_EFPE3Q7J.init_seed)();
31
+ (0, import_chunk_YKUZUAXA.init_seed)();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/migrate",
3
- "version": "5.23.0-dev.12",
3
+ "version": "5.23.0-dev.14",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -31,7 +31,6 @@
31
31
  "fp-ts": "2.16.9",
32
32
  "fs-jetpack": "5.1.0",
33
33
  "get-stdin": "8.0.0",
34
- "has-yarn": "2.1.0",
35
34
  "indent-string": "4.0.0",
36
35
  "jest": "29.7.0",
37
36
  "jest-junit": "16.0.0",
@@ -56,12 +55,12 @@
56
55
  "@prisma/internals": "*"
57
56
  },
58
57
  "dependencies": {
59
- "@prisma/engines-version": "5.23.0-10.5b155e0290acbe06ba32edc234026b6943efee9a",
58
+ "@prisma/engines-version": "5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c",
60
59
  "prompts": "2.4.2",
61
- "@prisma/debug": "5.23.0-dev.12",
62
- "@prisma/internals": "5.23.0-dev.12",
63
- "@prisma/get-platform": "5.23.0-dev.12",
64
- "@prisma/generator-helper": "5.23.0-dev.12"
60
+ "@prisma/debug": "5.23.0-dev.14",
61
+ "@prisma/generator-helper": "5.23.0-dev.14",
62
+ "@prisma/get-platform": "5.23.0-dev.14",
63
+ "@prisma/internals": "5.23.0-dev.14"
65
64
  },
66
65
  "files": [
67
66
  "README.md",
@@ -1,424 +0,0 @@
1
- "use strict";
2
- var __create = Object.create;
3
- var __defProp = Object.defineProperty;
4
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
- var __getOwnPropNames = Object.getOwnPropertyNames;
6
- var __getProtoOf = Object.getPrototypeOf;
7
- var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
- var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
19
- };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_EFPE3Q7J_exports = {};
30
- __export(chunk_EFPE3Q7J_exports, {
31
- executeSeedCommand: () => executeSeedCommand,
32
- getSeedCommandFromPackageJson: () => getSeedCommandFromPackageJson,
33
- init_seed: () => init_seed,
34
- legacyTsNodeScriptWarning: () => legacyTsNodeScriptWarning,
35
- verifySeedConfigAndReturnMessage: () => verifySeedConfigAndReturnMessage
36
- });
37
- module.exports = __toCommonJS(chunk_EFPE3Q7J_exports);
38
- var import_chunk_WIZM7TFT = require("./chunk-WIZM7TFT.js");
39
- var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
40
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
41
- var import_debug = __toESM(require("@prisma/debug"));
42
- var import_internals = require("@prisma/internals");
43
- var import_fs = __toESM(require("fs"));
44
- var import_path = __toESM(require("path"));
45
- var require_has_yarn = (0, import_chunk_WWAWV7DQ.__commonJS)({
46
- "../../node_modules/.pnpm/has-yarn@2.1.0/node_modules/has-yarn/index.js"(exports, module2) {
47
- "use strict";
48
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
49
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
50
- var hasYarn2 = (cwd = process.cwd()) => fs2.existsSync(path2.resolve(cwd, "yarn.lock"));
51
- module2.exports = hasYarn2;
52
- module2.exports.default = hasYarn2;
53
- }
54
- });
55
- var require_path_exists = (0, import_chunk_WWAWV7DQ.__commonJS)({
56
- "../../node_modules/.pnpm/path-exists@3.0.0/node_modules/path-exists/index.js"(exports, module2) {
57
- "use strict";
58
- var fs2 = (0, import_chunk_WWAWV7DQ.__require)("fs");
59
- module2.exports = (fp) => new Promise((resolve) => {
60
- fs2.access(fp, (err) => {
61
- resolve(!err);
62
- });
63
- });
64
- module2.exports.sync = (fp) => {
65
- try {
66
- fs2.accessSync(fp);
67
- return true;
68
- } catch (err) {
69
- return false;
70
- }
71
- };
72
- }
73
- });
74
- var require_p_try = (0, import_chunk_WWAWV7DQ.__commonJS)({
75
- "../../node_modules/.pnpm/p-try@2.2.0/node_modules/p-try/index.js"(exports, module2) {
76
- "use strict";
77
- var pTry = (fn, ...arguments_) => new Promise((resolve) => {
78
- resolve(fn(...arguments_));
79
- });
80
- module2.exports = pTry;
81
- module2.exports.default = pTry;
82
- }
83
- });
84
- var require_p_limit = (0, import_chunk_WWAWV7DQ.__commonJS)({
85
- "../../node_modules/.pnpm/p-limit@2.3.0/node_modules/p-limit/index.js"(exports, module2) {
86
- "use strict";
87
- var pTry = require_p_try();
88
- var pLimit = (concurrency) => {
89
- if (!((Number.isInteger(concurrency) || concurrency === Infinity) && concurrency > 0)) {
90
- return Promise.reject(new TypeError("Expected `concurrency` to be a number from 1 and up"));
91
- }
92
- const queue = [];
93
- let activeCount = 0;
94
- const next = () => {
95
- activeCount--;
96
- if (queue.length > 0) {
97
- queue.shift()();
98
- }
99
- };
100
- const run = (fn, resolve, ...args) => {
101
- activeCount++;
102
- const result = pTry(fn, ...args);
103
- resolve(result);
104
- result.then(next, next);
105
- };
106
- const enqueue = (fn, resolve, ...args) => {
107
- if (activeCount < concurrency) {
108
- run(fn, resolve, ...args);
109
- } else {
110
- queue.push(run.bind(null, fn, resolve, ...args));
111
- }
112
- };
113
- const generator = (fn, ...args) => new Promise((resolve) => enqueue(fn, resolve, ...args));
114
- Object.defineProperties(generator, {
115
- activeCount: {
116
- get: () => activeCount
117
- },
118
- pendingCount: {
119
- get: () => queue.length
120
- },
121
- clearQueue: {
122
- value: () => {
123
- queue.length = 0;
124
- }
125
- }
126
- });
127
- return generator;
128
- };
129
- module2.exports = pLimit;
130
- module2.exports.default = pLimit;
131
- }
132
- });
133
- var require_p_locate = (0, import_chunk_WWAWV7DQ.__commonJS)({
134
- "../../node_modules/.pnpm/p-locate@3.0.0/node_modules/p-locate/index.js"(exports, module2) {
135
- "use strict";
136
- var pLimit = require_p_limit();
137
- var EndError = class extends Error {
138
- constructor(value) {
139
- super();
140
- this.value = value;
141
- }
142
- };
143
- var testElement = (el, tester) => Promise.resolve(el).then(tester);
144
- var finder = (el) => Promise.all(el).then((val) => val[1] === true && Promise.reject(new EndError(val[0])));
145
- module2.exports = (iterable, tester, opts) => {
146
- opts = Object.assign({
147
- concurrency: Infinity,
148
- preserveOrder: true
149
- }, opts);
150
- const limit = pLimit(opts.concurrency);
151
- const items = [...iterable].map((el) => [el, limit(testElement, el, tester)]);
152
- const checkLimit = pLimit(opts.preserveOrder ? 1 : Infinity);
153
- return Promise.all(items.map((el) => checkLimit(finder, el))).then(() => {
154
- }).catch((err) => err instanceof EndError ? err.value : Promise.reject(err));
155
- };
156
- }
157
- });
158
- var require_locate_path = (0, import_chunk_WWAWV7DQ.__commonJS)({
159
- "../../node_modules/.pnpm/locate-path@3.0.0/node_modules/locate-path/index.js"(exports, module2) {
160
- "use strict";
161
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
162
- var pathExists = require_path_exists();
163
- var pLocate = require_p_locate();
164
- module2.exports = (iterable, options) => {
165
- options = Object.assign({
166
- cwd: process.cwd()
167
- }, options);
168
- return pLocate(iterable, (el) => pathExists(path2.resolve(options.cwd, el)), options);
169
- };
170
- module2.exports.sync = (iterable, options) => {
171
- options = Object.assign({
172
- cwd: process.cwd()
173
- }, options);
174
- for (const el of iterable) {
175
- if (pathExists.sync(path2.resolve(options.cwd, el))) {
176
- return el;
177
- }
178
- }
179
- };
180
- }
181
- });
182
- var require_find_up = (0, import_chunk_WWAWV7DQ.__commonJS)({
183
- "../../node_modules/.pnpm/find-up@3.0.0/node_modules/find-up/index.js"(exports, module2) {
184
- "use strict";
185
- var path2 = (0, import_chunk_WWAWV7DQ.__require)("path");
186
- var locatePath = require_locate_path();
187
- module2.exports = (filename, opts = {}) => {
188
- const startDir = path2.resolve(opts.cwd || "");
189
- const { root } = path2.parse(startDir);
190
- const filenames = [].concat(filename);
191
- return new Promise((resolve) => {
192
- (function find(dir) {
193
- locatePath(filenames, { cwd: dir }).then((file) => {
194
- if (file) {
195
- resolve(path2.join(dir, file));
196
- } else if (dir === root) {
197
- resolve(null);
198
- } else {
199
- find(path2.dirname(dir));
200
- }
201
- });
202
- })(startDir);
203
- });
204
- };
205
- module2.exports.sync = (filename, opts = {}) => {
206
- let dir = path2.resolve(opts.cwd || "");
207
- const { root } = path2.parse(dir);
208
- const filenames = [].concat(filename);
209
- while (true) {
210
- const file = locatePath.sync(filenames, { cwd: dir });
211
- if (file) {
212
- return path2.join(dir, file);
213
- }
214
- if (dir === root) {
215
- return null;
216
- }
217
- dir = path2.dirname(dir);
218
- }
219
- };
220
- }
221
- });
222
- var require_pkg_up = (0, import_chunk_WWAWV7DQ.__commonJS)({
223
- "../../node_modules/.pnpm/pkg-up@3.1.0/node_modules/pkg-up/index.js"(exports, module2) {
224
- "use strict";
225
- var findUp = require_find_up();
226
- module2.exports = async ({ cwd } = {}) => findUp("package.json", { cwd });
227
- module2.exports.sync = ({ cwd } = {}) => findUp.sync("package.json", { cwd });
228
- }
229
- });
230
- async function verifySeedConfigAndReturnMessage(schemaPath) {
231
- const cwd = process.cwd();
232
- const detected = detectSeedFiles(cwd, schemaPath);
233
- const prismaConfig = await (0, import_internals.getPrismaConfigFromPackageJson)(cwd);
234
- if (prismaConfig && prismaConfig.data?.seed) {
235
- return void 0;
236
- }
237
- const packageManager = (0, import_has_yarn.default)() ? "yarn add -D" : "npm i -D";
238
- let message = `${(0, import_chunk_6TE2RIPN.red)(
239
- 'To configure seeding in your project you need to add a "prisma.seed" property in your package.json with the command to execute it:'
240
- )}
241
-
242
- 1. Open the package.json of your project
243
- `;
244
- if (detected.numberOfSeedFiles) {
245
- await legacyTsNodeScriptWarning();
246
- message += `2. Add the following example to it:`;
247
- if (detected.js) {
248
- message += `
249
- \`\`\`
250
- "prisma": {
251
- "seed": "node ${detected.js}"
252
- }
253
- \`\`\`
254
- `;
255
- } else if (detected.ts) {
256
- message += `
257
- \`\`\`
258
- "prisma": {
259
- "seed": "ts-node ${detected.ts}"
260
- }
261
- \`\`\`
262
- If you are using ESM (ECMAScript modules):
263
- \`\`\`
264
- "prisma": {
265
- "seed": "node --loader ts-node/esm ${detected.ts}"
266
- }
267
- \`\`\`
268
-
269
- 3. Install the required dependencies by running:
270
- ${(0, import_chunk_6TE2RIPN.green)(`${packageManager} ts-node typescript @types/node`)}
271
- `;
272
- } else if (detected.sh) {
273
- message += `
274
- \`\`\`
275
- "prisma": {
276
- "seed": "${detected.sh}"
277
- }
278
- \`\`\`
279
- And run \`chmod +x ${detected.sh}\` to make it executable.`;
280
- }
281
- } else {
282
- message += `2. Add one of the following examples to your package.json:
283
-
284
- ${(0, import_chunk_6TE2RIPN.bold)("TypeScript:")}
285
- \`\`\`
286
- "prisma": {
287
- "seed": "ts-node ./prisma/seed.ts"
288
- }
289
- \`\`\`
290
- If you are using ESM (ECMAScript modules):
291
- \`\`\`
292
- "prisma": {
293
- "seed": "node --loader ts-node/esm ./prisma/seed.ts"
294
- }
295
- \`\`\`
296
-
297
- And install the required dependencies by running:
298
- ${packageManager} ts-node typescript @types/node
299
-
300
- ${(0, import_chunk_6TE2RIPN.bold)("JavaScript:")}
301
- \`\`\`
302
- "prisma": {
303
- "seed": "node ./prisma/seed.js"
304
- }
305
- \`\`\`
306
-
307
- ${(0, import_chunk_6TE2RIPN.bold)("Bash:")}
308
- \`\`\`
309
- "prisma": {
310
- "seed": "./prisma/seed.sh"
311
- }
312
- \`\`\`
313
- And run \`chmod +x prisma/seed.sh\` to make it executable.`;
314
- }
315
- message += `
316
- More information in our documentation:
317
- ${(0, import_internals.link)("https://pris.ly/d/seeding")}`;
318
- return message;
319
- }
320
- async function getSeedCommandFromPackageJson(cwd) {
321
- const prismaConfig = await (0, import_internals.getPrismaConfigFromPackageJson)(cwd);
322
- debug({ prismaConfig });
323
- if (!prismaConfig || !prismaConfig.data?.seed) {
324
- return null;
325
- }
326
- const seedCommandFromPkgJson = prismaConfig.data.seed;
327
- if (typeof seedCommandFromPkgJson !== "string") {
328
- throw new Error(
329
- `Provided seed command \`${seedCommandFromPkgJson}\` from \`${import_path.default.relative(
330
- cwd,
331
- prismaConfig.packagePath
332
- )}\` must be of type string`
333
- );
334
- }
335
- if (!seedCommandFromPkgJson) {
336
- throw new Error(
337
- `Provided seed command \`${seedCommandFromPkgJson}\` from \`${import_path.default.relative(
338
- cwd,
339
- prismaConfig.packagePath
340
- )}\` cannot be empty`
341
- );
342
- }
343
- return seedCommandFromPkgJson;
344
- }
345
- async function executeSeedCommand({
346
- commandFromConfig,
347
- extraArgs
348
- }) {
349
- const command = extraArgs ? `${commandFromConfig} ${extraArgs}` : commandFromConfig;
350
- process.stdout.write(`Running seed command \`${(0, import_chunk_6TE2RIPN.italic)(command)}\` ...
351
- `);
352
- try {
353
- await import_execa.default.command(command, {
354
- stdout: "inherit",
355
- stderr: "inherit"
356
- });
357
- } catch (_e) {
358
- const e = _e;
359
- debug({ e });
360
- console.error((0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.red)(`
361
- An error occurred while running the seed command:`)));
362
- console.error((0, import_chunk_6TE2RIPN.red)(e.stderr || String(e)));
363
- return false;
364
- }
365
- return true;
366
- }
367
- function detectSeedFiles(cwd, schemaPath) {
368
- let parentDirectory = import_path.default.relative(cwd, import_path.default.join(cwd, "prisma"));
369
- if (schemaPath) {
370
- parentDirectory = import_path.default.relative(cwd, import_path.default.dirname(schemaPath));
371
- }
372
- const seedPath = import_path.default.join(parentDirectory, "seed.");
373
- const detected = {
374
- seedPath,
375
- numberOfSeedFiles: 0,
376
- js: "",
377
- ts: "",
378
- sh: ""
379
- };
380
- const extensions = ["js", "ts", "sh"];
381
- for (const extension of extensions) {
382
- const fullPath = seedPath + extension;
383
- if (!import_fs.default.existsSync(fullPath)) {
384
- continue;
385
- }
386
- detected[extension] = fullPath;
387
- detected.numberOfSeedFiles++;
388
- }
389
- debug({ detected });
390
- return detected;
391
- }
392
- async function legacyTsNodeScriptWarning() {
393
- const scripts = await getScriptsFromPackageJson();
394
- if (scripts?.["ts-node"]) {
395
- import_internals.logger.warn(
396
- (0, import_chunk_6TE2RIPN.yellow)(`The "ts-node" script in the package.json is not used anymore since version 3.0 and can now be removed.`)
397
- );
398
- }
399
- return void 0;
400
- }
401
- async function getScriptsFromPackageJson(cwd = process.cwd()) {
402
- try {
403
- const pkgJsonPath = await (0, import_pkg_up.default)({ cwd });
404
- if (!pkgJsonPath) {
405
- return null;
406
- }
407
- const pkgJsonString = await import_fs.default.promises.readFile(pkgJsonPath, "utf-8");
408
- const pkgJson = JSON.parse(pkgJsonString);
409
- const { "ts-node": tsnode } = pkgJson.scripts;
410
- return { "ts-node": tsnode };
411
- } catch {
412
- return null;
413
- }
414
- }
415
- var import_execa, import_has_yarn, import_pkg_up, debug;
416
- var init_seed = (0, import_chunk_WWAWV7DQ.__esm)({
417
- "src/utils/seed.ts"() {
418
- import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_WIZM7TFT.require_execa)());
419
- import_has_yarn = (0, import_chunk_WWAWV7DQ.__toESM)(require_has_yarn());
420
- (0, import_chunk_6TE2RIPN.init_colors)();
421
- import_pkg_up = (0, import_chunk_WWAWV7DQ.__toESM)(require_pkg_up());
422
- debug = (0, import_debug.default)("prisma:migrate:seed");
423
- }
424
- });
@@ -1,9 +0,0 @@
1
- /**
2
- * Warn, if yarn is older than 1.19.2 because Yarn used to remove all dot
3
- * folders inside node_modules before. We use node_modules/.prisma/client
4
- * directory as default location for generated Prisma Client. Changelog
5
- * https://github.com/yarnpkg/yarn/blob/HEAD/CHANGELOG.md#1192
6
- * https://www.prisma.io/docs/reference/system-requirements#software-requirements
7
- * // TODO Maybe we replace this with the "engines" field in package.json
8
- */
9
- export declare function checkYarnVersion(): void;