@commercetools-frontend/application-config 24.7.2 → 24.8.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/dist/commercetools-frontend-application-config.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-application-config.cjs.dev.js +5 -7
- package/dist/commercetools-frontend-application-config.cjs.prod.js +5 -7
- package/dist/commercetools-frontend-application-config.esm.js +5 -7
- package/dist/declarations/src/formatters.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +6 -6
- package/dist/declarations/src/load-config.d.ts +2 -2
- package/dist/declarations/src/process-config.d.ts +1 -1
- package/dist/declarations/src/ssr.d.ts +1 -1
- package/dist/declarations/src/types.d.ts +4 -5
- package/package.json +5 -5
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.d.ts +2 -2
- package/dist/commercetools-frontend-application-config.cjs.d.ts.map +0 -1
- package/dist/declarations/src/substitute-variable-placeholders.d.ts +0 -3
- package/dist/declarations/src/transformers.d.ts +0 -4
- package/dist/declarations/src/utils.d.ts +0 -16
- package/dist/declarations/src/validations.d.ts +0 -7
- package/ssr/dist/commercetools-frontend-application-config-ssr.cjs.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "./declarations/src/index";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "./declarations/src/index.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hcHBsaWNhdGlvbi1jb25maWcuY2pzLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuL2RlY2xhcmF0aW9ucy9zcmMvaW5kZXguZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSJ9
|
|
@@ -27,10 +27,9 @@ var cosmiconfigTypescriptLoader = require('cosmiconfig-typescript-loader');
|
|
|
27
27
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
28
28
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
29
29
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
30
|
-
var _assertThisInitialized = require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
31
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
32
30
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
33
31
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
32
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
34
33
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
35
34
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
36
35
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -113,20 +112,19 @@ const LOADED_CONFIG_TYPES = {
|
|
|
113
112
|
CUSTOM_VIEW: 'custom-view'
|
|
114
113
|
};
|
|
115
114
|
|
|
116
|
-
function
|
|
115
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
117
116
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
118
117
|
let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
119
|
-
_inherits(MissingOrInvalidConfigError, _Error);
|
|
120
|
-
var _super = _createSuper(MissingOrInvalidConfigError);
|
|
121
118
|
function MissingOrInvalidConfigError(message) {
|
|
122
119
|
var _this;
|
|
123
120
|
_classCallCheck(this, MissingOrInvalidConfigError);
|
|
124
|
-
_this =
|
|
125
|
-
_Object$defineProperty__default["default"](
|
|
121
|
+
_this = _callSuper(this, MissingOrInvalidConfigError, [message]);
|
|
122
|
+
_Object$defineProperty__default["default"](_this, 'name', {
|
|
126
123
|
value: 'MissingOrInvalidConfigError'
|
|
127
124
|
});
|
|
128
125
|
return _this;
|
|
129
126
|
}
|
|
127
|
+
_inherits(MissingOrInvalidConfigError, _Error);
|
|
130
128
|
return _createClass(MissingOrInvalidConfigError);
|
|
131
129
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
132
130
|
|
|
@@ -27,10 +27,9 @@ var cosmiconfigTypescriptLoader = require('cosmiconfig-typescript-loader');
|
|
|
27
27
|
var _Reflect$construct = require('@babel/runtime-corejs3/core-js-stable/reflect/construct');
|
|
28
28
|
var _createClass = require('@babel/runtime-corejs3/helpers/createClass');
|
|
29
29
|
var _classCallCheck = require('@babel/runtime-corejs3/helpers/classCallCheck');
|
|
30
|
-
var _assertThisInitialized = require('@babel/runtime-corejs3/helpers/assertThisInitialized');
|
|
31
|
-
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
32
30
|
var _possibleConstructorReturn = require('@babel/runtime-corejs3/helpers/possibleConstructorReturn');
|
|
33
31
|
var _getPrototypeOf = require('@babel/runtime-corejs3/helpers/getPrototypeOf');
|
|
32
|
+
var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
|
|
34
33
|
var _wrapNativeSuper = require('@babel/runtime-corejs3/helpers/wrapNativeSuper');
|
|
35
34
|
var _trimInstanceProperty = require('@babel/runtime-corejs3/core-js-stable/instance/trim');
|
|
36
35
|
var _JSON$stringify = require('@babel/runtime-corejs3/core-js-stable/json/stringify');
|
|
@@ -113,20 +112,19 @@ const LOADED_CONFIG_TYPES = {
|
|
|
113
112
|
CUSTOM_VIEW: 'custom-view'
|
|
114
113
|
};
|
|
115
114
|
|
|
116
|
-
function
|
|
115
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct__default["default"](o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
117
116
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct__default["default"](Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
118
117
|
let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
119
|
-
_inherits(MissingOrInvalidConfigError, _Error);
|
|
120
|
-
var _super = _createSuper(MissingOrInvalidConfigError);
|
|
121
118
|
function MissingOrInvalidConfigError(message) {
|
|
122
119
|
var _this;
|
|
123
120
|
_classCallCheck(this, MissingOrInvalidConfigError);
|
|
124
|
-
_this =
|
|
125
|
-
_Object$defineProperty__default["default"](
|
|
121
|
+
_this = _callSuper(this, MissingOrInvalidConfigError, [message]);
|
|
122
|
+
_Object$defineProperty__default["default"](_this, 'name', {
|
|
126
123
|
value: 'MissingOrInvalidConfigError'
|
|
127
124
|
});
|
|
128
125
|
return _this;
|
|
129
126
|
}
|
|
127
|
+
_inherits(MissingOrInvalidConfigError, _Error);
|
|
130
128
|
return _createClass(MissingOrInvalidConfigError);
|
|
131
129
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
132
130
|
|
|
@@ -24,10 +24,9 @@ import { TypeScriptLoader } from 'cosmiconfig-typescript-loader';
|
|
|
24
24
|
import _Reflect$construct from '@babel/runtime-corejs3/core-js-stable/reflect/construct';
|
|
25
25
|
import _createClass from '@babel/runtime-corejs3/helpers/esm/createClass';
|
|
26
26
|
import _classCallCheck from '@babel/runtime-corejs3/helpers/esm/classCallCheck';
|
|
27
|
-
import _assertThisInitialized from '@babel/runtime-corejs3/helpers/esm/assertThisInitialized';
|
|
28
|
-
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
29
27
|
import _possibleConstructorReturn from '@babel/runtime-corejs3/helpers/esm/possibleConstructorReturn';
|
|
30
28
|
import _getPrototypeOf from '@babel/runtime-corejs3/helpers/esm/getPrototypeOf';
|
|
29
|
+
import _inherits from '@babel/runtime-corejs3/helpers/esm/inherits';
|
|
31
30
|
import _wrapNativeSuper from '@babel/runtime-corejs3/helpers/esm/wrapNativeSuper';
|
|
32
31
|
import _trimInstanceProperty from '@babel/runtime-corejs3/core-js-stable/instance/trim';
|
|
33
32
|
import _JSON$stringify from '@babel/runtime-corejs3/core-js-stable/json/stringify';
|
|
@@ -79,20 +78,19 @@ const LOADED_CONFIG_TYPES = {
|
|
|
79
78
|
CUSTOM_VIEW: 'custom-view'
|
|
80
79
|
};
|
|
81
80
|
|
|
82
|
-
function
|
|
81
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? _Reflect$construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
83
82
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(_Reflect$construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function () { return !!t; })(); }
|
|
84
83
|
let MissingOrInvalidConfigError = /*#__PURE__*/function (_Error) {
|
|
85
|
-
_inherits(MissingOrInvalidConfigError, _Error);
|
|
86
|
-
var _super = _createSuper(MissingOrInvalidConfigError);
|
|
87
84
|
function MissingOrInvalidConfigError(message) {
|
|
88
85
|
var _this;
|
|
89
86
|
_classCallCheck(this, MissingOrInvalidConfigError);
|
|
90
|
-
_this =
|
|
91
|
-
_Object$defineProperty(
|
|
87
|
+
_this = _callSuper(this, MissingOrInvalidConfigError, [message]);
|
|
88
|
+
_Object$defineProperty(_this, 'name', {
|
|
92
89
|
value: 'MissingOrInvalidConfigError'
|
|
93
90
|
});
|
|
94
91
|
return _this;
|
|
95
92
|
}
|
|
93
|
+
_inherits(MissingOrInvalidConfigError, _Error);
|
|
96
94
|
return _createClass(MissingOrInvalidConfigError);
|
|
97
95
|
}(/*#__PURE__*/_wrapNativeSuper(Error));
|
|
98
96
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { CamelCase } from
|
|
1
|
+
import type { CamelCase } from "./types.js";
|
|
2
2
|
type TImplicitCustomApplicationResourceAccesses<PermissionGroupName extends string = ''> = Record<`view` | `manage` | `view${Capitalize<CamelCase<PermissionGroupName>>}` | `manage${Capitalize<CamelCase<PermissionGroupName>>}`, string>;
|
|
3
3
|
type TImplicitCustomViewResourceAccesses<PermissionGroupName extends string = ''> = TImplicitCustomApplicationResourceAccesses<PermissionGroupName>;
|
|
4
4
|
type TImplicitCustomApplicationPermissionKeys<PermissionGroupName extends string = ''> = Record<`View` | `Manage` | `View${Capitalize<CamelCase<PermissionGroupName>>}` | `Manage${Capitalize<CamelCase<PermissionGroupName>>}`, string>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { default as processConfig } from
|
|
2
|
-
export { getConfigPath } from
|
|
3
|
-
export { default as sanitizeSvg } from
|
|
4
|
-
export * from
|
|
5
|
-
export * from
|
|
6
|
-
export * from
|
|
1
|
+
export { default as processConfig } from "./process-config.js";
|
|
2
|
+
export { getConfigPath } from "./load-config.js";
|
|
3
|
+
export { default as sanitizeSvg } from "./sanitize-svg.js";
|
|
4
|
+
export * from "./constants.js";
|
|
5
|
+
export * from "./errors.js";
|
|
6
|
+
export * from "./types.js";
|
|
7
7
|
export { ENTRY_POINT_URI_PATH_REGEX, PERMISSION_GROUP_NAME_REGEX, } from '@commercetools-frontend/constants';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { JSONSchemaForCustomApplicationConfigurationFiles } from
|
|
2
|
-
import type { JSONSchemaForCustomViewConfigurationFiles } from
|
|
1
|
+
import type { JSONSchemaForCustomApplicationConfigurationFiles } from "./schemas/generated/custom-application.schema.js";
|
|
2
|
+
import type { JSONSchemaForCustomViewConfigurationFiles } from "./schemas/generated/custom-view.schema.js";
|
|
3
3
|
export declare const isDynamicAwaitSupported: () => boolean;
|
|
4
4
|
export declare const isEsmModule: (cwd: string) => Promise<boolean>;
|
|
5
5
|
export declare const getConfigPath: () => Promise<string | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from
|
|
1
|
+
export * from "./formatters.js";
|
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
1
|
import type { ApplicationWindow } from '@commercetools-frontend/constants';
|
|
3
|
-
import { CLOUD_IDENTIFIERS, LOADED_CONFIG_TYPES } from
|
|
4
|
-
import type { JSONSchemaForCustomApplicationConfigurationFiles } from
|
|
5
|
-
import type { JSONSchemaForCustomViewConfigurationFiles } from
|
|
6
|
-
import type { TCustomView } from
|
|
2
|
+
import { CLOUD_IDENTIFIERS, LOADED_CONFIG_TYPES } from "./constants.js";
|
|
3
|
+
import type { JSONSchemaForCustomApplicationConfigurationFiles } from "./schemas/generated/custom-application.schema.js";
|
|
4
|
+
import type { JSONSchemaForCustomViewConfigurationFiles } from "./schemas/generated/custom-view.schema.js";
|
|
5
|
+
import type { TCustomView } from "./types/generated/settings.js";
|
|
7
6
|
export type ConfigOptions = JSONSchemaForCustomApplicationConfigurationFiles;
|
|
8
7
|
export type ConfigOptionsForCustomApplication = JSONSchemaForCustomApplicationConfigurationFiles;
|
|
9
8
|
export type ConfigOptionsForCustomView = JSONSchemaForCustomViewConfigurationFiles;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@commercetools-frontend/application-config",
|
|
3
|
-
"version": "24.
|
|
3
|
+
"version": "24.8.0",
|
|
4
4
|
"description": "Configuration utilities for building Custom Applications",
|
|
5
5
|
"bugs": "https://github.com/commercetools/merchant-center-application-kit/issues",
|
|
6
6
|
"repository": {
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
"@babel/register": "^7.22.15",
|
|
46
46
|
"@babel/runtime": "^7.22.15",
|
|
47
47
|
"@babel/runtime-corejs3": "^7.22.15",
|
|
48
|
-
"@commercetools-frontend/constants": "24.
|
|
48
|
+
"@commercetools-frontend/constants": "24.8.0",
|
|
49
49
|
"@types/lodash": "^4.14.198",
|
|
50
50
|
"@types/react": "^19.0.3",
|
|
51
|
-
"ajv": "8.
|
|
51
|
+
"ajv": "8.17.1",
|
|
52
52
|
"core-js": "^3.32.2",
|
|
53
53
|
"cosmiconfig": "9.0.0",
|
|
54
54
|
"cosmiconfig-typescript-loader": "6.1.0",
|
|
@@ -59,8 +59,8 @@
|
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/jsdom": "^21.1.2",
|
|
62
|
-
"json-schema-to-typescript": "15.0.
|
|
63
|
-
"@commercetools-frontend/assets": "24.
|
|
62
|
+
"json-schema-to-typescript": "15.0.4",
|
|
63
|
+
"@commercetools-frontend/assets": "24.8.0"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": "18.x || 20.x || >=22.0.0"
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from "../../dist/declarations/src/ssr";
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
export * from "../../dist/declarations/src/ssr.js";
|
|
2
|
+
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29tbWVyY2V0b29scy1mcm9udGVuZC1hcHBsaWNhdGlvbi1jb25maWctc3NyLmNqcy5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vZGlzdC9kZWNsYXJhdGlvbnMvc3JjL3Nzci5kLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBIn0=
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-application-config.cjs.d.ts","sourceRoot":"","sources":["./declarations/src/index.d.ts"],"names":[],"mappings":"AAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schemas/generated/custom-application.schema';
|
|
2
|
-
import type { JSONSchemaForCustomViewConfigurationFiles } from './schemas/generated/custom-view.schema';
|
|
3
|
-
import type { LoadedConfigType, CustomApplicationData, CustomViewData } from './types';
|
|
4
|
-
export declare function transformConfigurationToData(configType: LoadedConfigType, configuration: JSONSchemaForCustomApplicationConfigurationFiles | JSONSchemaForCustomViewConfigurationFiles): CustomApplicationData | CustomViewData;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="webpack-env" />
|
|
3
|
-
/// <reference types="node" />
|
|
4
|
-
/// <reference types="node" />
|
|
5
|
-
/// <reference types="node" />
|
|
6
|
-
/// <reference types="node" />
|
|
7
|
-
/// <reference types="node" />
|
|
8
|
-
/// <reference types="node" />
|
|
9
|
-
/// <reference types="node" />
|
|
10
|
-
import { CLOUD_IDENTIFIERS } from './constants';
|
|
11
|
-
declare const mapCloudIdentifierToApiUrl: (key: (typeof CLOUD_IDENTIFIERS)[keyof typeof CLOUD_IDENTIFIERS]) => string;
|
|
12
|
-
declare const getUniqueValues: (initialValues?: string[], additionalValues?: string[]) => string[];
|
|
13
|
-
declare const getIsProd: (env: NodeJS.ProcessEnv) => boolean;
|
|
14
|
-
declare const getOrThrow: <T>(fn: () => T, errorMessage: string) => T;
|
|
15
|
-
declare const parseJsonFile: <T>(filePath: string) => T;
|
|
16
|
-
export { mapCloudIdentifierToApiUrl, getUniqueValues, getIsProd, getOrThrow, parseJsonFile, };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { JSONSchemaForCustomApplicationConfigurationFiles } from './schemas/generated/custom-application.schema';
|
|
2
|
-
import type { JSONSchemaForCustomViewConfigurationFiles } from './schemas/generated/custom-view.schema';
|
|
3
|
-
import type { LoadedConfigType } from './types';
|
|
4
|
-
export declare const validateConfig: (configType: LoadedConfigType, config: JSONSchemaForCustomApplicationConfigurationFiles | JSONSchemaForCustomViewConfigurationFiles) => void;
|
|
5
|
-
export declare const validateEntryPointUriPath: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
|
|
6
|
-
export declare const validateSubmenuLinks: (config: JSONSchemaForCustomApplicationConfigurationFiles) => void;
|
|
7
|
-
export declare const validateAdditionalOAuthScopes: (config: JSONSchemaForCustomApplicationConfigurationFiles | JSONSchemaForCustomViewConfigurationFiles) => void;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"commercetools-frontend-application-config-ssr.cjs.d.ts","sourceRoot":"","sources":["../../dist/declarations/src/ssr.d.ts"],"names":[],"mappings":"AAAA"}
|