@prisma/get-platform 6.20.0-integration-next.1 → 6.20.0-integration-merge-release-workflows.1

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.
@@ -0,0 +1,43 @@
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_O5EOXX3N_exports = {};
30
+ __export(chunk_O5EOXX3N_exports, {
31
+ assertNodeAPISupported: () => assertNodeAPISupported
32
+ });
33
+ module.exports = __toCommonJS(chunk_O5EOXX3N_exports);
34
+ var import_fs = __toESM(require("fs"));
35
+ function assertNodeAPISupported() {
36
+ const customLibraryPath = process.env.PRISMA_QUERY_ENGINE_LIBRARY;
37
+ const customLibraryExists = customLibraryPath && import_fs.default.existsSync(customLibraryPath);
38
+ if (!customLibraryExists && process.arch === "ia32") {
39
+ throw new Error(
40
+ `The default query engine type (Node-API, "library") is currently not supported for 32bit Node. Please set \`engineType = "binary"\` in the "generator" block of your "schema.prisma" file (or use the environment variables "PRISMA_CLIENT_ENGINE_TYPE=binary" and/or "PRISMA_CLI_QUERY_ENGINE_TYPE=binary".)`
41
+ );
42
+ }
43
+ }
@@ -0,0 +1,8 @@
1
+ import { BinaryTarget } from './binaryTargets';
2
+ /**
3
+ * Gets Node-API Library name depending on the binary target
4
+ * @param binaryTarget
5
+ * @param type `fs` gets name used on the file system, `url` gets the name required to download the library from S3
6
+ * @returns
7
+ */
8
+ export declare function getNodeAPIName(binaryTarget: BinaryTarget, type: 'url' | 'fs'): string;
@@ -0,0 +1,25 @@
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 getNodeAPIName_exports = {};
20
+ __export(getNodeAPIName_exports, {
21
+ getNodeAPIName: () => import_chunk_2U36ISZO.getNodeAPIName
22
+ });
23
+ module.exports = __toCommonJS(getNodeAPIName_exports);
24
+ var import_chunk_2U36ISZO = require("./chunk-2U36ISZO.js");
25
+ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
+ export { assertNodeAPISupported } from './assertNodeAPISupported';
1
2
  export { type BinaryTarget, binaryTargets } from './binaryTargets';
3
+ export { getNodeAPIName } from './getNodeAPIName';
2
4
  export type { PlatformInfo } from './getPlatform';
3
5
  export { getBinaryTargetForCurrentPlatform, getos, getPlatformInfo } from './getPlatform';
4
6
  export { link } from './link';
package/dist/index.js CHANGED
@@ -18,24 +18,28 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var index_exports = {};
20
20
  __export(index_exports, {
21
+ assertNodeAPISupported: () => import_chunk_O5EOXX3N.assertNodeAPISupported,
21
22
  binaryTargets: () => import_chunk_7MLUNQIZ.binaryTargets,
22
23
  getBinaryTargetForCurrentPlatform: () => import_chunk_7PMGXL6S.getBinaryTargetForCurrentPlatform,
24
+ getNodeAPIName: () => import_chunk_2U36ISZO.getNodeAPIName,
23
25
  getPlatformInfo: () => import_chunk_7PMGXL6S.getPlatformInfo,
24
26
  getos: () => import_chunk_7PMGXL6S.getos,
25
- jestConsoleContext: () => import_chunk_6OBQDQYE.jestConsoleContext,
26
- jestContext: () => import_chunk_6OBQDQYE.jestContext,
27
- jestStdoutContext: () => import_chunk_6OBQDQYE.jestStdoutContext,
28
- link: () => import_chunk_YLRTNN74.link,
29
- processExitContext: () => import_chunk_6OBQDQYE.processExitContext
27
+ jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
28
+ jestContext: () => import_chunk_5EPDNTW3.jestContext,
29
+ jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
30
+ link: () => import_chunk_M5T7GI2R.link,
31
+ processExitContext: () => import_chunk_5EPDNTW3.processExitContext
30
32
  });
31
33
  module.exports = __toCommonJS(index_exports);
34
+ var import_chunk_6HZWON4S = require("./chunk-6HZWON4S.js");
35
+ var import_chunk_5EPDNTW3 = require("./chunk-5EPDNTW3.js");
36
+ var import_chunk_3UEKS5W6 = require("./chunk-3UEKS5W6.js");
37
+ var import_chunk_O5EOXX3N = require("./chunk-O5EOXX3N.js");
38
+ var import_chunk_2U36ISZO = require("./chunk-2U36ISZO.js");
32
39
  var import_chunk_7PMGXL6S = require("./chunk-7PMGXL6S.js");
33
- var import_chunk_YLRTNN74 = require("./chunk-YLRTNN74.js");
40
+ var import_chunk_M5T7GI2R = require("./chunk-M5T7GI2R.js");
34
41
  var import_chunk_FWMN4WME = require("./chunk-FWMN4WME.js");
35
42
  var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
36
43
  var import_chunk_7MLUNQIZ = require("./chunk-7MLUNQIZ.js");
37
- var import_chunk_6HZWON4S = require("./chunk-6HZWON4S.js");
38
- var import_chunk_6OBQDQYE = require("./chunk-6OBQDQYE.js");
39
- var import_chunk_OJINGNLI = require("./chunk-OJINGNLI.js");
40
44
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
41
45
  (0, import_chunk_7MLUNQIZ.init_binaryTargets)();
package/dist/link.js CHANGED
@@ -18,9 +18,9 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var link_exports = {};
20
20
  __export(link_exports, {
21
- link: () => import_chunk_YLRTNN74.link
21
+ link: () => import_chunk_M5T7GI2R.link
22
22
  });
23
23
  module.exports = __toCommonJS(link_exports);
24
- var import_chunk_YLRTNN74 = require("./chunk-YLRTNN74.js");
24
+ var import_chunk_M5T7GI2R = require("./chunk-M5T7GI2R.js");
25
25
  var import_chunk_YVXCXD3A = require("./chunk-YVXCXD3A.js");
26
26
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
@@ -16,13 +16,13 @@ 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 magic_string_es_SDTMJBWP_exports = {};
20
- __export(magic_string_es_SDTMJBWP_exports, {
19
+ var magic_string_es_3WRPFX2A_exports = {};
20
+ __export(magic_string_es_3WRPFX2A_exports, {
21
21
  Bundle: () => Bundle,
22
22
  SourceMap: () => SourceMap,
23
23
  default: () => MagicString
24
24
  });
25
- module.exports = __toCommonJS(magic_string_es_SDTMJBWP_exports);
25
+ module.exports = __toCommonJS(magic_string_es_3WRPFX2A_exports);
26
26
  var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
27
27
  var comma = ",".charCodeAt(0);
28
28
  var semicolon = ";".charCodeAt(0);
@@ -40,7 +40,8 @@ function encodeInteger(builder, num, relative) {
40
40
  do {
41
41
  let clamped = delta & 31;
42
42
  delta >>>= 5;
43
- if (delta > 0) clamped |= 32;
43
+ if (delta > 0)
44
+ clamped |= 32;
44
45
  builder.write(intToChar[clamped]);
45
46
  } while (delta > 0);
46
47
  return num;
@@ -87,18 +88,23 @@ function encode(decoded) {
87
88
  let namesIndex = 0;
88
89
  for (let i = 0; i < decoded.length; i++) {
89
90
  const line = decoded[i];
90
- if (i > 0) writer.write(semicolon);
91
- if (line.length === 0) continue;
91
+ if (i > 0)
92
+ writer.write(semicolon);
93
+ if (line.length === 0)
94
+ continue;
92
95
  let genColumn = 0;
93
96
  for (let j = 0; j < line.length; j++) {
94
97
  const segment = line[j];
95
- if (j > 0) writer.write(comma);
98
+ if (j > 0)
99
+ writer.write(comma);
96
100
  genColumn = encodeInteger(writer, segment[0], genColumn);
97
- if (segment.length === 1) continue;
101
+ if (segment.length === 1)
102
+ continue;
98
103
  sourcesIndex = encodeInteger(writer, segment[1], sourcesIndex);
99
104
  sourceLine = encodeInteger(writer, segment[2], sourceLine);
100
105
  sourceColumn = encodeInteger(writer, segment[3], sourceColumn);
101
- if (segment.length === 4) continue;
106
+ if (segment.length === 4)
107
+ continue;
102
108
  namesIndex = encodeInteger(writer, segment[4], namesIndex);
103
109
  }
104
110
  }
@@ -540,9 +546,6 @@ var MagicString = class _MagicString {
540
546
  }
541
547
  if (chunk.outro.length) mappings.advance(chunk.outro);
542
548
  });
543
- if (this.outro) {
544
- mappings.advance(this.outro);
545
- }
546
549
  return {
547
550
  file: options.file ? options.file.split(/[/\\]/).pop() : void 0,
548
551
  sources: [
@@ -900,13 +903,10 @@ var MagicString = class _MagicString {
900
903
  _split(index) {
901
904
  if (this.byStart[index] || this.byEnd[index]) return;
902
905
  let chunk = this.lastSearchedChunk;
903
- let previousChunk = chunk;
904
906
  const searchForward = index > chunk.end;
905
907
  while (chunk) {
906
908
  if (chunk.contains(index)) return this._splitChunk(chunk, index);
907
909
  chunk = searchForward ? this.byStart[chunk.end] : this.byEnd[chunk.start];
908
- if (chunk === previousChunk) return;
909
- previousChunk = chunk;
910
910
  }
911
911
  }
912
912
  _splitChunk(chunk, index) {
@@ -1053,12 +1053,7 @@ var MagicString = class _MagicString {
1053
1053
  const { original } = this;
1054
1054
  const index = original.indexOf(string);
1055
1055
  if (index !== -1) {
1056
- if (typeof replacement === "function") {
1057
- replacement = replacement(string, index, original);
1058
- }
1059
- if (string !== replacement) {
1060
- this.overwrite(index, index + string.length, replacement);
1061
- }
1056
+ this.overwrite(index, index + string.length, replacement);
1062
1057
  }
1063
1058
  return this;
1064
1059
  }
@@ -1073,11 +1068,7 @@ var MagicString = class _MagicString {
1073
1068
  const stringLength = string.length;
1074
1069
  for (let index = original.indexOf(string); index !== -1; index = original.indexOf(string, index + stringLength)) {
1075
1070
  const previous = original.slice(index, index + stringLength);
1076
- let _replacement = replacement;
1077
- if (typeof replacement === "function") {
1078
- _replacement = replacement(previous, index, original);
1079
- }
1080
- if (previous !== _replacement) this.overwrite(index, index + stringLength, _replacement);
1071
+ if (previous !== replacement) this.overwrite(index, index + stringLength, replacement);
1081
1072
  }
1082
1073
  return this;
1083
1074
  }
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var test_utils_exports = {};
20
20
  __export(test_utils_exports, {
21
- jestConsoleContext: () => import_chunk_6OBQDQYE.jestConsoleContext,
22
- jestContext: () => import_chunk_6OBQDQYE.jestContext,
23
- jestStdoutContext: () => import_chunk_6OBQDQYE.jestStdoutContext,
24
- processExitContext: () => import_chunk_6OBQDQYE.processExitContext
21
+ jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
22
+ jestContext: () => import_chunk_5EPDNTW3.jestContext,
23
+ jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
24
+ processExitContext: () => import_chunk_5EPDNTW3.processExitContext
25
25
  });
26
26
  module.exports = __toCommonJS(test_utils_exports);
27
27
  var import_chunk_6HZWON4S = require("../chunk-6HZWON4S.js");
28
- var import_chunk_6OBQDQYE = require("../chunk-6OBQDQYE.js");
29
- var import_chunk_OJINGNLI = require("../chunk-OJINGNLI.js");
28
+ var import_chunk_5EPDNTW3 = require("../chunk-5EPDNTW3.js");
29
+ var import_chunk_3UEKS5W6 = require("../chunk-3UEKS5W6.js");
30
30
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -18,12 +18,12 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var jestContext_exports = {};
20
20
  __export(jestContext_exports, {
21
- jestConsoleContext: () => import_chunk_6OBQDQYE.jestConsoleContext,
22
- jestContext: () => import_chunk_6OBQDQYE.jestContext,
23
- jestStdoutContext: () => import_chunk_6OBQDQYE.jestStdoutContext,
24
- processExitContext: () => import_chunk_6OBQDQYE.processExitContext
21
+ jestConsoleContext: () => import_chunk_5EPDNTW3.jestConsoleContext,
22
+ jestContext: () => import_chunk_5EPDNTW3.jestContext,
23
+ jestStdoutContext: () => import_chunk_5EPDNTW3.jestStdoutContext,
24
+ processExitContext: () => import_chunk_5EPDNTW3.processExitContext
25
25
  });
26
26
  module.exports = __toCommonJS(jestContext_exports);
27
- var import_chunk_6OBQDQYE = require("../chunk-6OBQDQYE.js");
28
- var import_chunk_OJINGNLI = require("../chunk-OJINGNLI.js");
27
+ var import_chunk_5EPDNTW3 = require("../chunk-5EPDNTW3.js");
28
+ var import_chunk_3UEKS5W6 = require("../chunk-3UEKS5W6.js");
29
29
  var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");