inibase 1.6.2 → 1.6.3
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/dist/utils.d.ts +1 -1
- package/dist/utils.js +1 -0
- package/dist/utils.server.js +3 -1
- package/package.json +1 -1
package/dist/utils.d.ts
CHANGED
|
@@ -147,7 +147,7 @@ export declare const deepMerge: (target: any, source: any) => any;
|
|
|
147
147
|
* @param obj2 - The second object for comparison, with string keys and values.
|
|
148
148
|
* @returns A record of changed properties with original values from obj1 and new values from obj2, or null if no changes are found.
|
|
149
149
|
*/
|
|
150
|
-
export declare const findChangedProperties: (obj1: Record<string, string>, obj2: Record<string, string>) => Record<string, string> | null;
|
|
150
|
+
export declare const findChangedProperties: (obj1: Record<string, string>, obj2: Record<string, string>) => Record<string, string | null> | null;
|
|
151
151
|
/**
|
|
152
152
|
* Detects the field type of an input based on available types.
|
|
153
153
|
*
|
package/dist/utils.js
CHANGED
|
@@ -740,6 +740,7 @@ export const createError = (language, name, variable) => {
|
|
|
740
740
|
export const isValidName = (input) => typeof input === "string" &&
|
|
741
741
|
input.length > 0 &&
|
|
742
742
|
input.length <= 255 &&
|
|
743
|
+
input !== "*" &&
|
|
743
744
|
validNamePattern.test(input);
|
|
744
745
|
// Word characters: Latin alphanumerics, underscores, hyphens and Arabic blocks.
|
|
745
746
|
const nameWordCharClass = "a-zA-Z0-9_\\u0600-\\u06FF\\u0750-\\u077F\\u08A0-\\u08FF-";
|
package/dist/utils.server.js
CHANGED
|
@@ -47,7 +47,9 @@ const getKeyAndIv = () => {
|
|
|
47
47
|
if (Buffer.isBuffer(globalConfig.salt)) {
|
|
48
48
|
return { key: globalConfig.salt, iv: globalConfig.salt.subarray(0, 16) };
|
|
49
49
|
}
|
|
50
|
-
const cacheKey = globalConfig.salt
|
|
50
|
+
const cacheKey = globalConfig.salt?.toString();
|
|
51
|
+
if (!cacheKey)
|
|
52
|
+
throw new Error("Invalid salt configuration");
|
|
51
53
|
let key = derivedKeyCache.get(cacheKey);
|
|
52
54
|
if (!key) {
|
|
53
55
|
key = scryptSync(cacheKey, `${INIBASE_SECRET}`, 32);
|