@unchainedshop/core-countries 1.2.31 → 2.0.0-beta1
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.
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export const CountriesSchema:
|
|
1
|
+
export const CountriesSchema: SimpleSchema;
|
|
2
|
+
import SimpleSchema from "simpl-schema";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import LRU from 'lru-cache';
|
|
2
|
-
// REMARK: --> combines defaultCurrency and resolveDefaultCurrencyCode helpers
|
|
3
2
|
const { NODE_ENV } = process.env;
|
|
4
|
-
const ttl = NODE_ENV === 'production' ? 1000 *
|
|
3
|
+
const ttl = NODE_ENV === 'production' ? 1000 * 1 : 0; // minute or second
|
|
5
4
|
const currencyCodeCache = new LRU({
|
|
6
5
|
max: 500,
|
|
7
6
|
ttl,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveDefaultCurrencyCodeService.js","sourceRoot":"","sources":["../../src/service/resolveDefaultCurrencyCodeService.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,WAAW,CAAC;AAE5B,
|
|
1
|
+
{"version":3,"file":"resolveDefaultCurrencyCodeService.js","sourceRoot":"","sources":["../../src/service/resolveDefaultCurrencyCodeService.ts"],"names":[],"mappings":"AAEA,OAAO,GAAG,MAAM,WAAW,CAAC;AAE5B,MAAM,EAAE,QAAQ,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAEjC,MAAM,GAAG,GAAG,QAAQ,KAAK,YAAY,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,mBAAmB;AAEzE,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC;IAChC,GAAG,EAAE,GAAG;IACR,GAAG;CACJ,CAAC,CAAC;AAEH,MAAM,EAAE,kBAAkB,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;AAE3C,MAAM,kBAAkB,GAAG,KAAK,EAAE,OAAgB,EAAE,OAAiB,EAAE,EAAE;IACvE,IAAI,OAAO,EAAE,iBAAiB,EAAE;QAC9B,OAAO,OAAO,CAAC,UAAU,CAAC,YAAY,CAAC;YACrC,UAAU,EAAE,OAAO,CAAC,iBAAiB;SACtC,CAAC,CAAC;KACJ;IACD,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,iCAAiC,GAAsC,KAAK,EACvF,EAAE,OAAO,EAAE,EACX,EAAE,OAAO,EAAE,EACX,EAAE;IACF,MAAM,YAAY,GAAG,iBAAiB,CAAC,GAAG,CAAC,OAAO,CAAW,CAAC;IAC9D,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,MAAM,OAAO,GAAG,MAAM,OAAO,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC;IACjE,MAAM,QAAQ,GAAG,MAAM,kBAAkB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IAE5D,MAAM,gBAAgB,GAAG,QAAQ,EAAE,OAAO,IAAI,kBAAkB,IAAI,KAAK,CAAC;IAC1E,iBAAiB,CAAC,GAAG,CAAC,OAAO,EAAE,gBAAgB,CAAC,CAAC;IAEjD,OAAO,gBAAgB,CAAC;AAC1B,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unchainedshop/core-countries",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0-beta1",
|
|
4
4
|
"main": "lib/countries-index.js",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./lib/countries-index.js",
|
|
@@ -30,19 +30,19 @@
|
|
|
30
30
|
},
|
|
31
31
|
"homepage": "https://github.com/unchainedshop/unchained#readme",
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@unchainedshop/events": "^
|
|
34
|
-
"@unchainedshop/utils": "^
|
|
33
|
+
"@unchainedshop/events": "^2.0.0-beta1",
|
|
34
|
+
"@unchainedshop/utils": "^2.0.0-beta1",
|
|
35
35
|
"emoji-flags": "^1.3.0",
|
|
36
36
|
"i18n-iso-countries": "^7.5.0",
|
|
37
37
|
"lru-cache": "^7.14.0",
|
|
38
|
-
"simpl-schema": "^
|
|
38
|
+
"simpl-schema": "^3.0.1"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@types/node": "^16.11.
|
|
42
|
-
"@unchainedshop/types": "^
|
|
41
|
+
"@types/node": "^16.11.66",
|
|
42
|
+
"@unchainedshop/types": "^2.0.0-beta1",
|
|
43
43
|
"cross-env": "^7.0.3",
|
|
44
|
-
"jest": "^29.
|
|
45
|
-
"ts-jest": "^
|
|
44
|
+
"jest": "^29.2.1",
|
|
45
|
+
"ts-jest": "^29.0.3",
|
|
46
46
|
"typescript": "^4.8.4"
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -2,11 +2,9 @@ import { Country, ResolveDefaultCurrencyCodeService } from '@unchainedshop/types
|
|
|
2
2
|
import { Modules } from '@unchainedshop/types/modules';
|
|
3
3
|
import LRU from 'lru-cache';
|
|
4
4
|
|
|
5
|
-
// REMARK: --> combines defaultCurrency and resolveDefaultCurrencyCode helpers
|
|
6
|
-
|
|
7
5
|
const { NODE_ENV } = process.env;
|
|
8
6
|
|
|
9
|
-
const ttl = NODE_ENV === 'production' ? 1000 *
|
|
7
|
+
const ttl = NODE_ENV === 'production' ? 1000 * 1 : 0; // minute or second
|
|
10
8
|
|
|
11
9
|
const currencyCodeCache = new LRU({
|
|
12
10
|
max: 500,
|