@m1212e/rumble 0.21.3 → 0.21.4
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/index.cjs +7 -2
- package/out/index.cjs.map +1 -1
- package/out/index.mjs +7 -2
- package/out/index.mjs.map +1 -1
- package/package.json +1 -1
package/out/index.cjs
CHANGED
|
@@ -208,7 +208,7 @@ function mapNullFieldsToUndefined(obj) {
|
|
|
208
208
|
}
|
|
209
209
|
//#endregion
|
|
210
210
|
//#region package.json
|
|
211
|
-
var version = "0.21.
|
|
211
|
+
var version = "0.21.4";
|
|
212
212
|
//#endregion
|
|
213
213
|
//#region lib/helpers/mergeFilters.ts
|
|
214
214
|
function mergeFilters(filterA, filterB, mode = "AND") {
|
|
@@ -1139,7 +1139,12 @@ async function initSearchIfApplicable(input) {
|
|
|
1139
1139
|
console.info("Database dialect is not compatible with search, skipping search initialization. Only PostgreSQL is supported.");
|
|
1140
1140
|
return;
|
|
1141
1141
|
}
|
|
1142
|
-
|
|
1142
|
+
try {
|
|
1143
|
+
await input.db.execute(drizzle_orm.sql`CREATE EXTENSION IF NOT EXISTS pg_trgm;`);
|
|
1144
|
+
} catch (error) {
|
|
1145
|
+
console.error("Failed to create pg_trgm extension. Search functionality may not work. Ensure the database user has CREATE privilege or the extension is pre-installed.", error);
|
|
1146
|
+
return;
|
|
1147
|
+
}
|
|
1143
1148
|
if (input.search?.threshold) {
|
|
1144
1149
|
const threshold = Number(input.search.threshold);
|
|
1145
1150
|
if (threshold < 0 || threshold > 1) throw new Error(`Search threshold must be between 0 and 1`);
|