@sap-ux/app-config-writer 1.0.11 → 1.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.
@@ -11,8 +11,9 @@ import type { ToolsLogger } from '@sap-ux/logger';
11
11
  * @param {string} [yamlPath] - Optional path to the `ui5.yaml` configuration file.
12
12
  * @param {ToolsLogger} [logger] - Optional logger instance for logging messages.
13
13
  * @param {Editor} [fs] - Optional `mem-fs-editor` instance for file system operations. If not provided, a new instance will be created.
14
+ * @param {boolean} [updatePackage] - Optional flag to update the `package.json` file. Defaults to true.
14
15
  * @returns {Promise<Editor>} A promise that resolves to the updated `mem-fs-editor` instance.
15
16
  * @throws {Error} If minimum UI5 version requirement is not met (EDMX: ≥1.121.0, CAP: ≥1.149.0).
16
17
  */
17
- export declare function enableCardGeneratorConfig(basePath: string, yamlPath?: string, logger?: ToolsLogger, fs?: Editor): Promise<Editor>;
18
+ export declare function enableCardGeneratorConfig(basePath: string, yamlPath?: string, logger?: ToolsLogger, fs?: Editor, updatePackage?: boolean): Promise<Editor>;
18
19
  //# sourceMappingURL=index.d.ts.map
@@ -85,16 +85,19 @@ async function updatePackageJson(basePath, fs, yamlPath, logger) {
85
85
  * @param {string} [yamlPath] - Optional path to the `ui5.yaml` configuration file.
86
86
  * @param {ToolsLogger} [logger] - Optional logger instance for logging messages.
87
87
  * @param {Editor} [fs] - Optional `mem-fs-editor` instance for file system operations. If not provided, a new instance will be created.
88
+ * @param {boolean} [updatePackage] - Optional flag to update the `package.json` file. Defaults to true.
88
89
  * @returns {Promise<Editor>} A promise that resolves to the updated `mem-fs-editor` instance.
89
90
  * @throws {Error} If minimum UI5 version requirement is not met (EDMX: ≥1.121.0, CAP: ≥1.149.0).
90
91
  */
91
- export async function enableCardGeneratorConfig(basePath, yamlPath, logger, fs) {
92
+ export async function enableCardGeneratorConfig(basePath, yamlPath, logger, fs, updatePackage = true) {
92
93
  fs = fs ?? create(createStorage());
93
94
  // asserts minimum UI5 version requirement before proceeding
94
95
  await ensureMinUI5Version(basePath, fs);
95
96
  await updateMiddlewaresForPreview(fs, basePath, yamlPath, logger);
96
97
  await updateMiddlewareConfigWithGeneratorPath(fs, basePath, yamlPath, logger);
97
- await updatePackageJson(basePath, fs, yamlPath, logger);
98
+ if (updatePackage) {
99
+ await updatePackageJson(basePath, fs, yamlPath, logger);
100
+ }
98
101
  return fs;
99
102
  }
100
103
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/app-config-writer",
3
3
  "description": "Add or update configuration for SAP Fiori tools application",
4
- "version": "1.0.11",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -13,6 +13,16 @@
13
13
  },
14
14
  "license": "Apache-2.0",
15
15
  "main": "dist/index.js",
16
+ "exports": {
17
+ ".": {
18
+ "types": "./dist/index.d.ts",
19
+ "default": "./dist/index.js"
20
+ },
21
+ "./cards-config": {
22
+ "types": "./dist/cards-config/index.d.ts",
23
+ "default": "./dist/cards-config/index.js"
24
+ }
25
+ },
16
26
  "files": [
17
27
  "LICENSE",
18
28
  "dist",
@@ -29,8 +39,8 @@
29
39
  "prompts": "2.4.2",
30
40
  "semver": "7.7.4",
31
41
  "cross-spawn": "7.0.6",
32
- "@sap-ux/axios-extension": "2.0.3",
33
42
  "@sap-ux/ui5-application-writer": "2.0.4",
43
+ "@sap-ux/axios-extension": "2.0.3",
34
44
  "@sap-ux/btp-utils": "2.0.2",
35
45
  "@sap-ux/logger": "1.0.1",
36
46
  "@sap-ux/project-access": "2.1.2",
@@ -47,7 +57,7 @@
47
57
  "@types/cross-spawn": "6.0.6",
48
58
  "axios": "1.16.0",
49
59
  "nock": "14.0.11",
50
- "@sap-ux/preview-middleware": "1.0.25"
60
+ "@sap-ux/preview-middleware": "1.0.26"
51
61
  },
52
62
  "engines": {
53
63
  "node": ">=22.x"