@sap-ux/ui5-config
Advanced tools
Comparing version 0.22.10 to 0.23.0
@@ -48,3 +48,2 @@ "use strict"; | ||
function getFioriToolsProxyMiddlewareConfig(backends, ui5) { | ||
var _a, _b; | ||
const fioriToolsProxy = { | ||
@@ -65,4 +64,3 @@ name: 'fiori-tools-proxy', | ||
backends.forEach((element, index) => { | ||
var _a; | ||
element.path = (_a = element.path) !== null && _a !== void 0 ? _a : '/'; | ||
element.path = element.path ?? '/'; | ||
const backendComments = getBackendComments(element, index); | ||
@@ -77,4 +75,4 @@ if (backendComments) { | ||
fioriToolsProxy.configuration['ui5'] = { | ||
path: (_a = ui5.path) !== null && _a !== void 0 ? _a : ['/resources', '/test-resources'], | ||
url: (_b = ui5.url) !== null && _b !== void 0 ? _b : 'https://ui5.sap.com' | ||
path: ui5.path ?? ['/resources', '/test-resources'], | ||
url: ui5.url ?? 'https://ui5.sap.com' | ||
}; | ||
@@ -92,3 +90,3 @@ if (ui5.version !== undefined) { | ||
const getMockServerMiddlewareConfig = (path, annotationsConfig = []) => { | ||
path = path === null || path === void 0 ? void 0 : path.replace(/\/$/, ''); // Mockserver is sensitive to trailing '/' | ||
path = path?.replace(/\/$/, ''); // Mockserver is sensitive to trailing '/' | ||
return { | ||
@@ -101,3 +99,3 @@ name: 'sap-fe-mockserver', | ||
{ | ||
urlPath: path !== null && path !== void 0 ? path : '', | ||
urlPath: path ?? '', | ||
metadataPath: './webapp/localService/metadata.xml', | ||
@@ -104,0 +102,0 @@ mockdataPath: './webapp/localService/data', |
"use strict"; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -22,2 +13,3 @@ exports.UI5Config = void 0; | ||
class UI5Config { | ||
document; | ||
/** | ||
@@ -31,8 +23,6 @@ * Returns a new instance of UI5Config. | ||
*/ | ||
static newInstance(serializedYaml) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
const instance = new UI5Config(); | ||
instance.document = yield yaml_1.YamlDocument.newInstance(serializedYaml); | ||
return instance; | ||
}); | ||
static async newInstance(serializedYaml) { | ||
const instance = new UI5Config(); | ||
instance.document = await yaml_1.YamlDocument.newInstance(serializedYaml); | ||
return instance; | ||
} | ||
@@ -46,3 +36,2 @@ /** | ||
getConfiguration() { | ||
var _a; | ||
let resources; | ||
@@ -55,3 +44,3 @@ try { | ||
} | ||
return (_a = resources.configuration) !== null && _a !== void 0 ? _a : {}; | ||
return resources.configuration ?? {}; | ||
} | ||
@@ -133,6 +122,5 @@ /** | ||
getCustomConfiguration(key) { | ||
var _a, _b; | ||
try { | ||
const node = this.document.getMap({ path: 'customConfiguration' }).get(key); | ||
return (_b = (_a = node === null || node === void 0 ? void 0 : node.toJSON) === null || _a === void 0 ? void 0 : _a.call(node)) !== null && _b !== void 0 ? _b : node === null || node === void 0 ? void 0 : node.toString(); | ||
return node?.toJSON?.() ?? node?.toString(); | ||
} | ||
@@ -139,0 +127,0 @@ catch (_error) { |
@@ -78,4 +78,3 @@ "use strict"; | ||
function getTypesPackage(ui5Version) { | ||
var _a; | ||
const version = (_a = semver_1.default.coerce(ui5Version)) !== null && _a !== void 0 ? _a : semver_1.default.coerce("1.108.0" /* UI5_DEFAULT.TYPES_VERSION_BEST */); | ||
const version = semver_1.default.coerce(ui5Version) ?? semver_1.default.coerce("1.108.0" /* UI5_DEFAULT.TYPES_VERSION_BEST */); | ||
if (version && semver_1.default.lt(version, "1.113.0" /* UI5_DEFAULT.NEW_TYPES_PACKAGE_SINCE */)) { | ||
@@ -82,0 +81,0 @@ return "@sapui5/ts-types-esm" /* UI5_DEFAULT.TS_TYPES_ESM_PACKAGE_NAME */; |
@@ -12,3 +12,3 @@ { | ||
}, | ||
"version": "0.22.10", | ||
"version": "0.23.0", | ||
"license": "Apache-2.0", | ||
@@ -25,3 +25,3 @@ "main": "dist/index.js", | ||
"semver": "7.5.4", | ||
"@sap-ux/yaml": "0.15.1" | ||
"@sap-ux/yaml": "0.16.0" | ||
}, | ||
@@ -31,3 +31,3 @@ "devDependencies": { | ||
"@types/semver": "7.5.2", | ||
"@sap-ux/store": "0.6.0" | ||
"@sap-ux/store": "0.7.0" | ||
}, | ||
@@ -34,0 +34,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
63005
1272
+ Added@sap-ux/yaml@0.16.0(transitive)
- Removed@sap-ux/yaml@0.15.1(transitive)
Updated@sap-ux/yaml@0.16.0