@sap-ux/cap-config-writer 0.0.2 → 0.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.
@@ -1,4 +1,5 @@
1
1
  import type { Editor } from 'mem-fs-editor';
2
+ export { hasMinCdsVersion } from './package-json';
2
3
  /**
3
4
  * Enable workspace and cds-plugin-ui5 for given CAP project.
4
5
  *
@@ -9,11 +9,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.checkCdsUi5PluginEnabled = exports.enableCdsUi5Plugin = void 0;
12
+ exports.checkCdsUi5PluginEnabled = exports.enableCdsUi5Plugin = exports.hasMinCdsVersion = void 0;
13
13
  const path_1 = require("path");
14
14
  const mem_fs_1 = require("mem-fs");
15
15
  const mem_fs_editor_1 = require("mem-fs-editor");
16
16
  const package_json_1 = require("./package-json");
17
+ var package_json_2 = require("./package-json");
18
+ Object.defineProperty(exports, "hasMinCdsVersion", { enumerable: true, get: function () { return package_json_2.hasMinCdsVersion; } });
17
19
  /**
18
20
  * Enable workspace and cds-plugin-ui5 for given CAP project.
19
21
  *
@@ -19,7 +19,8 @@ export declare function enableWorkspaces(basePath: string, packageJson: Package)
19
19
  */
20
20
  export declare function addCdsPluginUi5(packageJson: Package): void;
21
21
  /**
22
- * Check if the min version of @sap/cds is present in the package.json.
22
+ * Check if package.json has dependency to the minimum min version of @sap/cds,
23
+ * that is required to enable cds-plugin-ui.
23
24
  *
24
25
  * @param packageJson - the parsed package.json
25
26
  * @returns - true: min cds version is present; false: cds version needs update
@@ -69,7 +69,8 @@ function addCdsPluginUi5(packageJson) {
69
69
  }
70
70
  exports.addCdsPluginUi5 = addCdsPluginUi5;
71
71
  /**
72
- * Check if the min version of @sap/cds is present in the package.json.
72
+ * Check if package.json has dependency to the minimum min version of @sap/cds,
73
+ * that is required to enable cds-plugin-ui.
73
74
  *
74
75
  * @param packageJson - the parsed package.json
75
76
  * @returns - true: min cds version is present; false: cds version needs update
package/dist/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
- export { checkCdsUi5PluginEnabled, enableCdsUi5Plugin } from './cap-config';
1
+ export { checkCdsUi5PluginEnabled, enableCdsUi5Plugin, hasMinCdsVersion } from './cap-config';
2
2
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -1,7 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.enableCdsUi5Plugin = exports.checkCdsUi5PluginEnabled = void 0;
3
+ exports.hasMinCdsVersion = exports.enableCdsUi5Plugin = exports.checkCdsUi5PluginEnabled = void 0;
4
4
  var cap_config_1 = require("./cap-config");
5
5
  Object.defineProperty(exports, "checkCdsUi5PluginEnabled", { enumerable: true, get: function () { return cap_config_1.checkCdsUi5PluginEnabled; } });
6
6
  Object.defineProperty(exports, "enableCdsUi5Plugin", { enumerable: true, get: function () { return cap_config_1.enableCdsUi5Plugin; } });
7
+ Object.defineProperty(exports, "hasMinCdsVersion", { enumerable: true, get: function () { return cap_config_1.hasMinCdsVersion; } });
7
8
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/cap-config-writer",
3
3
  "description": "Add or update configuration for SAP CAP projects",
4
- "version": "0.0.2",
4
+ "version": "0.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",