@sap-ux/fiori-elements-writer 2.0.2 → 2.0.4
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/index.js +16 -0
- package/dist/types.d.ts +4 -1
- package/package.json +4 -3
package/dist/index.js
CHANGED
|
@@ -37,6 +37,7 @@ const semver_1 = __importDefault(require("semver"));
|
|
|
37
37
|
const i18n_1 = require("./i18n");
|
|
38
38
|
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
39
39
|
const fpmConfig_1 = require("./fpmConfig");
|
|
40
|
+
const cap_config_writer_1 = require("@sap-ux/cap-config-writer");
|
|
40
41
|
exports.V2_FE_TYPES_AVAILABLE = '1.108.0';
|
|
41
42
|
/**
|
|
42
43
|
* Get TypeScript Ignore Glob Pattern.
|
|
@@ -176,6 +177,21 @@ async function generate(basePath, data, fs) {
|
|
|
176
177
|
: `test/flpSandbox.html?sap-ui-xx-viewCache=false#${feApp.app.flpAppId}`
|
|
177
178
|
}, fs);
|
|
178
179
|
}
|
|
180
|
+
if (feApp.service.capService) {
|
|
181
|
+
const hasCdsUi5PluginInfo = !!feApp.service.capService.cdsUi5PluginInfo;
|
|
182
|
+
const settings = {
|
|
183
|
+
appRoot: basePath,
|
|
184
|
+
packageName: feApp.package.name ?? '',
|
|
185
|
+
appId: feApp.app.id,
|
|
186
|
+
sapux: feApp.appOptions?.sapux,
|
|
187
|
+
enableTypescript: feApp.appOptions?.typescript,
|
|
188
|
+
// Enable CDS UI5 plugin and NPM workspaces if the CDS UI5 plugin info is present
|
|
189
|
+
enableCdsUi5Plugin: hasCdsUi5PluginInfo,
|
|
190
|
+
enableNPMWorkspaces: hasCdsUi5PluginInfo
|
|
191
|
+
};
|
|
192
|
+
// apply cap updates when service is cap
|
|
193
|
+
await (0, cap_config_writer_1.applyCAPUpdates)(fs, feApp.service.capService, settings);
|
|
194
|
+
}
|
|
179
195
|
return fs;
|
|
180
196
|
}
|
|
181
197
|
__exportStar(require("./types"), exports);
|
package/dist/types.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { Ui5App, App, AppOptions } from '@sap-ux/ui5-application-writer';
|
|
2
2
|
import type { OdataService } from '@sap-ux/odata-service-writer';
|
|
3
|
+
import type { CapServiceCdsInfo } from '@sap-ux/cap-config-writer';
|
|
3
4
|
export declare const TemplateType: {
|
|
4
5
|
readonly Worklist: "worklist";
|
|
5
6
|
readonly ListReportObjectPage: "lrop";
|
|
@@ -89,7 +90,9 @@ export interface FioriApp extends App {
|
|
|
89
90
|
}
|
|
90
91
|
export interface FioriElementsApp<T> extends Ui5App {
|
|
91
92
|
template: Template<T>;
|
|
92
|
-
service: Omit<OdataService, 'model'
|
|
93
|
+
service: Omit<OdataService, 'model'> & {
|
|
94
|
+
capService?: CapServiceCdsInfo;
|
|
95
|
+
};
|
|
93
96
|
app: FioriApp;
|
|
94
97
|
appOptions: Partial<AppOptions> & {
|
|
95
98
|
/**
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/fiori-elements-writer",
|
|
3
3
|
"description": "SAP Fiori elements application writer",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.4",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -29,10 +29,11 @@
|
|
|
29
29
|
"semver": "7.5.4",
|
|
30
30
|
"@sap-ux/odata-service-writer": "0.25.4",
|
|
31
31
|
"@sap-ux/ui5-application-writer": "1.2.9",
|
|
32
|
-
"@sap-ux/fe-fpm-writer": "0.
|
|
32
|
+
"@sap-ux/fe-fpm-writer": "0.32.0",
|
|
33
33
|
"@sap-ux/ui5-config": "0.26.1",
|
|
34
34
|
"@sap-ux/ui5-test-writer": "0.4.1",
|
|
35
|
-
"@sap-ux/fiori-generator-shared": "0.7.21"
|
|
35
|
+
"@sap-ux/fiori-generator-shared": "0.7.21",
|
|
36
|
+
"@sap-ux/cap-config-writer": "0.9.0"
|
|
36
37
|
},
|
|
37
38
|
"devDependencies": {
|
|
38
39
|
"@types/ejs": "3.1.2",
|