Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prisma-query-log

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prisma-query-log - npm Package Compare versions

Comparing version 1.2.0 to 2.0.0

16

index.d.ts

@@ -32,11 +32,11 @@ declare type PrismaQueryEvent = {

/**
* Poor Man's T-SQL Formatter options
* https://github.com/TaoK/poor-mans-t-sql-formatter-npm-package#usage
* Formatter options
* https://github.com/gwax/sql-formatter#usage
*/
formatterOptions: {
maxLineWidth: number | undefined;
indent: string | undefined;
expandCommaLists: boolean | undefined;
expandInLists: boolean | undefined;
};
formatterOptions: Partial<{
language: string | undefined;
indent: string;
uppercase: boolean;
linesBetweenQueries: number;
}>;
};

@@ -43,0 +43,0 @@ declare type CreatePrismaQueryEventHandlerArgs = typeof defaultOptions;

"use strict";Object.defineProperty(exports, "__esModule", {value: true});var __assign = Object.assign;
// src/index.ts
var defaultFormatterOptions = {
language: void 0,
indent: " ",
uppercase: true,
linesBetweenQueries: 1
};
var defaultOptions = {

@@ -10,8 +16,3 @@ logger: true,

format: false,
formatterOptions: {
maxLineWidth: 0,
indent: " ",
expandCommaLists: false,
expandInLists: false
}
formatterOptions: defaultFormatterOptions
};

@@ -39,9 +40,5 @@ var formatter;

if (!formatter) {
formatter = require("poor-mans-t-sql-formatter");
if (!formatterOptions.maxLineWidth) {
const termSize = require("term-size");
formatterOptions.maxLineWidth = termSize().columns - 12;
}
formatter = require("@gwax/sql-formatter");
}
query = "\n" + formatter.formatSql(query, formatterOptions).text.trim();
query = "\n" + formatter.format(query, formatterOptions).trim();
}

@@ -48,0 +45,0 @@ query = query.replace(/\?/g, () => {

{
"name": "prisma-query-log",
"version": "1.2.0",
"version": "2.0.0",
"license": "MIT",

@@ -82,5 +82,4 @@ "description": "Log prisma query event",

"dependencies": {
"poor-mans-t-sql-formatter": "^1.6.10",
"term-size": "^2.2.1"
"@gwax/sql-formatter": "^3.0.3"
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc