@commercetools-frontend/constants 22.38.0 → 22.38.2
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.
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "22.38.
|
|
6
|
+
var version = "22.38.2";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
|
|
@@ -152,20 +152,33 @@ const STORAGE_KEYS = {
|
|
|
152
152
|
IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
|
|
153
153
|
LOGIN_STRATEGY: 'loginStrategy'
|
|
154
154
|
};
|
|
155
|
+
const HTTP_SECURITY_HEADER_KEYS = {
|
|
156
|
+
'Content-Security-Policy': 'Content-Security-Policy',
|
|
157
|
+
'Referrer-Policy': 'Referrer-Policy',
|
|
158
|
+
'Permissions-Policy': 'Permissions-Policy',
|
|
159
|
+
'Strict-Transport-Security': 'Strict-Transport-Security',
|
|
160
|
+
'X-XSS-Protection': 'X-XSS-Protection',
|
|
161
|
+
'X-Content-Type-Options': 'X-Content-Type-Options',
|
|
162
|
+
'X-Frame-Options': 'X-Frame-Options'
|
|
163
|
+
};
|
|
155
164
|
const HTTP_SECURITY_HEADERS = {
|
|
156
|
-
'Referrer-Policy': 'same-origin',
|
|
157
|
-
'Permissions-Policy':
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
'
|
|
161
|
-
'
|
|
165
|
+
[HTTP_SECURITY_HEADER_KEYS['Referrer-Policy']]: 'same-origin',
|
|
166
|
+
[HTTP_SECURITY_HEADER_KEYS['Permissions-Policy']]:
|
|
167
|
+
// Note: we need to use `(self)` to ensure that Custom Views (rendered within an `<iframe>`)
|
|
168
|
+
// can inherit the main application permissions policy and override other directives if needed.
|
|
169
|
+
'microphone=(self), camera=(self), payment=(self), usb=(self), geolocation=(self)',
|
|
170
|
+
[HTTP_SECURITY_HEADER_KEYS['Strict-Transport-Security']]: 'max-age=31536000; includeSubDomains; preload',
|
|
171
|
+
[HTTP_SECURITY_HEADER_KEYS['X-XSS-Protection']]: '1; mode=block',
|
|
172
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Content-Type-Options']]: 'nosniff',
|
|
173
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Frame-Options']]: 'SAMEORIGIN'
|
|
162
174
|
};
|
|
163
175
|
|
|
164
176
|
// Custom Views events (messages sent between the host application and the custom view)
|
|
165
177
|
const CUSTOM_VIEWS_EVENTS_NAMES = {
|
|
166
178
|
CUSTOM_VIEW_BOOTSTRAP: 'custom-view-bootstrap',
|
|
167
179
|
CUSTOM_VIEW_INITIALIZATION: 'custom-view-initialization',
|
|
168
|
-
CUSTOM_VIEW_CLOSE: 'custom-view-close'
|
|
180
|
+
CUSTOM_VIEW_CLOSE: 'custom-view-close',
|
|
181
|
+
CUSTOM_VIEW_READY: 'custom-view-ready'
|
|
169
182
|
};
|
|
170
183
|
const CUSTOM_VIEWS_EVENTS_META = {
|
|
171
184
|
HOST_APPLICATION_CODE: 'mc-host-application',
|
|
@@ -223,6 +236,7 @@ exports.GRAPHQL_TARGETS = GRAPHQL_TARGETS;
|
|
|
223
236
|
exports.HIDE_ALL_PAGE_NOTIFICATIONS = HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
224
237
|
exports.HIDE_LOADING = HIDE_LOADING;
|
|
225
238
|
exports.HTTP_SECURITY_HEADERS = HTTP_SECURITY_HEADERS;
|
|
239
|
+
exports.HTTP_SECURITY_HEADER_KEYS = HTTP_SECURITY_HEADER_KEYS;
|
|
226
240
|
exports.LOGIN_STRATEGY_DEFAULT = LOGIN_STRATEGY_DEFAULT;
|
|
227
241
|
exports.LOGIN_STRATEGY_OIDC = LOGIN_STRATEGY_OIDC;
|
|
228
242
|
exports.LOGIN_STRATEGY_SSO = LOGIN_STRATEGY_SSO;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
// NOTE: This string will be replaced on build time with the package version.
|
|
6
|
-
var version = "22.38.
|
|
6
|
+
var version = "22.38.2";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
|
|
@@ -152,20 +152,33 @@ const STORAGE_KEYS = {
|
|
|
152
152
|
IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
|
|
153
153
|
LOGIN_STRATEGY: 'loginStrategy'
|
|
154
154
|
};
|
|
155
|
+
const HTTP_SECURITY_HEADER_KEYS = {
|
|
156
|
+
'Content-Security-Policy': 'Content-Security-Policy',
|
|
157
|
+
'Referrer-Policy': 'Referrer-Policy',
|
|
158
|
+
'Permissions-Policy': 'Permissions-Policy',
|
|
159
|
+
'Strict-Transport-Security': 'Strict-Transport-Security',
|
|
160
|
+
'X-XSS-Protection': 'X-XSS-Protection',
|
|
161
|
+
'X-Content-Type-Options': 'X-Content-Type-Options',
|
|
162
|
+
'X-Frame-Options': 'X-Frame-Options'
|
|
163
|
+
};
|
|
155
164
|
const HTTP_SECURITY_HEADERS = {
|
|
156
|
-
'Referrer-Policy': 'same-origin',
|
|
157
|
-
'Permissions-Policy':
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
'
|
|
161
|
-
'
|
|
165
|
+
[HTTP_SECURITY_HEADER_KEYS['Referrer-Policy']]: 'same-origin',
|
|
166
|
+
[HTTP_SECURITY_HEADER_KEYS['Permissions-Policy']]:
|
|
167
|
+
// Note: we need to use `(self)` to ensure that Custom Views (rendered within an `<iframe>`)
|
|
168
|
+
// can inherit the main application permissions policy and override other directives if needed.
|
|
169
|
+
'microphone=(self), camera=(self), payment=(self), usb=(self), geolocation=(self)',
|
|
170
|
+
[HTTP_SECURITY_HEADER_KEYS['Strict-Transport-Security']]: 'max-age=31536000; includeSubDomains; preload',
|
|
171
|
+
[HTTP_SECURITY_HEADER_KEYS['X-XSS-Protection']]: '1; mode=block',
|
|
172
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Content-Type-Options']]: 'nosniff',
|
|
173
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Frame-Options']]: 'SAMEORIGIN'
|
|
162
174
|
};
|
|
163
175
|
|
|
164
176
|
// Custom Views events (messages sent between the host application and the custom view)
|
|
165
177
|
const CUSTOM_VIEWS_EVENTS_NAMES = {
|
|
166
178
|
CUSTOM_VIEW_BOOTSTRAP: 'custom-view-bootstrap',
|
|
167
179
|
CUSTOM_VIEW_INITIALIZATION: 'custom-view-initialization',
|
|
168
|
-
CUSTOM_VIEW_CLOSE: 'custom-view-close'
|
|
180
|
+
CUSTOM_VIEW_CLOSE: 'custom-view-close',
|
|
181
|
+
CUSTOM_VIEW_READY: 'custom-view-ready'
|
|
169
182
|
};
|
|
170
183
|
const CUSTOM_VIEWS_EVENTS_META = {
|
|
171
184
|
HOST_APPLICATION_CODE: 'mc-host-application',
|
|
@@ -223,6 +236,7 @@ exports.GRAPHQL_TARGETS = GRAPHQL_TARGETS;
|
|
|
223
236
|
exports.HIDE_ALL_PAGE_NOTIFICATIONS = HIDE_ALL_PAGE_NOTIFICATIONS;
|
|
224
237
|
exports.HIDE_LOADING = HIDE_LOADING;
|
|
225
238
|
exports.HTTP_SECURITY_HEADERS = HTTP_SECURITY_HEADERS;
|
|
239
|
+
exports.HTTP_SECURITY_HEADER_KEYS = HTTP_SECURITY_HEADER_KEYS;
|
|
226
240
|
exports.LOGIN_STRATEGY_DEFAULT = LOGIN_STRATEGY_DEFAULT;
|
|
227
241
|
exports.LOGIN_STRATEGY_OIDC = LOGIN_STRATEGY_OIDC;
|
|
228
242
|
exports.LOGIN_STRATEGY_SSO = LOGIN_STRATEGY_SSO;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// NOTE: This string will be replaced on build time with the package version.
|
|
2
|
-
var version = "22.38.
|
|
2
|
+
var version = "22.38.2";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* The project key must be between 2 and 36 characters long. It can only contain alphanumeric lowercase characters (a-z, 0-9),
|
|
@@ -148,20 +148,33 @@ const STORAGE_KEYS = {
|
|
|
148
148
|
IS_FORCED_MENU_OPEN: 'isForcedMenuOpen',
|
|
149
149
|
LOGIN_STRATEGY: 'loginStrategy'
|
|
150
150
|
};
|
|
151
|
+
const HTTP_SECURITY_HEADER_KEYS = {
|
|
152
|
+
'Content-Security-Policy': 'Content-Security-Policy',
|
|
153
|
+
'Referrer-Policy': 'Referrer-Policy',
|
|
154
|
+
'Permissions-Policy': 'Permissions-Policy',
|
|
155
|
+
'Strict-Transport-Security': 'Strict-Transport-Security',
|
|
156
|
+
'X-XSS-Protection': 'X-XSS-Protection',
|
|
157
|
+
'X-Content-Type-Options': 'X-Content-Type-Options',
|
|
158
|
+
'X-Frame-Options': 'X-Frame-Options'
|
|
159
|
+
};
|
|
151
160
|
const HTTP_SECURITY_HEADERS = {
|
|
152
|
-
'Referrer-Policy': 'same-origin',
|
|
153
|
-
'Permissions-Policy':
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
'
|
|
157
|
-
'
|
|
161
|
+
[HTTP_SECURITY_HEADER_KEYS['Referrer-Policy']]: 'same-origin',
|
|
162
|
+
[HTTP_SECURITY_HEADER_KEYS['Permissions-Policy']]:
|
|
163
|
+
// Note: we need to use `(self)` to ensure that Custom Views (rendered within an `<iframe>`)
|
|
164
|
+
// can inherit the main application permissions policy and override other directives if needed.
|
|
165
|
+
'microphone=(self), camera=(self), payment=(self), usb=(self), geolocation=(self)',
|
|
166
|
+
[HTTP_SECURITY_HEADER_KEYS['Strict-Transport-Security']]: 'max-age=31536000; includeSubDomains; preload',
|
|
167
|
+
[HTTP_SECURITY_HEADER_KEYS['X-XSS-Protection']]: '1; mode=block',
|
|
168
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Content-Type-Options']]: 'nosniff',
|
|
169
|
+
[HTTP_SECURITY_HEADER_KEYS['X-Frame-Options']]: 'SAMEORIGIN'
|
|
158
170
|
};
|
|
159
171
|
|
|
160
172
|
// Custom Views events (messages sent between the host application and the custom view)
|
|
161
173
|
const CUSTOM_VIEWS_EVENTS_NAMES = {
|
|
162
174
|
CUSTOM_VIEW_BOOTSTRAP: 'custom-view-bootstrap',
|
|
163
175
|
CUSTOM_VIEW_INITIALIZATION: 'custom-view-initialization',
|
|
164
|
-
CUSTOM_VIEW_CLOSE: 'custom-view-close'
|
|
176
|
+
CUSTOM_VIEW_CLOSE: 'custom-view-close',
|
|
177
|
+
CUSTOM_VIEW_READY: 'custom-view-ready'
|
|
165
178
|
};
|
|
166
179
|
const CUSTOM_VIEWS_EVENTS_META = {
|
|
167
180
|
HOST_APPLICATION_CODE: 'mc-host-application',
|
|
@@ -210,4 +223,4 @@ var featureToggles = /*#__PURE__*/Object.freeze({
|
|
|
210
223
|
DEFAULT_FLAGS: DEFAULT_FLAGS
|
|
211
224
|
});
|
|
212
225
|
|
|
213
|
-
export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH, DOMAINS, ENTRY_POINT_URI_PATH_REGEX, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, LOGIN_STRATEGY_DEFAULT, LOGIN_STRATEGY_OIDC, LOGIN_STRATEGY_SSO, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, ORGANIZATION_GENERAL_ERROR, PERMISSION_GROUP_NAME_REGEX, PORTALS_CONTAINER_ID, PORTALS_CONTAINER_INDENTATION_SIZE, PROJECT_KEY_REGEX, SHOW_LOADING, STATUS_CODES, STORAGE_KEYS, SUPPORTED_HEADERS, SUPPORT_PORTAL_URL, featureToggles as featureFlags, version };
|
|
226
|
+
export { CUSTOM_VIEWS_EVENTS_META, CUSTOM_VIEWS_EVENTS_NAMES, CUSTOM_VIEW_HOST_ENTRY_POINT_URI_PATH, DOMAINS, ENTRY_POINT_URI_PATH_REGEX, GRAPHQL_TARGETS, HIDE_ALL_PAGE_NOTIFICATIONS, HIDE_LOADING, HTTP_SECURITY_HEADERS, HTTP_SECURITY_HEADER_KEYS, LOGIN_STRATEGY_DEFAULT, LOGIN_STRATEGY_OIDC, LOGIN_STRATEGY_SSO, LOGOUT_REASONS, MC_API_PROXY_TARGETS, NOTIFICATION_DOMAINS, NOTIFICATION_KINDS_GLOBAL, NOTIFICATION_KINDS_PAGE, NOTIFICATION_KINDS_SIDE, NO_VALUE_FALLBACK, ORGANIZATION_GENERAL_ERROR, PERMISSION_GROUP_NAME_REGEX, PORTALS_CONTAINER_ID, PORTALS_CONTAINER_INDENTATION_SIZE, PROJECT_KEY_REGEX, SHOW_LOADING, STATUS_CODES, STORAGE_KEYS, SUPPORTED_HEADERS, SUPPORT_PORTAL_URL, featureToggles as featureFlags, version };
|
|
@@ -251,18 +251,29 @@ export declare const STORAGE_KEYS: {
|
|
|
251
251
|
readonly IS_FORCED_MENU_OPEN: "isForcedMenuOpen";
|
|
252
252
|
readonly LOGIN_STRATEGY: "loginStrategy";
|
|
253
253
|
};
|
|
254
|
+
export declare const HTTP_SECURITY_HEADER_KEYS: {
|
|
255
|
+
readonly 'Content-Security-Policy': "Content-Security-Policy";
|
|
256
|
+
readonly 'Referrer-Policy': "Referrer-Policy";
|
|
257
|
+
readonly 'Permissions-Policy': "Permissions-Policy";
|
|
258
|
+
readonly 'Strict-Transport-Security': "Strict-Transport-Security";
|
|
259
|
+
readonly 'X-XSS-Protection': "X-XSS-Protection";
|
|
260
|
+
readonly 'X-Content-Type-Options': "X-Content-Type-Options";
|
|
261
|
+
readonly 'X-Frame-Options': "X-Frame-Options";
|
|
262
|
+
};
|
|
263
|
+
export type THttpSecurityHeaders = keyof typeof HTTP_SECURITY_HEADER_KEYS;
|
|
254
264
|
export declare const HTTP_SECURITY_HEADERS: {
|
|
255
|
-
readonly
|
|
256
|
-
readonly
|
|
257
|
-
readonly
|
|
258
|
-
readonly
|
|
259
|
-
readonly
|
|
260
|
-
readonly
|
|
265
|
+
readonly "Referrer-Policy": "same-origin";
|
|
266
|
+
readonly "Permissions-Policy": "microphone=(self), camera=(self), payment=(self), usb=(self), geolocation=(self)";
|
|
267
|
+
readonly "Strict-Transport-Security": "max-age=31536000; includeSubDomains; preload";
|
|
268
|
+
readonly "X-XSS-Protection": "1; mode=block";
|
|
269
|
+
readonly "X-Content-Type-Options": "nosniff";
|
|
270
|
+
readonly "X-Frame-Options": "SAMEORIGIN";
|
|
261
271
|
};
|
|
262
272
|
export declare const CUSTOM_VIEWS_EVENTS_NAMES: {
|
|
263
273
|
CUSTOM_VIEW_BOOTSTRAP: string;
|
|
264
274
|
CUSTOM_VIEW_INITIALIZATION: string;
|
|
265
275
|
CUSTOM_VIEW_CLOSE: string;
|
|
276
|
+
CUSTOM_VIEW_READY: string;
|
|
266
277
|
};
|
|
267
278
|
export declare const CUSTOM_VIEWS_EVENTS_META: {
|
|
268
279
|
HOST_APPLICATION_CODE: string;
|
package/package.json
CHANGED