@unchainedshop/core-delivery 5.0.0-alpha.3 → 5.0.0-alpha.5
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.
|
@@ -26,7 +26,7 @@ export const configureDeliveryModule = async ({ db, options: deliveryOptions = {
|
|
|
26
26
|
registerEvents(DELIVERY_PROVIDER_EVENTS);
|
|
27
27
|
deliverySettings.configureSettings(deliveryOptions);
|
|
28
28
|
const DeliveryProviders = await DeliveryProvidersCollection(db);
|
|
29
|
-
const allProviders = memoizeWithTTL(async () => DeliveryProviders.find({ deleted: null }, { sort: { created: 1 } }).toArray(), { ttl: process.env.NODE_ENV === 'production' ? 60000 : 1 });
|
|
29
|
+
const allProviders = memoizeWithTTL(async () => DeliveryProviders.find({ deleted: null }, { sort: { created: 1, _id: 1 } }).toArray(), { ttl: process.env.NODE_ENV === 'production' ? 60000 : 1 });
|
|
30
30
|
return {
|
|
31
31
|
count: async (query = {}) => {
|
|
32
32
|
const providerCount = await DeliveryProviders.countDocuments(buildFindSelector(query));
|
|
@@ -35,7 +35,7 @@ export const configureDeliveryModule = async ({ db, options: deliveryOptions = {
|
|
|
35
35
|
findProvider: async ({ deliveryProviderId, ...query }, options) => {
|
|
36
36
|
return DeliveryProviders.findOne(deliveryProviderId ? generateDbFilterById(deliveryProviderId) : query, options);
|
|
37
37
|
},
|
|
38
|
-
findProviders: async (query = {}, options = { sort: { created: 1 } }) => {
|
|
38
|
+
findProviders: async (query = {}, options = { sort: { created: 1, _id: 1 } }) => {
|
|
39
39
|
const providers = DeliveryProviders.find(buildFindSelector(query), options);
|
|
40
40
|
return providers.toArray();
|
|
41
41
|
},
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-delivery",
|
|
3
3
|
"description": "Delivery provider management module for the Unchained Engine",
|
|
4
|
-
"version": "5.0.0-alpha.
|
|
4
|
+
"version": "5.0.0-alpha.5",
|
|
5
5
|
"main": "lib/delivery-index.js",
|
|
6
6
|
"types": "lib/delivery-index.d.ts",
|
|
7
7
|
"type": "module",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
},
|
|
36
36
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@unchainedshop/events": "^5.0.0-alpha.
|
|
39
|
-
"@unchainedshop/mongodb": "^5.0.0-alpha.
|
|
40
|
-
"@unchainedshop/utils": "^5.0.0-alpha.
|
|
38
|
+
"@unchainedshop/events": "^5.0.0-alpha.5",
|
|
39
|
+
"@unchainedshop/mongodb": "^5.0.0-alpha.5",
|
|
40
|
+
"@unchainedshop/utils": "^5.0.0-alpha.5"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
43
43
|
"@types/node": "^26.2.0",
|
|
44
|
-
"typescript": "^
|
|
44
|
+
"typescript": "^6.0.3"
|
|
45
45
|
}
|
|
46
46
|
}
|