@prisma/internals 6.6.0-integration-push-xmzqvqxpztks.5 → 6.6.0-integration-feat-orm-693-d1-driver-create-migration-adapter-using-new-http-binding.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (80) hide show
  1. package/dist/Generator.d.ts +5 -23
  2. package/dist/Generator.js +2 -4
  3. package/dist/{chunk-I7MGLNDS.js → chunk-3Y2LOGEP.js} +287 -111
  4. package/dist/chunk-72UZXEBG.js +28 -0
  5. package/dist/{chunk-TGNGIHD7.js → chunk-75AJJ2SV.js} +5 -5
  6. package/dist/{chunk-3R43ZQD7.js → chunk-ABTIXQDX.js} +4 -3
  7. package/dist/{chunk-3IW5B4VR.js → chunk-BC6RF6PC.js} +5 -5
  8. package/dist/{chunk-HD2DLZ4P.js → chunk-BTWAF3S4.js} +7 -7
  9. package/dist/chunk-BWGDP6B5.js +4948 -0
  10. package/dist/{chunk-BPDMLM32.js → chunk-DYVL6P7F.js} +13 -46
  11. package/dist/chunk-EUTJYQDW.js +46 -0
  12. package/dist/chunk-EWWOTVR3.js +52 -0
  13. package/dist/chunk-GHHABGYW.js +28 -0
  14. package/dist/{chunk-RN2HKPE6.js → chunk-GIOVJ5SL.js} +8 -8
  15. package/dist/{chunk-3CHXBY5J.js → chunk-HX2VLZFY.js} +287 -111
  16. package/dist/{chunk-MJIP3FY5.js → chunk-K5W6WZ6E.js} +238 -6
  17. package/dist/{chunk-UZ3OMVFB.js → chunk-LHESHKC2.js} +5 -5
  18. package/dist/{chunk-IYZKSKPJ.js → chunk-MSQTODVE.js} +8 -8
  19. package/dist/{chunk-C73SLFIL.js → chunk-PQE76XRR.js} +5 -5
  20. package/dist/chunk-QGJH4P4N.js +35 -0
  21. package/dist/{chunk-S2R7ACYL.js → chunk-QPHQEGC5.js} +8 -8
  22. package/dist/{chunk-XNFIABGN.js → chunk-RUJGWM5Y.js} +5 -5
  23. package/dist/{chunk-JWAHHTQF.js → chunk-SA65PE7P.js} +5 -5
  24. package/dist/{chunk-S3DSAPBW.js → chunk-T45XO7V4.js} +8 -8
  25. package/dist/{chunk-7JDKTQ7P.js → chunk-T6YMHO44.js} +7 -7
  26. package/dist/{chunk-2H6XXXKO.js → chunk-TV34NMBZ.js} +12 -15
  27. package/dist/{chunk-67I7CEQJ.js → chunk-VVPSLVOR.js} +7 -6
  28. package/dist/{chunk-UPQKNKIW.js → chunk-WHZN3ZOU.js} +5 -5
  29. package/dist/{chunk-MVHUHZE5.js → chunk-XKIMYV5V.js} +5 -5
  30. package/dist/{chunk-3BXWI45I.js → chunk-XPXF244W.js} +5 -4
  31. package/dist/{chunk-IMOWQZSF.js → chunk-XQSHUIJ5.js} +8 -8
  32. package/dist/{chunk-VSRVLIUX.js → chunk-YKPF4IDJ.js} +8 -8
  33. package/dist/cli/checkUnsupportedDataProxy.js +29 -23
  34. package/dist/cli/directoryConfig.d.ts +1 -1
  35. package/dist/cli/directoryConfig.js +2 -2
  36. package/dist/cli/getSchema.d.ts +28 -3
  37. package/dist/cli/getSchema.js +33 -26
  38. package/dist/cli/hashes.d.ts +2 -1
  39. package/dist/cli/hashes.js +29 -23
  40. package/dist/cli/schemaContext.d.ts +3 -4
  41. package/dist/cli/schemaContext.js +29 -23
  42. package/dist/engine-commands/errorHelpers.js +4 -4
  43. package/dist/engine-commands/formatSchema.js +28 -22
  44. package/dist/engine-commands/getConfig.js +10 -10
  45. package/dist/engine-commands/getDmmf.js +7 -7
  46. package/dist/engine-commands/index.js +37 -31
  47. package/dist/engine-commands/lintSchema.js +8 -8
  48. package/dist/engine-commands/mergeSchemas.js +7 -7
  49. package/dist/engine-commands/validate.js +7 -7
  50. package/dist/get-generators/generatorResolvers/generatorResolvers.d.ts +15 -0
  51. package/dist/get-generators/generatorResolvers/generatorResolvers.js +138 -0
  52. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.d.ts +6 -0
  53. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/findPrismaClientDir.js +26 -0
  54. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.d.ts +9 -0
  55. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/getPackageCmd.js +26 -0
  56. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.d.ts +8 -0
  57. package/dist/get-generators/generatorResolvers/prisma-client-js/auto-installation/runPackageCmd.js +29 -0
  58. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.d.ts +6 -0
  59. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkTypeScriptVersion.js +138 -0
  60. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.d.ts +1 -0
  61. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/isYarnUsed.js +26 -0
  62. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.d.ts +20 -0
  63. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/resolve.js +26 -0
  64. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.d.ts +7 -0
  65. package/dist/{resolvePkg.js → get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.js} +6 -6
  66. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.d.ts +1 -0
  67. package/dist/get-generators/generatorResolvers/prisma-client-js/check-dependencies/semverLt.test.js +17 -0
  68. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.d.ts +20 -0
  69. package/dist/get-generators/generatorResolvers/prisma-client-js/prismaClientResolver.js +139 -0
  70. package/dist/get-generators/getGenerators.d.ts +9 -18
  71. package/dist/get-generators/getGenerators.js +31 -25
  72. package/dist/getPackedPackage.js +3 -3
  73. package/dist/index.d.ts +5 -3
  74. package/dist/index.js +60 -53
  75. package/dist/utils/getEnvPaths.js +28 -22
  76. package/dist/utils/getVersionFromPackageJson.js +3 -3
  77. package/dist/utils/loadEnvFile.js +28 -22
  78. package/dist/wasm.js +4 -4
  79. package/package.json +11 -10
  80. package/dist/resolvePkg.d.ts +0 -7
@@ -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 chunk_MJIP3FY5_exports = {};
30
- __export(chunk_MJIP3FY5_exports, {
29
+ var chunk_K5W6WZ6E_exports = {};
30
+ __export(chunk_K5W6WZ6E_exports, {
31
31
  getPackedPackage: () => getPackedPackage,
32
32
  readPackageUp: () => readPackageUp,
33
33
  require_p_map: () => require_p_map,
34
34
  toPath: () => toPath2
35
35
  });
36
- module.exports = __toCommonJS(chunk_MJIP3FY5_exports);
36
+ module.exports = __toCommonJS(chunk_K5W6WZ6E_exports);
37
+ var import_chunk_VVPSLVOR = require("./chunk-VVPSLVOR.js");
37
38
  var import_chunk_KDP6C3CB = require("./chunk-KDP6C3CB.js");
38
39
  var import_chunk_UZTXEBTM = require("./chunk-UZTXEBTM.js");
39
40
  var import_chunk_JOIIWB3U = require("./chunk-JOIIWB3U.js");
40
- var import_chunk_67I7CEQJ = require("./chunk-67I7CEQJ.js");
41
41
  var import_chunk_MM4ARWWY = require("./chunk-MM4ARWWY.js");
42
42
  var import_chunk_5VQNKCKW = require("./chunk-5VQNKCKW.js");
43
43
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
@@ -8633,6 +8633,238 @@ var require_lib8 = (0, import_chunk_4VNS5WPM.__commonJS)({
8633
8633
  module2.exports = GitHost;
8634
8634
  }
8635
8635
  });
8636
+ var require_hasown = (0, import_chunk_4VNS5WPM.__commonJS)({
8637
+ "../../node_modules/.pnpm/hasown@2.0.0/node_modules/hasown/index.js"(exports, module2) {
8638
+ "use strict";
8639
+ var call = Function.prototype.call;
8640
+ var $hasOwn = Object.prototype.hasOwnProperty;
8641
+ var bind = (0, import_chunk_VVPSLVOR.require_function_bind)();
8642
+ module2.exports = bind.call(call, $hasOwn);
8643
+ }
8644
+ });
8645
+ var require_core = (0, import_chunk_4VNS5WPM.__commonJS)({
8646
+ "../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/core.json"(exports, module2) {
8647
+ module2.exports = {
8648
+ assert: true,
8649
+ "node:assert": [">= 14.18 && < 15", ">= 16"],
8650
+ "assert/strict": ">= 15",
8651
+ "node:assert/strict": ">= 16",
8652
+ async_hooks: ">= 8",
8653
+ "node:async_hooks": [">= 14.18 && < 15", ">= 16"],
8654
+ buffer_ieee754: ">= 0.5 && < 0.9.7",
8655
+ buffer: true,
8656
+ "node:buffer": [">= 14.18 && < 15", ">= 16"],
8657
+ child_process: true,
8658
+ "node:child_process": [">= 14.18 && < 15", ">= 16"],
8659
+ cluster: ">= 0.5",
8660
+ "node:cluster": [">= 14.18 && < 15", ">= 16"],
8661
+ console: true,
8662
+ "node:console": [">= 14.18 && < 15", ">= 16"],
8663
+ constants: true,
8664
+ "node:constants": [">= 14.18 && < 15", ">= 16"],
8665
+ crypto: true,
8666
+ "node:crypto": [">= 14.18 && < 15", ">= 16"],
8667
+ _debug_agent: ">= 1 && < 8",
8668
+ _debugger: "< 8",
8669
+ dgram: true,
8670
+ "node:dgram": [">= 14.18 && < 15", ">= 16"],
8671
+ diagnostics_channel: [">= 14.17 && < 15", ">= 15.1"],
8672
+ "node:diagnostics_channel": [">= 14.18 && < 15", ">= 16"],
8673
+ dns: true,
8674
+ "node:dns": [">= 14.18 && < 15", ">= 16"],
8675
+ "dns/promises": ">= 15",
8676
+ "node:dns/promises": ">= 16",
8677
+ domain: ">= 0.7.12",
8678
+ "node:domain": [">= 14.18 && < 15", ">= 16"],
8679
+ events: true,
8680
+ "node:events": [">= 14.18 && < 15", ">= 16"],
8681
+ freelist: "< 6",
8682
+ fs: true,
8683
+ "node:fs": [">= 14.18 && < 15", ">= 16"],
8684
+ "fs/promises": [">= 10 && < 10.1", ">= 14"],
8685
+ "node:fs/promises": [">= 14.18 && < 15", ">= 16"],
8686
+ _http_agent: ">= 0.11.1",
8687
+ "node:_http_agent": [">= 14.18 && < 15", ">= 16"],
8688
+ _http_client: ">= 0.11.1",
8689
+ "node:_http_client": [">= 14.18 && < 15", ">= 16"],
8690
+ _http_common: ">= 0.11.1",
8691
+ "node:_http_common": [">= 14.18 && < 15", ">= 16"],
8692
+ _http_incoming: ">= 0.11.1",
8693
+ "node:_http_incoming": [">= 14.18 && < 15", ">= 16"],
8694
+ _http_outgoing: ">= 0.11.1",
8695
+ "node:_http_outgoing": [">= 14.18 && < 15", ">= 16"],
8696
+ _http_server: ">= 0.11.1",
8697
+ "node:_http_server": [">= 14.18 && < 15", ">= 16"],
8698
+ http: true,
8699
+ "node:http": [">= 14.18 && < 15", ">= 16"],
8700
+ http2: ">= 8.8",
8701
+ "node:http2": [">= 14.18 && < 15", ">= 16"],
8702
+ https: true,
8703
+ "node:https": [">= 14.18 && < 15", ">= 16"],
8704
+ inspector: ">= 8",
8705
+ "node:inspector": [">= 14.18 && < 15", ">= 16"],
8706
+ "inspector/promises": [">= 19"],
8707
+ "node:inspector/promises": [">= 19"],
8708
+ _linklist: "< 8",
8709
+ module: true,
8710
+ "node:module": [">= 14.18 && < 15", ">= 16"],
8711
+ net: true,
8712
+ "node:net": [">= 14.18 && < 15", ">= 16"],
8713
+ "node-inspect/lib/_inspect": ">= 7.6 && < 12",
8714
+ "node-inspect/lib/internal/inspect_client": ">= 7.6 && < 12",
8715
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6 && < 12",
8716
+ os: true,
8717
+ "node:os": [">= 14.18 && < 15", ">= 16"],
8718
+ path: true,
8719
+ "node:path": [">= 14.18 && < 15", ">= 16"],
8720
+ "path/posix": ">= 15.3",
8721
+ "node:path/posix": ">= 16",
8722
+ "path/win32": ">= 15.3",
8723
+ "node:path/win32": ">= 16",
8724
+ perf_hooks: ">= 8.5",
8725
+ "node:perf_hooks": [">= 14.18 && < 15", ">= 16"],
8726
+ process: ">= 1",
8727
+ "node:process": [">= 14.18 && < 15", ">= 16"],
8728
+ punycode: ">= 0.5",
8729
+ "node:punycode": [">= 14.18 && < 15", ">= 16"],
8730
+ querystring: true,
8731
+ "node:querystring": [">= 14.18 && < 15", ">= 16"],
8732
+ readline: true,
8733
+ "node:readline": [">= 14.18 && < 15", ">= 16"],
8734
+ "readline/promises": ">= 17",
8735
+ "node:readline/promises": ">= 17",
8736
+ repl: true,
8737
+ "node:repl": [">= 14.18 && < 15", ">= 16"],
8738
+ smalloc: ">= 0.11.5 && < 3",
8739
+ _stream_duplex: ">= 0.9.4",
8740
+ "node:_stream_duplex": [">= 14.18 && < 15", ">= 16"],
8741
+ _stream_transform: ">= 0.9.4",
8742
+ "node:_stream_transform": [">= 14.18 && < 15", ">= 16"],
8743
+ _stream_wrap: ">= 1.4.1",
8744
+ "node:_stream_wrap": [">= 14.18 && < 15", ">= 16"],
8745
+ _stream_passthrough: ">= 0.9.4",
8746
+ "node:_stream_passthrough": [">= 14.18 && < 15", ">= 16"],
8747
+ _stream_readable: ">= 0.9.4",
8748
+ "node:_stream_readable": [">= 14.18 && < 15", ">= 16"],
8749
+ _stream_writable: ">= 0.9.4",
8750
+ "node:_stream_writable": [">= 14.18 && < 15", ">= 16"],
8751
+ stream: true,
8752
+ "node:stream": [">= 14.18 && < 15", ">= 16"],
8753
+ "stream/consumers": ">= 16.7",
8754
+ "node:stream/consumers": ">= 16.7",
8755
+ "stream/promises": ">= 15",
8756
+ "node:stream/promises": ">= 16",
8757
+ "stream/web": ">= 16.5",
8758
+ "node:stream/web": ">= 16.5",
8759
+ string_decoder: true,
8760
+ "node:string_decoder": [">= 14.18 && < 15", ">= 16"],
8761
+ sys: [">= 0.4 && < 0.7", ">= 0.8"],
8762
+ "node:sys": [">= 14.18 && < 15", ">= 16"],
8763
+ "test/reporters": ">= 19.9 && < 20.2",
8764
+ "node:test/reporters": [">= 18.17 && < 19", ">= 19.9", ">= 20"],
8765
+ "node:test": [">= 16.17 && < 17", ">= 18"],
8766
+ timers: true,
8767
+ "node:timers": [">= 14.18 && < 15", ">= 16"],
8768
+ "timers/promises": ">= 15",
8769
+ "node:timers/promises": ">= 16",
8770
+ _tls_common: ">= 0.11.13",
8771
+ "node:_tls_common": [">= 14.18 && < 15", ">= 16"],
8772
+ _tls_legacy: ">= 0.11.3 && < 10",
8773
+ _tls_wrap: ">= 0.11.3",
8774
+ "node:_tls_wrap": [">= 14.18 && < 15", ">= 16"],
8775
+ tls: true,
8776
+ "node:tls": [">= 14.18 && < 15", ">= 16"],
8777
+ trace_events: ">= 10",
8778
+ "node:trace_events": [">= 14.18 && < 15", ">= 16"],
8779
+ tty: true,
8780
+ "node:tty": [">= 14.18 && < 15", ">= 16"],
8781
+ url: true,
8782
+ "node:url": [">= 14.18 && < 15", ">= 16"],
8783
+ util: true,
8784
+ "node:util": [">= 14.18 && < 15", ">= 16"],
8785
+ "util/types": ">= 15.3",
8786
+ "node:util/types": ">= 16",
8787
+ "v8/tools/arguments": ">= 10 && < 12",
8788
+ "v8/tools/codemap": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8789
+ "v8/tools/consarray": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8790
+ "v8/tools/csvparser": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8791
+ "v8/tools/logreader": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8792
+ "v8/tools/profile_view": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8793
+ "v8/tools/splaytree": [">= 4.4 && < 5", ">= 5.2 && < 12"],
8794
+ v8: ">= 1",
8795
+ "node:v8": [">= 14.18 && < 15", ">= 16"],
8796
+ vm: true,
8797
+ "node:vm": [">= 14.18 && < 15", ">= 16"],
8798
+ wasi: [">= 13.4 && < 13.5", ">= 18.17 && < 19", ">= 20"],
8799
+ "node:wasi": [">= 18.17 && < 19", ">= 20"],
8800
+ worker_threads: ">= 11.7",
8801
+ "node:worker_threads": [">= 14.18 && < 15", ">= 16"],
8802
+ zlib: ">= 0.5",
8803
+ "node:zlib": [">= 14.18 && < 15", ">= 16"]
8804
+ };
8805
+ }
8806
+ });
8807
+ var require_is_core_module = (0, import_chunk_4VNS5WPM.__commonJS)({
8808
+ "../../node_modules/.pnpm/is-core-module@2.13.1/node_modules/is-core-module/index.js"(exports, module2) {
8809
+ "use strict";
8810
+ var hasOwn = require_hasown();
8811
+ function specifierIncluded(current, specifier) {
8812
+ var nodeParts = current.split(".");
8813
+ var parts = specifier.split(" ");
8814
+ var op = parts.length > 1 ? parts[0] : "=";
8815
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split(".");
8816
+ for (var i = 0; i < 3; ++i) {
8817
+ var cur = parseInt(nodeParts[i] || 0, 10);
8818
+ var ver = parseInt(versionParts[i] || 0, 10);
8819
+ if (cur === ver) {
8820
+ continue;
8821
+ }
8822
+ if (op === "<") {
8823
+ return cur < ver;
8824
+ }
8825
+ if (op === ">=") {
8826
+ return cur >= ver;
8827
+ }
8828
+ return false;
8829
+ }
8830
+ return op === ">=";
8831
+ }
8832
+ function matchesRange(current, range) {
8833
+ var specifiers = range.split(/ ?&& ?/);
8834
+ if (specifiers.length === 0) {
8835
+ return false;
8836
+ }
8837
+ for (var i = 0; i < specifiers.length; ++i) {
8838
+ if (!specifierIncluded(current, specifiers[i])) {
8839
+ return false;
8840
+ }
8841
+ }
8842
+ return true;
8843
+ }
8844
+ function versionIncluded(nodeVersion, specifierValue) {
8845
+ if (typeof specifierValue === "boolean") {
8846
+ return specifierValue;
8847
+ }
8848
+ var current = typeof nodeVersion === "undefined" ? process.versions && process.versions.node : nodeVersion;
8849
+ if (typeof current !== "string") {
8850
+ throw new TypeError(typeof nodeVersion === "undefined" ? "Unable to determine current node version" : "If provided, a valid node version is required");
8851
+ }
8852
+ if (specifierValue && typeof specifierValue === "object") {
8853
+ for (var i = 0; i < specifierValue.length; ++i) {
8854
+ if (matchesRange(current, specifierValue[i])) {
8855
+ return true;
8856
+ }
8857
+ }
8858
+ return false;
8859
+ }
8860
+ return matchesRange(current, specifierValue);
8861
+ }
8862
+ var data = require_core();
8863
+ module2.exports = function isCore(x, nodeVersion) {
8864
+ return hasOwn(data, x) && versionIncluded(nodeVersion, data[x]);
8865
+ };
8866
+ }
8867
+ });
8636
8868
  var require_extract_description = (0, import_chunk_4VNS5WPM.__commonJS)({
8637
8869
  "../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/extract_description.js"(exports, module2) {
8638
8870
  "use strict";
@@ -8694,7 +8926,7 @@ var require_fixer = (0, import_chunk_4VNS5WPM.__commonJS)({
8694
8926
  var cleanSemver = require_clean();
8695
8927
  var validateLicense = require_validate_npm_package_license();
8696
8928
  var hostedGitInfo = require_lib8();
8697
- var isBuiltinModule = (0, import_chunk_67I7CEQJ.require_is_core_module)();
8929
+ var isBuiltinModule = require_is_core_module();
8698
8930
  var depTypes = ["dependencies", "devDependencies", "optionalDependencies"];
8699
8931
  var extractDescription = require_extract_description();
8700
8932
  var url = (0, import_chunk_4VNS5WPM.__require)("url");
@@ -12667,7 +12899,7 @@ function readPackageUpSync(options) {
12667
12899
  }
12668
12900
  var import_tempy = (0, import_chunk_4VNS5WPM.__toESM)(require_tempy());
12669
12901
  async function getPackedPackage(name, target, packageDir) {
12670
- packageDir = packageDir || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: process.cwd() }) || await (0, import_chunk_67I7CEQJ.resolvePkg)(name, { basedir: target });
12902
+ packageDir = packageDir || await (0, import_chunk_VVPSLVOR.resolvePkg)(name, { basedir: process.cwd() }) || await (0, import_chunk_VVPSLVOR.resolvePkg)(name, { basedir: target });
12671
12903
  if (!packageDir) {
12672
12904
  const pkg = readPackageUpSync({
12673
12905
  cwd: target,
@@ -26,14 +26,14 @@ 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 chunk_UZ3OMVFB_exports = {};
30
- __export(chunk_UZ3OMVFB_exports, {
29
+ var chunk_LHESHKC2_exports = {};
30
+ __export(chunk_LHESHKC2_exports, {
31
31
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
32
32
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion,
33
33
  wasm_exports: () => wasm_exports
34
34
  });
35
- module.exports = __toCommonJS(chunk_UZ3OMVFB_exports);
36
- var import_chunk_3BXWI45I = require("./chunk-3BXWI45I.js");
35
+ module.exports = __toCommonJS(chunk_LHESHKC2_exports);
36
+ var import_chunk_ABTIXQDX = require("./chunk-ABTIXQDX.js");
37
37
  var import_chunk_WXRVYSYN = require("./chunk-WXRVYSYN.js");
38
38
  var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
39
39
  var import_prisma_schema_wasm = __toESM(require("@prisma/prisma-schema-wasm"));
@@ -42,6 +42,6 @@ var wasm_exports = {};
42
42
  prismaSchemaWasm: () => import_prisma_schema_wasm.default,
43
43
  prismaSchemaWasmVersion: () => prismaSchemaWasmVersion
44
44
  });
45
- var { dependencies } = (0, import_chunk_3BXWI45I.require_package)();
45
+ var { dependencies } = (0, import_chunk_ABTIXQDX.require_package)();
46
46
  var prismaSchemaWasmVersion = dependencies["@prisma/prisma-schema-wasm"];
47
47
  globalThis.PRISMA_WASM_PANIC_REGISTRY = new import_chunk_WXRVYSYN.WasmPanicRegistry();
@@ -26,20 +26,20 @@ 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 chunk_IYZKSKPJ_exports = {};
30
- __export(chunk_IYZKSKPJ_exports, {
29
+ var chunk_MSQTODVE_exports = {};
30
+ __export(chunk_MSQTODVE_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
32
  getConfig: () => getConfig,
33
33
  getDirectUrl: () => getDirectUrl,
34
34
  getEffectiveUrl: () => getEffectiveUrl,
35
35
  resolveUrl: () => resolveUrl
36
36
  });
37
- module.exports = __toCommonJS(chunk_IYZKSKPJ_exports);
37
+ module.exports = __toCommonJS(chunk_MSQTODVE_exports);
38
38
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
39
39
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
40
40
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
- var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
42
- var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.js");
41
+ var import_chunk_PQE76XRR = require("./chunk-PQE76XRR.js");
42
+ var import_chunk_LHESHKC2 = require("./chunk-LHESHKC2.js");
43
43
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
44
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
45
45
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
64
64
  }).exhaustive();
65
65
  const errorMessageWithContext = `${constructedErrorMessage}
66
66
  [Context: getConfig]`;
67
- super((0, import_chunk_JWAHHTQF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_PQE76XRR.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -89,7 +89,7 @@ async function getConfig(options) {
89
89
  () => {
90
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
91
91
  debug("Triggering a Rust panic...");
92
- import_chunk_UZ3OMVFB.prismaSchemaWasm.debug_panic();
92
+ import_chunk_LHESHKC2.prismaSchemaWasm.debug_panic();
93
93
  }
94
94
  const params = JSON.stringify({
95
95
  prismaSchema: options.datamodel,
@@ -97,7 +97,7 @@ async function getConfig(options) {
97
97
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
98
  env: process.env
99
99
  });
100
- const data = import_chunk_UZ3OMVFB.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_LHESHKC2.prismaSchemaWasm.get_config(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -16,15 +16,15 @@ 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 chunk_C73SLFIL_exports = {};
20
- __export(chunk_C73SLFIL_exports, {
19
+ var chunk_PQE76XRR_exports = {};
20
+ __export(chunk_PQE76XRR_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_C73SLFIL_exports);
24
- var import_chunk_TGNGIHD7 = require("./chunk-TGNGIHD7.js");
23
+ module.exports = __toCommonJS(chunk_PQE76XRR_exports);
24
+ var import_chunk_75AJJ2SV = require("./chunk-75AJJ2SV.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_TGNGIHD7.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_75AJJ2SV.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var chunk_QGJH4P4N_exports = {};
20
+ __export(chunk_QGJH4P4N_exports, {
21
+ runPackageCmd: () => runPackageCmd
22
+ });
23
+ module.exports = __toCommonJS(chunk_QGJH4P4N_exports);
24
+ var import_chunk_72UZXEBG = require("./chunk-72UZXEBG.js");
25
+ var import_chunk_ETYWYJBX = require("./chunk-ETYWYJBX.js");
26
+ var import_chunk_4VNS5WPM = require("./chunk-4VNS5WPM.js");
27
+ var import_execa = (0, import_chunk_4VNS5WPM.__toESM)((0, import_chunk_ETYWYJBX.require_execa)());
28
+ async function runPackageCmd(cwd, cmd, ...args) {
29
+ await import_execa.default.command(await (0, import_chunk_72UZXEBG.getPackageCmd)(cwd, cmd, ...args), {
30
+ // we skip this because we are already in the generator
31
+ env: { PRISMA_SKIP_POSTINSTALL_GENERATE: "true" },
32
+ stdio: "inherit",
33
+ cwd
34
+ });
35
+ }
@@ -26,20 +26,20 @@ 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 chunk_S2R7ACYL_exports = {};
30
- __export(chunk_S2R7ACYL_exports, {
29
+ var chunk_QPHQEGC5_exports = {};
30
+ __export(chunk_QPHQEGC5_exports, {
31
31
  GetConfigError: () => GetConfigError,
32
32
  getConfig: () => getConfig,
33
33
  getDirectUrl: () => getDirectUrl,
34
34
  getEffectiveUrl: () => getEffectiveUrl,
35
35
  resolveUrl: () => resolveUrl
36
36
  });
37
- module.exports = __toCommonJS(chunk_S2R7ACYL_exports);
37
+ module.exports = __toCommonJS(chunk_QPHQEGC5_exports);
38
38
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
39
39
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
40
40
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
41
- var import_chunk_C73SLFIL = require("./chunk-C73SLFIL.js");
42
- var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.js");
41
+ var import_chunk_SA65PE7P = require("./chunk-SA65PE7P.js");
42
+ var import_chunk_WHZN3ZOU = require("./chunk-WHZN3ZOU.js");
43
43
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
44
44
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
45
45
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -64,7 +64,7 @@ ${detailsHeader} ${message}`;
64
64
  }).exhaustive();
65
65
  const errorMessageWithContext = `${constructedErrorMessage}
66
66
  [Context: getConfig]`;
67
- super((0, import_chunk_C73SLFIL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
67
+ super((0, import_chunk_SA65PE7P.addVersionDetailsToErrorMessage)(errorMessageWithContext));
68
68
  this.name = "GetConfigError";
69
69
  }
70
70
  };
@@ -89,7 +89,7 @@ async function getConfig(options) {
89
89
  () => {
90
90
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_CONFIG) {
91
91
  debug("Triggering a Rust panic...");
92
- import_chunk_UPQKNKIW.prismaSchemaWasm.debug_panic();
92
+ import_chunk_WHZN3ZOU.prismaSchemaWasm.debug_panic();
93
93
  }
94
94
  const params = JSON.stringify({
95
95
  prismaSchema: options.datamodel,
@@ -97,7 +97,7 @@ async function getConfig(options) {
97
97
  ignoreEnvVarErrors: options.ignoreEnvVarErrors ?? false,
98
98
  env: process.env
99
99
  });
100
- const data = import_chunk_UPQKNKIW.prismaSchemaWasm.get_config(params);
100
+ const data = import_chunk_WHZN3ZOU.prismaSchemaWasm.get_config(params);
101
101
  return data;
102
102
  },
103
103
  (e) => ({
@@ -16,20 +16,20 @@ 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 chunk_XNFIABGN_exports = {};
20
- __export(chunk_XNFIABGN_exports, {
19
+ var chunk_RUJGWM5Y_exports = {};
20
+ __export(chunk_RUJGWM5Y_exports, {
21
21
  getLintWarnings: () => getLintWarnings,
22
22
  getLintWarningsAsText: () => getLintWarningsAsText,
23
23
  handleLintPanic: () => handleLintPanic,
24
24
  lintSchema: () => lintSchema,
25
25
  warningToString: () => warningToString
26
26
  });
27
- module.exports = __toCommonJS(chunk_XNFIABGN_exports);
28
- var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.js");
27
+ module.exports = __toCommonJS(chunk_RUJGWM5Y_exports);
28
+ var import_chunk_WHZN3ZOU = require("./chunk-WHZN3ZOU.js");
29
29
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
30
30
  var import_chunk_PG5FDKSF = require("./chunk-PG5FDKSF.js");
31
31
  function lintSchema({ schemas }) {
32
- const lintResult = import_chunk_UPQKNKIW.prismaSchemaWasm.lint(JSON.stringify(schemas));
32
+ const lintResult = import_chunk_WHZN3ZOU.prismaSchemaWasm.lint(JSON.stringify(schemas));
33
33
  const lintDiagnostics = JSON.parse(lintResult);
34
34
  return lintDiagnostics;
35
35
  }
@@ -16,15 +16,15 @@ 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 chunk_JWAHHTQF_exports = {};
20
- __export(chunk_JWAHHTQF_exports, {
19
+ var chunk_SA65PE7P_exports = {};
20
+ __export(chunk_SA65PE7P_exports, {
21
21
  addVersionDetailsToErrorMessage: () => addVersionDetailsToErrorMessage
22
22
  });
23
- module.exports = __toCommonJS(chunk_JWAHHTQF_exports);
24
- var import_chunk_3IW5B4VR = require("./chunk-3IW5B4VR.js");
23
+ module.exports = __toCommonJS(chunk_SA65PE7P_exports);
24
+ var import_chunk_BC6RF6PC = require("./chunk-BC6RF6PC.js");
25
25
  var import_chunk_QN6PSQY7 = require("./chunk-QN6PSQY7.js");
26
26
  function addVersionDetailsToErrorMessage(message) {
27
- const rows = [["Prisma CLI Version", import_chunk_3IW5B4VR.version]];
27
+ const rows = [["Prisma CLI Version", import_chunk_BC6RF6PC.version]];
28
28
  return `${message}
29
29
 
30
30
  ${(0, import_chunk_QN6PSQY7.formatTable)(rows)}`;
@@ -26,17 +26,17 @@ 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 chunk_S3DSAPBW_exports = {};
30
- __export(chunk_S3DSAPBW_exports, {
29
+ var chunk_T45XO7V4_exports = {};
30
+ __export(chunk_T45XO7V4_exports, {
31
31
  ValidateError: () => ValidateError,
32
32
  validate: () => validate
33
33
  });
34
- module.exports = __toCommonJS(chunk_S3DSAPBW_exports);
34
+ module.exports = __toCommonJS(chunk_T45XO7V4_exports);
35
35
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_JWAHHTQF = require("./chunk-JWAHHTQF.js");
39
- var import_chunk_UZ3OMVFB = require("./chunk-UZ3OMVFB.js");
38
+ var import_chunk_SA65PE7P = require("./chunk-SA65PE7P.js");
39
+ var import_chunk_WHZN3ZOU = require("./chunk-WHZN3ZOU.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: validate]`;
62
- super((0, import_chunk_JWAHHTQF.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_SA65PE7P.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "ValidateError";
64
64
  }
65
65
  };
@@ -71,13 +71,13 @@ function validate(options) {
71
71
  () => {
72
72
  if (process.env.FORCE_PANIC_QUERY_ENGINE_GET_DMMF) {
73
73
  debug("Triggering a Rust panic...");
74
- import_chunk_UZ3OMVFB.prismaSchemaWasm.debug_panic();
74
+ import_chunk_WHZN3ZOU.prismaSchemaWasm.debug_panic();
75
75
  }
76
76
  const params = JSON.stringify({
77
77
  prismaSchema: options.schemas,
78
78
  noColor: Boolean(process.env.NO_COLOR)
79
79
  });
80
- import_chunk_UZ3OMVFB.prismaSchemaWasm.validate(params);
80
+ import_chunk_WHZN3ZOU.prismaSchemaWasm.validate(params);
81
81
  },
82
82
  (e) => ({
83
83
  type: "wasm-error",
@@ -26,17 +26,17 @@ 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 chunk_7JDKTQ7P_exports = {};
30
- __export(chunk_7JDKTQ7P_exports, {
29
+ var chunk_T6YMHO44_exports = {};
30
+ __export(chunk_T6YMHO44_exports, {
31
31
  MergeSchemasError: () => MergeSchemasError,
32
32
  mergeSchemas: () => mergeSchemas
33
33
  });
34
- module.exports = __toCommonJS(chunk_7JDKTQ7P_exports);
34
+ module.exports = __toCommonJS(chunk_T6YMHO44_exports);
35
35
  var import_chunk_WSZXPLJQ = require("./chunk-WSZXPLJQ.js");
36
36
  var import_chunk_R6QH57HZ = require("./chunk-R6QH57HZ.js");
37
37
  var import_chunk_C47SCASR = require("./chunk-C47SCASR.js");
38
- var import_chunk_C73SLFIL = require("./chunk-C73SLFIL.js");
39
- var import_chunk_UPQKNKIW = require("./chunk-UPQKNKIW.js");
38
+ var import_chunk_SA65PE7P = require("./chunk-SA65PE7P.js");
39
+ var import_chunk_WHZN3ZOU = require("./chunk-WHZN3ZOU.js");
40
40
  var import_chunk_5DBOS77Y = require("./chunk-5DBOS77Y.js");
41
41
  var import_chunk_XKZ6CBLA = require("./chunk-XKZ6CBLA.js");
42
42
  var import_chunk_LMVSIVKQ = require("./chunk-LMVSIVKQ.js");
@@ -59,7 +59,7 @@ ${detailsHeader} ${message}`;
59
59
  }).exhaustive();
60
60
  const errorMessageWithContext = `${constructedErrorMessage}
61
61
  [Context: mergeSchemas]`;
62
- super((0, import_chunk_C73SLFIL.addVersionDetailsToErrorMessage)(errorMessageWithContext));
62
+ super((0, import_chunk_SA65PE7P.addVersionDetailsToErrorMessage)(errorMessageWithContext));
63
63
  this.name = "MergeSchemasError";
64
64
  }
65
65
  };
@@ -72,7 +72,7 @@ function mergeSchemas(options) {
72
72
  const params = JSON.stringify({
73
73
  schema: options.schemas
74
74
  });
75
- return import_chunk_UPQKNKIW.prismaSchemaWasm.merge_schemas(params);
75
+ return import_chunk_WHZN3ZOU.prismaSchemaWasm.merge_schemas(params);
76
76
  },
77
77
  (e) => ({
78
78
  type: "wasm-error",
@@ -26,24 +26,21 @@ 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 chunk_2H6XXXKO_exports = {};
30
- __export(chunk_2H6XXXKO_exports, {
29
+ var chunk_TV34NMBZ_exports = {};
30
+ __export(chunk_TV34NMBZ_exports, {
31
31
  inferDirectoryConfig: () => inferDirectoryConfig
32
32
  });
33
- module.exports = __toCommonJS(chunk_2H6XXXKO_exports);
33
+ module.exports = __toCommonJS(chunk_TV34NMBZ_exports);
34
34
  var import_path = __toESM(require("path"));
35
- function inferDirectoryConfig(schemaContext, cwd = process.cwd()) {
36
- const baseDir = (
37
- // All default paths are relative to the `schema.prisma` file that contains the primary datasource.
38
- // That schema file should usually be the users "root" aka main schema file.
39
- schemaContext?.primaryDatasourceDirectory ?? // If no primary datasource exists we use the schemaRootDir.
40
- // `schemaRootDir` is either the directory the user supplied as schemaPath or the directory the single schema file is in.
41
- schemaContext?.schemaRootDir ?? // Should also that not be defined because there is no schema yet we fallback to CWD + `/prisma`.
42
- import_path.default.join(cwd, "prisma")
43
- );
35
+ function inferDirectoryConfig(schemaContext) {
36
+ const rootDir = schemaContext?.schemaRootDir ?? import_path.default.join(process.cwd(), "prisma");
37
+ const migrationsDirPath = import_path.default.join(import_path.default.dirname(schemaContext?.schemaPath ?? process.cwd()), "migrations");
38
+ const schemaPath = schemaContext?.schemaPath ?? import_path.default.join(process.cwd(), "prisma");
39
+ const prismaDir = import_path.default.dirname(schemaPath);
40
+ const viewsDirPath = import_path.default.join(prismaDir, "views");
44
41
  return {
45
- viewsDirPath: import_path.default.join(baseDir, "views"),
46
- typedSqlDirPath: import_path.default.join(baseDir, "sql"),
47
- migrationsDirPath: import_path.default.join(baseDir, "migrations")
42
+ viewsDirPath,
43
+ typedSqlDirPath: import_path.default.join(rootDir, "sql"),
44
+ migrationsDirPath
48
45
  };
49
46
  }