@sap-ux/ui5-application-writer 0.19.2 → 0.21.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 CHANGED
@@ -27,7 +27,7 @@ const defaults_1 = require("./data/defaults");
27
27
  * @returns the updated memfs editor instance
28
28
  */
29
29
  function generate(basePath, ui5AppConfig, fs) {
30
- var _a, _b;
30
+ var _a, _b, _c;
31
31
  return __awaiter(this, void 0, void 0, function* () {
32
32
  if (!fs) {
33
33
  fs = (0, mem_fs_editor_1.create)((0, mem_fs_1.create)());
@@ -35,6 +35,9 @@ function generate(basePath, ui5AppConfig, fs) {
35
35
  const ui5App = (0, data_1.mergeWithDefaults)(ui5AppConfig);
36
36
  const tmplPath = (0, path_1.join)(__dirname, '..', 'templates');
37
37
  const ignore = [((_a = ui5AppConfig.appOptions) === null || _a === void 0 ? void 0 : _a.typescript) ? '**/*.js' : '**/*.ts'];
38
+ if (((_b = ui5AppConfig.appOptions) === null || _b === void 0 ? void 0 : _b.generateIndex) === false) {
39
+ ignore.push('**/webapp/index.html');
40
+ }
38
41
  fs.copyTpl((0, path_1.join)(tmplPath, 'core', '**/*.*'), (0, path_1.join)(basePath), ui5App, undefined, {
39
42
  globOptions: { dot: true, ignore },
40
43
  processDestinationPath: (filePath) => filePath.replace(/gitignore.tmpl/g, '.gitignore')
@@ -44,7 +47,7 @@ function generate(basePath, ui5AppConfig, fs) {
44
47
  const ui5Config = yield ui5_config_1.UI5Config.newInstance(fs.read(ui5ConfigPath));
45
48
  ui5Config.addFioriToolsProxydMiddleware({
46
49
  ui5: {
47
- url: (_b = ui5App.ui5) === null || _b === void 0 ? void 0 : _b.frameworkUrl
50
+ url: (_c = ui5App.ui5) === null || _c === void 0 ? void 0 : _c.frameworkUrl
48
51
  }
49
52
  });
50
53
  ui5Config.addFioriToolsAppReloadMiddleware();
package/dist/types.d.ts CHANGED
@@ -64,6 +64,10 @@ export interface AppOptions {
64
64
  * Enable support for importing functionality from npm packages in UI5 applications
65
65
  */
66
66
  npmPackageConsumption: boolean;
67
+ /**
68
+ * Excludes the index.html from the template and does not add the `start-noflp` script in package.json
69
+ */
70
+ generateIndex?: boolean;
67
71
  }
68
72
  export interface Ui5App {
69
73
  app: App;
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aui5-application-writer"
11
11
  },
12
- "version": "0.19.2",
12
+ "version": "0.21.0",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -1,14 +1,41 @@
1
1
  {
2
2
  "root": true,
3
3
  "plugins": [
4
- "eslint-plugin-fiori-custom"
4
+ "fiori-custom"
5
5
  ],
6
- "extends": [
7
- "./node_modules/eslint-plugin-fiori-custom/configure.eslintrc"
8
- ],
9
- "ignorePatterns": [
10
- "webapp/localService/**",
11
- "webapp/test/**",
12
- "dist/**"
6
+ "overrides": [
7
+ {
8
+ "files": [
9
+ "**/*.*"
10
+ ],
11
+ "excludedFiles": [
12
+ "test/**",
13
+ "target/**",
14
+ "webapp/test/**",
15
+ "webapp/localservice/**",
16
+ "backup/**",
17
+ "Gruntfile.js",
18
+ "changes_preview.js",
19
+ "gulpfile.js"
20
+ ],
21
+ "plugins": [
22
+ "fiori-custom"
23
+ ],
24
+ "extends": [
25
+ "eslint:recommended",
26
+ "plugin:fiori-custom/fioriToolsDefault"
27
+ ]
28
+ },
29
+ {
30
+ "files": [
31
+ "webapp/test/**"
32
+ ],
33
+ "plugins": [
34
+ "fiori-custom"
35
+ ],
36
+ "extends": [
37
+ "plugin:fiori-custom/fioriToolsTestcode"
38
+ ]
39
+ }
13
40
  ]
14
- }
41
+ }
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "scripts": {
3
- "lint": "eslint ./ --rulesdir ./node_modules/eslint-plugin-fiori-custom/lib/rules/"
3
+ "lint": "eslint ./"
4
4
  },
5
5
  "devDependencies": {
6
6
  "eslint": "7.32.0",
7
- "eslint-plugin-fiori-custom": "2.2.1",
7
+ "eslint-plugin-fiori-custom": "2.6.7",
8
8
  "@babel/eslint-parser": "7.14.7"
9
9
  }
10
10
  }
@@ -65,7 +65,7 @@
65
65
  }
66
66
  resolve(result);
67
67
  })
68
- .fail(function (error) {
68
+ .fail(function () {
69
69
  reject(new Error("Could not fetch manifest at '" + manifestPath));
70
70
  });
71
71
  });
@@ -131,7 +131,7 @@
131
131
  };
132
132
  })(sap);
133
133
 
134
- /*eslint-disable sap-browser-api-warning, sap-no-dom-access*/
134
+ /*eslint-disable fiori-custom/sap-browser-api-warning, fiori-custom/sap-no-dom-access*/
135
135
  var currentScript = document.getElementById("locate-reuse-libs");
136
136
  if (!currentScript) {
137
137
  currentScript = document.currentScript;