cynx-lib 1.3.96 → 1.3.97
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/package.json
CHANGED
|
@@ -1241,8 +1241,15 @@ class StorageManager {
|
|
|
1241
1241
|
return r.rows.map((row) => this.formatFileRecord(row));
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
|
-
function createStorageManager(
|
|
1245
|
-
|
|
1244
|
+
function createStorageManager(queryOrOptions = {}, storagesTable, filesTable) {
|
|
1245
|
+
if (typeof queryOrOptions === "function") {
|
|
1246
|
+
return new StorageManager({
|
|
1247
|
+
query: queryOrOptions,
|
|
1248
|
+
storagesTable,
|
|
1249
|
+
filesTable
|
|
1250
|
+
});
|
|
1251
|
+
}
|
|
1252
|
+
return new StorageManager(queryOrOptions);
|
|
1246
1253
|
}
|
|
1247
1254
|
var storage_manager_default = {
|
|
1248
1255
|
StorageManager,
|
|
@@ -1421,8 +1421,15 @@ export class StorageManager {
|
|
|
1421
1421
|
* @param {object} options
|
|
1422
1422
|
* @returns {StorageManager}
|
|
1423
1423
|
*/
|
|
1424
|
-
export function createStorageManager(
|
|
1425
|
-
|
|
1424
|
+
export function createStorageManager(queryOrOptions = {}, storagesTable, filesTable) {
|
|
1425
|
+
if (typeof queryOrOptions === 'function') {
|
|
1426
|
+
return new StorageManager({
|
|
1427
|
+
query: queryOrOptions,
|
|
1428
|
+
storagesTable,
|
|
1429
|
+
filesTable,
|
|
1430
|
+
});
|
|
1431
|
+
}
|
|
1432
|
+
return new StorageManager(queryOrOptions);
|
|
1426
1433
|
}
|
|
1427
1434
|
|
|
1428
1435
|
export {
|