@sap-ux/fiori-elements-writer 0.10.0 → 0.11.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/index.js +3 -2
- package/dist/packageConfig.d.ts +6 -8
- package/dist/packageConfig.js +18 -19
- package/dist/types.d.ts +10 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -80,7 +80,7 @@ function getTypeScriptIgnoreGlob(feApp, coercedUI5Version) {
|
|
|
80
80
|
* @returns Reference to a mem-fs-editor
|
|
81
81
|
*/
|
|
82
82
|
function generate(basePath, data, fs) {
|
|
83
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
83
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
84
84
|
return __awaiter(this, void 0, void 0, function* () {
|
|
85
85
|
// Clone rather than modifying callers refs
|
|
86
86
|
const feApp = (0, cloneDeep_1.default)(data);
|
|
@@ -142,7 +142,8 @@ function generate(basePath, data, fs) {
|
|
|
142
142
|
sapClient: (_l = feApp.service) === null || _l === void 0 ? void 0 : _l.client,
|
|
143
143
|
flpAppId: feApp.app.flpAppId,
|
|
144
144
|
startFile: (_m = data === null || data === void 0 ? void 0 : data.app) === null || _m === void 0 ? void 0 : _m.startFile,
|
|
145
|
-
localStartFile: (_o = data === null || data === void 0 ? void 0 : data.app) === null || _o === void 0 ? void 0 : _o.localStartFile
|
|
145
|
+
localStartFile: (_o = data === null || data === void 0 ? void 0 : data.app) === null || _o === void 0 ? void 0 : _o.localStartFile,
|
|
146
|
+
generateIndex: (_p = feApp.appOptions) === null || _p === void 0 ? void 0 : _p.generateIndex
|
|
146
147
|
})));
|
|
147
148
|
fs.writeJSON(packagePath, packageJson);
|
|
148
149
|
if (addTest) {
|
package/dist/packageConfig.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
import type { PackageJsonScripts } from './types';
|
|
1
2
|
/**
|
|
2
|
-
* Get
|
|
3
|
+
* Get an object reflecting the scripts that need to be added to the package.json.
|
|
3
4
|
*
|
|
4
5
|
* @param options Collection of mostly optional settings.
|
|
5
6
|
* @param options.localOnly no server available
|
|
@@ -9,10 +10,11 @@
|
|
|
9
10
|
* @param options.flpAppId local FLP id
|
|
10
11
|
* @param options.startFile path that should be opened with the start script
|
|
11
12
|
* @param options.localStartFile path that should be opend with the start-local script
|
|
13
|
+
* @param options.generateIndex exclude the start-noflp script
|
|
12
14
|
* @description Generates the package.json scripts
|
|
13
15
|
* @returns package.json scripts
|
|
14
16
|
*/
|
|
15
|
-
export declare function getPackageJsonTasks({ localOnly, addMock, addTest, sapClient, flpAppId, startFile, localStartFile }: {
|
|
17
|
+
export declare function getPackageJsonTasks({ localOnly, addMock, addTest, sapClient, flpAppId, startFile, localStartFile, generateIndex }: {
|
|
16
18
|
localOnly: boolean;
|
|
17
19
|
addMock: boolean;
|
|
18
20
|
addTest: boolean;
|
|
@@ -20,10 +22,6 @@ export declare function getPackageJsonTasks({ localOnly, addMock, addTest, sapCl
|
|
|
20
22
|
flpAppId?: string;
|
|
21
23
|
startFile?: string;
|
|
22
24
|
localStartFile?: string;
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
'start-local': string;
|
|
26
|
-
'start-noflp': string;
|
|
27
|
-
'start-mock'?: string;
|
|
28
|
-
};
|
|
25
|
+
generateIndex?: boolean;
|
|
26
|
+
}): PackageJsonScripts;
|
|
29
27
|
//# sourceMappingURL=packageConfig.d.ts.map
|
package/dist/packageConfig.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.getPackageJsonTasks = void 0;
|
|
4
4
|
const i18n_1 = require("./i18n");
|
|
5
5
|
/**
|
|
6
|
-
* Get
|
|
6
|
+
* Get an object reflecting the scripts that need to be added to the package.json.
|
|
7
7
|
*
|
|
8
8
|
* @param options Collection of mostly optional settings.
|
|
9
9
|
* @param options.localOnly no server available
|
|
@@ -13,10 +13,11 @@ const i18n_1 = require("./i18n");
|
|
|
13
13
|
* @param options.flpAppId local FLP id
|
|
14
14
|
* @param options.startFile path that should be opened with the start script
|
|
15
15
|
* @param options.localStartFile path that should be opend with the start-local script
|
|
16
|
+
* @param options.generateIndex exclude the start-noflp script
|
|
16
17
|
* @description Generates the package.json scripts
|
|
17
18
|
* @returns package.json scripts
|
|
18
19
|
*/
|
|
19
|
-
function getPackageJsonTasks({ localOnly, addMock = true, addTest = false, sapClient, flpAppId = '', startFile, localStartFile }) {
|
|
20
|
+
function getPackageJsonTasks({ localOnly, addMock = true, addTest = false, sapClient, flpAppId = '', startFile, localStartFile, generateIndex = true }) {
|
|
20
21
|
// Build search param part of preview launch url
|
|
21
22
|
const searchParamList = [];
|
|
22
23
|
if (sapClient) {
|
|
@@ -33,24 +34,22 @@ function getPackageJsonTasks({ localOnly, addMock = true, addTest = false, sapCl
|
|
|
33
34
|
? `echo \\"${(0, i18n_1.t)('info.mockOnlyWarning')}\\"`
|
|
34
35
|
: `fiori run --open "${startFile || 'test/flpSandbox.html'}${params}"`;
|
|
35
36
|
const startLocalCommand = `fiori run --config ./ui5-local.yaml --open "${localStartFile || 'test/flpSandbox.html'}${params}"`;
|
|
36
|
-
const
|
|
37
|
-
? `echo \\"${(0, i18n_1.t)('info.mockOnlyWarning')}\\"`
|
|
38
|
-
: `fiori run --open "${'index.html'}${searchParam}"`;
|
|
39
|
-
const mockTask = `fiori run --config ./ui5-mock.yaml --open "test/flpSandbox.html${params}"`;
|
|
40
|
-
const testTask = 'fiori run --config ./ui5-mock.yaml --open "test/integration/opaTests.qunit.html"';
|
|
41
|
-
return Object.assign({
|
|
37
|
+
const scripts = {
|
|
42
38
|
start: startCommand,
|
|
43
|
-
'start-local': startLocalCommand
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
'
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
39
|
+
'start-local': startLocalCommand
|
|
40
|
+
};
|
|
41
|
+
if (generateIndex) {
|
|
42
|
+
scripts['start-noflp'] = localOnly
|
|
43
|
+
? `echo \\"${(0, i18n_1.t)('info.mockOnlyWarning')}\\"`
|
|
44
|
+
: `fiori run --open "${'index.html'}${searchParam}"`;
|
|
45
|
+
}
|
|
46
|
+
if (addMock) {
|
|
47
|
+
scripts['start-mock'] = `fiori run --config ./ui5-mock.yaml --open "test/flpSandbox.html${params}"`;
|
|
48
|
+
}
|
|
49
|
+
if (addTest) {
|
|
50
|
+
scripts['int-test'] = 'fiori run --config ./ui5-mock.yaml --open "test/integration/opaTests.qunit.html"';
|
|
51
|
+
}
|
|
52
|
+
return scripts;
|
|
54
53
|
}
|
|
55
54
|
exports.getPackageJsonTasks = getPackageJsonTasks;
|
|
56
55
|
//# sourceMappingURL=packageConfig.js.map
|
package/dist/types.d.ts
CHANGED
|
@@ -92,4 +92,14 @@ export interface FioriElementsApp<T> extends Ui5App {
|
|
|
92
92
|
};
|
|
93
93
|
}
|
|
94
94
|
export { OdataVersion } from '@sap-ux/odata-service-writer';
|
|
95
|
+
/**
|
|
96
|
+
Represents a set of scripts defined in a package.json file.
|
|
97
|
+
*/
|
|
98
|
+
export interface PackageJsonScripts {
|
|
99
|
+
start: string;
|
|
100
|
+
'start-local': string;
|
|
101
|
+
'start-noflp'?: string;
|
|
102
|
+
'start-mock'?: string;
|
|
103
|
+
'int-test'?: string;
|
|
104
|
+
}
|
|
95
105
|
//# sourceMappingURL=types.d.ts.map
|
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": "0.
|
|
4
|
+
"version": "0.11.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
],
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@sap-ux/odata-service-writer": "0.14.19",
|
|
24
|
-
"@sap-ux/ui5-application-writer": "0.
|
|
24
|
+
"@sap-ux/ui5-application-writer": "0.21.0",
|
|
25
25
|
"@sap-ux/fe-fpm-writer": "0.18.7",
|
|
26
26
|
"@sap-ux/ui5-config": "0.16.5",
|
|
27
27
|
"@sap-ux/ui5-test-writer": "0.1.7",
|