@prisma/migrate 6.5.0-dev.6 → 6.5.0-dev.60
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 +2 -2
- package/dist/Migrate.js +3 -3
- package/dist/SchemaEngine.js +3 -3
- package/dist/bin.js +35 -35
- package/dist/{chunk-CHBE43L6.js → chunk-3V3ZGR72.js} +464 -1335
- package/dist/{chunk-J77IRNPE.js → chunk-5VDXAE53.js} +45 -31
- package/dist/{chunk-PSYS5XVH.js → chunk-A4BCLP6K.js} +23 -32
- package/dist/{chunk-CTPONE6G.js → chunk-DLLXDCI2.js} +6 -3
- package/dist/{chunk-4EV2RVXY.js → chunk-E7OXHCDR.js} +31 -37
- package/dist/{chunk-73OPZA7N.js → chunk-EGPJABTW.js} +136 -81
- package/dist/{chunk-TM3ETZES.js → chunk-EX2UWGES.js} +11 -10
- package/dist/{chunk-FRTPDRF2.js → chunk-G2XUUMKH.js} +5 -5
- package/dist/{chunk-6DFJIBJX.js → chunk-GKDFIHM2.js} +3 -3
- package/dist/{chunk-2NMFKGXM.js → chunk-IR55GBON.js} +5 -5
- package/dist/{chunk-DDHPSYC4.js → chunk-KXMACMQC.js} +9 -6
- package/dist/{chunk-I4EY55DC.js → chunk-LZOZZRHB.js} +10 -9
- package/dist/{chunk-4JQIX6O7.js → chunk-MKK3GSDF.js} +5 -5
- package/dist/{chunk-D74DU52C.js → chunk-QBA7W2BT.js} +463 -1334
- package/dist/{chunk-LVLRGTYH.js → chunk-TPJISPJ5.js} +10 -9
- package/dist/{chunk-YZVZCC3I.js → chunk-V5TUSOJX.js} +8 -7
- package/dist/{chunk-WNH2ACJS.js → chunk-VVKOFN3Y.js} +6 -5
- package/dist/{chunk-QTAIWPLH.js → chunk-VZ23KD5C.js} +5 -4
- package/dist/{chunk-HIFVDK2U.js → chunk-W2SZNLK4.js} +6 -5
- package/dist/{chunk-WLPX3672.js → chunk-X5N72JHI.js} +8 -7
- package/dist/{chunk-RQFGRXJI.js → chunk-X6KW7BYP.js} +10 -9
- package/dist/{chunk-XRTNIFND.js → chunk-YYPMC5FN.js} +203 -108
- package/dist/{chunk-ORL3LJOT.js → chunk-ZOEKRXDP.js} +16 -7
- package/dist/{chunk-J5FHVALZ.js → chunk-ZQ3OWSVS.js} +10 -9
- package/dist/commands/DbCommand.js +2 -2
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +4 -4
- package/dist/commands/DbPull.js +3 -3
- package/dist/commands/DbPush.js +5 -5
- package/dist/commands/DbSeed.js +2 -2
- package/dist/commands/MigrateCommand.js +2 -2
- package/dist/commands/MigrateDeploy.js +5 -5
- package/dist/commands/MigrateDev.js +5 -5
- package/dist/commands/MigrateDiff.js +6 -6
- package/dist/commands/MigrateReset.js +5 -5
- package/dist/commands/MigrateResolve.js +5 -5
- package/dist/commands/MigrateStatus.js +5 -5
- package/dist/index.js +39 -39
- package/dist/internals/src/errorReporting.d.ts +1 -0
- package/dist/utils/captureStdout.js +2 -2
- package/dist/utils/getDatabaseVersionSafe.js +3 -3
- package/dist/utils/getSchemaPathAndPrint.js +3 -3
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/setupCockroach.js +2 -2
- package/dist/utils/setupMSSQL.js +13 -13
- package/dist/utils/setupMongo.js +3 -3
- package/dist/utils/setupMysql.js +231 -99
- package/dist/utils/setupPostgres.js +2 -2
- package/package.json +14 -14
|
@@ -16,14 +16,14 @@ 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_YYPMC5FN_exports = {};
|
|
20
|
+
__export(chunk_YYPMC5FN_exports, {
|
|
21
21
|
require_commonjs: () => require_commonjs
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_YYPMC5FN_exports);
|
|
24
24
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
25
|
var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
26
|
-
"../../node_modules/.pnpm/lru-cache@10.
|
|
26
|
+
"../../node_modules/.pnpm/lru-cache@10.4.3/node_modules/lru-cache/dist/commonjs/index.js"(exports) {
|
|
27
27
|
"use strict";
|
|
28
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
29
|
exports.LRUCache = void 0;
|
|
@@ -111,7 +111,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
111
111
|
_constructing = /* @__PURE__ */ new WeakMap();
|
|
112
112
|
(0, import_chunk_WWAWV7DQ.__privateAdd)(_Stack, _constructing, false);
|
|
113
113
|
var Stack = _Stack;
|
|
114
|
-
var _a, _b, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _LRUCache_instances, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, indexes_fn, rindexes_fn, isValidIndex_fn, evict_fn, backgroundFetch_fn, isBackgroundFetch_fn, connect_fn, moveToTail_fn;
|
|
114
|
+
var _a, _b, _max, _maxSize, _dispose, _disposeAfter, _fetchMethod, _memoMethod, _size, _calculatedSize, _keyMap, _keyList, _valList, _next, _prev, _head, _tail, _free, _disposed, _sizes, _starts, _ttls, _hasDispose, _hasFetchMethod, _hasDisposeAfter, _LRUCache_instances, initializeTTLTracking_fn, _updateItemAge, _statusTTL, _setItemTTL, _isStale, initializeSizeTracking_fn, _removeItemSize, _addItemSize, _requireSize, indexes_fn, rindexes_fn, isValidIndex_fn, evict_fn, backgroundFetch_fn, isBackgroundFetch_fn, connect_fn, moveToTail_fn, delete_fn, clear_fn;
|
|
115
115
|
var _LRUCache = class _LRUCache2 {
|
|
116
116
|
constructor(options) {
|
|
117
117
|
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _LRUCache_instances);
|
|
@@ -120,6 +120,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
120
120
|
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _dispose);
|
|
121
121
|
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _disposeAfter);
|
|
122
122
|
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _fetchMethod);
|
|
123
|
+
(0, import_chunk_WWAWV7DQ.__privateAdd)(this, _memoMethod);
|
|
123
124
|
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttl");
|
|
124
125
|
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttlResolution");
|
|
125
126
|
(0, import_chunk_WWAWV7DQ.__publicField)(this, "ttlAutopurge");
|
|
@@ -170,7 +171,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
170
171
|
return 0;
|
|
171
172
|
});
|
|
172
173
|
(0, import_chunk_WWAWV7DQ.__publicField)(this, _a, "LRUCache");
|
|
173
|
-
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
|
|
174
|
+
const { max = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort } = options;
|
|
174
175
|
if (max !== 0 && !isPosInt(max)) {
|
|
175
176
|
throw new TypeError("max option must be a nonnegative integer");
|
|
176
177
|
}
|
|
@@ -190,6 +191,10 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
190
191
|
throw new TypeError("sizeCalculation set to non-function");
|
|
191
192
|
}
|
|
192
193
|
}
|
|
194
|
+
if (memoMethod !== void 0 && typeof memoMethod !== "function") {
|
|
195
|
+
throw new TypeError("memoMethod must be a function if defined");
|
|
196
|
+
}
|
|
197
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _memoMethod, memoMethod);
|
|
193
198
|
if (fetchMethod !== void 0 && typeof fetchMethod !== "function") {
|
|
194
199
|
throw new TypeError("fetchMethod must be a function if specified");
|
|
195
200
|
}
|
|
@@ -344,6 +349,9 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
344
349
|
get fetchMethod() {
|
|
345
350
|
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _fetchMethod);
|
|
346
351
|
}
|
|
352
|
+
get memoMethod() {
|
|
353
|
+
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _memoMethod);
|
|
354
|
+
}
|
|
347
355
|
/**
|
|
348
356
|
* {@link LRUCache.OptionsBase.dispose} (read-only)
|
|
349
357
|
*/
|
|
@@ -357,7 +365,8 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
357
365
|
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter);
|
|
358
366
|
}
|
|
359
367
|
/**
|
|
360
|
-
* Return the
|
|
368
|
+
* Return the number of ms left in the item's TTL. If item is not in cache,
|
|
369
|
+
* returns `0`. Returns `Infinity` if item is in cache without a defined TTL.
|
|
361
370
|
*/
|
|
362
371
|
getRemainingTTL(key) {
|
|
363
372
|
return (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).has(key) ? Infinity : 0;
|
|
@@ -447,7 +456,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
447
456
|
}
|
|
448
457
|
/**
|
|
449
458
|
* Find a value for which the supplied fn method returns a truthy value,
|
|
450
|
-
* similar to Array.find()
|
|
459
|
+
* similar to `Array.find()`. fn is called as `fn(value, key, cache)`.
|
|
451
460
|
*/
|
|
452
461
|
find(fn, getOptions = {}) {
|
|
453
462
|
for (const i of (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, indexes_fn).call(this)) {
|
|
@@ -461,10 +470,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
461
470
|
}
|
|
462
471
|
}
|
|
463
472
|
/**
|
|
464
|
-
* Call the supplied function on each item in the cache, in order from
|
|
465
|
-
*
|
|
466
|
-
*
|
|
467
|
-
*
|
|
473
|
+
* Call the supplied function on each item in the cache, in order from most
|
|
474
|
+
* recently used to least recently used.
|
|
475
|
+
*
|
|
476
|
+
* `fn` is called as `fn(value, key, cache)`.
|
|
477
|
+
*
|
|
478
|
+
* If `thisp` is provided, function will be called in the `this`-context of
|
|
479
|
+
* the provided object, or the cache if no `thisp` object is provided.
|
|
480
|
+
*
|
|
481
|
+
* Does not update age or recenty of use, or iterate over stale values.
|
|
468
482
|
*/
|
|
469
483
|
forEach(fn, thisp = this) {
|
|
470
484
|
for (const i of (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, indexes_fn).call(this)) {
|
|
@@ -496,7 +510,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
496
510
|
let deleted = false;
|
|
497
511
|
for (const i of (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, rindexes_fn).call(this, { allowStale: true })) {
|
|
498
512
|
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _isStale).call(this, i)) {
|
|
499
|
-
this.
|
|
513
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[i], "expire");
|
|
500
514
|
deleted = true;
|
|
501
515
|
}
|
|
502
516
|
}
|
|
@@ -504,9 +518,15 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
504
518
|
}
|
|
505
519
|
/**
|
|
506
520
|
* Get the extended info about a given entry, to get its value, size, and
|
|
507
|
-
* TTL info simultaneously.
|
|
508
|
-
*
|
|
509
|
-
*
|
|
521
|
+
* TTL info simultaneously. Returns `undefined` if the key is not present.
|
|
522
|
+
*
|
|
523
|
+
* Unlike {@link LRUCache#dump}, which is designed to be portable and survive
|
|
524
|
+
* serialization, the `start` value is always the current timestamp, and the
|
|
525
|
+
* `ttl` is a calculated remaining time to live (negative if expired).
|
|
526
|
+
*
|
|
527
|
+
* Always returns stale values, if their info is found in the cache, so be
|
|
528
|
+
* sure to check for expirations (ie, a negative {@link LRUCache.Entry#ttl})
|
|
529
|
+
* if relevant.
|
|
510
530
|
*/
|
|
511
531
|
info(key) {
|
|
512
532
|
const i = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(key);
|
|
@@ -533,7 +553,16 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
533
553
|
}
|
|
534
554
|
/**
|
|
535
555
|
* Return an array of [key, {@link LRUCache.Entry}] tuples which can be
|
|
536
|
-
* passed to
|
|
556
|
+
* passed to {@link LRLUCache#load}.
|
|
557
|
+
*
|
|
558
|
+
* The `start` fields are calculated relative to a portable `Date.now()`
|
|
559
|
+
* timestamp, even if `performance.now()` is available.
|
|
560
|
+
*
|
|
561
|
+
* Stale entries are always included in the `dump`, even if
|
|
562
|
+
* {@link LRUCache.OptionsBase.allowStale} is false.
|
|
563
|
+
*
|
|
564
|
+
* Note: this returns an actual array, not a generator, so it can be more
|
|
565
|
+
* easily passed around.
|
|
537
566
|
*/
|
|
538
567
|
dump() {
|
|
539
568
|
const arr = [];
|
|
@@ -558,8 +587,12 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
558
587
|
}
|
|
559
588
|
/**
|
|
560
589
|
* Reset the cache and load in the items in entries in the order listed.
|
|
561
|
-
*
|
|
562
|
-
*
|
|
590
|
+
*
|
|
591
|
+
* The shape of the resulting cache may be different if the same options are
|
|
592
|
+
* not used in both caches.
|
|
593
|
+
*
|
|
594
|
+
* The `start` fields are assumed to be calculated relative to a portable
|
|
595
|
+
* `Date.now()` timestamp, even if `performance.now()` is available.
|
|
563
596
|
*/
|
|
564
597
|
load(arr) {
|
|
565
598
|
this.clear();
|
|
@@ -576,6 +609,30 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
576
609
|
*
|
|
577
610
|
* Note: if `undefined` is specified as a value, this is an alias for
|
|
578
611
|
* {@link LRUCache#delete}
|
|
612
|
+
*
|
|
613
|
+
* Fields on the {@link LRUCache.SetOptions} options param will override
|
|
614
|
+
* their corresponding values in the constructor options for the scope
|
|
615
|
+
* of this single `set()` operation.
|
|
616
|
+
*
|
|
617
|
+
* If `start` is provided, then that will set the effective start
|
|
618
|
+
* time for the TTL calculation. Note that this must be a previous
|
|
619
|
+
* value of `performance.now()` if supported, or a previous value of
|
|
620
|
+
* `Date.now()` if not.
|
|
621
|
+
*
|
|
622
|
+
* Options object may also include `size`, which will prevent
|
|
623
|
+
* calling the `sizeCalculation` function and just use the specified
|
|
624
|
+
* number if it is a positive integer, and `noDisposeOnSet` which
|
|
625
|
+
* will prevent calling a `dispose` function in the case of
|
|
626
|
+
* overwrites.
|
|
627
|
+
*
|
|
628
|
+
* If the `size` (or return value of `sizeCalculation`) for a given
|
|
629
|
+
* entry is greater than `maxEntrySize`, then the item will not be
|
|
630
|
+
* added to the cache.
|
|
631
|
+
*
|
|
632
|
+
* Will update the recency of the entry.
|
|
633
|
+
*
|
|
634
|
+
* If the value is `undefined`, then this is an alias for
|
|
635
|
+
* `cache.delete(key)`. `undefined` is never stored in the cache.
|
|
579
636
|
*/
|
|
580
637
|
set(k, v, setOptions = {}) {
|
|
581
638
|
var _a2, _b2, _c;
|
|
@@ -591,7 +648,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
591
648
|
status.set = "miss";
|
|
592
649
|
status.maxEntrySizeExceeded = true;
|
|
593
650
|
}
|
|
594
|
-
this.
|
|
651
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "set");
|
|
595
652
|
return this;
|
|
596
653
|
}
|
|
597
654
|
let index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) === 0 ? void 0 : (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(k);
|
|
@@ -696,6 +753,14 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
696
753
|
* Will return false if the item is stale, even though it is technically
|
|
697
754
|
* in the cache.
|
|
698
755
|
*
|
|
756
|
+
* Check if a key is in the cache, without updating the recency of
|
|
757
|
+
* use. Age is updated if {@link LRUCache.OptionsBase.updateAgeOnHas} is set
|
|
758
|
+
* to `true` in either the options or the constructor.
|
|
759
|
+
*
|
|
760
|
+
* Will return `false` if the item is stale, even though it is technically in
|
|
761
|
+
* the cache. The difference can be determined (if it matters) by using a
|
|
762
|
+
* `status` argument, and inspecting the `has` field.
|
|
763
|
+
*
|
|
699
764
|
* Will not update item age unless
|
|
700
765
|
* {@link LRUCache.OptionsBase.updateAgeOnHas} is set.
|
|
701
766
|
*/
|
|
@@ -829,6 +894,28 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
829
894
|
return staleVal ? p.__staleWhileFetching : p.__returned = p;
|
|
830
895
|
}
|
|
831
896
|
}
|
|
897
|
+
async forceFetch(k, fetchOptions = {}) {
|
|
898
|
+
const v = await this.fetch(k, fetchOptions);
|
|
899
|
+
if (v === void 0)
|
|
900
|
+
throw new Error("fetch() returned undefined");
|
|
901
|
+
return v;
|
|
902
|
+
}
|
|
903
|
+
memo(k, memoOptions = {}) {
|
|
904
|
+
const memoMethod = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _memoMethod);
|
|
905
|
+
if (!memoMethod) {
|
|
906
|
+
throw new Error("no memoMethod provided to constructor");
|
|
907
|
+
}
|
|
908
|
+
const { context, forceRefresh, ...options } = memoOptions;
|
|
909
|
+
const v = this.get(k, options);
|
|
910
|
+
if (!forceRefresh && v !== void 0)
|
|
911
|
+
return v;
|
|
912
|
+
const vv = memoMethod(k, v, {
|
|
913
|
+
options,
|
|
914
|
+
context
|
|
915
|
+
});
|
|
916
|
+
this.set(k, vv, options);
|
|
917
|
+
return vv;
|
|
918
|
+
}
|
|
832
919
|
/**
|
|
833
920
|
* Return a value from the cache. Will update the recency of the cache
|
|
834
921
|
* entry found.
|
|
@@ -848,7 +935,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
848
935
|
status.get = "stale";
|
|
849
936
|
if (!fetching) {
|
|
850
937
|
if (!noDeleteOnStaleGet) {
|
|
851
|
-
this.
|
|
938
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "expire");
|
|
852
939
|
}
|
|
853
940
|
if (status && allowStale)
|
|
854
941
|
status.returnedStale = true;
|
|
@@ -877,98 +964,17 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
877
964
|
}
|
|
878
965
|
/**
|
|
879
966
|
* Deletes a key out of the cache.
|
|
967
|
+
*
|
|
880
968
|
* Returns true if the key was deleted, false otherwise.
|
|
881
969
|
*/
|
|
882
970
|
delete(k) {
|
|
883
|
-
|
|
884
|
-
let deleted = false;
|
|
885
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) !== 0) {
|
|
886
|
-
const index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(k);
|
|
887
|
-
if (index !== void 0) {
|
|
888
|
-
deleted = true;
|
|
889
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) === 1) {
|
|
890
|
-
this.clear();
|
|
891
|
-
} else {
|
|
892
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _removeItemSize).call(this, index);
|
|
893
|
-
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
|
894
|
-
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
|
895
|
-
v.__abortController.abort(new Error("deleted"));
|
|
896
|
-
} else if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose) || (0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
897
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
|
898
|
-
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, "delete");
|
|
899
|
-
}
|
|
900
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
901
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, "delete"]);
|
|
902
|
-
}
|
|
903
|
-
}
|
|
904
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).delete(k);
|
|
905
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index] = void 0;
|
|
906
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = void 0;
|
|
907
|
-
if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail)) {
|
|
908
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index]);
|
|
909
|
-
} else if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
|
|
910
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index]);
|
|
911
|
-
} else {
|
|
912
|
-
const pi = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
|
913
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[pi] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
|
914
|
-
const ni = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
|
915
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[ni] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
|
916
|
-
}
|
|
917
|
-
(0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._--;
|
|
918
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).push(index);
|
|
919
|
-
}
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.length) {
|
|
923
|
-
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
|
924
|
-
let task;
|
|
925
|
-
while (task = dt?.shift()) {
|
|
926
|
-
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
|
927
|
-
}
|
|
928
|
-
}
|
|
929
|
-
return deleted;
|
|
971
|
+
return (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "delete");
|
|
930
972
|
}
|
|
931
973
|
/**
|
|
932
974
|
* Clear the cache entirely, throwing away all values.
|
|
933
975
|
*/
|
|
934
976
|
clear() {
|
|
935
|
-
|
|
936
|
-
for (const index of (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, rindexes_fn).call(this, { allowStale: true })) {
|
|
937
|
-
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
|
938
|
-
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
|
939
|
-
v.__abortController.abort(new Error("deleted"));
|
|
940
|
-
} else {
|
|
941
|
-
const k = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index];
|
|
942
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
|
943
|
-
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, "delete");
|
|
944
|
-
}
|
|
945
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
946
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, "delete"]);
|
|
947
|
-
}
|
|
948
|
-
}
|
|
949
|
-
}
|
|
950
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).clear();
|
|
951
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList).fill(void 0);
|
|
952
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList).fill(void 0);
|
|
953
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts)) {
|
|
954
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls).fill(0);
|
|
955
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts).fill(0);
|
|
956
|
-
}
|
|
957
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes)) {
|
|
958
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes).fill(0);
|
|
959
|
-
}
|
|
960
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, 0);
|
|
961
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, 0);
|
|
962
|
-
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).length = 0;
|
|
963
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, 0);
|
|
964
|
-
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _size, 0);
|
|
965
|
-
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)) {
|
|
966
|
-
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
|
967
|
-
let task;
|
|
968
|
-
while (task = dt?.shift()) {
|
|
969
|
-
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
|
970
|
-
}
|
|
971
|
-
}
|
|
977
|
+
return (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, clear_fn).call(this, "delete");
|
|
972
978
|
}
|
|
973
979
|
};
|
|
974
980
|
_max = /* @__PURE__ */ new WeakMap();
|
|
@@ -976,6 +982,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
976
982
|
_dispose = /* @__PURE__ */ new WeakMap();
|
|
977
983
|
_disposeAfter = /* @__PURE__ */ new WeakMap();
|
|
978
984
|
_fetchMethod = /* @__PURE__ */ new WeakMap();
|
|
985
|
+
_memoMethod = /* @__PURE__ */ new WeakMap();
|
|
979
986
|
_size = /* @__PURE__ */ new WeakMap();
|
|
980
987
|
_calculatedSize = /* @__PURE__ */ new WeakMap();
|
|
981
988
|
_keyMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1005,7 +1012,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1005
1012
|
if (ttl !== 0 && this.ttlAutopurge) {
|
|
1006
1013
|
const t = setTimeout(() => {
|
|
1007
1014
|
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _isStale).call(this, index)) {
|
|
1008
|
-
this.
|
|
1015
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index], "expire");
|
|
1009
1016
|
}
|
|
1010
1017
|
}, ttl + 1);
|
|
1011
1018
|
if (t.unref) {
|
|
@@ -1214,7 +1221,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1214
1221
|
if (bf2.__staleWhileFetching) {
|
|
1215
1222
|
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = bf2.__staleWhileFetching;
|
|
1216
1223
|
} else {
|
|
1217
|
-
this.
|
|
1224
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "fetch");
|
|
1218
1225
|
}
|
|
1219
1226
|
} else {
|
|
1220
1227
|
if (options.status)
|
|
@@ -1240,7 +1247,7 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1240
1247
|
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] === p) {
|
|
1241
1248
|
const del = !noDelete || bf2.__staleWhileFetching === void 0;
|
|
1242
1249
|
if (del) {
|
|
1243
|
-
this.
|
|
1250
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, delete_fn).call(this, k, "fetch");
|
|
1244
1251
|
} else if (!allowStaleAborted) {
|
|
1245
1252
|
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = bf2.__staleWhileFetching;
|
|
1246
1253
|
}
|
|
@@ -1306,6 +1313,94 @@ var require_commonjs = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1306
1313
|
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, index);
|
|
1307
1314
|
}
|
|
1308
1315
|
};
|
|
1316
|
+
delete_fn = function(k, reason) {
|
|
1317
|
+
var _a2, _b2;
|
|
1318
|
+
let deleted = false;
|
|
1319
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) !== 0) {
|
|
1320
|
+
const index = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).get(k);
|
|
1321
|
+
if (index !== void 0) {
|
|
1322
|
+
deleted = true;
|
|
1323
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _size) === 1) {
|
|
1324
|
+
(0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, clear_fn).call(this, reason);
|
|
1325
|
+
} else {
|
|
1326
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _removeItemSize).call(this, index);
|
|
1327
|
+
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
|
1328
|
+
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
|
1329
|
+
v.__abortController.abort(new Error("deleted"));
|
|
1330
|
+
} else if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose) || (0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
1331
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
|
1332
|
+
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, reason);
|
|
1333
|
+
}
|
|
1334
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
1335
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, reason]);
|
|
1336
|
+
}
|
|
1337
|
+
}
|
|
1338
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).delete(k);
|
|
1339
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index] = void 0;
|
|
1340
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index] = void 0;
|
|
1341
|
+
if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _tail)) {
|
|
1342
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index]);
|
|
1343
|
+
} else if (index === (0, import_chunk_WWAWV7DQ.__privateGet)(this, _head)) {
|
|
1344
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index]);
|
|
1345
|
+
} else {
|
|
1346
|
+
const pi = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
|
1347
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[pi] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
|
1348
|
+
const ni = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _next)[index];
|
|
1349
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[ni] = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _prev)[index];
|
|
1350
|
+
}
|
|
1351
|
+
(0, import_chunk_WWAWV7DQ.__privateWrapper)(this, _size)._--;
|
|
1352
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).push(index);
|
|
1353
|
+
}
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.length) {
|
|
1357
|
+
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
|
1358
|
+
let task;
|
|
1359
|
+
while (task = dt?.shift()) {
|
|
1360
|
+
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
|
1361
|
+
}
|
|
1362
|
+
}
|
|
1363
|
+
return deleted;
|
|
1364
|
+
};
|
|
1365
|
+
clear_fn = function(reason) {
|
|
1366
|
+
var _a2, _b2;
|
|
1367
|
+
for (const index of (0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, rindexes_fn).call(this, { allowStale: true })) {
|
|
1368
|
+
const v = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList)[index];
|
|
1369
|
+
if ((0, import_chunk_WWAWV7DQ.__privateMethod)(this, _LRUCache_instances, isBackgroundFetch_fn).call(this, v)) {
|
|
1370
|
+
v.__abortController.abort(new Error("deleted"));
|
|
1371
|
+
} else {
|
|
1372
|
+
const k = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList)[index];
|
|
1373
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDispose)) {
|
|
1374
|
+
(_a2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _dispose)) == null ? void 0 : _a2.call(this, v, k, reason);
|
|
1375
|
+
}
|
|
1376
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter)) {
|
|
1377
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)?.push([v, k, reason]);
|
|
1378
|
+
}
|
|
1379
|
+
}
|
|
1380
|
+
}
|
|
1381
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyMap).clear();
|
|
1382
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _valList).fill(void 0);
|
|
1383
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _keyList).fill(void 0);
|
|
1384
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts)) {
|
|
1385
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _ttls).fill(0);
|
|
1386
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _starts).fill(0);
|
|
1387
|
+
}
|
|
1388
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes)) {
|
|
1389
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _sizes).fill(0);
|
|
1390
|
+
}
|
|
1391
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _head, 0);
|
|
1392
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _tail, 0);
|
|
1393
|
+
(0, import_chunk_WWAWV7DQ.__privateGet)(this, _free).length = 0;
|
|
1394
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _calculatedSize, 0);
|
|
1395
|
+
(0, import_chunk_WWAWV7DQ.__privateSet)(this, _size, 0);
|
|
1396
|
+
if ((0, import_chunk_WWAWV7DQ.__privateGet)(this, _hasDisposeAfter) && (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed)) {
|
|
1397
|
+
const dt = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposed);
|
|
1398
|
+
let task;
|
|
1399
|
+
while (task = dt?.shift()) {
|
|
1400
|
+
(_b2 = (0, import_chunk_WWAWV7DQ.__privateGet)(this, _disposeAfter)) == null ? void 0 : _b2.call(this, ...task);
|
|
1401
|
+
}
|
|
1402
|
+
}
|
|
1403
|
+
};
|
|
1309
1404
|
var LRUCache = _LRUCache;
|
|
1310
1405
|
exports.LRUCache = LRUCache;
|
|
1311
1406
|
}
|
|
@@ -26,15 +26,16 @@ 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_ZOEKRXDP_exports = {};
|
|
30
|
+
__export(chunk_ZOEKRXDP_exports, {
|
|
31
31
|
EngineError: () => EngineError,
|
|
32
32
|
SchemaEngine: () => SchemaEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_ZOEKRXDP_exports);
|
|
35
35
|
var import_chunk_MATFO4ZW = require("./chunk-MATFO4ZW.js");
|
|
36
36
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
37
37
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
38
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
38
39
|
var import_node_path = __toESM(require("node:path"));
|
|
39
40
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
40
41
|
var import_internals = require("@prisma/internals");
|
|
@@ -45,6 +46,7 @@ var debugStdin = (0, import_debug.default)("prisma:schemaEngine:stdin");
|
|
|
45
46
|
var EngineError = class extends Error {
|
|
46
47
|
constructor(message, code) {
|
|
47
48
|
super(message);
|
|
49
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "code");
|
|
48
50
|
this.code = code;
|
|
49
51
|
}
|
|
50
52
|
};
|
|
@@ -52,10 +54,17 @@ var EngineError = class extends Error {
|
|
|
52
54
|
var messageId = 1;
|
|
53
55
|
var SchemaEngine = class {
|
|
54
56
|
constructor({ debug = false, schemaPath, enabledPreviewFeatures }) {
|
|
55
|
-
this
|
|
56
|
-
this
|
|
57
|
-
this
|
|
58
|
-
this
|
|
57
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "debug");
|
|
58
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "child");
|
|
59
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
|
|
60
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "listeners", {});
|
|
61
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "messages", []);
|
|
62
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastRequest");
|
|
63
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastError", null);
|
|
64
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "initPromise");
|
|
65
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "enabledPreviewFeatures");
|
|
66
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "latestSchema");
|
|
67
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(this, "isRunning", false);
|
|
59
68
|
this.schemaPath = schemaPath;
|
|
60
69
|
if (debug) {
|
|
61
70
|
import_debug.default.enable("SchemaEngine*");
|
|
@@ -26,17 +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_ZQ3OWSVS_exports = {};
|
|
30
|
+
__export(chunk_ZQ3OWSVS_exports, {
|
|
31
31
|
DbPush: () => DbPush
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_ZQ3OWSVS_exports);
|
|
34
|
+
var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
|
|
35
35
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
37
37
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
38
|
var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
|
|
39
39
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
40
41
|
var import_internals = require("@prisma/internals");
|
|
41
42
|
var import_prompts = __toESM(require("prompts"));
|
|
42
43
|
var _DbPush = class _DbPush2 {
|
|
@@ -66,10 +67,10 @@ var _DbPush = class _DbPush2 {
|
|
|
66
67
|
return this.help();
|
|
67
68
|
}
|
|
68
69
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
69
|
-
const { schemaPath } = await (0,
|
|
70
|
+
const { schemaPath } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
70
71
|
const datasourceInfo = await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath });
|
|
71
72
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
72
|
-
const migrate = new
|
|
73
|
+
const migrate = new import_chunk_KXMACMQC.Migrate(schemaPath);
|
|
73
74
|
try {
|
|
74
75
|
const wasDbCreated = await (0, import_chunk_DJMFXNR4.ensureDatabaseExists)("push", schemaPath);
|
|
75
76
|
if (wasDbCreated) {
|
|
@@ -200,7 +201,7 @@ ${_DbPush2.help}`);
|
|
|
200
201
|
return _DbPush2.help;
|
|
201
202
|
}
|
|
202
203
|
};
|
|
203
|
-
_DbPush
|
|
204
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_DbPush, "help", (0, import_internals.format)(`
|
|
204
205
|
${process.platform === "win32" ? "" : "\u{1F64C} "}Push the state from your Prisma schema to your database
|
|
205
206
|
|
|
206
207
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -226,5 +227,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
226
227
|
|
|
227
228
|
Ignore data loss warnings
|
|
228
229
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db push --accept-data-loss
|
|
229
|
-
`);
|
|
230
|
+
`));
|
|
230
231
|
var DbPush = _DbPush;
|
|
@@ -18,9 +18,9 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbCommand_exports = {};
|
|
20
20
|
__export(DbCommand_exports, {
|
|
21
|
-
DbCommand: () =>
|
|
21
|
+
DbCommand: () => import_chunk_W2SZNLK4.DbCommand
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbCommand_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_W2SZNLK4 = require("../chunk-W2SZNLK4.js");
|
|
25
25
|
var import_chunk_SKRR5WT4 = require("../chunk-SKRR5WT4.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
|
package/dist/commands/DbDrop.js
CHANGED
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbDrop_exports = {};
|
|
20
20
|
__export(DbDrop_exports, {
|
|
21
|
-
DbDrop: () =>
|
|
21
|
+
DbDrop: () => import_chunk_V5TUSOJX.DbDrop
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbDrop_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_V5TUSOJX = require("../chunk-V5TUSOJX.js");
|
|
25
25
|
var import_chunk_IHDN3L3R = require("../chunk-IHDN3L3R.js");
|
|
26
26
|
var import_chunk_3WC4XD74 = require("../chunk-3WC4XD74.js");
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_GKDFIHM2 = require("../chunk-GKDFIHM2.js");
|
|
28
28
|
var import_chunk_QOPTDDIH = require("../chunk-QOPTDDIH.js");
|
|
29
29
|
var import_chunk_DJMFXNR4 = require("../chunk-DJMFXNR4.js");
|
|
30
30
|
var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
|
|
@@ -18,14 +18,14 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbExecute_exports = {};
|
|
20
20
|
__export(DbExecute_exports, {
|
|
21
|
-
DbExecute: () =>
|
|
21
|
+
DbExecute: () => import_chunk_E7OXHCDR.DbExecute
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbExecute_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_E7OXHCDR = require("../chunk-E7OXHCDR.js");
|
|
25
|
+
var import_chunk_KXMACMQC = require("../chunk-KXMACMQC.js");
|
|
26
26
|
var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
|
|
27
27
|
var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
|
|
28
|
-
var
|
|
28
|
+
var import_chunk_ZOEKRXDP = require("../chunk-ZOEKRXDP.js");
|
|
29
29
|
var import_chunk_MATFO4ZW = require("../chunk-MATFO4ZW.js");
|
|
30
30
|
var import_chunk_L6KOIJJ5 = require("../chunk-L6KOIJJ5.js");
|
|
31
31
|
var import_chunk_SKRR5WT4 = require("../chunk-SKRR5WT4.js");
|