@stemy/backend 2.8.0 → 2.8.1
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/bundles/stemy-backend.umd.js +32 -0
- package/bundles/stemy-backend.umd.js.map +1 -1
- package/bundles/stemy-backend.umd.min.js +1 -1
- package/bundles/stemy-backend.umd.min.js.map +1 -1
- package/esm2015/services/assets.js +14 -1
- package/fesm2015/stemy-backend.js +13 -0
- package/fesm2015/stemy-backend.js.map +1 -1
- package/package.json +1 -1
- package/services/assets.d.ts +1 -0
- package/stemy-backend.metadata.json +1 -1
|
@@ -1904,6 +1904,38 @@
|
|
|
1904
1904
|
});
|
|
1905
1905
|
});
|
|
1906
1906
|
};
|
|
1907
|
+
Assets.prototype.findMany = function (where) {
|
|
1908
|
+
return __awaiter$q(this, void 0, void 0, function () {
|
|
1909
|
+
var cursor, items, result, items_1, items_1_1, item;
|
|
1910
|
+
var e_2, _b;
|
|
1911
|
+
return __generator(this, function (_c) {
|
|
1912
|
+
switch (_c.label) {
|
|
1913
|
+
case 0:
|
|
1914
|
+
cursor = this.collection.find(where);
|
|
1915
|
+
return [4 /*yield*/, cursor.toArray()];
|
|
1916
|
+
case 1:
|
|
1917
|
+
items = (_c.sent()) || [];
|
|
1918
|
+
result = [];
|
|
1919
|
+
try {
|
|
1920
|
+
for (items_1 = __values(items), items_1_1 = items_1.next(); !items_1_1.done; items_1_1 = items_1.next()) {
|
|
1921
|
+
item = items_1_1.value;
|
|
1922
|
+
if (!item)
|
|
1923
|
+
continue;
|
|
1924
|
+
result.push(new Asset(item._id, item, this.collection, this.bucket));
|
|
1925
|
+
}
|
|
1926
|
+
}
|
|
1927
|
+
catch (e_2_1) { e_2 = { error: e_2_1 }; }
|
|
1928
|
+
finally {
|
|
1929
|
+
try {
|
|
1930
|
+
if (items_1_1 && !items_1_1.done && (_b = items_1.return)) _b.call(items_1);
|
|
1931
|
+
}
|
|
1932
|
+
finally { if (e_2) throw e_2.error; }
|
|
1933
|
+
}
|
|
1934
|
+
return [2 /*return*/, result];
|
|
1935
|
+
}
|
|
1936
|
+
});
|
|
1937
|
+
});
|
|
1938
|
+
};
|
|
1907
1939
|
Assets.prototype.unlink = function (id) {
|
|
1908
1940
|
return __awaiter$q(this, void 0, void 0, function () {
|
|
1909
1941
|
var asset;
|