@m1212e/rumble 0.21.2 → 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 +10 -6
- package/out/index.cjs.map +1 -1
- package/out/index.d.cts +10 -6
- package/out/index.d.cts.map +1 -1
- package/out/index.d.mts +10 -6
- package/out/index.d.mts.map +1 -1
- package/out/index.mjs +10 -6
- package/out/index.mjs.map +1 -1
- package/package.json +3 -4
package/out/index.mjs
CHANGED
|
@@ -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.4";
|
|
184
184
|
//#endregion
|
|
185
185
|
//#region lib/helpers/mergeFilters.ts
|
|
186
186
|
function mergeFilters(filterA, filterB, mode = "AND") {
|
|
@@ -786,10 +786,9 @@ const createEnumImplementer = ({ schema, schemaBuilder }) => {
|
|
|
786
786
|
}
|
|
787
787
|
if (!enumSchemaName || !enumValues) throw new RumbleError("Could not determine enum structure!");
|
|
788
788
|
const graphqlImplementationName = refName ?? `${capitalize(toCamelCase(enumSchemaName))}Enum`;
|
|
789
|
-
|
|
790
|
-
if (
|
|
791
|
-
const
|
|
792
|
-
ret = implement();
|
|
789
|
+
const cached = referenceStorage.get(graphqlImplementationName);
|
|
790
|
+
if (cached) return cached;
|
|
791
|
+
const ret = schemaBuilder.enumType(graphqlImplementationName, { values: enumValues });
|
|
793
792
|
referenceStorage.set(graphqlImplementationName, ret);
|
|
794
793
|
return ret;
|
|
795
794
|
};
|
|
@@ -1112,7 +1111,12 @@ async function initSearchIfApplicable(input) {
|
|
|
1112
1111
|
console.info("Database dialect is not compatible with search, skipping search initialization. Only PostgreSQL is supported.");
|
|
1113
1112
|
return;
|
|
1114
1113
|
}
|
|
1115
|
-
|
|
1114
|
+
try {
|
|
1115
|
+
await input.db.execute(sql`CREATE EXTENSION IF NOT EXISTS pg_trgm;`);
|
|
1116
|
+
} catch (error) {
|
|
1117
|
+
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);
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1116
1120
|
if (input.search?.threshold) {
|
|
1117
1121
|
const threshold = Number(input.search.threshold);
|
|
1118
1122
|
if (threshold < 0 || threshold > 1) throw new Error(`Search threshold must be between 0 and 1`);
|