@sap/ux-ui5-tooling 1.3.0 → 1.3.5
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/CHANGELOG.md +18 -0
- package/README.md +27 -13
- package/dist/cli/index.js +94175 -64975
- package/dist/markdowns/add/add.en.md +37 -0
- package/dist/markdowns/cfDeploy/cfDeploy.en.md +9 -0
- package/dist/markdowns/deploy/deploy.en.md +27 -0
- package/dist/markdowns/index/index.en.md +21 -0
- package/dist/markdowns/run/run.en.md +24 -0
- package/dist/markdowns/undeploy/undeploy.en.md +19 -0
- package/dist/middlewares/fiori-tools-appreload.js +541 -549
- package/dist/middlewares/fiori-tools-preview.js +44270 -43169
- package/dist/middlewares/fiori-tools-proxy.js +58097 -56752
- package/dist/middlewares/fiori-tools-servestatic.js +10 -22
- package/dist/tasks/cf-deploy/index.js +81550 -0
- package/dist/tasks/deploy/index.js +66294 -49068
- package/dist/templates/control-property-editor/app.js +1 -0
- package/dist/templates/control-property-editor/editor.html +22 -0
- package/dist/templates/control-property-editor/favicon.ico +0 -0
- package/dist/templates/control-property-editor/ui5-adaptation.js +1 -0
- package/dist/templates/control-property-editor/vendor.js +2 -0
- package/dist/templates/control-property-editor/vendor.js.LICENSE.txt +56 -0
- package/dist/templates/variants-management/WorkspaceConnector.js +23 -4
- package/dist/templates/variants-management/preview.html +18 -19
- package/package.json +29 -5
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*
|
|
2
|
+
object-assign
|
|
3
|
+
(c) Sindre Sorhus
|
|
4
|
+
@license MIT
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
/*! *****************************************************************************
|
|
8
|
+
Copyright (c) Microsoft Corporation.
|
|
9
|
+
|
|
10
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
11
|
+
purpose with or without fee is hereby granted.
|
|
12
|
+
|
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
14
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
15
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
16
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
17
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
18
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
***************************************************************************** */
|
|
21
|
+
|
|
22
|
+
/** @license React v0.19.1
|
|
23
|
+
* scheduler.production.min.js
|
|
24
|
+
*
|
|
25
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
26
|
+
*
|
|
27
|
+
* This source code is licensed under the MIT license found in the
|
|
28
|
+
* LICENSE file in the root directory of this source tree.
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/** @license React v16.13.1
|
|
32
|
+
* react-is.production.min.js
|
|
33
|
+
*
|
|
34
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
35
|
+
*
|
|
36
|
+
* This source code is licensed under the MIT license found in the
|
|
37
|
+
* LICENSE file in the root directory of this source tree.
|
|
38
|
+
*/
|
|
39
|
+
|
|
40
|
+
/** @license React v16.14.0
|
|
41
|
+
* react-dom.production.min.js
|
|
42
|
+
*
|
|
43
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
44
|
+
*
|
|
45
|
+
* This source code is licensed under the MIT license found in the
|
|
46
|
+
* LICENSE file in the root directory of this source tree.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
/** @license React v16.14.0
|
|
50
|
+
* react.production.min.js
|
|
51
|
+
*
|
|
52
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
53
|
+
*
|
|
54
|
+
* This source code is licensed under the MIT license found in the
|
|
55
|
+
* LICENSE file in the root directory of this source tree.
|
|
56
|
+
*/
|
|
@@ -1,19 +1,35 @@
|
|
|
1
1
|
sap.ui.define(
|
|
2
|
-
[
|
|
3
|
-
|
|
2
|
+
[
|
|
3
|
+
'sap/base/util/merge',
|
|
4
|
+
'sap/ui/fl/write/api/connectors/ObjectStorageConnector',
|
|
5
|
+
'sap/ui/fl/Layer',
|
|
6
|
+
'sap/base/util/UriParameters'
|
|
7
|
+
],
|
|
8
|
+
function(merge, ObjectStorageConnector, Layer, UriParameters) {
|
|
4
9
|
'use strict';
|
|
5
10
|
var url = new URL(window.location.toString());
|
|
11
|
+
var uriParameters = UriParameters.fromURL(url.href);
|
|
12
|
+
var rtaMode = uriParameters.get('fiori-tools-rta-mode');
|
|
13
|
+
var generator =
|
|
14
|
+
rtaMode === 'forAdaptation'
|
|
15
|
+
? 'changeUtils: SAPFioriTools-propertyEditor'
|
|
16
|
+
: 'changeUtils: SAPFioriTools-variants';
|
|
17
|
+
|
|
6
18
|
var trustedHosts = [/^localhost$/, /^.*.applicationstudio.cloud.sap$/];
|
|
7
19
|
var isValidHost = trustedHosts.some((host) => {
|
|
8
20
|
return host.test(url.hostname);
|
|
9
21
|
});
|
|
10
22
|
|
|
11
23
|
var WorkspaceConnector = merge({}, ObjectStorageConnector, {
|
|
12
|
-
|
|
24
|
+
layers: [Layer.VENDOR, Layer.CUSTOMER_BASE],
|
|
13
25
|
storage: {
|
|
14
26
|
_itemsStoredAsObjects: true,
|
|
15
27
|
setItem: function(sKey, vValue) {
|
|
16
28
|
if (isValidHost) {
|
|
29
|
+
// update generator
|
|
30
|
+
if (vValue && vValue.support) {
|
|
31
|
+
vValue.support.generator = generator;
|
|
32
|
+
}
|
|
17
33
|
$.ajax({
|
|
18
34
|
type: 'POST',
|
|
19
35
|
url: url.origin + '/FioriTools/api/writeChanges',
|
|
@@ -28,7 +44,7 @@ sap.ui.define(
|
|
|
28
44
|
if (isValidHost) {
|
|
29
45
|
$.ajax({
|
|
30
46
|
type: 'DELETE',
|
|
31
|
-
url: url.
|
|
47
|
+
url: url.origin + '/FioriTools/api/removeChanges',
|
|
32
48
|
data: JSON.stringify({ fileName: sKey }),
|
|
33
49
|
contentType: 'application/json'
|
|
34
50
|
});
|
|
@@ -63,6 +79,9 @@ sap.ui.define(
|
|
|
63
79
|
settings.isVariantAdaptationEnabled = true;
|
|
64
80
|
}
|
|
65
81
|
|
|
82
|
+
if (rtaMode === 'forAdaptation') {
|
|
83
|
+
settings.isVariantAdaptationEnabled = false;
|
|
84
|
+
}
|
|
66
85
|
return settings;
|
|
67
86
|
});
|
|
68
87
|
}
|
|
@@ -5,12 +5,11 @@
|
|
|
5
5
|
<meta charset="UTF-8">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
7
7
|
<title>{{appTitle}}</title>
|
|
8
|
-
|
|
9
8
|
<script>
|
|
10
9
|
window["sap-ushell-config"] = {
|
|
11
10
|
defaultRenderer: "fiori2",
|
|
12
11
|
applications: {
|
|
13
|
-
"
|
|
12
|
+
"<%- previewAppName %>": {
|
|
14
13
|
additionalInformation: "SAPUI5.Component=<%- component %>",
|
|
15
14
|
applicationType: "URL",
|
|
16
15
|
url: "./",
|
|
@@ -19,21 +18,9 @@
|
|
|
19
18
|
}
|
|
20
19
|
};
|
|
21
20
|
</script>
|
|
22
|
-
|
|
23
21
|
<script src="/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
|
|
24
|
-
<script
|
|
25
|
-
|
|
26
|
-
data-sap-ui-libs="<%- libs %>"
|
|
27
|
-
data-sap-ui-async="true"
|
|
28
|
-
data-sap-ui-preload="async"
|
|
29
|
-
data-sap-ui-compatVersion="edge"
|
|
30
|
-
data-sap-ui-theme="<%- ui5Theme %>"
|
|
31
|
-
data-sap-ui-flexibilityServices='[{"applyConnector": "<%- component.replace(/\./g, '/') %>/WorkspaceConnector", "writeConnector": "<%- component.replace(/\./g, '/') %>/WorkspaceConnector", "custom": true}]'
|
|
32
|
-
data-sap-ui-frameOptions="allow"
|
|
33
|
-
data-sap-ui-bindingSyntax="complex"
|
|
34
|
-
></script><% if (reuseLibs) { %>
|
|
35
|
-
<script src="../utils/locate-reuse-libs.js"
|
|
36
|
-
data-sap-ui-manifest-uri="../manifest.json">
|
|
22
|
+
<script src="/resources/sap-ui-core.js" <%- ui5Configuration %>></script><% if (reuseLibs) { %>
|
|
23
|
+
<script src="../utils/locate-reuse-libs.js" data-sap-ui-manifest-uri="../manifest.json">
|
|
37
24
|
</script><% } %><% if (rtaMode) { %>
|
|
38
25
|
<script>
|
|
39
26
|
sap.ui.getCore().attachInit(function() {
|
|
@@ -41,15 +28,27 @@
|
|
|
41
28
|
sap.ushell.Container.getServiceAsync('AppLifeCycle').then((serviceInstance) => {
|
|
42
29
|
serviceInstance.attachAppLoaded((event) => {
|
|
43
30
|
var oView = event.getParameter('componentInstance');
|
|
44
|
-
sap.ui.require(["sap/ui/rta/api/startAdaptation"], function (startAdaptation) {
|
|
31
|
+
sap.ui.require(["sap/ui/rta/api/startAdaptation"], async function (startAdaptation) {
|
|
45
32
|
var options = {
|
|
46
33
|
rootControl: oView,
|
|
47
34
|
validateAppVersion: false,
|
|
48
35
|
flexSettings: {
|
|
49
|
-
layer: '
|
|
36
|
+
layer: '<%- layer %>'
|
|
50
37
|
}
|
|
51
38
|
};
|
|
52
|
-
startAdaptation(options);
|
|
39
|
+
const rta = await startAdaptation(options);
|
|
40
|
+
<% if (flexMode) { %>
|
|
41
|
+
sap.ui.require(['editor/ui5-adaptation'], async function() {
|
|
42
|
+
const { init } = window['ui5-adaptation'];
|
|
43
|
+
await init({
|
|
44
|
+
rta,
|
|
45
|
+
view: oView,
|
|
46
|
+
layer: '<%- layer %>',
|
|
47
|
+
componentId: '<%- component %>',
|
|
48
|
+
generator: '<%- generator %>'
|
|
49
|
+
});
|
|
50
|
+
});
|
|
51
|
+
<% } %>
|
|
53
52
|
});
|
|
54
53
|
})
|
|
55
54
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/ux-ui5-tooling",
|
|
3
3
|
"displayName": "SAP Fiori tools – UI5 Tooling",
|
|
4
|
-
"version": "1.3.
|
|
4
|
+
"version": "1.3.5",
|
|
5
5
|
"description": "SAP Fiori tools – UI5 Tooling",
|
|
6
6
|
"publisher": "SAPSE",
|
|
7
7
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"compile": "webpack --color --config webpack.prod.js",
|
|
16
16
|
"watch": "yarn clean && webpack --color --config webpack.dev.js",
|
|
17
17
|
"build": "npm-run-all clean compile",
|
|
18
|
-
"build:deps": "yarn lerna run --concurrency 1 --no-bail --stream --scope @sap/ux-odata-client --scope @sap/ux-common-utils --scope @sap/ux-store --scope @sap/ux-app-templates build",
|
|
18
|
+
"build:deps": "yarn lerna run --concurrency 1 --no-bail --stream --scope @sap/ux-telemetry --scope @sap/ux-odata-client --scope @sap/ux-common-utils --scope @sap/ux-store --scope @sap/ux-app-templates build",
|
|
19
19
|
"bundle": "yarn build:deps && yarn build && npm pack",
|
|
20
20
|
"test": "jest --maxWorkers=1 --ci --forceExit --detectOpenHandles --colors --silent",
|
|
21
21
|
"test:sequence": "node -r ts-node/register test/test-project/request-sequence.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"lint:summary": "eslint . --ext .ts,.tsx -f summary",
|
|
24
24
|
"lint:fix": "eslint --fix",
|
|
25
25
|
"lint:fix:all": "eslint . --ext .ts,.tsx --fix",
|
|
26
|
-
"lint:report": "eslint . --ext .ts,.tsx -
|
|
26
|
+
"lint:report": "eslint . --ext .ts,.tsx -f multiple --report-unused-disable-directives",
|
|
27
27
|
"format:fix": "prettier --write --loglevel silent --ignore-path ../../../.prettierignore",
|
|
28
28
|
"format:fix:all": "prettier --write '**/*.{css,scss,html,js,json,ts,tsx,yaml,yml}' '!**/{out,dist,typings,node_modules}/**' '!**/*.{svg,png,xml}' --ignore-path ../../../.prettierignore",
|
|
29
29
|
"tgz:package": "npm pack",
|
|
@@ -41,8 +41,11 @@
|
|
|
41
41
|
"keytar": "7.7.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@sap/ux-app-templates": "1.3.
|
|
45
|
-
"@sap/ux-
|
|
44
|
+
"@sap/ux-app-templates": "1.3.5",
|
|
45
|
+
"@sap/ux-cds": "1.3.5",
|
|
46
|
+
"@sap/ux-control-property-editor": "1.3.5",
|
|
47
|
+
"@sap/ux-odata-client": "1.3.5",
|
|
48
|
+
"@sap/ux-telemetry": "1.3.5",
|
|
46
49
|
"@types/body-parser": "1.19.0",
|
|
47
50
|
"@types/prompts": "2.0.8",
|
|
48
51
|
"@types/yazl": "2.4.2",
|
|
@@ -50,6 +53,7 @@
|
|
|
50
53
|
"@ui5/logger": "2.0.1",
|
|
51
54
|
"@ui5/project": "2.4.0",
|
|
52
55
|
"@ui5/server": "2.2.10",
|
|
56
|
+
"axios": "0.21.1",
|
|
53
57
|
"body-parser": "1.19.0",
|
|
54
58
|
"chalk": "4.1.0",
|
|
55
59
|
"connect-livereload": "0.6.1",
|
|
@@ -60,6 +64,8 @@
|
|
|
60
64
|
"http-proxy-middleware": "1.3.1",
|
|
61
65
|
"https-proxy-agent": "4.0.0",
|
|
62
66
|
"i18next": "19.0.2",
|
|
67
|
+
"marked": "3.0.2",
|
|
68
|
+
"marked-terminal": "4.2.0",
|
|
63
69
|
"mock-http-server": "1.4.2",
|
|
64
70
|
"open": "7.0.3",
|
|
65
71
|
"portfinder": "1.0.25",
|
|
@@ -85,5 +91,23 @@
|
|
|
85
91
|
"jestSonar": {
|
|
86
92
|
"reportPath": "reports/test/unit",
|
|
87
93
|
"reportFile": "test-report.xml"
|
|
94
|
+
},
|
|
95
|
+
"eslint-formatter-multiple": {
|
|
96
|
+
"formatters": [
|
|
97
|
+
{
|
|
98
|
+
"name": "stylish",
|
|
99
|
+
"output": "console"
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
"name": "json",
|
|
103
|
+
"output": "file",
|
|
104
|
+
"path": "reports/lint/eslint.json"
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"name": "checkstyle",
|
|
108
|
+
"output": "file",
|
|
109
|
+
"path": "reports/lint/eslint.checkstyle.xml"
|
|
110
|
+
}
|
|
111
|
+
]
|
|
88
112
|
}
|
|
89
113
|
}
|