@prisma/adapter-pg 6.15.0-dev.8 → 6.15.0-integration-fix-prisma-client-dirname-aws-lambda.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.
package/dist/index.js CHANGED
@@ -372,11 +372,9 @@ function mapArg(arg, argType) {
372
372
  switch (argType.dbType) {
373
373
  case "TIME":
374
374
  case "TIMETZ":
375
- return formatTime(arg);
376
- case "DATE":
377
- return formatDate(arg);
375
+ return arg.toISOString().split("T")[1];
378
376
  default:
379
- return formatDateTime(arg);
377
+ return arg.toISOString();
380
378
  }
381
379
  }
382
380
  if (typeof arg === "string" && argType.scalarType === "bytes") {
@@ -390,20 +388,6 @@ function mapArg(arg, argType) {
390
388
  }
391
389
  return arg;
392
390
  }
393
- function formatDateTime(date) {
394
- const pad = (n, z = 2) => String(n).padStart(z, "0");
395
- const ms = date.getUTCMilliseconds();
396
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + " " + pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
397
- }
398
- function formatDate(date) {
399
- const pad = (n, z = 2) => String(n).padStart(z, "0");
400
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate());
401
- }
402
- function formatTime(date) {
403
- const pad = (n, z = 2) => String(n).padStart(z, "0");
404
- const ms = date.getUTCMilliseconds();
405
- return pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
406
- }
407
391
 
408
392
  // src/errors.ts
409
393
  var TLS_ERRORS = /* @__PURE__ */ new Set([
package/dist/index.mjs CHANGED
@@ -336,11 +336,9 @@ function mapArg(arg, argType) {
336
336
  switch (argType.dbType) {
337
337
  case "TIME":
338
338
  case "TIMETZ":
339
- return formatTime(arg);
340
- case "DATE":
341
- return formatDate(arg);
339
+ return arg.toISOString().split("T")[1];
342
340
  default:
343
- return formatDateTime(arg);
341
+ return arg.toISOString();
344
342
  }
345
343
  }
346
344
  if (typeof arg === "string" && argType.scalarType === "bytes") {
@@ -354,20 +352,6 @@ function mapArg(arg, argType) {
354
352
  }
355
353
  return arg;
356
354
  }
357
- function formatDateTime(date) {
358
- const pad = (n, z = 2) => String(n).padStart(z, "0");
359
- const ms = date.getUTCMilliseconds();
360
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate()) + " " + pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
361
- }
362
- function formatDate(date) {
363
- const pad = (n, z = 2) => String(n).padStart(z, "0");
364
- return date.getUTCFullYear() + "-" + pad(date.getUTCMonth() + 1) + "-" + pad(date.getUTCDate());
365
- }
366
- function formatTime(date) {
367
- const pad = (n, z = 2) => String(n).padStart(z, "0");
368
- const ms = date.getUTCMilliseconds();
369
- return pad(date.getUTCHours()) + ":" + pad(date.getUTCMinutes()) + ":" + pad(date.getUTCSeconds()) + (ms ? "." + String(ms).padStart(3, "0") : "");
370
- }
371
355
 
372
356
  // src/errors.ts
373
357
  var TLS_ERRORS = /* @__PURE__ */ new Set([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/adapter-pg",
3
- "version": "6.15.0-dev.8",
3
+ "version": "6.15.0-integration-fix-prisma-client-dirname-aws-lambda.2",
4
4
  "description": "Prisma's driver adapter for \"pg\"",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
@@ -33,7 +33,7 @@
33
33
  "dependencies": {
34
34
  "postgres-array": "3.0.4",
35
35
  "pg": "^8.11.3",
36
- "@prisma/driver-adapter-utils": "6.15.0-dev.8"
36
+ "@prisma/driver-adapter-utils": "6.15.0-integration-fix-prisma-client-dirname-aws-lambda.2"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@swc/core": "1.11.5",