@m1212e/rumble 0.21.4 → 0.21.5
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/out/client/generate.cjs +1 -1
- package/out/client/generate.mjs +1 -1
- package/out/{generate-B4w-hX0K.mjs → generate-0QFVc3Sg.mjs} +10 -5
- package/out/generate-0QFVc3Sg.mjs.map +1 -0
- package/out/{generate-Ch5LEiBr.cjs → generate-CM3XjmlO.cjs} +10 -5
- package/out/generate-CM3XjmlO.cjs.map +1 -0
- package/out/index.cjs +7 -3
- package/out/index.cjs.map +1 -1
- package/out/index.mjs +7 -3
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
- package/out/generate-B4w-hX0K.mjs.map +0 -1
- package/out/generate-Ch5LEiBr.cjs.map +0 -1
package/out/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as lazy } from "./lazy-C7IyM4M4.mjs";
|
|
2
|
-
import { t as generateFromSchema } from "./generate-
|
|
2
|
+
import { t as generateFromSchema } from "./generate-0QFVc3Sg.mjs";
|
|
3
3
|
import { GraphQLError } from "graphql";
|
|
4
4
|
import { EnvelopArmorPlugin } from "@escape.tech/graphql-armor";
|
|
5
5
|
import { useDisableIntrospection } from "@graphql-yoga/plugin-disable-introspection";
|
|
@@ -180,7 +180,7 @@ function mapNullFieldsToUndefined(obj) {
|
|
|
180
180
|
}
|
|
181
181
|
//#endregion
|
|
182
182
|
//#region package.json
|
|
183
|
-
var version = "0.21.
|
|
183
|
+
var version = "0.21.5";
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region lib/helpers/mergeFilters.ts
|
|
186
186
|
function mergeFilters(filterA, filterB, mode = "AND") {
|
|
@@ -1121,7 +1121,11 @@ async function initSearchIfApplicable(input) {
|
|
|
1121
1121
|
const threshold = Number(input.search.threshold);
|
|
1122
1122
|
if (threshold < 0 || threshold > 1) throw new Error(`Search threshold must be between 0 and 1`);
|
|
1123
1123
|
const dbName = (await input.db.execute(sql`SELECT current_database()`)).rows[0].current_database;
|
|
1124
|
-
|
|
1124
|
+
try {
|
|
1125
|
+
await input.db.execute(sql.raw(`ALTER DATABASE ${dbName} SET pg_trgm.similarity_threshold = ${threshold};`));
|
|
1126
|
+
} catch (error) {
|
|
1127
|
+
if (error?.cause?.code !== "XX000" && error?.code !== "XX000") throw error;
|
|
1128
|
+
}
|
|
1125
1129
|
}
|
|
1126
1130
|
if (input.search?.cpu_operator_cost) {
|
|
1127
1131
|
if (typeof input.search.cpu_operator_cost !== "number") throw new Error(`CPU operator cost must be a number`);
|