@sap/artifact-management 1.17.2 → 1.18.1

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.
Files changed (35) hide show
  1. package/README.md +2 -0
  2. package/dist/projectapi.js +3 -0
  3. package/dist/projectapi.js.LICENSE.txt +86 -0
  4. package/dist/src/cp/templates/file-templates/OverviewPage-template.html +1 -1
  5. package/dist/src/cp/templates/file-templates/launchpadPage-template.html +2 -2
  6. package/dist/src/index.js +3 -1
  7. package/dist/src/index.js.map +1 -1
  8. package/dist/src/plugins/cap/generators/CapLaunchpadGenerator.js +1 -1
  9. package/dist/src/plugins/cap/generators/CapLaunchpadGenerator.js.map +1 -1
  10. package/dist/src/plugins/ui5/generators/UI5ModuleGenerator.js +1 -1
  11. package/dist/src/plugins/ui5/generators/UI5ModuleGenerator.js.map +1 -1
  12. package/dist/src/project-api/CommandExecutor.js +232 -0
  13. package/dist/src/project-api/CommandExecutor.js.map +1 -0
  14. package/dist/src/project-api/ProjectCLI.js +125 -409
  15. package/dist/src/project-api/ProjectCLI.js.map +1 -1
  16. package/dist/templates/assets/SAP_R_grad.svg +1 -0
  17. package/dist/templates/assets/header.jpg +0 -0
  18. package/dist/templates/assets/launchpad.css +7 -0
  19. package/dist/templates/assets/preview.css +78 -0
  20. package/dist/templates/file-templates/OverviewPage-template.html +52 -0
  21. package/dist/templates/file-templates/Preview-template.xml +108 -0
  22. package/dist/templates/file-templates/launchpadPage-template.html +29 -0
  23. package/dist/templates/launchpad-ui5-app-template/package.json +18 -0
  24. package/dist/templates/launchpad-ui5-app-template/ui5.yaml +5 -0
  25. package/dist/templates/launchpad-ui5-app-template/webapp/i18n/i18n.properties +9 -0
  26. package/dist/templates/launchpad-ui5-app-template/webapp/manifest.json +84 -0
  27. package/dist/templates/launchpad-ui5-app-template/webapp/xs-app.json +31 -0
  28. package/dist/templates/mta-cap-db-template.yaml +10 -0
  29. package/dist/templates/mta-cap-srv-template.yaml +14 -0
  30. package/dist/templates/mta-cap-template.yaml +21 -0
  31. package/dist/templates/mta-ui-deployer-template.yaml +6 -0
  32. package/dist/tsconfig.tsbuildinfo +102 -65
  33. package/dist/types/src/index.d.ts +1 -0
  34. package/dist/types/src/project-api/CommandExecutor.d.ts +5 -0
  35. package/package.json +7 -17
@@ -0,0 +1,78 @@
1
+ .customCellImageBackground {
2
+ color: #fff;
3
+ background-image: url("header.jpg");
4
+ background-size: cover;
5
+ }
6
+ .customCellImageBackground .sapUiBlockCellContent,
7
+ .customCellImageBackground .sapUiBlockCellContent .sapMText {
8
+ color: #fff;
9
+ }
10
+ .launchpad {
11
+ height: 35rem;
12
+ width: 100%;
13
+ }
14
+ .titleLink {
15
+ margin-top: 0.75rem;
16
+ text-shadow: 0 0 BLACK !important;
17
+ color: #91C8F6 !important;
18
+ }
19
+ .sectionContentMargin {
20
+ margin-top: 2rem;
21
+ }
22
+ .blockLayoutContentRow {
23
+ margin-top: 4rem;
24
+ }
25
+ .parentTable {
26
+ margin-left: -1rem;
27
+ }
28
+ .childTable {
29
+ margin-bottom: 2rem;
30
+ }
31
+ .tableDescription {
32
+ padding: 0 0 0 0.5rem;
33
+ }
34
+ .webAppSeparator {
35
+ margin-bottom: 2rem;
36
+ }
37
+ .servicesSeparator {
38
+ margin-bottom: 1rem;
39
+ }
40
+ .transparentTable .sapUiTableCnt {
41
+ border-right: none;
42
+ border-left: none;
43
+ border-top: none;
44
+ background-color: transparent;
45
+ }
46
+ .transparentTable .sapUiTableCCnt {
47
+ border-bottom: none;
48
+ }
49
+ .transparentTable .sapUiTableCell {
50
+ border-right: none;
51
+ border-bottom: none;
52
+ }
53
+ .transparentTable .sapUiTableContentRow {
54
+ background-color: transparent;
55
+ }
56
+ .transparentTable .sapUiTableContentRow .sapUiTableCellDummy {
57
+ background-color: transparent !important;
58
+ border-left: none;
59
+ }
60
+ .sapUiTableCell:focus::before {
61
+ outline: none !important;
62
+ }
63
+ .sapMLIBFocusable:focus {
64
+ outline: none;
65
+ }
66
+ .sapFShellBarHomeIcon {
67
+ cursor: auto;
68
+ pointer-events: none;
69
+ }
70
+ /* .transparentTable .sapUiTableColHdrCnt {
71
+ background-color: transparent;
72
+ } */
73
+ /* .transparentTable .sapUiTableCellDummy {
74
+ background-color: transparent;
75
+ } */
76
+ /* .transparentTable .sapUiTableHeaderRow {
77
+ background-color: transparent;
78
+ } */
@@ -0,0 +1,52 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+
4
+ <head>
5
+ <title> <%- pageTitle %> </title>
6
+ <script src="shared-config.js"></script>
7
+ <script src="https://ui5.sap.com/1.108.3/resources/sap-ui-core.js"
8
+ id="sap-ui-bootstrap"
9
+ data-sap-ui-theme='sap_horizon'
10
+ data-sap-ui-bindingSyntax="complex"
11
+ data-sap-ui-xx-bindingSyntax="complex"
12
+ data-sap-ui-resourceroots='{"assets": "assets"}'
13
+ data-sap-ui-libs="sap.m,sap.uxap,sap.ui.layout,sap.f">
14
+ </script>
15
+ <link rel="stylesheet" href="assets/preview.css">
16
+ </head>
17
+
18
+ <body id="body" class="sapUiBody">
19
+ <script>
20
+ "use strict";
21
+ sap.ui.localResources("assets");
22
+ (function (jQuery, App, Page) {
23
+ sap.ui.getCore().attachInit(function () {
24
+ sap.ui.define([
25
+ "sap/ui/core/mvc/Controller",
26
+ "sap/ui/model/json/JSONModel"
27
+ ], function (Controller, JSONModel) {
28
+ return Controller.extend("PreviewController", {
29
+ onInit: function () {
30
+
31
+ const data = <%- data %>
32
+ this.getView().setModel(new JSONModel(data));
33
+ }
34
+ });
35
+ });
36
+ var oApp = new App()
37
+ var previewView = sap.ui.view({
38
+ viewName: "assets.Preview",
39
+ type: sap.ui.core.mvc.ViewType.XML
40
+ });
41
+ oApp.addPage(new Page({
42
+ content: [previewView],
43
+ showHeader: false
44
+ })).placeAt("content");
45
+ });
46
+
47
+ }(jQuery, sap.m.App, sap.m.Page));
48
+ </script>
49
+ <div id="content"></div>
50
+ </body>
51
+
52
+ </html>
@@ -0,0 +1,108 @@
1
+ <mvc:View controllerName="PreviewController"
2
+ xmlns="sap.m"
3
+ xmlns:l="sap.ui.layout"
4
+ xmlns:uxap="sap.uxap"
5
+ xmlns:m="sap.ui.core.m"
6
+ xmlns:core="sap.ui.core"
7
+ xmlns:mvc="sap.ui.core.mvc"
8
+ xmlns:f="sap.f"
9
+ xmlns:table="sap.ui.table"
10
+ core:require="{ sapMLib: 'sap/m/library' }">
11
+ <f:ShellBar
12
+ title="Application Development"
13
+ secondTitle="<%- pageSecondTitle %>"
14
+ homeIcon="assets/SAP_R_grad.svg">
15
+ </f:ShellBar>
16
+ <l:BlockLayout>
17
+ <l:BlockLayoutRow>
18
+ <l:BlockLayoutCell
19
+ title="<%- projectName %>"
20
+ titleAlignment="Left"
21
+ class="customCellImageBackground">
22
+ <VBox>
23
+ <Text text="<%- version %>" />
24
+ <Link class="titleLink" text="View Log" target="_blank" href="<%- applicationLogLink %>" visible="<%- applicationLogEnabled %>" />
25
+ </VBox>
26
+ </l:BlockLayoutCell>
27
+ </l:BlockLayoutRow>
28
+ <l:BlockLayoutRow class="blockLayoutContentRow">
29
+ <l:BlockLayoutCell id="webApplications" width='2'>
30
+ <Title titleStyle="H3" text="Web Applications (<%- count %>)"/>
31
+ <core:HTML
32
+ content='&lt;hr class=&quot;webAppSeparator&quot;&gt;'>
33
+ </core:HTML>
34
+ <core:HTML
35
+ content='&lt;p&gt;<%- webApplicationsDescripton %>&lt;/p&gt;'>
36
+ </core:HTML>
37
+ <core:HTML
38
+ content='&lt;iframe class=&quot;launchpad sectionContentMargin&quot; src=&quot;./launchpadPage.html&quot; frameBorder=0 &gt;&lt;/iframe&gt;'>
39
+ </core:HTML>
40
+ </l:BlockLayoutCell>
41
+ <l:BlockLayoutCell>
42
+ <Title titleStyle="H3" text="Services (<%- servicesCount %>)"/>
43
+ <core:HTML
44
+ content='&lt;hr class=&quot;servicesSeparator&quot;&gt;'>
45
+ </core:HTML>
46
+ <table:Table
47
+ rows="{path: '/Services'}"
48
+ enableSelectAll="false"
49
+ selectionMode="None"
50
+ enableColumnReordering="false"
51
+ columnHeaderVisible="false"
52
+ ariaLabelledBy="title"
53
+ visibleRowCount="<%- servicesCount %>"
54
+ class="transparentTable parentTable">
55
+ <table:columns>
56
+ <table:Column>
57
+ <Label text="Service Entity" />
58
+ <table:template>
59
+ <table:Table
60
+ rows="{path: 'Entities'}"
61
+ enableSelectAll="false"
62
+ selectionMode="None"
63
+ enableColumnReordering="false"
64
+ columnHeaderVisible="false"
65
+ ariaLabelledBy="title"
66
+ visibleRowCount="{EntitiesCount}"
67
+ class="transparentTable childTable">
68
+ <table:extension>
69
+ <OverflowToolbar style="Clear">
70
+ <Title id="title" text="{ServiceName}"/>
71
+ </OverflowToolbar>
72
+ <Title class="tableDescription">
73
+ <FormattedText htmlText="&lt;p&gt;{EntitiesCount} tables are included in this service. View &lt;a href=&quot;{DetailsURL}&quot; &gt; service details&lt;/a&gt; and &lt;a href=&quot;{Metadata}&quot; &gt; metadata&lt;/a&gt; for more info.&lt;/p&gt;"/>
74
+ </Title>
75
+ </table:extension>
76
+ <table:columns>
77
+ <table:Column width="12rem">
78
+ <Label text="Service Entity" />
79
+ <table:template>
80
+ <Text text="{Name}" wrapping="false" />
81
+ </table:template>
82
+ </table:Column>
83
+ <table:Column width="4rem">
84
+ <Label text="Metadata Fiori" />
85
+ <table:template>
86
+ <Button tooltip="View as table"
87
+ icon="sap-icon://table-view"
88
+ press="sapMLib.URLHelper.redirect(${FioriURL}, true)" visible="{= ${FioriURL} !== ''}"/>
89
+ </table:template>
90
+ </table:Column>
91
+ <table:Column width="4rem">
92
+ <Label text="Json Data" />
93
+ <table:template>
94
+ <Button tooltip="View as code"
95
+ icon="sap-icon://syntax"
96
+ press="sapMLib.URLHelper.redirect(${URL}, true)"/>
97
+ </table:template>
98
+ </table:Column>
99
+ </table:columns>
100
+ </table:Table>
101
+ </table:template>
102
+ </table:Column>
103
+ </table:columns>
104
+ </table:Table>
105
+ </l:BlockLayoutCell>
106
+ </l:BlockLayoutRow>
107
+ </l:BlockLayout>
108
+ </mvc:View>
@@ -0,0 +1,29 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>{{appTitle}}</title>
8
+
9
+ <script>
10
+ window["sap-ushell-config"] = <%- applications %>;
11
+ </script>
12
+ <link rel="stylesheet" href="assets/launchpad.css">
13
+ <script src="https://ui5.sap.com/1.108.3/test-resources/sap/ushell/bootstrap/sandbox.js"></script>
14
+ <script
15
+ src="https://ui5.sap.com/1.108.3/resources/sap-ui-core.js"
16
+ data-sap-ui-libs="sap.m, sap.ushell, sap.fe.templates"
17
+ data-sap-ui-compatVersion="edge"
18
+ data-sap-ui-theme="sap_horizon"
19
+ data-sap-ui-frameOptions="allow"
20
+ data-sap-ui-bindingSyntax="complex"
21
+ ></script>
22
+ <script>
23
+ sap.ui.getCore().attachInit(function() {
24
+ sap.ushell.Container.createRenderer().placeAt('content');
25
+ });
26
+ </script>
27
+ </head>
28
+ <body class="sapUiBody" id="content"></body>
29
+ </html>
@@ -0,0 +1,18 @@
1
+ {
2
+ "name": "launchpad",
3
+ "version": "1.0.0",
4
+ "description": "launch pad for ui applications",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1"
8
+ },
9
+ "keywords": [],
10
+ "author": "",
11
+ "license": "ISC",
12
+ "devDependencies": {
13
+ "@ui5/cli": "^2.4.2"
14
+ },
15
+ "dependencies": {
16
+ "bestzip": "^2.1.7"
17
+ }
18
+ }
@@ -0,0 +1,5 @@
1
+ specVersion: '1.0'
2
+ metadata:
3
+ name: launchpad
4
+ type: application
5
+
@@ -0,0 +1,9 @@
1
+ # This is the resource bundle for risks
2
+
3
+ #Texts for manifest.json
4
+
5
+ #XTIT: Application name
6
+ appTitle=Launchpad
7
+
8
+ #YDES: Application description
9
+ appDescription=Launchpad for UI applications
@@ -0,0 +1,84 @@
1
+ {
2
+ "_version": "1.21.0",
3
+ "sap.app": {
4
+ "id": "<%- appName %>-Launchpad",
5
+ "type": "application",
6
+ "i18n": "i18n/i18n.properties",
7
+ "applicationVersion": {
8
+ "version": "1.0.0"
9
+ },
10
+ "title": "<%- appName %>",
11
+ "description": "Launchpad for <%- appName %>"
12
+ },
13
+ "sap.ui": {
14
+ "technology": "UI5",
15
+ "icons": {
16
+ "icon": "",
17
+ "favIcon": "",
18
+ "phone": "",
19
+ "phone@2": "",
20
+ "tablet": "",
21
+ "tablet@2": ""
22
+ },
23
+ "deviceTypes": {
24
+ "desktop": true,
25
+ "tablet": true,
26
+ "phone": true
27
+ }
28
+ },
29
+ "sap.ui5": {
30
+ "flexEnabled": true,
31
+ "dependencies": {
32
+ "minUI5Version": "1.60.0",
33
+ "libs": {
34
+ "sap.ui.core": {},
35
+ "sap.m": {},
36
+ "sap.ui.layout": {}
37
+ }
38
+ },
39
+ "contentDensities": {
40
+ "compact": true,
41
+ "cozy": true
42
+ },
43
+ "models": {
44
+ "i18n": {
45
+ "type": "sap.ui.model.resource.ResourceModel",
46
+ "settings": {
47
+ "bundleName": "launchpad.i18n.i18n"
48
+ }
49
+ }
50
+ },
51
+ "resources": {
52
+ "css": [
53
+ {
54
+ "uri": "css/style.css"
55
+ }
56
+ ]
57
+ },
58
+ "routing": {
59
+ "config": {
60
+ "routerClass": "sap.m.routing.Router",
61
+ "viewType": "XML",
62
+ "viewPath": "launchpad.view",
63
+ "controlId": "idAppControl",
64
+ "controlAggregation": "pages",
65
+ "async": true
66
+ },
67
+ "routes": [
68
+ {
69
+ "name": "RouteMainView",
70
+ "pattern": "RouteMainView",
71
+ "target": ["TargetMainView"]
72
+ }
73
+ ],
74
+ "targets": {
75
+ "TargetMainView": {
76
+ "viewType": "XML",
77
+ "viewLevel": 1,
78
+ "viewId": "idAppControl",
79
+ "viewName": "MainView"
80
+ }
81
+ }
82
+ }
83
+ }
84
+ }
@@ -0,0 +1,31 @@
1
+ {
2
+ "welcomeFile": "/index.html",
3
+ "authenticationMethod": "route",
4
+ "logout": {
5
+ "logoutEndpoint": "/do/logout",
6
+ "logoutPage": "/logout.html"
7
+ },
8
+ "routes": [
9
+ {
10
+ "source": "^/index.html$",
11
+ "target": "/index.html",
12
+ "service": "html5-apps-repo-rt",
13
+ "cacheControl": "no-cache, no-store, must-revalidate",
14
+ "authenticationType": "xsuaa"
15
+ },
16
+ {
17
+ "source": "^/logout.html$",
18
+ "target": "/logout.html",
19
+ "service": "html5-apps-repo-rt",
20
+ "cacheControl": "no-cache, must-revalidate",
21
+ "authenticationType": "none"
22
+ },
23
+ {
24
+ "source": "^(.*)$",
25
+ "target": "$1",
26
+ "service": "html5-apps-repo-rt",
27
+ "cacheControl": "no-cache, must-revalidate",
28
+ "authenticationType": "xsuaa"
29
+ }
30
+ ]
31
+ }
@@ -0,0 +1,10 @@
1
+ name: <%- project.prefix %>-db-deployer
2
+ type: hdb
3
+ path: gen/db
4
+ parameters:
5
+ buildpack: nodejs_buildpack
6
+ build-parameters:
7
+ builder: npm
8
+ ignore:
9
+ - node_modules
10
+ - package-lock.json
@@ -0,0 +1,14 @@
1
+ name: <%- project.prefix %>-srv
2
+ type: nodejs
3
+ path: gen/srv
4
+ parameters:
5
+ memory: 256MB
6
+ provides:
7
+ - name: srv-api
8
+ properties:
9
+ srv-url: <%- url %>
10
+ build-parameters:
11
+ builder: npm
12
+ ignore:
13
+ - node_modules
14
+ - package-lock.json
@@ -0,0 +1,21 @@
1
+ _schema-version: '3.1'
2
+ ID: <%- project.name %>
3
+ version: <%- project.version %>
4
+ description: "A simple CAP project."
5
+ parameters:
6
+ deploy_mode: html5-repo
7
+ enable-parallel-deployments: true
8
+
9
+ build-parameters:
10
+ before-all:
11
+ - builder: custom
12
+ commands:
13
+ - npm install --production
14
+ - bash -c "cds -v | grep 'cds-dk' || npm i --production --no-save @sap/cds-dk @sap/mdk-tools"
15
+ - bash -c "export PATH=$PATH:$(pwd)/node_modules/.bin"
16
+ - cds build --production
17
+
18
+
19
+ modules:
20
+
21
+ resources:
@@ -0,0 +1,6 @@
1
+ name: <%- moduleName %>
2
+ type: com.sap.application.content
3
+ path: build/ui-deployer
4
+ build-parameters:
5
+ build-result: resources
6
+ requires: []