@sap-ux/preview-middleware 0.26.12 → 1.0.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/base/cdm.d.ts +2 -2
- package/dist/base/cdm.js +10 -11
- package/dist/base/config.d.ts +1 -1
- package/dist/base/config.js +60 -72
- package/dist/base/flex.js +16 -23
- package/dist/base/flp.d.ts +2 -2
- package/dist/base/flp.js +96 -96
- package/dist/base/index.d.ts +3 -3
- package/dist/base/index.js +3 -12
- package/dist/base/remote-url.js +14 -24
- package/dist/base/test.d.ts +1 -1
- package/dist/base/test.js +2 -6
- package/dist/base/utils/cards.d.ts +1 -1
- package/dist/base/utils/cards.js +3 -9
- package/dist/client/adp/add-fragment.js +4 -4
- package/dist/client/adp/add-fragment.ts +2 -2
- package/dist/client/adp/api-handler.js +2 -2
- package/dist/client/adp/api-handler.ts +1 -1
- package/dist/client/adp/command-executor.js +3 -3
- package/dist/client/adp/command-executor.ts +2 -2
- package/dist/client/adp/controllers/AddActionFragment.controller.js +5 -5
- package/dist/client/adp/controllers/AddActionFragment.controller.ts +7 -7
- package/dist/client/adp/controllers/AddCustomFragment.controller.js +7 -7
- package/dist/client/adp/controllers/AddCustomFragment.controller.ts +9 -9
- package/dist/client/adp/controllers/AddFragment.controller.js +7 -7
- package/dist/client/adp/controllers/AddFragment.controller.ts +11 -11
- package/dist/client/adp/controllers/AddSubpage.controller.js +4 -4
- package/dist/client/adp/controllers/AddSubpage.controller.ts +7 -7
- package/dist/client/adp/controllers/AddTableColumnFragments.controller.js +7 -7
- package/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +11 -11
- package/dist/client/adp/controllers/BaseDialog.controller.js +3 -3
- package/dist/client/adp/controllers/BaseDialog.controller.ts +6 -6
- package/dist/client/adp/controllers/ControllerExtension.controller.js +14 -14
- package/dist/client/adp/controllers/ControllerExtension.controller.ts +12 -12
- package/dist/client/adp/controllers/ExtensionPoint.controller.js +4 -4
- package/dist/client/adp/controllers/ExtensionPoint.controller.ts +5 -5
- package/dist/client/adp/controllers/FileExistsDialog.controller.js +2 -2
- package/dist/client/adp/controllers/FileExistsDialog.controller.ts +2 -2
- package/dist/client/adp/dialog-factory.js +2 -2
- package/dist/client/adp/dialog-factory.ts +16 -16
- package/dist/client/adp/extend-controller.js +4 -4
- package/dist/client/adp/extend-controller.ts +2 -2
- package/dist/client/adp/extension-point.js +5 -5
- package/dist/client/adp/extension-point.ts +4 -4
- package/dist/client/adp/init-dialogs.js +6 -6
- package/dist/client/adp/init-dialogs.ts +6 -6
- package/dist/client/adp/init.js +13 -13
- package/dist/client/adp/init.ts +9 -9
- package/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.js +8 -8
- package/dist/client/adp/quick-actions/add-new-subpage-quick-action-base.ts +10 -10
- package/dist/client/adp/quick-actions/common/add-controller-to-page.js +13 -13
- package/dist/client/adp/quick-actions/common/add-controller-to-page.ts +11 -11
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +11 -11
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +10 -10
- package/dist/client/adp/quick-actions/common/create-page-action.js +8 -8
- package/dist/client/adp/quick-actions/common/create-page-action.ts +7 -7
- package/dist/client/adp/quick-actions/common/op-add-custom-section.js +6 -6
- package/dist/client/adp/quick-actions/common/op-add-custom-section.ts +5 -5
- package/dist/client/adp/quick-actions/common/op-add-header-field.js +7 -7
- package/dist/client/adp/quick-actions/common/op-add-header-field.ts +7 -7
- package/dist/client/adp/quick-actions/common/utils.ts +1 -1
- package/dist/client/adp/quick-actions/dialog-enablement-validator.js +3 -3
- package/dist/client/adp/quick-actions/dialog-enablement-validator.ts +3 -3
- package/dist/client/adp/quick-actions/fe-v2/add-new-subpage.js +6 -6
- package/dist/client/adp/quick-actions/fe-v2/add-new-subpage.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v2/change-table-actions.js +5 -5
- package/dist/client/adp/quick-actions/fe-v2/change-table-actions.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.js +7 -7
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.js +11 -11
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.js +13 -13
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +7 -7
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.js +9 -9
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.js +11 -11
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.js +4 -4
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +3 -3
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.js +4 -4
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +4 -4
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.js +12 -12
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +8 -8
- package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.js +6 -6
- package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v2/registry.js +18 -18
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +18 -18
- package/dist/client/adp/quick-actions/fe-v2/utils.js +4 -4
- package/dist/client/adp/quick-actions/fe-v2/utils.ts +2 -2
- package/dist/client/adp/quick-actions/fe-v4/add-new-subpage.js +7 -7
- package/dist/client/adp/quick-actions/fe-v4/add-new-subpage.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v4/change-table-actions.js +9 -9
- package/dist/client/adp/quick-actions/fe-v4/change-table-actions.ts +7 -7
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.js +6 -6
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v4/create-page-action.js +11 -11
- package/dist/client/adp/quick-actions/fe-v4/create-page-action.ts +9 -9
- package/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.js +13 -13
- package/dist/client/adp/quick-actions/fe-v4/create-table-action-config-change.ts +11 -11
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.js +16 -16
- package/dist/client/adp/quick-actions/fe-v4/create-table-custom-column-config-change.ts +9 -9
- package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.js +5 -5
- package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +4 -4
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.js +5 -5
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.js +7 -7
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.js +5 -5
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +5 -5
- package/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.js +8 -8
- package/dist/client/adp/quick-actions/fe-v4/op-add-custom-section.ts +8 -8
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.js +12 -12
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +8 -8
- package/dist/client/adp/quick-actions/fe-v4/registry.js +17 -17
- package/dist/client/adp/quick-actions/fe-v4/registry.ts +17 -17
- package/dist/client/adp/quick-actions/fe-v4/utils.js +6 -6
- package/dist/client/adp/quick-actions/fe-v4/utils.ts +3 -3
- package/dist/client/adp/quick-actions/load.ts +2 -2
- package/dist/client/adp/quick-actions/quick-action-base.js +2 -2
- package/dist/client/adp/quick-actions/quick-action-base.ts +3 -3
- package/dist/client/adp/quick-actions/simple-quick-action-base.js +3 -3
- package/dist/client/adp/quick-actions/simple-quick-action-base.ts +4 -4
- package/dist/client/adp/quick-actions/table-quick-action-base.js +17 -17
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +9 -9
- package/dist/client/adp/sync-views-utils.js +4 -4
- package/dist/client/adp/sync-views-utils.ts +3 -3
- package/dist/client/adp/utils.js +3 -3
- package/dist/client/adp/utils.ts +2 -2
- package/dist/client/cpe/additional-change-info/add-xml-additional-info.js +7 -7
- package/dist/client/cpe/additional-change-info/add-xml-additional-info.ts +2 -2
- package/dist/client/cpe/changes/flex-change.js +3 -3
- package/dist/client/cpe/changes/flex-change.ts +3 -3
- package/dist/client/cpe/changes/generic-change.js +5 -5
- package/dist/client/cpe/changes/generic-change.ts +4 -4
- package/dist/client/cpe/changes/index.js +2 -2
- package/dist/client/cpe/changes/index.ts +1 -1
- package/dist/client/cpe/changes/service.js +12 -12
- package/dist/client/cpe/changes/service.ts +9 -9
- package/dist/client/cpe/changes/validator.js +2 -2
- package/dist/client/cpe/changes/validator.ts +1 -1
- package/dist/client/cpe/communication-service.js +2 -2
- package/dist/client/cpe/communication-service.ts +2 -2
- package/dist/client/cpe/connector-service.js +3 -3
- package/dist/client/cpe/connector-service.ts +3 -3
- package/dist/client/cpe/context-menu-service.js +6 -6
- package/dist/client/cpe/context-menu-service.ts +6 -6
- package/dist/client/cpe/control-data.js +3 -3
- package/dist/client/cpe/control-data.ts +5 -5
- package/dist/client/cpe/documentation.js +4 -4
- package/dist/client/cpe/documentation.ts +5 -5
- package/dist/client/cpe/init.js +15 -15
- package/dist/client/cpe/init.ts +16 -16
- package/dist/client/cpe/odata-health/odata-health-checker.js +5 -5
- package/dist/client/cpe/odata-health/odata-health-checker.ts +10 -10
- package/dist/client/cpe/outline/editable.js +4 -4
- package/dist/client/cpe/outline/editable.ts +4 -4
- package/dist/client/cpe/outline/nodes.js +7 -7
- package/dist/client/cpe/outline/nodes.ts +7 -7
- package/dist/client/cpe/outline/service.js +3 -3
- package/dist/client/cpe/outline/service.ts +4 -4
- package/dist/client/cpe/quick-actions/quick-action-service.js +5 -5
- package/dist/client/cpe/quick-actions/quick-action-service.ts +10 -10
- package/dist/client/cpe/quick-actions/registry.js +3 -3
- package/dist/client/cpe/quick-actions/registry.ts +4 -4
- package/dist/client/cpe/quick-actions/utils.js +3 -3
- package/dist/client/cpe/quick-actions/utils.ts +2 -2
- package/dist/client/cpe/rta-service.ts +1 -1
- package/dist/client/cpe/selection.js +8 -8
- package/dist/client/cpe/selection.ts +7 -7
- package/dist/client/cpe/utils.js +2 -2
- package/dist/client/cpe/utils.ts +2 -2
- package/dist/client/flp/WorkspaceConnector.js +6 -6
- package/dist/client/flp/WorkspaceConnector.ts +4 -4
- package/dist/client/flp/enableFakeConnector.js +4 -4
- package/dist/client/flp/enableFakeConnector.ts +3 -3
- package/dist/client/flp/init.js +6 -6
- package/dist/client/flp/init.ts +5 -5
- package/dist/client/flp/initConnectors.js +3 -3
- package/dist/client/flp/initConnectors.ts +1 -1
- package/dist/client/thirdparty/@sap-ux-private/control-property-editor-common.js +397 -477
- package/dist/client/utils/additional-change-info.js +2 -2
- package/dist/client/utils/additional-change-info.ts +2 -2
- package/dist/client/utils/core.js +2 -2
- package/dist/client/utils/core.ts +1 -1
- package/dist/client/utils/fe-v4.js +3 -3
- package/dist/client/utils/fe-v4.ts +2 -2
- package/dist/client/utils/info-center-message.js +3 -3
- package/dist/client/utils/info-center-message.ts +2 -2
- package/dist/client/utils/version.js +2 -2
- package/dist/client/utils/version.ts +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +2 -25
- package/dist/types/index.js +1 -4
- package/dist/ui5/middleware.d.ts +11 -1
- package/dist/ui5/middleware.js +13 -15
- package/package.json +18 -16
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["../cpe/additional-change-info/add-xml-additional-info"], function (
|
|
3
|
+
sap.ui.define(["../cpe/additional-change-info/add-xml-additional-info"], function (___cpe_additional_change_info_add_xml_additional_infojs) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const getAddXMLAdditionalInfo =
|
|
6
|
+
const getAddXMLAdditionalInfo = ___cpe_additional_change_info_add_xml_additional_infojs["getAddXMLAdditionalInfo"];
|
|
7
7
|
const additionalChangeInfoMap = new Map();
|
|
8
8
|
|
|
9
9
|
/**
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getAddXMLAdditionalInfo,
|
|
4
4
|
type AddXMLAdditionalInfo,
|
|
5
5
|
type AddXMLChangeContent
|
|
6
|
-
} from '../cpe/additional-change-info/add-xml-additional-info';
|
|
7
|
-
import { FlexChange as Change } from '../flp/common';
|
|
6
|
+
} from '../cpe/additional-change-info/add-xml-additional-info.js';
|
|
7
|
+
import { FlexChange as Change } from '../flp/common.js';
|
|
8
8
|
import type Component from 'sap/ui/core/Component';
|
|
9
9
|
|
|
10
10
|
export type AdditionalChangeInfo = AddXMLAdditionalInfo | undefined;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/core/Component", "sap/ui/core/Element", "sap/ui/core/util/reflection/JsControlTreeModifier", "sap/base/Log", "./error"], function (Component, Element, JsControlTreeModifier, Log,
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component", "sap/ui/core/Element", "sap/ui/core/util/reflection/JsControlTreeModifier", "sap/base/Log", "./error"], function (Component, Element, JsControlTreeModifier, Log, ___errorjs) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const getError =
|
|
6
|
+
const getError = ___errorjs["getError"];
|
|
7
7
|
/**
|
|
8
8
|
* Gets Component by id.
|
|
9
9
|
*
|
|
@@ -6,7 +6,7 @@ import View from 'sap/ui/core/mvc/View';
|
|
|
6
6
|
import type Selector from 'sap/ui/fl/Selector';
|
|
7
7
|
import JsControlTreeModifier from 'sap/ui/core/util/reflection/JsControlTreeModifier';
|
|
8
8
|
import Log from 'sap/base/Log';
|
|
9
|
-
import { getError } from './error';
|
|
9
|
+
import { getError } from './error.js';
|
|
10
10
|
|
|
11
11
|
/**
|
|
12
12
|
* Gets Component by id.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/core/Component", "./core", "sap/ui/rta/command/CommandFactory", "../cpe/utils"], function (Component,
|
|
3
|
+
sap.ui.define(["sap/ui/core/Component", "./core", "sap/ui/rta/command/CommandFactory", "../cpe/utils"], function (Component, ___corejs, CommandFactory, ___cpe_utilsjs) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const isA =
|
|
7
|
-
const getOverlay =
|
|
6
|
+
const isA = ___corejs["isA"];
|
|
7
|
+
const getOverlay = ___cpe_utilsjs["getOverlay"];
|
|
8
8
|
/**
|
|
9
9
|
* Gets app component of a v4 project.
|
|
10
10
|
*
|
|
@@ -5,9 +5,9 @@ import AppComponent from 'sap/fe/core/AppComponent';
|
|
|
5
5
|
import XMLView from 'sap/ui/core/mvc/XMLView';
|
|
6
6
|
import type { FlexSettings, Manifest } from 'sap/ui/rta/RuntimeAuthoring';
|
|
7
7
|
|
|
8
|
-
import { isA } from './core';
|
|
8
|
+
import { isA } from './core.js';
|
|
9
9
|
import CommandFactory from 'sap/ui/rta/command/CommandFactory';
|
|
10
|
-
import { getOverlay } from '../cpe/utils';
|
|
10
|
+
import { getOverlay } from '../cpe/utils.js';
|
|
11
11
|
import UI5Element from 'sap/ui/core/Element';
|
|
12
12
|
import FlexCommand from 'sap/ui/rta/command/FlexCommand';
|
|
13
13
|
import TableAPI from 'sap/fe/macros/table/TableAPI';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../cpe/communication-service", "../i18n"], function (___sap_ux_private_control_property_editor_common,
|
|
3
|
+
sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common", "../cpe/communication-service", "../i18n"], function (___sap_ux_private_control_property_editor_common, ___cpe_communication_servicejs, ___i18njs) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
6
|
const showInfoCenterMessage = ___sap_ux_private_control_property_editor_common["showInfoCenterMessage"];
|
|
7
|
-
const CommunicationService =
|
|
8
|
-
const getTextBundle =
|
|
7
|
+
const CommunicationService = ___cpe_communication_servicejs["CommunicationService"];
|
|
8
|
+
const getTextBundle = ___i18njs["getTextBundle"];
|
|
9
9
|
/**
|
|
10
10
|
* Localization key interface for defining message keys and optional parameters.
|
|
11
11
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MessageBarType, showInfoCenterMessage } from '@sap-ux-private/control-property-editor-common';
|
|
2
|
-
import { CommunicationService } from '../cpe/communication-service';
|
|
3
|
-
import { getTextBundle } from '../i18n';
|
|
2
|
+
import { CommunicationService } from '../cpe/communication-service.js';
|
|
3
|
+
import { getTextBundle } from '../i18n.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Localization key interface for defining message keys and optional parameters.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common"], function (VersionInfo, Log,
|
|
3
|
+
sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "open/ux/preview/client/thirdparty/@sap-ux-private/control-property-editor-common"], function (VersionInfo, Log, ___info_center_messagejs, ___sap_ux_private_control_property_editor_common) {
|
|
4
4
|
"use strict";
|
|
5
5
|
|
|
6
|
-
const sendInfoCenterMessage =
|
|
6
|
+
const sendInfoCenterMessage = ___info_center_messagejs["sendInfoCenterMessage"];
|
|
7
7
|
const MessageBarType = ___sap_ux_private_control_property_editor_common["MessageBarType"];
|
|
8
8
|
/**
|
|
9
9
|
* Default minimal supported UI5 version
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import VersionInfo from 'sap/ui/VersionInfo';
|
|
2
2
|
import Log from 'sap/base/Log';
|
|
3
|
-
import { sendInfoCenterMessage } from './info-center-message';
|
|
3
|
+
import { sendInfoCenterMessage } from './info-center-message.js';
|
|
4
4
|
import { MessageBarType } from '@sap-ux-private/control-property-editor-common';
|
|
5
5
|
|
|
6
6
|
type SingleVersionInfo =
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export * from './ui5/middleware';
|
|
2
|
-
export { FlpSandbox, generatePreviewFiles, getPreviewPaths, sanitizeRtaConfig, logRemoteUrl, isRemoteConnectionsEnabled } from './base';
|
|
3
|
-
export { FlpConfig, RtaConfig, TestConfig, MiddlewareConfig, DefaultFlpPath, DefaultIntent, TestConfigDefaults } from './types';
|
|
1
|
+
export * from './ui5/middleware.js';
|
|
2
|
+
export { FlpSandbox, generatePreviewFiles, getPreviewPaths, sanitizeRtaConfig, logRemoteUrl, isRemoteConnectionsEnabled } from './base/index.js';
|
|
3
|
+
export type { FlpConfig, RtaConfig, TestConfig, MiddlewareConfig, DefaultFlpPath, DefaultIntent, TestConfigDefaults } from './types/index.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,26 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.isRemoteConnectionsEnabled = exports.logRemoteUrl = exports.sanitizeRtaConfig = exports.getPreviewPaths = exports.generatePreviewFiles = exports.FlpSandbox = void 0;
|
|
18
|
-
__exportStar(require("./ui5/middleware"), exports);
|
|
19
|
-
var base_1 = require("./base");
|
|
20
|
-
Object.defineProperty(exports, "FlpSandbox", { enumerable: true, get: function () { return base_1.FlpSandbox; } });
|
|
21
|
-
Object.defineProperty(exports, "generatePreviewFiles", { enumerable: true, get: function () { return base_1.generatePreviewFiles; } });
|
|
22
|
-
Object.defineProperty(exports, "getPreviewPaths", { enumerable: true, get: function () { return base_1.getPreviewPaths; } });
|
|
23
|
-
Object.defineProperty(exports, "sanitizeRtaConfig", { enumerable: true, get: function () { return base_1.sanitizeRtaConfig; } });
|
|
24
|
-
Object.defineProperty(exports, "logRemoteUrl", { enumerable: true, get: function () { return base_1.logRemoteUrl; } });
|
|
25
|
-
Object.defineProperty(exports, "isRemoteConnectionsEnabled", { enumerable: true, get: function () { return base_1.isRemoteConnectionsEnabled; } });
|
|
1
|
+
export * from './ui5/middleware.js';
|
|
2
|
+
export { FlpSandbox, generatePreviewFiles, getPreviewPaths, sanitizeRtaConfig, logRemoteUrl, isRemoteConnectionsEnabled } from './base/index.js';
|
|
26
3
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js
CHANGED
|
@@ -1,10 +1,7 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.FLPHomePageDefaults = void 0;
|
|
4
1
|
/**
|
|
5
2
|
* Default FLP homepage configuration.
|
|
6
3
|
*/
|
|
7
|
-
|
|
4
|
+
export const FLPHomePageDefaults = {
|
|
8
5
|
pageName: 'SAP_BASIS_PG_UI_MYHOME',
|
|
9
6
|
catalogId: 'homeCatalog',
|
|
10
7
|
sectionId: 'homeAppsSection'
|
package/dist/ui5/middleware.d.ts
CHANGED
|
@@ -1,2 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import type { RequestHandler } from 'express';
|
|
2
|
+
import type { MiddlewareParameters } from '@ui5/server';
|
|
3
|
+
import type { MiddlewareConfig } from '../types/index.js';
|
|
4
|
+
/**
|
|
5
|
+
* Exporting the middleware for usage in the UI5 tooling.
|
|
6
|
+
*
|
|
7
|
+
* @param params middleware configuration
|
|
8
|
+
* @returns a promise for the request handler
|
|
9
|
+
*/
|
|
10
|
+
declare const _default: (params: MiddlewareParameters<MiddlewareConfig>) => Promise<RequestHandler>;
|
|
11
|
+
export default _default;
|
|
2
12
|
//# sourceMappingURL=middleware.d.ts.map
|
package/dist/ui5/middleware.js
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const config_1 = require("../base/config");
|
|
6
|
-
const remote_url_1 = require("../base/remote-url");
|
|
1
|
+
import { LogLevel, ToolsLogger, UI5ToolingTransport } from '@sap-ux/logger';
|
|
2
|
+
import { FlpSandbox } from '../base/flp.js';
|
|
3
|
+
import { getPreviewPaths, sanitizeConfig } from '../base/config.js';
|
|
4
|
+
import { logRemoteUrl, isRemoteConnectionsEnabled } from '../base/remote-url.js';
|
|
7
5
|
/**
|
|
8
6
|
* Create the router that is to be exposed as UI5 middleware.
|
|
9
7
|
*
|
|
@@ -18,9 +16,9 @@ async function createRouter({ resources, options, middlewareUtil }, logger) {
|
|
|
18
16
|
// setting defaults
|
|
19
17
|
const config = options.configuration ?? {};
|
|
20
18
|
config.flp ??= {};
|
|
21
|
-
|
|
19
|
+
sanitizeConfig(config, logger);
|
|
22
20
|
// configure the FLP sandbox based on information from the manifest
|
|
23
|
-
const flp = new
|
|
21
|
+
const flp = new FlpSandbox(config, resources.rootProject, middlewareUtil, logger);
|
|
24
22
|
if (config.adp) {
|
|
25
23
|
await flp.initAdp(config.adp);
|
|
26
24
|
}
|
|
@@ -34,11 +32,11 @@ async function createRouter({ resources, options, middlewareUtil }, logger) {
|
|
|
34
32
|
throw new Error('No manifest.json found.');
|
|
35
33
|
}
|
|
36
34
|
}
|
|
37
|
-
if (
|
|
38
|
-
await
|
|
35
|
+
if (isRemoteConnectionsEnabled()) {
|
|
36
|
+
await logRemoteUrl(logger);
|
|
39
37
|
}
|
|
40
38
|
// add exposed endpoints for cds-plugin-ui5
|
|
41
|
-
flp.router.getAppPages = () =>
|
|
39
|
+
flp.router.getAppPages = () => getPreviewPaths(config).map(({ path }) => path);
|
|
42
40
|
return flp.router;
|
|
43
41
|
}
|
|
44
42
|
/**
|
|
@@ -47,10 +45,10 @@ async function createRouter({ resources, options, middlewareUtil }, logger) {
|
|
|
47
45
|
* @param params middleware configuration
|
|
48
46
|
* @returns a promise for the request handler
|
|
49
47
|
*/
|
|
50
|
-
|
|
51
|
-
const logger = new
|
|
52
|
-
transports: [new
|
|
53
|
-
logLevel: params.options.configuration?.debug ?
|
|
48
|
+
export default async (params) => {
|
|
49
|
+
const logger = new ToolsLogger({
|
|
50
|
+
transports: [new UI5ToolingTransport({ moduleName: 'preview-middleware' })],
|
|
51
|
+
logLevel: params.options.configuration?.debug ? LogLevel.Debug : LogLevel.Info
|
|
54
52
|
});
|
|
55
53
|
try {
|
|
56
54
|
return await createRouter(params, logger);
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/preview-middleware",
|
|
3
3
|
"description": "Preview middleware",
|
|
4
|
+
"type": "module",
|
|
4
5
|
"repository": {
|
|
5
6
|
"type": "git",
|
|
6
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -9,7 +10,7 @@
|
|
|
9
10
|
"bugs": {
|
|
10
11
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Apreview-middleware"
|
|
11
12
|
},
|
|
12
|
-
"version": "0.
|
|
13
|
+
"version": "1.0.0",
|
|
13
14
|
"license": "Apache-2.0",
|
|
14
15
|
"author": "@SAP/ux-tools-team",
|
|
15
16
|
"main": "dist/index.js",
|
|
@@ -27,16 +28,17 @@
|
|
|
27
28
|
"mem-fs-editor": "9.4.0",
|
|
28
29
|
"qrcode": "1.5.4",
|
|
29
30
|
"@sap/bas-sdk": "3.13.7",
|
|
30
|
-
"@sap-ux/adp-tooling": "0.
|
|
31
|
-
"@sap-ux/btp-utils": "
|
|
32
|
-
"@sap-ux/
|
|
33
|
-
"@sap-ux/
|
|
34
|
-
"@sap-ux/logger": "0.
|
|
35
|
-
"@sap-ux/project-access": "
|
|
36
|
-
"@sap-ux/system-access": "0.
|
|
37
|
-
"@sap-ux/i18n": "0.
|
|
31
|
+
"@sap-ux/adp-tooling": "1.0.0",
|
|
32
|
+
"@sap-ux/btp-utils": "2.0.0",
|
|
33
|
+
"@sap-ux/control-property-editor-sources": "npm:@sap-ux/control-property-editor@1.0.0",
|
|
34
|
+
"@sap-ux/feature-toggle": "1.0.0",
|
|
35
|
+
"@sap-ux/logger": "1.0.0",
|
|
36
|
+
"@sap-ux/project-access": "2.0.0",
|
|
37
|
+
"@sap-ux/system-access": "1.0.0",
|
|
38
|
+
"@sap-ux/i18n": "1.0.0"
|
|
38
39
|
},
|
|
39
40
|
"devDependencies": {
|
|
41
|
+
"@jest/globals": "30.3.0",
|
|
40
42
|
"@types/connect": "^3.4.38",
|
|
41
43
|
"@types/qrcode": "1.5.6",
|
|
42
44
|
"@types/ejs": "3.1.5",
|
|
@@ -52,11 +54,11 @@
|
|
|
52
54
|
"nock": "14.0.11",
|
|
53
55
|
"npm-run-all2": "8.0.4",
|
|
54
56
|
"supertest": "7.2.2",
|
|
55
|
-
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@0.
|
|
56
|
-
"@sap-ux/
|
|
57
|
-
"@sap-ux-
|
|
58
|
-
"@sap-ux/store": "
|
|
59
|
-
"@sap-ux/ui5-info": "0.
|
|
57
|
+
"@private/preview-middleware-client": "npm:@sap-ux-private/preview-middleware-client@1.0.0",
|
|
58
|
+
"@sap-ux-private/playwright": "1.0.0",
|
|
59
|
+
"@sap-ux/axios-extension": "2.0.0",
|
|
60
|
+
"@sap-ux/store": "2.0.0",
|
|
61
|
+
"@sap-ux/ui5-info": "1.0.0"
|
|
60
62
|
},
|
|
61
63
|
"peerDependencies": {
|
|
62
64
|
"express": "4"
|
|
@@ -74,8 +76,8 @@
|
|
|
74
76
|
"format": "prettier --write '**/*.{js,json,ts,yaml,yml}' --ignore-path ../../.prettierignore",
|
|
75
77
|
"lint": "eslint",
|
|
76
78
|
"lint:fix": "eslint --fix",
|
|
77
|
-
"test": "jest --ci --forceExit --detectOpenHandles --colors",
|
|
78
|
-
"test-u": "jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
79
|
+
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --ci --forceExit --detectOpenHandles --colors",
|
|
80
|
+
"test-u": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --ci --forceExit --detectOpenHandles --colors -u",
|
|
79
81
|
"test:integration:clean": "rimraf --glob playwright-report",
|
|
80
82
|
"test:integration:run": "playwright test",
|
|
81
83
|
"test:integration": "npm-run-all -l -s test:integration:clean test:integration:run",
|