@postgresql-typed/util
Advanced tools
Comparing version
export * from "./types/Awaitable.js"; | ||
export * from "./types/ClientHooks.js"; | ||
export * from "./types/PgTExtension.js"; | ||
export * from "./types/PgTExtensionContext.js"; | ||
export * from "./types/PgTExtensionsManagerType.js"; | ||
@@ -5,0 +6,0 @@ export * from "./util/arrayToEnum.js"; |
export * from "./types/Awaitable.js"; | ||
export * from "./types/ClientHooks.js"; | ||
export * from "./types/PgTExtension.js"; | ||
export * from "./types/PgTExtensionContext.js"; | ||
export * from "./types/PgTExtensionsManagerType.js"; | ||
@@ -5,0 +6,0 @@ export * from "./util/arrayToEnum.js"; |
import type { QueryArrayConfig, QueryArrayResult, QueryConfig, QueryResult } from "pg"; | ||
import type { Awaitable } from "./Awaitable.js"; | ||
import type { PgTExtensionContext } from "./PgTExtensionContext.js"; | ||
export type PreQueryHookData = { | ||
@@ -9,2 +10,3 @@ input: { | ||
output: QueryResult<any> | undefined; | ||
context: PgTExtensionContext; | ||
} | { | ||
@@ -16,2 +18,3 @@ input: { | ||
output: QueryArrayResult<any[]> | undefined; | ||
context: PgTExtensionContext; | ||
}; | ||
@@ -24,2 +27,3 @@ export type PostQueryHookData = { | ||
output: QueryResult<any>; | ||
context: PgTExtensionContext; | ||
} | { | ||
@@ -31,2 +35,3 @@ input: { | ||
output: QueryArrayResult<any[]>; | ||
context: PgTExtensionContext; | ||
}; | ||
@@ -33,0 +38,0 @@ export interface ClientHooks { |
import { SchemaDefinition } from "untyped"; | ||
import { type BundleConfig } from "./BundleConfig.js"; | ||
import { type DefinerModes } from "./DefinerModes.js"; | ||
@@ -13,13 +12,15 @@ import type { ImportStatement } from "./ImportStatement.js"; | ||
/** | ||
* Whether to bundle the generated code into a single file (per database) | ||
* Whether to add debugging statements to the generated code | ||
* | ||
* @default { "enabled": false } | ||
* @default false | ||
*/ | ||
bundle: BundleConfig; | ||
debug: boolean; | ||
/** | ||
* Whether to add debugging statements to the generated code | ||
* Whether to pre-compile the generated code | ||
* | ||
* This will make the generated code run faster, but will only generate .d.ts and .js files | ||
* | ||
* @default false | ||
*/ | ||
debug: boolean; | ||
preCompile: boolean; | ||
/** | ||
@@ -26,0 +27,0 @@ * Definer modes |
import { defineUntypedSchema } from "untyped"; | ||
import bundleSchema from "./BundleConfig.js"; | ||
import definerSchema from "./DefinerModes.js"; | ||
@@ -9,3 +8,2 @@ const schema = defineUntypedSchema({ | ||
}, | ||
bundle: bundleSchema, | ||
debug: { | ||
@@ -15,2 +13,6 @@ $default: false, | ||
}, | ||
preCompile: { | ||
$default: false, | ||
$resolve: Boolean, | ||
}, | ||
definerModes: definerSchema, | ||
@@ -17,0 +19,0 @@ debugFileName: { |
@@ -66,10 +66,4 @@ import { SchemaDefinition } from "untyped"; | ||
files: FilesConfig; | ||
/** | ||
* The TypeScript module type you use in your project (if you are using esm it adds the .js import extension) | ||
* | ||
* @default "cjs" | ||
*/ | ||
type: "esm" | "cjs"; | ||
} | ||
declare const schema: SchemaDefinition; | ||
export default schema; |
@@ -28,8 +28,4 @@ import { defineUntypedSchema } from "untyped"; | ||
files: filesSchema, | ||
type: { | ||
$default: "cjs", | ||
$resolve: value => (value === "esm" ? "esm" : "cjs"), | ||
}, | ||
}); | ||
export default schema; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@postgresql-typed/util", | ||
"version": "0.7.0", | ||
"version": "0.8.0", | ||
"description": "Utility functions for PostgreSQL-Typed", | ||
@@ -5,0 +5,0 @@ "type": "module", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
100665
-1.86%1485
-2.69%