@sap-ux/preview-middleware 0.11.30 → 0.11.32

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,3 +1,4 @@
1
+ /// <reference path="../../../../types/ui5.d.ts" />
1
2
  import type { Logger } from '@sap-ux/logger';
2
3
  import type { ReaderCollection } from '@ui5/fs';
3
4
  /**
@@ -1,3 +1,4 @@
1
+ /// <reference path="../../../../types/ui5.d.ts" />
1
2
  import type { ReaderCollection } from '@ui5/fs';
2
3
  import type { Router } from 'express';
3
4
  import type { App, FlpConfig, MiddlewareConfig, RtaConfig } from '../types';
@@ -230,57 +230,55 @@ sap.ui.define((function () { 'use strict';
230
230
 
231
231
  var utils = {};
232
232
 
233
- (function (exports) {
234
- Object.defineProperty(exports, "__esModule", { value: true });
235
- exports.FlexChangesEndPoints = exports.convertCamelCaseToPascalCase = void 0;
236
- const isUpperCase = (code) => code >= 65 && code <= 90;
237
- const isLowerCase = (code) => code >= 97 && code <= 122;
238
- const isWordDelimiter = (code) => code === 45 || code === 95 || code === 32; // - or _ or space
239
- const convertCamelCaseToPascalCase = (text) => {
240
- const words = [];
241
- let word = '';
242
- let lookForUpperCase = true;
243
- for (let i = 0; i < text.length; i++) {
244
- const character = text[i];
245
- if (lookForUpperCase) {
246
- // make sure that the first letter is capitalized
247
- word += word.length === 0 ? character.toUpperCase() : character;
248
- if (isLowerCase(text.charCodeAt(i + 1))) {
249
- // First lower case character after upper case character -> switch mode to collect only lower case characters
250
- lookForUpperCase = false;
251
- }
252
- else if (isUpperCase(text.charCodeAt(i + 1)) && isLowerCase(text.charCodeAt(i + 2))) {
253
- // Next character is the last uppercase character after a sequence of upper case character -> create an abbreviated word
254
- words.push(word);
255
- word = '';
256
- }
257
- }
258
- else if (isUpperCase(text.charCodeAt(i))) {
259
- // Upper case character indicates the beginning of a new word -> switch mode to detect abbreviated word
260
- words.push(word);
261
- lookForUpperCase = true;
262
- word = character;
263
- }
264
- else if (isWordDelimiter(text.charCodeAt(i))) {
265
- words.push(word);
266
- lookForUpperCase = true;
267
- word = '';
268
- }
269
- else {
270
- word += character;
271
- }
272
- }
273
- if (word.length) {
274
- words.push(word);
275
- }
276
- return words.join(' ');
277
- };
278
- exports.convertCamelCaseToPascalCase = convertCamelCaseToPascalCase;
279
- (function (FlexChangesEndPoints) {
280
- FlexChangesEndPoints["changes"] = "/preview/api/changes";
281
- })(exports.FlexChangesEndPoints || (exports.FlexChangesEndPoints = {}));
282
-
283
- } (utils));
233
+ Object.defineProperty(utils, "__esModule", { value: true });
234
+ utils.FlexChangesEndPoints = utils.convertCamelCaseToPascalCase = void 0;
235
+ const isUpperCase = (code) => code >= 65 && code <= 90;
236
+ const isLowerCase = (code) => code >= 97 && code <= 122;
237
+ const isWordDelimiter = (code) => code === 45 || code === 95 || code === 32; // - or _ or space
238
+ const convertCamelCaseToPascalCase = (text) => {
239
+ const words = [];
240
+ let word = '';
241
+ let lookForUpperCase = true;
242
+ for (let i = 0; i < text.length; i++) {
243
+ const character = text[i];
244
+ if (lookForUpperCase) {
245
+ // make sure that the first letter is capitalized
246
+ word += word.length === 0 ? character.toUpperCase() : character;
247
+ if (isLowerCase(text.charCodeAt(i + 1))) {
248
+ // First lower case character after upper case character -> switch mode to collect only lower case characters
249
+ lookForUpperCase = false;
250
+ }
251
+ else if (isUpperCase(text.charCodeAt(i + 1)) && isLowerCase(text.charCodeAt(i + 2))) {
252
+ // Next character is the last uppercase character after a sequence of upper case character -> create an abbreviated word
253
+ words.push(word);
254
+ word = '';
255
+ }
256
+ }
257
+ else if (isUpperCase(text.charCodeAt(i))) {
258
+ // Upper case character indicates the beginning of a new word -> switch mode to detect abbreviated word
259
+ words.push(word);
260
+ lookForUpperCase = true;
261
+ word = character;
262
+ }
263
+ else if (isWordDelimiter(text.charCodeAt(i))) {
264
+ words.push(word);
265
+ lookForUpperCase = true;
266
+ word = '';
267
+ }
268
+ else {
269
+ word += character;
270
+ }
271
+ }
272
+ if (word.length) {
273
+ words.push(word);
274
+ }
275
+ return words.join(' ');
276
+ };
277
+ utils.convertCamelCaseToPascalCase = convertCamelCaseToPascalCase;
278
+ var FlexChangesEndPoints;
279
+ (function (FlexChangesEndPoints) {
280
+ FlexChangesEndPoints["changes"] = "/preview/api/changes";
281
+ })(FlexChangesEndPoints || (utils.FlexChangesEndPoints = FlexChangesEndPoints = {}));
284
282
 
285
283
  (function (exports) {
286
284
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
11
11
  },
12
- "version": "0.11.30",
12
+ "version": "0.11.32",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -24,8 +24,8 @@
24
24
  "dependencies": {
25
25
  "ejs": "3.1.9",
26
26
  "@sap-ux/logger": "0.4.0",
27
- "@sap-ux/adp-tooling": "0.8.2",
28
- "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.4.12"
27
+ "@sap-ux/adp-tooling": "0.8.4",
28
+ "@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@0.4.13"
29
29
  },
30
30
  "devDependencies": {
31
31
  "@types/ejs": "3.1.2",
@@ -38,9 +38,9 @@
38
38
  "supertest": "6.3.3",
39
39
  "@sap-ux-private/playwright": "0.0.1",
40
40
  "dotenv": "16.3.1",
41
- "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.8.13",
41
+ "@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.8.14",
42
42
  "@sap-ux/project-access": "1.17.0",
43
- "@sap-ux/store": "0.4.0"
43
+ "@sap-ux/store": "0.4.1"
44
44
  },
45
45
  "peerDependencies": {
46
46
  "express": "4"