@unchainedshop/core-currencies 2.5.12 → 2.6.0
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/lib/db/CurrenciesCollection.d.ts +2 -2
- package/lib/db/CurrenciesCollection.js +1 -1
- package/lib/db/CurrenciesCollection.js.map +1 -1
- package/lib/module/configureCurrenciesModule.js +1 -1
- package/lib/module/configureCurrenciesModule.js.map +1 -1
- package/package.json +7 -7
- package/src/db/CurrenciesCollection.ts +2 -3
- package/src/module/configureCurrenciesModule.ts +1 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mongodb } from '@unchainedshop/mongodb';
|
|
2
2
|
import { Currency } from '@unchainedshop/types/currencies.js';
|
|
3
|
-
export declare const CurrenciesCollection: (db: Db) => Promise<
|
|
3
|
+
export declare const CurrenciesCollection: (db: mongodb.Db) => Promise<mongodb.Collection<Currency>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CurrenciesCollection.js","sourceRoot":"","sources":["../../src/db/CurrenciesCollection.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CurrenciesCollection.js","sourceRoot":"","sources":["../../src/db/CurrenciesCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAW,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAGjE,MAAM,CAAC,MAAM,oBAAoB,GAAG,KAAK,EAAE,EAAc,EAAE,EAAE;IAC3D,MAAM,UAAU,GAAG,EAAE,CAAC,UAAU,CAAW,YAAY,CAAC,CAAC;IAEzD,MAAM,cAAc,CAAW,UAAU,EAAE;QACzC,EAAE,KAAK,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;QACpD;YACE,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE;YACvC,OAAO,EAAE;gBACP,OAAO,EAAE;oBACP,GAAG,EAAE,CAAC;oBACN,OAAO,EAAE,CAAC;iBACX;gBACD,IAAI,EAAE,4BAA4B;aACnC;SACF;KACF,CAAC,CAAC;IAEH,OAAO,UAAU,CAAC;AACpB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
2
|
-
import { generateDbMutations, generateDbFilterById, buildSortOptions } from '@unchainedshop/
|
|
2
|
+
import { generateDbMutations, generateDbFilterById, buildSortOptions } from '@unchainedshop/mongodb';
|
|
3
3
|
import { SortDirection } from '@unchainedshop/types/api.js';
|
|
4
4
|
import { CurrenciesCollection } from '../db/CurrenciesCollection.js';
|
|
5
5
|
import { CurrenciesSchema } from '../db/CurrenciesSchema.js';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureCurrenciesModule.js","sourceRoot":"","sources":["../../src/module/configureCurrenciesModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"configureCurrenciesModule.js","sourceRoot":"","sources":["../../src/module/configureCurrenciesModule.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AACrG,OAAO,EAAE,aAAa,EAAc,MAAM,6BAA6B,CAAC;AACxE,OAAO,EAAE,oBAAoB,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAE7D,MAAM,eAAe,GAAa,CAAC,iBAAiB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;AAE5F,MAAM,CAAC,MA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AAC,WAAW,EAAE;aACnC,CAAC,CAAC;YACH,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;YAC9C,OAAO,UAAU,CAAC;QACpB,CAAC;QAED,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE;YAC3B,MAAM,YAAY,GAAG,MAAM,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;YACxD,MAAM,IAAI,CAAC,iBAAiB,EAAE,EAAE,UAAU,EAAE,CAAC,CAAC;YAC9C,OAAO,YAAY,CAAC;QACtB,CAAC;QAED,iBAAiB,EAAE,KAAK,EAAE,GAAG,EAAE,EAAE;YAC/B,OAAO,SAAS,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QAC1C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-currencies",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.6.0",
|
|
4
4
|
"main": "lib/currencies-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/currencies-index.js",
|
|
@@ -31,15 +31,15 @@
|
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unchainedshop/events": "^2.
|
|
35
|
-
"@unchainedshop/utils": "^2.
|
|
34
|
+
"@unchainedshop/events": "^2.6.0",
|
|
35
|
+
"@unchainedshop/utils": "^2.6.0",
|
|
36
36
|
"simpl-schema": "=3.2.0"
|
|
37
37
|
},
|
|
38
38
|
"devDependencies": {
|
|
39
|
-
"@types/node": "^20.
|
|
40
|
-
"@unchainedshop/types": "^2.
|
|
39
|
+
"@types/node": "^20.11.6",
|
|
40
|
+
"@unchainedshop/types": "^2.6.0",
|
|
41
41
|
"jest": "^29.7.0",
|
|
42
|
-
"ts-jest": "^29.1.
|
|
43
|
-
"typescript": "^5.3.
|
|
42
|
+
"ts-jest": "^29.1.2",
|
|
43
|
+
"typescript": "^5.3.3"
|
|
44
44
|
}
|
|
45
45
|
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { mongodb, buildDbIndexes } from '@unchainedshop/mongodb';
|
|
2
2
|
import { Currency } from '@unchainedshop/types/currencies.js';
|
|
3
|
-
import { buildDbIndexes } from '@unchainedshop/utils';
|
|
4
3
|
|
|
5
|
-
export const CurrenciesCollection = async (db: Db) => {
|
|
4
|
+
export const CurrenciesCollection = async (db: mongodb.Db) => {
|
|
6
5
|
const Currencies = db.collection<Currency>('currencies');
|
|
7
6
|
|
|
8
7
|
await buildDbIndexes<Currency>(Currencies, [
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ModuleInput, ModuleMutations } from '@unchainedshop/types/core.js';
|
|
2
2
|
import { CurrenciesModule, Currency, CurrencyQuery } from '@unchainedshop/types/currencies.js';
|
|
3
3
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
4
|
-
import { generateDbMutations, generateDbFilterById, buildSortOptions } from '@unchainedshop/
|
|
4
|
+
import { generateDbMutations, generateDbFilterById, buildSortOptions } from '@unchainedshop/mongodb';
|
|
5
5
|
import { SortDirection, SortOption } from '@unchainedshop/types/api.js';
|
|
6
6
|
import { CurrenciesCollection } from '../db/CurrenciesCollection.js';
|
|
7
7
|
import { CurrenciesSchema } from '../db/CurrenciesSchema.js';
|