@commercelayer/organization-config 1.4.2 → 1.4.4
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/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +47 -8
- package/dist/index.d.ts +47 -8
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
package/dist/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { merge } from 'merge-anything'\n\nexport type NullableType<T> = T | null | undefined\n\ninterface ConfigParams {\n /**\n *
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { merge } from 'merge-anything'\n\n/**\n * Represents a type that can be null or undefined, making it optional in use.\n * @template T The type that is being made nullable.\n */\nexport type NullableType<T> = T | null | undefined\n\n/**\n * Params used by the getConfig function\n */\ninterface ConfigParams {\n /**\n * Language code (e.g., 'en', 'fr') used to dynamically replace the `:lang` placeholder in URLs.\n */\n lang?: NullableType<string>\n /**\n * Access token string used to replace the `:access_token` placeholder in URLs.\n */\n accessToken?: NullableType<string>\n /**\n * Unique identifier for an order used to replace the `:order_id` placeholder in URLs.\n */\n orderId?: NullableType<string>\n}\n\n/**\n * Configuration for overriding default links of the micro frontends,\n * allowing customization of specific components.\n */\ninterface LinkConfig {\n /** URL for a custom cart. */\n cart?: string\n /** URL for a custom checkout */\n checkout?: string\n /** URL for a custom my account */\n my_account?: string\n /** URL for a custom identity */\n identity?: string\n}\n\ninterface Country {\n /** The country code (e.g., 'US', 'UK') */\n value: string\n /** The display name of the country (e.g., 'United States', 'United Kingdom') */\n label: string\n}\n\ntype StateConfig = Record<string, Country[]>\n\n/**\n * Configuration settings for customizing the Checkout application.\n */\ninterface CheckoutConfig {\n /** URL for a custom thank you page displayed after completing a purchase. */\n thankyou_page?: string\n /** List of countries available for selection in billing address forms. */\n billing_countries?: Country[]\n /** List of countries available for selection in shipping address forms. */\n shipping_countries?: Country[]\n /** Configuration for states or regions to display in billing address forms, which may override default settings. */\n billing_states?: StateConfig[]\n /** Configuration for states or regions to display in shipping address forms, which may override default settings. */\n shipping_states?: StateConfig[]\n /** Country code preselected by default in billing and shipping address forms. */\n default_country?: string\n}\n\ninterface UrlsConfig {\n /** URL of the privacy policy page */\n privacy: string\n /** URL of the terms and conditions page */\n terms: string\n}\n\n/** Interface of the config of the organization */\nexport interface DefaultConfig {\n /** Custom links for overriding default micro frontends. */\n links?: LinkConfig\n /** Checkout-specific configuration, like custom thank you page and country lists. */\n checkout?: CheckoutConfig\n /** URLs for privacy policy and terms of service pages. */\n urls?: UrlsConfig\n}\n\n/** Configuration structure containing defaults and market-specific overrides. */\nexport interface Configs {\n /** Default configuration applicable to all markets. */\n default: DefaultConfig\n /** Market-specific configuration overrides, keyed by market identifier. */\n [key: string]: Partial<DefaultConfig>\n}\n\ninterface GetConfigProps {\n /**\n * `config` attribute of the organization\n */\n jsonConfig?: { mfe?: Configs }\n /**\n * Market identifier for fetching specific configuration overrides. (`market:id:hashid`)\n */\n market?: string\n /**\n * Parameters for replacing URL placeholders.\n */\n params?: ConfigParams\n}\n\n/**\n * Retrieves and merges the default organization configuration with market-specific overrides based on the provided market identifier.\n * Placeholder values in the configuration URLs can be replaced with actual values from the `params`.\n *\n * @param jsonConfig The complete configuration object of the organization.\n * @param market The market identifier used to get market-specific configuration overrides.\n * @param params The object containing replacement values for URL placeholders, such as language and access token.\n * @returns The merged configuration object for the specified market, or null if no configuration is found.\n */\nexport function getConfig({\n jsonConfig,\n market,\n params\n}: GetConfigProps): DefaultConfig | null {\n if (jsonConfig?.mfe == null) {\n console.warn('No configuration found.')\n return null\n }\n\n const defaultConfig = jsonConfig?.mfe?.default ?? {}\n const overrideConfig = market != null ? jsonConfig?.mfe[market] ?? {} : {}\n\n // Replace placeholders in all string values within the object\n function replacePlaceholders(config: DefaultConfig): DefaultConfig {\n const replacedConfig = JSON.stringify(config)\n .replace(/:lang/g, params?.lang ?? ':lang')\n .replace(/:access_token/g, params?.accessToken ?? ':access_token')\n .replace(/:order_id/g, params?.orderId ?? ':order_id')\n\n return JSON.parse(replacedConfig)\n }\n\n const mergedConfig: DefaultConfig = merge(\n JSON.parse(JSON.stringify(defaultConfig)),\n overrideConfig\n )\n return replacePlaceholders(mergedConfig)\n}\n"],"mappings":"yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,eAAAE,IAAA,eAAAC,EAAAH,GAAA,IAAAI,EAAsB,0BAqHf,SAASF,EAAU,CACxB,WAAAG,EACA,OAAAC,EACA,OAAAC,CACF,EAAyC,CAzHzC,IAAAC,EAAAC,EAAAC,EA0HE,IAAIL,GAAA,YAAAA,EAAY,MAAO,KACrB,eAAQ,KAAK,yBAAyB,EAC/B,KAGT,IAAMM,GAAgBF,GAAAD,EAAAH,GAAA,YAAAA,EAAY,MAAZ,YAAAG,EAAiB,UAAjB,KAAAC,EAA4B,CAAC,EAC7CG,EAAiBN,GAAU,MAAOI,EAAAL,GAAA,YAAAA,EAAY,IAAIC,KAAhB,KAAAI,EAA2B,CAAC,EAAI,CAAC,EAGzE,SAASG,EAAoBC,EAAsC,CAnIrE,IAAAN,EAAAC,EAAAC,EAoII,IAAMK,EAAiB,KAAK,UAAUD,CAAM,EACzC,QAAQ,UAAUN,EAAAD,GAAA,YAAAA,EAAQ,OAAR,KAAAC,EAAgB,OAAO,EACzC,QAAQ,kBAAkBC,EAAAF,GAAA,YAAAA,EAAQ,cAAR,KAAAE,EAAuB,eAAe,EAChE,QAAQ,cAAcC,EAAAH,GAAA,YAAAA,EAAQ,UAAR,KAAAG,EAAmB,WAAW,EAEvD,OAAO,KAAK,MAAMK,CAAc,CAClC,CAEA,IAAMC,KAA8B,SAClC,KAAK,MAAM,KAAK,UAAUL,CAAa,CAAC,EACxCC,CACF,EACA,OAAOC,EAAoBG,CAAY,CACzC","names":["src_exports","__export","getConfig","__toCommonJS","import_merge_anything","jsonConfig","market","params","_a","_b","_c","defaultConfig","overrideConfig","replacePlaceholders","config","replacedConfig","mergedConfig"]}
|
package/dist/index.d.cts
CHANGED
|
@@ -1,48 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a type that can be null or undefined, making it optional in use.
|
|
3
|
+
* @template T The type that is being made nullable.
|
|
4
|
+
*/
|
|
1
5
|
type NullableType<T> = T | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Params used by the getConfig function
|
|
8
|
+
*/
|
|
2
9
|
interface ConfigParams {
|
|
3
10
|
/**
|
|
4
|
-
*
|
|
11
|
+
* Language code (e.g., 'en', 'fr') used to dynamically replace the `:lang` placeholder in URLs.
|
|
5
12
|
*/
|
|
6
13
|
lang?: NullableType<string>;
|
|
7
14
|
/**
|
|
8
|
-
*
|
|
15
|
+
* Access token string used to replace the `:access_token` placeholder in URLs.
|
|
9
16
|
*/
|
|
10
17
|
accessToken?: NullableType<string>;
|
|
11
18
|
/**
|
|
12
|
-
* order
|
|
19
|
+
* Unique identifier for an order used to replace the `:order_id` placeholder in URLs.
|
|
13
20
|
*/
|
|
14
21
|
orderId?: NullableType<string>;
|
|
15
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for overriding default links of the micro frontends,
|
|
25
|
+
* allowing customization of specific components.
|
|
26
|
+
*/
|
|
16
27
|
interface LinkConfig {
|
|
28
|
+
/** URL for a custom cart. */
|
|
17
29
|
cart?: string;
|
|
30
|
+
/** URL for a custom checkout */
|
|
18
31
|
checkout?: string;
|
|
32
|
+
/** URL for a custom my account */
|
|
19
33
|
my_account?: string;
|
|
34
|
+
/** URL for a custom identity */
|
|
20
35
|
identity?: string;
|
|
21
36
|
}
|
|
22
37
|
interface Country {
|
|
38
|
+
/** The country code (e.g., 'US', 'UK') */
|
|
23
39
|
value: string;
|
|
40
|
+
/** The display name of the country (e.g., 'United States', 'United Kingdom') */
|
|
24
41
|
label: string;
|
|
25
42
|
}
|
|
26
43
|
type StateConfig = Record<string, Country[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Configuration settings for customizing the Checkout application.
|
|
46
|
+
*/
|
|
27
47
|
interface CheckoutConfig {
|
|
48
|
+
/** URL for a custom thank you page displayed after completing a purchase. */
|
|
28
49
|
thankyou_page?: string;
|
|
50
|
+
/** List of countries available for selection in billing address forms. */
|
|
29
51
|
billing_countries?: Country[];
|
|
52
|
+
/** List of countries available for selection in shipping address forms. */
|
|
30
53
|
shipping_countries?: Country[];
|
|
54
|
+
/** Configuration for states or regions to display in billing address forms, which may override default settings. */
|
|
31
55
|
billing_states?: StateConfig[];
|
|
56
|
+
/** Configuration for states or regions to display in shipping address forms, which may override default settings. */
|
|
32
57
|
shipping_states?: StateConfig[];
|
|
58
|
+
/** Country code preselected by default in billing and shipping address forms. */
|
|
33
59
|
default_country?: string;
|
|
34
60
|
}
|
|
35
61
|
interface UrlsConfig {
|
|
62
|
+
/** URL of the privacy policy page */
|
|
36
63
|
privacy: string;
|
|
64
|
+
/** URL of the terms and conditions page */
|
|
37
65
|
terms: string;
|
|
38
66
|
}
|
|
67
|
+
/** Interface of the config of the organization */
|
|
39
68
|
interface DefaultConfig {
|
|
69
|
+
/** Custom links for overriding default micro frontends. */
|
|
40
70
|
links?: LinkConfig;
|
|
71
|
+
/** Checkout-specific configuration, like custom thank you page and country lists. */
|
|
41
72
|
checkout?: CheckoutConfig;
|
|
73
|
+
/** URLs for privacy policy and terms of service pages. */
|
|
42
74
|
urls?: UrlsConfig;
|
|
43
75
|
}
|
|
76
|
+
/** Configuration structure containing defaults and market-specific overrides. */
|
|
44
77
|
interface Configs {
|
|
78
|
+
/** Default configuration applicable to all markets. */
|
|
45
79
|
default: DefaultConfig;
|
|
80
|
+
/** Market-specific configuration overrides, keyed by market identifier. */
|
|
46
81
|
[key: string]: Partial<DefaultConfig>;
|
|
47
82
|
}
|
|
48
83
|
interface GetConfigProps {
|
|
@@ -53,18 +88,22 @@ interface GetConfigProps {
|
|
|
53
88
|
mfe?: Configs;
|
|
54
89
|
};
|
|
55
90
|
/**
|
|
56
|
-
* `market:id:hashid`
|
|
91
|
+
* Market identifier for fetching specific configuration overrides. (`market:id:hashid`)
|
|
57
92
|
*/
|
|
58
93
|
market?: string;
|
|
59
94
|
/**
|
|
60
|
-
*
|
|
95
|
+
* Parameters for replacing URL placeholders.
|
|
61
96
|
*/
|
|
62
97
|
params?: ConfigParams;
|
|
63
98
|
}
|
|
64
99
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
100
|
+
* Retrieves and merges the default organization configuration with market-specific overrides based on the provided market identifier.
|
|
101
|
+
* Placeholder values in the configuration URLs can be replaced with actual values from the `params`.
|
|
102
|
+
*
|
|
103
|
+
* @param jsonConfig The complete configuration object of the organization.
|
|
104
|
+
* @param market The market identifier used to get market-specific configuration overrides.
|
|
105
|
+
* @param params The object containing replacement values for URL placeholders, such as language and access token.
|
|
106
|
+
* @returns The merged configuration object for the specified market, or null if no configuration is found.
|
|
68
107
|
*/
|
|
69
108
|
declare function getConfig({ jsonConfig, market, params }: GetConfigProps): DefaultConfig | null;
|
|
70
109
|
|
package/dist/index.d.ts
CHANGED
|
@@ -1,48 +1,83 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Represents a type that can be null or undefined, making it optional in use.
|
|
3
|
+
* @template T The type that is being made nullable.
|
|
4
|
+
*/
|
|
1
5
|
type NullableType<T> = T | null | undefined;
|
|
6
|
+
/**
|
|
7
|
+
* Params used by the getConfig function
|
|
8
|
+
*/
|
|
2
9
|
interface ConfigParams {
|
|
3
10
|
/**
|
|
4
|
-
*
|
|
11
|
+
* Language code (e.g., 'en', 'fr') used to dynamically replace the `:lang` placeholder in URLs.
|
|
5
12
|
*/
|
|
6
13
|
lang?: NullableType<string>;
|
|
7
14
|
/**
|
|
8
|
-
*
|
|
15
|
+
* Access token string used to replace the `:access_token` placeholder in URLs.
|
|
9
16
|
*/
|
|
10
17
|
accessToken?: NullableType<string>;
|
|
11
18
|
/**
|
|
12
|
-
* order
|
|
19
|
+
* Unique identifier for an order used to replace the `:order_id` placeholder in URLs.
|
|
13
20
|
*/
|
|
14
21
|
orderId?: NullableType<string>;
|
|
15
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Configuration for overriding default links of the micro frontends,
|
|
25
|
+
* allowing customization of specific components.
|
|
26
|
+
*/
|
|
16
27
|
interface LinkConfig {
|
|
28
|
+
/** URL for a custom cart. */
|
|
17
29
|
cart?: string;
|
|
30
|
+
/** URL for a custom checkout */
|
|
18
31
|
checkout?: string;
|
|
32
|
+
/** URL for a custom my account */
|
|
19
33
|
my_account?: string;
|
|
34
|
+
/** URL for a custom identity */
|
|
20
35
|
identity?: string;
|
|
21
36
|
}
|
|
22
37
|
interface Country {
|
|
38
|
+
/** The country code (e.g., 'US', 'UK') */
|
|
23
39
|
value: string;
|
|
40
|
+
/** The display name of the country (e.g., 'United States', 'United Kingdom') */
|
|
24
41
|
label: string;
|
|
25
42
|
}
|
|
26
43
|
type StateConfig = Record<string, Country[]>;
|
|
44
|
+
/**
|
|
45
|
+
* Configuration settings for customizing the Checkout application.
|
|
46
|
+
*/
|
|
27
47
|
interface CheckoutConfig {
|
|
48
|
+
/** URL for a custom thank you page displayed after completing a purchase. */
|
|
28
49
|
thankyou_page?: string;
|
|
50
|
+
/** List of countries available for selection in billing address forms. */
|
|
29
51
|
billing_countries?: Country[];
|
|
52
|
+
/** List of countries available for selection in shipping address forms. */
|
|
30
53
|
shipping_countries?: Country[];
|
|
54
|
+
/** Configuration for states or regions to display in billing address forms, which may override default settings. */
|
|
31
55
|
billing_states?: StateConfig[];
|
|
56
|
+
/** Configuration for states or regions to display in shipping address forms, which may override default settings. */
|
|
32
57
|
shipping_states?: StateConfig[];
|
|
58
|
+
/** Country code preselected by default in billing and shipping address forms. */
|
|
33
59
|
default_country?: string;
|
|
34
60
|
}
|
|
35
61
|
interface UrlsConfig {
|
|
62
|
+
/** URL of the privacy policy page */
|
|
36
63
|
privacy: string;
|
|
64
|
+
/** URL of the terms and conditions page */
|
|
37
65
|
terms: string;
|
|
38
66
|
}
|
|
67
|
+
/** Interface of the config of the organization */
|
|
39
68
|
interface DefaultConfig {
|
|
69
|
+
/** Custom links for overriding default micro frontends. */
|
|
40
70
|
links?: LinkConfig;
|
|
71
|
+
/** Checkout-specific configuration, like custom thank you page and country lists. */
|
|
41
72
|
checkout?: CheckoutConfig;
|
|
73
|
+
/** URLs for privacy policy and terms of service pages. */
|
|
42
74
|
urls?: UrlsConfig;
|
|
43
75
|
}
|
|
76
|
+
/** Configuration structure containing defaults and market-specific overrides. */
|
|
44
77
|
interface Configs {
|
|
78
|
+
/** Default configuration applicable to all markets. */
|
|
45
79
|
default: DefaultConfig;
|
|
80
|
+
/** Market-specific configuration overrides, keyed by market identifier. */
|
|
46
81
|
[key: string]: Partial<DefaultConfig>;
|
|
47
82
|
}
|
|
48
83
|
interface GetConfigProps {
|
|
@@ -53,18 +88,22 @@ interface GetConfigProps {
|
|
|
53
88
|
mfe?: Configs;
|
|
54
89
|
};
|
|
55
90
|
/**
|
|
56
|
-
* `market:id:hashid`
|
|
91
|
+
* Market identifier for fetching specific configuration overrides. (`market:id:hashid`)
|
|
57
92
|
*/
|
|
58
93
|
market?: string;
|
|
59
94
|
/**
|
|
60
|
-
*
|
|
95
|
+
* Parameters for replacing URL placeholders.
|
|
61
96
|
*/
|
|
62
97
|
params?: ConfigParams;
|
|
63
98
|
}
|
|
64
99
|
/**
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
100
|
+
* Retrieves and merges the default organization configuration with market-specific overrides based on the provided market identifier.
|
|
101
|
+
* Placeholder values in the configuration URLs can be replaced with actual values from the `params`.
|
|
102
|
+
*
|
|
103
|
+
* @param jsonConfig The complete configuration object of the organization.
|
|
104
|
+
* @param market The market identifier used to get market-specific configuration overrides.
|
|
105
|
+
* @param params The object containing replacement values for URL placeholders, such as language and access token.
|
|
106
|
+
* @returns The merged configuration object for the specified market, or null if no configuration is found.
|
|
68
107
|
*/
|
|
69
108
|
declare function getConfig({ jsonConfig, market, params }: GetConfigProps): DefaultConfig | null;
|
|
70
109
|
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { merge } from 'merge-anything'\n\nexport type NullableType<T> = T | null | undefined\n\ninterface ConfigParams {\n /**\n *
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["import { merge } from 'merge-anything'\n\n/**\n * Represents a type that can be null or undefined, making it optional in use.\n * @template T The type that is being made nullable.\n */\nexport type NullableType<T> = T | null | undefined\n\n/**\n * Params used by the getConfig function\n */\ninterface ConfigParams {\n /**\n * Language code (e.g., 'en', 'fr') used to dynamically replace the `:lang` placeholder in URLs.\n */\n lang?: NullableType<string>\n /**\n * Access token string used to replace the `:access_token` placeholder in URLs.\n */\n accessToken?: NullableType<string>\n /**\n * Unique identifier for an order used to replace the `:order_id` placeholder in URLs.\n */\n orderId?: NullableType<string>\n}\n\n/**\n * Configuration for overriding default links of the micro frontends,\n * allowing customization of specific components.\n */\ninterface LinkConfig {\n /** URL for a custom cart. */\n cart?: string\n /** URL for a custom checkout */\n checkout?: string\n /** URL for a custom my account */\n my_account?: string\n /** URL for a custom identity */\n identity?: string\n}\n\ninterface Country {\n /** The country code (e.g., 'US', 'UK') */\n value: string\n /** The display name of the country (e.g., 'United States', 'United Kingdom') */\n label: string\n}\n\ntype StateConfig = Record<string, Country[]>\n\n/**\n * Configuration settings for customizing the Checkout application.\n */\ninterface CheckoutConfig {\n /** URL for a custom thank you page displayed after completing a purchase. */\n thankyou_page?: string\n /** List of countries available for selection in billing address forms. */\n billing_countries?: Country[]\n /** List of countries available for selection in shipping address forms. */\n shipping_countries?: Country[]\n /** Configuration for states or regions to display in billing address forms, which may override default settings. */\n billing_states?: StateConfig[]\n /** Configuration for states or regions to display in shipping address forms, which may override default settings. */\n shipping_states?: StateConfig[]\n /** Country code preselected by default in billing and shipping address forms. */\n default_country?: string\n}\n\ninterface UrlsConfig {\n /** URL of the privacy policy page */\n privacy: string\n /** URL of the terms and conditions page */\n terms: string\n}\n\n/** Interface of the config of the organization */\nexport interface DefaultConfig {\n /** Custom links for overriding default micro frontends. */\n links?: LinkConfig\n /** Checkout-specific configuration, like custom thank you page and country lists. */\n checkout?: CheckoutConfig\n /** URLs for privacy policy and terms of service pages. */\n urls?: UrlsConfig\n}\n\n/** Configuration structure containing defaults and market-specific overrides. */\nexport interface Configs {\n /** Default configuration applicable to all markets. */\n default: DefaultConfig\n /** Market-specific configuration overrides, keyed by market identifier. */\n [key: string]: Partial<DefaultConfig>\n}\n\ninterface GetConfigProps {\n /**\n * `config` attribute of the organization\n */\n jsonConfig?: { mfe?: Configs }\n /**\n * Market identifier for fetching specific configuration overrides. (`market:id:hashid`)\n */\n market?: string\n /**\n * Parameters for replacing URL placeholders.\n */\n params?: ConfigParams\n}\n\n/**\n * Retrieves and merges the default organization configuration with market-specific overrides based on the provided market identifier.\n * Placeholder values in the configuration URLs can be replaced with actual values from the `params`.\n *\n * @param jsonConfig The complete configuration object of the organization.\n * @param market The market identifier used to get market-specific configuration overrides.\n * @param params The object containing replacement values for URL placeholders, such as language and access token.\n * @returns The merged configuration object for the specified market, or null if no configuration is found.\n */\nexport function getConfig({\n jsonConfig,\n market,\n params\n}: GetConfigProps): DefaultConfig | null {\n if (jsonConfig?.mfe == null) {\n console.warn('No configuration found.')\n return null\n }\n\n const defaultConfig = jsonConfig?.mfe?.default ?? {}\n const overrideConfig = market != null ? jsonConfig?.mfe[market] ?? {} : {}\n\n // Replace placeholders in all string values within the object\n function replacePlaceholders(config: DefaultConfig): DefaultConfig {\n const replacedConfig = JSON.stringify(config)\n .replace(/:lang/g, params?.lang ?? ':lang')\n .replace(/:access_token/g, params?.accessToken ?? ':access_token')\n .replace(/:order_id/g, params?.orderId ?? ':order_id')\n\n return JSON.parse(replacedConfig)\n }\n\n const mergedConfig: DefaultConfig = merge(\n JSON.parse(JSON.stringify(defaultConfig)),\n overrideConfig\n )\n return replacePlaceholders(mergedConfig)\n}\n"],"mappings":"AAAA,OAAS,SAAAA,MAAa,iBAqHf,SAASC,EAAU,CACxB,WAAAC,EACA,OAAAC,EACA,OAAAC,CACF,EAAyC,CAzHzC,IAAAC,EAAAC,EAAAC,EA0HE,IAAIL,GAAA,YAAAA,EAAY,MAAO,KACrB,eAAQ,KAAK,yBAAyB,EAC/B,KAGT,IAAMM,GAAgBF,GAAAD,EAAAH,GAAA,YAAAA,EAAY,MAAZ,YAAAG,EAAiB,UAAjB,KAAAC,EAA4B,CAAC,EAC7CG,EAAiBN,GAAU,MAAOI,EAAAL,GAAA,YAAAA,EAAY,IAAIC,KAAhB,KAAAI,EAA2B,CAAC,EAAI,CAAC,EAGzE,SAASG,EAAoBC,EAAsC,CAnIrE,IAAAN,EAAAC,EAAAC,EAoII,IAAMK,EAAiB,KAAK,UAAUD,CAAM,EACzC,QAAQ,UAAUN,EAAAD,GAAA,YAAAA,EAAQ,OAAR,KAAAC,EAAgB,OAAO,EACzC,QAAQ,kBAAkBC,EAAAF,GAAA,YAAAA,EAAQ,cAAR,KAAAE,EAAuB,eAAe,EAChE,QAAQ,cAAcC,EAAAH,GAAA,YAAAA,EAAQ,UAAR,KAAAG,EAAmB,WAAW,EAEvD,OAAO,KAAK,MAAMK,CAAc,CAClC,CAEA,IAAMC,EAA8Bb,EAClC,KAAK,MAAM,KAAK,UAAUQ,CAAa,CAAC,EACxCC,CACF,EACA,OAAOC,EAAoBG,CAAY,CACzC","names":["merge","getConfig","jsonConfig","market","params","_a","_b","_c","defaultConfig","overrideConfig","replacePlaceholders","config","replacedConfig","mergedConfig"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercelayer/organization-config",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Organization config utils for extracting config by market",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matteo Alessani",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"url": "https://github.com/commercelayer/common-utils/issues"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@commercelayer/eslint-config-ts": "^1.4.
|
|
38
|
+
"@commercelayer/eslint-config-ts": "^1.4.4",
|
|
39
39
|
"@types/lodash": "^4.17.0",
|
|
40
40
|
"deepmerge": "^4.3.1",
|
|
41
41
|
"deepmerge-ts": "^5.1.0",
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
"lint:fix": "eslint src --ext .ts,.tsx --fix",
|
|
58
58
|
"test": "pnpm run lint && vitest run --silent",
|
|
59
59
|
"bench": "vitest bench",
|
|
60
|
-
"build": "tsup"
|
|
60
|
+
"build": "tsup",
|
|
61
|
+
"jsr:publish": "pnpm dlx jsr publish"
|
|
61
62
|
}
|
|
62
63
|
}
|