@ui5/mcp-server 0.1.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.
Files changed (221) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/LICENSE +201 -0
  3. package/LICENSES/Apache-2.0.txt +73 -0
  4. package/README.md +131 -0
  5. package/bin/ui5mcp.js +2 -0
  6. package/lib/Context.d.ts +28 -0
  7. package/lib/Context.js +71 -0
  8. package/lib/Context.js.map +1 -0
  9. package/lib/api.d.ts +3 -0
  10. package/lib/api.js +3 -0
  11. package/lib/api.js.map +1 -0
  12. package/lib/cli.d.ts +1 -0
  13. package/lib/cli.js +12 -0
  14. package/lib/cli.js.map +1 -0
  15. package/lib/registerTools.d.ts +133 -0
  16. package/lib/registerTools.js +59 -0
  17. package/lib/registerTools.js.map +1 -0
  18. package/lib/resources/documentation/getDocumentation.d.ts +18 -0
  19. package/lib/resources/documentation/getDocumentation.js +70 -0
  20. package/lib/resources/documentation/getDocumentation.js.map +1 -0
  21. package/lib/server.d.ts +10 -0
  22. package/lib/server.js +113 -0
  23. package/lib/server.js.map +1 -0
  24. package/lib/tools/create_ui5_app/ODataMetadata.d.ts +55 -0
  25. package/lib/tools/create_ui5_app/ODataMetadata.js +99 -0
  26. package/lib/tools/create_ui5_app/ODataMetadata.js.map +1 -0
  27. package/lib/tools/create_ui5_app/createSuccessMessage.d.ts +13 -0
  28. package/lib/tools/create_ui5_app/createSuccessMessage.js +45 -0
  29. package/lib/tools/create_ui5_app/createSuccessMessage.js.map +1 -0
  30. package/lib/tools/create_ui5_app/create_ui5_app.d.ts +8 -0
  31. package/lib/tools/create_ui5_app/create_ui5_app.js +273 -0
  32. package/lib/tools/create_ui5_app/create_ui5_app.js.map +1 -0
  33. package/lib/tools/create_ui5_app/index.d.ts +3 -0
  34. package/lib/tools/create_ui5_app/index.js +58 -0
  35. package/lib/tools/create_ui5_app/index.js.map +1 -0
  36. package/lib/tools/create_ui5_app/isValidUrl.d.ts +16 -0
  37. package/lib/tools/create_ui5_app/isValidUrl.js +59 -0
  38. package/lib/tools/create_ui5_app/isValidUrl.js.map +1 -0
  39. package/lib/tools/create_ui5_app/schema.d.ts +135 -0
  40. package/lib/tools/create_ui5_app/schema.js +67 -0
  41. package/lib/tools/create_ui5_app/schema.js.map +1 -0
  42. package/lib/tools/create_ui5_app/templateProcessor.d.ts +67 -0
  43. package/lib/tools/create_ui5_app/templateProcessor.js +59 -0
  44. package/lib/tools/create_ui5_app/templateProcessor.js.map +1 -0
  45. package/lib/tools/create_ui5_app/ui5Version.d.ts +2 -0
  46. package/lib/tools/create_ui5_app/ui5Version.js +6 -0
  47. package/lib/tools/create_ui5_app/ui5Version.js.map +1 -0
  48. package/lib/tools/get_api_reference/createUriForSymbol.d.ts +2 -0
  49. package/lib/tools/get_api_reference/createUriForSymbol.js +49 -0
  50. package/lib/tools/get_api_reference/createUriForSymbol.js.map +1 -0
  51. package/lib/tools/get_api_reference/getApiReference.d.ts +10 -0
  52. package/lib/tools/get_api_reference/getApiReference.js +51 -0
  53. package/lib/tools/get_api_reference/getApiReference.js.map +1 -0
  54. package/lib/tools/get_api_reference/index.d.ts +3 -0
  55. package/lib/tools/get_api_reference/index.js +38 -0
  56. package/lib/tools/get_api_reference/index.js.map +1 -0
  57. package/lib/tools/get_api_reference/lib/ApiReferenceProvider.d.ts +85 -0
  58. package/lib/tools/get_api_reference/lib/ApiReferenceProvider.js +452 -0
  59. package/lib/tools/get_api_reference/lib/ApiReferenceProvider.js.map +1 -0
  60. package/lib/tools/get_api_reference/lib/apiReferenceResources.d.ts +18 -0
  61. package/lib/tools/get_api_reference/lib/apiReferenceResources.js +138 -0
  62. package/lib/tools/get_api_reference/lib/apiReferenceResources.js.map +1 -0
  63. package/lib/tools/get_api_reference/lib/formatSymbol.d.ts +24 -0
  64. package/lib/tools/get_api_reference/lib/formatSymbol.js +109 -0
  65. package/lib/tools/get_api_reference/lib/formatSymbol.js.map +1 -0
  66. package/lib/tools/get_api_reference/schema.d.ts +16 -0
  67. package/lib/tools/get_api_reference/schema.js +12 -0
  68. package/lib/tools/get_api_reference/schema.js.map +1 -0
  69. package/lib/tools/get_guidelines/guidelines.d.ts +1 -0
  70. package/lib/tools/get_guidelines/guidelines.js +6 -0
  71. package/lib/tools/get_guidelines/guidelines.js.map +1 -0
  72. package/lib/tools/get_guidelines/index.d.ts +3 -0
  73. package/lib/tools/get_guidelines/index.js +30 -0
  74. package/lib/tools/get_guidelines/index.js.map +1 -0
  75. package/lib/tools/get_project_info/getProjectInfo.d.ts +2 -0
  76. package/lib/tools/get_project_info/getProjectInfo.js +205 -0
  77. package/lib/tools/get_project_info/getProjectInfo.js.map +1 -0
  78. package/lib/tools/get_project_info/index.d.ts +3 -0
  79. package/lib/tools/get_project_info/index.js +28 -0
  80. package/lib/tools/get_project_info/index.js.map +1 -0
  81. package/lib/tools/get_project_info/schema.d.ts +87 -0
  82. package/lib/tools/get_project_info/schema.js +28 -0
  83. package/lib/tools/get_project_info/schema.js.map +1 -0
  84. package/lib/tools/get_version_info/getVersionInfo.d.ts +8 -0
  85. package/lib/tools/get_version_info/getVersionInfo.js +41 -0
  86. package/lib/tools/get_version_info/getVersionInfo.js.map +1 -0
  87. package/lib/tools/get_version_info/index.d.ts +9 -0
  88. package/lib/tools/get_version_info/index.js +33 -0
  89. package/lib/tools/get_version_info/index.js.map +1 -0
  90. package/lib/tools/get_version_info/schema.d.ts +66 -0
  91. package/lib/tools/get_version_info/schema.js +16 -0
  92. package/lib/tools/get_version_info/schema.js.map +1 -0
  93. package/lib/tools/get_version_info/types.d.ts +5 -0
  94. package/lib/tools/get_version_info/types.js +2 -0
  95. package/lib/tools/get_version_info/types.js.map +1 -0
  96. package/lib/tools/run_ui5_linter/index.d.ts +3 -0
  97. package/lib/tools/run_ui5_linter/index.js +86 -0
  98. package/lib/tools/run_ui5_linter/index.js.map +1 -0
  99. package/lib/tools/run_ui5_linter/migrationGuides.d.ts +6 -0
  100. package/lib/tools/run_ui5_linter/migrationGuides.js +88 -0
  101. package/lib/tools/run_ui5_linter/migrationGuides.js.map +1 -0
  102. package/lib/tools/run_ui5_linter/resultContext.d.ts +3 -0
  103. package/lib/tools/run_ui5_linter/resultContext.js +236 -0
  104. package/lib/tools/run_ui5_linter/resultContext.js.map +1 -0
  105. package/lib/tools/run_ui5_linter/runUi5Linter.d.ts +2 -0
  106. package/lib/tools/run_ui5_linter/runUi5Linter.js +72 -0
  107. package/lib/tools/run_ui5_linter/runUi5Linter.js.map +1 -0
  108. package/lib/tools/run_ui5_linter/schema.d.ts +340 -0
  109. package/lib/tools/run_ui5_linter/schema.js +55 -0
  110. package/lib/tools/run_ui5_linter/schema.js.map +1 -0
  111. package/lib/utils/cdnHelper.d.ts +9 -0
  112. package/lib/utils/cdnHelper.js +50 -0
  113. package/lib/utils/cdnHelper.js.map +1 -0
  114. package/lib/utils/dataStorageHelper.d.ts +2 -0
  115. package/lib/utils/dataStorageHelper.js +65 -0
  116. package/lib/utils/dataStorageHelper.js.map +1 -0
  117. package/lib/utils/ui5Framework.d.ts +4 -0
  118. package/lib/utils/ui5Framework.js +6 -0
  119. package/lib/utils/ui5Framework.js.map +1 -0
  120. package/lib/utils.d.ts +10 -0
  121. package/lib/utils.js +87 -0
  122. package/lib/utils.js.map +1 -0
  123. package/npm-shrinkwrap.json +7880 -0
  124. package/package.json +121 -0
  125. package/resources/docs/1.136.7/00737d6c1b864dc3ab72ef56611491c4.md +155 -0
  126. package/resources/docs/1.136.7/0187ea5e2eff4166b0453b9dcc8fc64f.md +164 -0
  127. package/resources/docs/1.136.7/032be2cb2e1d4115af20862673bedcdb.md +12 -0
  128. package/resources/docs/1.136.7/28fcd55b04654977b63dacbee0552712.md +317 -0
  129. package/resources/docs/1.136.7/676b636446c94eada183b1218a824717.md +135 -0
  130. package/resources/docs/1.136.7/a87ca843bcee469f82a9072927a7dcdb.md +355 -0
  131. package/resources/docs/1.136.7/b0fb4de7364f4bcbb053a99aa645affe.md +126 -0
  132. package/resources/docs/1.136.7/fe1a6dba940e479fb7c3bc753f92b28c.md +670 -0
  133. package/resources/docs/1.136.7/index.json +58 -0
  134. package/resources/guidelines.md +104 -0
  135. package/resources/migrationGuides/deprecated-controller-factory.md +116 -0
  136. package/resources/migrationGuides/deprecated-getLibraryResourceBundle.md +62 -0
  137. package/resources/migrationGuides/deprecated-jquery-sap-require.md +141 -0
  138. package/resources/migrationGuides/deprecated-messagePage.md +162 -0
  139. package/resources/migrationGuides/deprecated-table-table-property.md +154 -0
  140. package/resources/template-js/LICENSE +201 -0
  141. package/resources/template-js/README.md +87 -0
  142. package/resources/template-js/_.editorconfig +22 -0
  143. package/resources/template-js/_.gitignore +17 -0
  144. package/resources/template-js/eslint.config.js +68 -0
  145. package/resources/template-js/karma-ci-cov.conf.js +20 -0
  146. package/resources/template-js/karma-ci.conf.js +9 -0
  147. package/resources/template-js/karma.conf.js +9 -0
  148. package/resources/template-js/package.json +34 -0
  149. package/resources/template-js/ui5-dist.yaml +18 -0
  150. package/resources/template-js/ui5.yaml +24 -0
  151. package/resources/template-js/webapp/Component.js +41 -0
  152. package/resources/template-js/webapp/controller/App.controller.js +10 -0
  153. package/resources/template-js/webapp/controller/BaseController.js +67 -0
  154. package/resources/template-js/webapp/controller/Main.controller.js +14 -0
  155. package/resources/template-js/webapp/i18n/i18n.properties +3 -0
  156. package/resources/template-js/webapp/i18n/i18n_en.properties +3 -0
  157. package/resources/template-js/webapp/index-cdn.html +34 -0
  158. package/resources/template-js/webapp/index.html +34 -0
  159. package/resources/template-js/webapp/manifest.json +103 -0
  160. package/resources/template-js/webapp/model/formatter.js +9 -0
  161. package/resources/template-js/webapp/model/models.js +11 -0
  162. package/resources/template-js/webapp/test/Test.qunit.html +16 -0
  163. package/resources/template-js/webapp/test/integration/HelloJourney.js +85 -0
  164. package/resources/template-js/webapp/test/integration/opaTests.qunit.js +1 -0
  165. package/resources/template-js/webapp/test/integration/pages/Main.js +112 -0
  166. package/resources/template-js/webapp/test/testsuite.qunit.html +18 -0
  167. package/resources/template-js/webapp/test/testsuite.qunit.js +37 -0
  168. package/resources/template-js/webapp/test/unit/controller/Main.qunit.js +11 -0
  169. package/resources/template-js/webapp/test/unit/unitTests.qunit.js +1 -0
  170. package/resources/template-js/webapp/test-lt1_124/integration/HelloJourney.js +85 -0
  171. package/resources/template-js/webapp/test-lt1_124/integration/opaTests.qunit.html +31 -0
  172. package/resources/template-js/webapp/test-lt1_124/integration/opaTests.qunit.js +11 -0
  173. package/resources/template-js/webapp/test-lt1_124/integration/pages/Main.js +112 -0
  174. package/resources/template-js/webapp/test-lt1_124/testsuite.qunit.html +13 -0
  175. package/resources/template-js/webapp/test-lt1_124/testsuite.qunit.js +9 -0
  176. package/resources/template-js/webapp/test-lt1_124/unit/controller/Main.qunit.js +11 -0
  177. package/resources/template-js/webapp/test-lt1_124/unit/unitTests.qunit.html +30 -0
  178. package/resources/template-js/webapp/test-lt1_124/unit/unitTests.qunit.js +12 -0
  179. package/resources/template-js/webapp/view/App.view.xml +9 -0
  180. package/resources/template-js/webapp/view/Main.view.xml +90 -0
  181. package/resources/template-ts/LICENSE +201 -0
  182. package/resources/template-ts/README.md +101 -0
  183. package/resources/template-ts/_.editorconfig +23 -0
  184. package/resources/template-ts/_.gitignore +18 -0
  185. package/resources/template-ts/_.nycrc.json +7 -0
  186. package/resources/template-ts/_tsconfig.json +21 -0
  187. package/resources/template-ts/eslint.config.mjs +27 -0
  188. package/resources/template-ts/package.json +40 -0
  189. package/resources/template-ts/ui5-coverage.yaml +40 -0
  190. package/resources/template-ts/ui5-dist.yaml +18 -0
  191. package/resources/template-ts/ui5.yaml +27 -0
  192. package/resources/template-ts/webapp/Component.ts +49 -0
  193. package/resources/template-ts/webapp/controller/App.controller.ts +11 -0
  194. package/resources/template-ts/webapp/controller/BaseController.ts +83 -0
  195. package/resources/template-ts/webapp/controller/Main.controller.ts +19 -0
  196. package/resources/template-ts/webapp/i18n/i18n.properties +3 -0
  197. package/resources/template-ts/webapp/i18n/i18n_en.properties +3 -0
  198. package/resources/template-ts/webapp/index-cdn.html +35 -0
  199. package/resources/template-ts/webapp/index.html +35 -0
  200. package/resources/template-ts/webapp/manifest.json +105 -0
  201. package/resources/template-ts/webapp/model/formatter.ts +5 -0
  202. package/resources/template-ts/webapp/model/models.ts +15 -0
  203. package/resources/template-ts/webapp/test/Test.qunit.html +16 -0
  204. package/resources/template-ts/webapp/test/integration/HelloJourney.ts +84 -0
  205. package/resources/template-ts/webapp/test/integration/opaTests.qunit.ts +2 -0
  206. package/resources/template-ts/webapp/test/integration/pages/MainPage.ts +112 -0
  207. package/resources/template-ts/webapp/test/testsuite.qunit.html +18 -0
  208. package/resources/template-ts/webapp/test/testsuite.qunit.ts +33 -0
  209. package/resources/template-ts/webapp/test/unit/controller/Main.qunit.ts +8 -0
  210. package/resources/template-ts/webapp/test/unit/unitTests.qunit.ts +2 -0
  211. package/resources/template-ts/webapp/test-lt1_124/integration/HelloJourney.ts +86 -0
  212. package/resources/template-ts/webapp/test-lt1_124/integration/opaTests.qunit.html +34 -0
  213. package/resources/template-ts/webapp/test-lt1_124/integration/opaTests.qunit.ts +8 -0
  214. package/resources/template-ts/webapp/test-lt1_124/integration/pages/MainPage.ts +112 -0
  215. package/resources/template-ts/webapp/test-lt1_124/testsuite.qunit.html +13 -0
  216. package/resources/template-ts/webapp/test-lt1_124/testsuite.qunit.ts +9 -0
  217. package/resources/template-ts/webapp/test-lt1_124/unit/controller/Main.qunit.ts +8 -0
  218. package/resources/template-ts/webapp/test-lt1_124/unit/unitTests.qunit.html +37 -0
  219. package/resources/template-ts/webapp/test-lt1_124/unit/unitTests.qunit.ts +8 -0
  220. package/resources/template-ts/webapp/view/App.view.xml +9 -0
  221. package/resources/template-ts/webapp/view/Main.view.xml +90 -0
@@ -0,0 +1,8 @@
1
+ import Main from "<%= appURI %>/controller/Main.controller";
2
+
3
+ QUnit.module("Sample Main controller test");
4
+
5
+ QUnit.test("The Main controller class has a <% if (!oDataEntitySet) { %>sayHello<% } else { %>onRowSelectionChange<% } %> method", function (assert) {
6
+ // as a very basic test example just check the presence of the "<% if (!oDataEntitySet) { %>sayHello<% } else { %>onRowSelectionChange<% } %>" method
7
+ assert.strictEqual(typeof Main.prototype.<% if (!oDataEntitySet) { %>sayHello<% } else { %>onRowSelectionChange<% } %>, "function");
8
+ });
@@ -0,0 +1,37 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta http-equiv="Cache-control" content="no-cache, no-store, must-revalidate" />
5
+ <meta http-equiv="Pragma" content="no-cache" />
6
+ <meta http-equiv="expires" content="0" />
7
+ <meta charset="utf-8" />
8
+ <title>Unit tests for the UI5 Application: <%= namespace %></title>
9
+ <script
10
+ id="sap-ui-bootstrap"
11
+ src="../../resources/sap-ui-core.js"<% if (gte1_120_0) { %>
12
+ data-sap-ui-resource-roots='{
13
+ "<%= appId %>": "../../",
14
+ "unit": "."
15
+ }'
16
+ data-sap-ui-compat-version="edge"<% } else { %>
17
+ data-sap-ui-resourceroots='{
18
+ "<%= appId %>": "../../",
19
+ "unit": "."
20
+ }'
21
+ data-sap-ui-compatVersion="edge"<% } %>
22
+ data-sap-ui-async="true"
23
+ ></script>
24
+ <link rel="stylesheet" type="text/css" href="../../resources/sap/ui/thirdparty/qunit-2.css" />
25
+ <script src="../../resources/sap/ui/thirdparty/qunit-2.js"></script>
26
+ <script src="../../resources/sap/ui/qunit/qunit-junit.js"></script>
27
+ <script src="../../resources/sap/ui/qunit/qunit-coverage.js"></script>
28
+ <script src="../../resources/sap/ui/thirdparty/sinon.js"></script>
29
+ <script src="../../resources/sap/ui/thirdparty/sinon-qunit.js"></script>
30
+
31
+ <script src="./unitTests.qunit.js"></script>
32
+ </head>
33
+ <body>
34
+ <div id="qunit"></div>
35
+ <div id="qunit-fixture"></div>
36
+ </body>
37
+ </html>
@@ -0,0 +1,8 @@
1
+ /* @sapUiRequire */
2
+ // https://api.qunitjs.com/config/autostart/
3
+ QUnit.config.autostart = false;
4
+
5
+ // import all your QUnit tests here
6
+ void Promise.all([import("unit/controller/Main.qunit")]).then(() => {
7
+ QUnit.start();
8
+ });
@@ -0,0 +1,9 @@
1
+ <mvc:View
2
+ controllerName="<%= appId %>.controller.App"
3
+ displayBlock="true"
4
+ xmlns="sap.m"
5
+ xmlns:mvc="sap.ui.core.mvc">
6
+
7
+ <App id="app" />
8
+
9
+ </mvc:View>
@@ -0,0 +1,90 @@
1
+ <mvc:View
2
+ controllerName="<%= appId %>.controller.Main"
3
+ displayBlock="true"
4
+ xmlns="sap.m"<% if (oDataV4Url) { %>
5
+ xmlns:f="sap.f"
6
+ xmlns:table="sap.ui.table"
7
+ xmlns:form="sap.ui.layout.form"<% } %>
8
+ xmlns:mvc="sap.ui.core.mvc"
9
+ xmlns:core="sap.ui.core"
10
+ core:require="{
11
+ formatter: '<%= appURI %>/model/formatter'
12
+ }">
13
+ <% if (!oDataEntitySet) { %><% if (gte1_98_0) { %>
14
+ <Page
15
+ title="{i18n>appTitle}"
16
+ id="page">
17
+ <content>
18
+ <IllustratedMessage
19
+ title="{i18n>appTitle}"
20
+ illustrationType="sapIllus-SuccessHighFive"<% if (gte1_104_0) { %>
21
+ enableVerticalResponsiveness="true"<% } %>
22
+ description="{i18n>appDescription}">
23
+ <additionalContent>
24
+ <Button
25
+ id="helloButton"
26
+ text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
27
+ press="sayHello" />
28
+ </additionalContent>
29
+ </IllustratedMessage>
30
+ </content>
31
+ </Page>
32
+ <% } else { %>
33
+ <MessagePage
34
+ title="{i18n>appTitle}"
35
+ text="{i18n>appTitle}"
36
+ icon="sap-icon://accept"
37
+ id="page"
38
+ description="{i18n>appDescription}">
39
+ <buttons>
40
+ <Button
41
+ id="helloButton"
42
+ text="{formatter: 'formatter.formatValue', path: 'i18n>btnText'}"
43
+ press="sayHello" />
44
+ </buttons>
45
+ </MessagePage>
46
+ <% } %><% } else { %>
47
+ <f:DynamicPage id="page">
48
+ <f:title>
49
+ <f:DynamicPageTitle>
50
+ <f:heading>
51
+ <Title text="{i18n>appTitle}"/>
52
+ </f:heading>
53
+ </f:DynamicPageTitle>
54
+ </f:title>
55
+ <f:header>
56
+ <f:DynamicPageHeader>
57
+ <f:content>
58
+ </f:content>
59
+ </f:DynamicPageHeader>
60
+ </f:header>
61
+ <f:content>
62
+ <VBox>
63
+ <table:Table
64
+ rows="{/<%= oDataEntitySet %>}"
65
+ selectionBehavior="RowOnly"
66
+ selectionMode="Single"
67
+ rowSelectionChange=".onRowSelectionChange">
68
+ <table:columns><% entityProperties.forEach(function(property) { %>
69
+ <table:Column>
70
+ <Label text="<%= property %>" />
71
+ <table:template>
72
+ <Text text="{path: '<%= property %>'}" wrapping="false" />
73
+ </table:template>
74
+ </table:Column>
75
+ <% }); %></table:columns>
76
+ </table:Table>
77
+ <Panel>
78
+ <form:SimpleForm
79
+ id="detailForm"
80
+ layout="ResponsiveGridLayout">
81
+ <form:content><% entityProperties.forEach(function(property) { %>
82
+ <Label text="<%= property %>" />
83
+ <Input value="{path: '<%= property %>'}" /><% }); %>
84
+ </form:content>
85
+ </form:SimpleForm>
86
+ </Panel>
87
+ </VBox>
88
+ </f:content>
89
+ </f:DynamicPage><% } %>
90
+ </mvc:View>