@sap-ux/ui5-application-writer 1.7.16 → 1.7.18

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.d.ts CHANGED
@@ -29,6 +29,7 @@ declare function isTypescriptEnabled(basePath: string, fs?: Editor): Promise<boo
29
29
  declare function enableTypescript(basePath: string, fs?: Editor): Promise<Editor>;
30
30
  export { Ui5App, generate, enableTypescript, isTypescriptEnabled };
31
31
  export { App, Package, UI5, AppOptions };
32
+ export { addEslintFeature } from './options';
32
33
  export { compareUI5VersionGte, ui5LtsVersion_1_120, ui5LtsVersion_1_71, processDestinationPath, getTemplateVersionPath } from './utils';
33
34
  export { getManifestVersion } from './data/defaults';
34
35
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getManifestVersion = exports.getTemplateVersionPath = exports.processDestinationPath = exports.ui5LtsVersion_1_71 = exports.ui5LtsVersion_1_120 = exports.compareUI5VersionGte = void 0;
3
+ exports.getManifestVersion = exports.getTemplateVersionPath = exports.processDestinationPath = exports.ui5LtsVersion_1_71 = exports.ui5LtsVersion_1_120 = exports.compareUI5VersionGte = exports.addEslintFeature = void 0;
4
4
  exports.generate = generate;
5
5
  exports.enableTypescript = enableTypescript;
6
6
  exports.isTypescriptEnabled = isTypescriptEnabled;
@@ -167,6 +167,8 @@ async function enableTypescript(basePath, fs) {
167
167
  fs.write(ui5ConfigPath, ui5Config.toString());
168
168
  return fs;
169
169
  }
170
+ var options_2 = require("./options");
171
+ Object.defineProperty(exports, "addEslintFeature", { enumerable: true, get: function () { return options_2.addEslintFeature; } });
170
172
  var utils_2 = require("./utils");
171
173
  Object.defineProperty(exports, "compareUI5VersionGte", { enumerable: true, get: function () { return utils_2.compareUI5VersionGte; } });
172
174
  Object.defineProperty(exports, "ui5LtsVersion_1_120", { enumerable: true, get: function () { return utils_2.ui5LtsVersion_1_120; } });
package/dist/options.d.ts CHANGED
@@ -42,6 +42,13 @@ export declare function enableNpmPackageConsumption(input: FeatureInput): Promis
42
42
  * @param ui5Configs available UI5 configs
43
43
  */
44
44
  export declare function applyOptionalFeatures(ui5App: Ui5App, fs: Editor, basePath: string, tmplPath: string, ui5Configs: UI5Config[]): Promise<void>;
45
+ /**
46
+ * Adds eslint configuration to a project.
47
+ *
48
+ * @param basePath - base path to be used for adding the config
49
+ * @param fs - file system reference
50
+ */
51
+ export declare function addEslintFeature(basePath: string, fs: Editor): Promise<void>;
45
52
  /**
46
53
  * Generates the resource URL based on the project type and ui5 framework details.
47
54
  *
package/dist/options.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.enableTypescript = enableTypescript;
4
4
  exports.enableNpmPackageConsumption = enableNpmPackageConsumption;
5
5
  exports.applyOptionalFeatures = applyOptionalFeatures;
6
+ exports.addEslintFeature = addEslintFeature;
6
7
  exports.getTemplateOptions = getTemplateOptions;
7
8
  const node_path_1 = require("node:path");
8
9
  const ejs_1 = require("ejs");
@@ -110,6 +111,26 @@ async function applyOptionalFeatures(ui5App, fs, basePath, tmplPath, ui5Configs)
110
111
  }
111
112
  }
112
113
  }
114
+ /**
115
+ * Adds eslint configuration to a project.
116
+ *
117
+ * @param basePath - base path to be used for adding the config
118
+ * @param fs - file system reference
119
+ */
120
+ async function addEslintFeature(basePath, fs) {
121
+ const input = {
122
+ tmplPath: (0, node_path_1.join)(__dirname, '../templates'),
123
+ basePath: basePath,
124
+ fs: fs,
125
+ ui5Configs: [], // the ui5Configs is not used for eslint configuration
126
+ ui5App: {
127
+ app: {
128
+ id: 'dummy' // the app config is not used for eslint configuration
129
+ }
130
+ }
131
+ };
132
+ await copyTemplates('eslint', input);
133
+ }
113
134
  /**
114
135
  * Generates the resource URL based on the project type and ui5 framework details.
115
136
  *
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": "1.7.16",
12
+ "version": "1.7.18",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -27,18 +27,18 @@
27
27
  "mem-fs": "2.1.0",
28
28
  "mem-fs-editor": "9.4.0",
29
29
  "semver": "7.7.4",
30
- "@sap-ux/ui5-config": "0.29.20"
30
+ "@sap-ux/ui5-config": "0.29.21"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/ejs": "3.1.2",
34
- "@types/fs-extra": "9.0.13",
34
+ "@types/fs-extra": "11.0.4",
35
35
  "@types/lodash": "4.14.202",
36
36
  "@types/mem-fs": "1.1.2",
37
37
  "@types/mem-fs-editor": "7.0.1",
38
38
  "@types/semver": "7.7.1",
39
- "fs-extra": "10.1.0",
40
- "@sap-ux/eslint-plugin-fiori-tools": "9.7.3",
41
- "@sap-ux/project-access": "1.35.11"
39
+ "fs-extra": "11.3.4",
40
+ "@sap-ux/eslint-plugin-fiori-tools": "9.7.4",
41
+ "@sap-ux/project-access": "1.35.12"
42
42
  },
43
43
  "engines": {
44
44
  "node": ">=20.x"