@unchainedshop/core-countries 3.0.0-alpha7 → 3.0.0-rc10
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/migrations/addMigrations.js +2 -2
- package/lib/migrations/addMigrations.js.map +1 -1
- package/lib/module/configureCountriesModule.d.ts +1 -1
- package/lib/module/configureCountriesModule.d.ts.map +1 -1
- package/package.json +12 -13
- package/src/migrations/addMigrations.ts +2 -2
- package/src/module/configureCountriesModule.ts +1 -1
- package/tsconfig.json +5 -7
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { CountriesCollection } from '../db/CountriesCollection.js';
|
|
2
2
|
export default function addMigrations(repository) {
|
|
3
3
|
repository?.register({
|
|
4
|
-
id:
|
|
5
|
-
name: '
|
|
4
|
+
id: 20241220123500,
|
|
5
|
+
name: 'Remove defaultCurrencyId from countries and add defaultCurrencyCode',
|
|
6
6
|
up: async () => {
|
|
7
7
|
const Currencies = await repository.db.collection('currencies');
|
|
8
8
|
const Countries = await CountriesCollection(repository.db);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"addMigrations.js","sourceRoot":"","sources":["../../src/migrations/addMigrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAA+B;IACnE,UAAU,EAAE,QAAQ,CAAC;QACnB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"addMigrations.js","sourceRoot":"","sources":["../../src/migrations/addMigrations.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAGnE,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,UAA+B;IACnE,UAAU,EAAE,QAAQ,CAAC;QACnB,EAAE,EAAE,cAAc;QAClB,IAAI,EAAE,qEAAqE;QAC3E,EAAE,EAAE,KAAK,IAAI,EAAE;YACb,MAAM,UAAU,GAAG,MAAM,UAAU,CAAC,EAAE,CAAC,UAAU,CAAmC,YAAY,CAAC,CAAC;YAClG,MAAM,SAAS,GAAG,MAAM,mBAAmB,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;YAE3D,MAAM,aAAa,GAAG,MAAM,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAC1D,MAAM,YAAY,GAAG,MAAM,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;YAExD,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CACtC,CAAC,GAAG,EAAE,QAAQ,EAAE,EAAE;gBAChB,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,OAAO,CAAC;gBACrC,OAAO,GAAG,CAAC;YACb,CAAC,EACD,EAAyB,CAC1B,CAAC;YAEF,KAAK,MAAM,OAAO,IAAI,YAAY,EAAE,CAAC;gBACnC,MAAM,SAAS,CAAC,SAAS,CACvB,EAAE,GAAG,EAAE,OAAO,CAAC,GAAG,EAAE,iBAAiB,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,EAC1D;oBACE,IAAI,EAAE;wBACJ,mBAAmB,EACjB,WAAW,CAAE,OAAmD,CAAC,iBAAiB,CAAC;qBACtF;oBACD,MAAM,EAAE;wBACN,iBAAiB,EAAE,CAAC;qBACrB;iBACF,CACF,CAAC;YACJ,CAAC;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"configureCountriesModule.d.ts","sourceRoot":"","sources":["../../src/module/configureCountriesModule.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"configureCountriesModule.d.ts","sourceRoot":"","sources":["../../src/module/configureCountriesModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,eAAe,EA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AM,KAAK,MAAM,CAAC;IAErD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACvD,MAAM,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACzC,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAClD,CAAC;AAIF,eAAO,MAAM,iBAAiB,qCAAmD,YAAY;eAC9D,IAAI;YAAU,GAAG;cAAY,IAAI;CAI/D,CAAC;AAEF,eAAO,MAAM,wBAAwB,iCAGlC,WAAW,CAAC,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,KAAG,OAAO,CAAC,eAAe,CA2F9D,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,16 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-countries",
|
|
3
|
-
"version": "3.0.0-
|
|
3
|
+
"version": "3.0.0-rc10",
|
|
4
4
|
"main": "lib/countries-index.js",
|
|
5
|
-
"exports": {
|
|
6
|
-
".": "./lib/countries-index.js",
|
|
7
|
-
"./*": "./lib/*"
|
|
8
|
-
},
|
|
9
5
|
"types": "lib/countries-index.d.ts",
|
|
10
6
|
"type": "module",
|
|
11
7
|
"scripts": {
|
|
12
|
-
"clean": "
|
|
13
|
-
"
|
|
8
|
+
"clean": "tsc -b --clean",
|
|
9
|
+
"build": "tsc -b",
|
|
10
|
+
"prepublishOnly": "npm run clean && npm run build",
|
|
14
11
|
"watch": "tsc -w",
|
|
15
12
|
"test": "NODE_OPTIONS=--experimental-vm-modules jest --detectOpenHandles --forceExit",
|
|
16
13
|
"test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch --detectOpenHandles --forceExit"
|
|
@@ -24,21 +21,23 @@
|
|
|
24
21
|
"ecommerce",
|
|
25
22
|
"core"
|
|
26
23
|
],
|
|
27
|
-
"
|
|
24
|
+
"authors": [
|
|
25
|
+
"Joël Meiller",
|
|
26
|
+
"Pascal Kaufmann"
|
|
27
|
+
],
|
|
28
28
|
"license": "EUPL-1.2",
|
|
29
29
|
"bugs": {
|
|
30
30
|
"url": "https://github.com/unchainedshop/unchained/issues"
|
|
31
31
|
},
|
|
32
32
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@unchainedshop/events": "^3.0.0-
|
|
35
|
-
"@unchainedshop/utils": "^3.0.0-
|
|
34
|
+
"@unchainedshop/events": "^3.0.0-rc10",
|
|
35
|
+
"@unchainedshop/utils": "^3.0.0-rc10"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@types/node": "^22.
|
|
39
|
-
"cross-env": "^7.0.3",
|
|
38
|
+
"@types/node": "^22.10.2",
|
|
40
39
|
"jest": "^29.7.0",
|
|
41
40
|
"ts-jest": "^29.2.5",
|
|
42
|
-
"typescript": "^5.
|
|
41
|
+
"typescript": "^5.7.2"
|
|
43
42
|
}
|
|
44
43
|
}
|
|
@@ -4,8 +4,8 @@ import { Country } from '../countries-index.js';
|
|
|
4
4
|
|
|
5
5
|
export default function addMigrations(repository: MigrationRepository) {
|
|
6
6
|
repository?.register({
|
|
7
|
-
id:
|
|
8
|
-
name: '
|
|
7
|
+
id: 20241220123500,
|
|
8
|
+
name: 'Remove defaultCurrencyId from countries and add defaultCurrencyCode',
|
|
9
9
|
up: async () => {
|
|
10
10
|
const Currencies = await repository.db.collection<{ _id: string; isoCode: string }>('currencies');
|
|
11
11
|
const Countries = await CountriesCollection(repository.db);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { mongodb, TimestampFields, ModuleInput } from '@unchainedshop/mongodb';
|
|
2
2
|
import { emit, registerEvents } from '@unchainedshop/events';
|
|
3
3
|
import { generateDbFilterById, buildSortOptions, generateDbObjectId } from '@unchainedshop/mongodb';
|
|
4
4
|
import { SortDirection, SortOption } from '@unchainedshop/utils';
|
package/tsconfig.json
CHANGED
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"extends": "../shared/base.tsconfig.json",
|
|
3
3
|
"compilerOptions": {
|
|
4
|
-
"
|
|
5
|
-
"
|
|
4
|
+
"declarationDir": "./lib",
|
|
5
|
+
"rootDir": "./src",
|
|
6
|
+
"outDir": "./lib"
|
|
6
7
|
},
|
|
7
|
-
"exclude": ["**/*.test.ts", "**/*.test.js", "tests"]
|
|
8
|
-
|
|
9
|
-
"./src"
|
|
10
|
-
]
|
|
11
|
-
}
|
|
8
|
+
"exclude": ["**/*.test.ts", "**/*.test.js", "tests", "lib"]
|
|
9
|
+
}
|