@sap-ux/odata-service-writer 0.15.1 → 0.16.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.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import type { Editor } from 'mem-fs-editor';
2
- import { OdataService, OdataVersion } from './types';
2
+ import { OdataService, OdataVersion, ServiceType } from './types';
3
3
  /**
4
4
  * Try finding a package.json and a ui5.yaml for the given project by looking upwards in the folder hierachy.
5
5
  *
@@ -21,5 +21,5 @@ export declare function findProjectFiles(basePath: string, fs: Editor): Promise<
21
21
  * @returns {Promise<Editor>} the updated memfs editor instance
22
22
  */
23
23
  declare function generate(basePath: string, service: OdataService, fs?: Editor): Promise<Editor>;
24
- export { generate, OdataVersion, OdataService };
24
+ export { generate, OdataVersion, OdataService, ServiceType };
25
25
  //# sourceMappingURL=index.d.ts.map
package/dist/index.js CHANGED
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.OdataVersion = exports.generate = exports.findProjectFiles = void 0;
15
+ exports.ServiceType = exports.OdataVersion = exports.generate = exports.findProjectFiles = void 0;
16
16
  const path_1 = require("path");
17
17
  const mem_fs_1 = require("mem-fs");
18
18
  const mem_fs_editor_1 = require("mem-fs-editor");
@@ -23,6 +23,7 @@ const data_1 = require("./data");
23
23
  const i18n_1 = require("./i18n");
24
24
  const types_1 = require("./types");
25
25
  Object.defineProperty(exports, "OdataVersion", { enumerable: true, get: function () { return types_1.OdataVersion; } });
26
+ Object.defineProperty(exports, "ServiceType", { enumerable: true, get: function () { return types_1.ServiceType; } });
26
27
  /**
27
28
  * Ensures the existence of the given files in the provided base path. If a file in the provided list does not exit, an error would be thrown.
28
29
  *
package/dist/types.d.ts CHANGED
@@ -7,6 +7,10 @@ export interface NamespaceAlias {
7
7
  namespace: string;
8
8
  alias: string;
9
9
  }
10
+ export declare enum ServiceType {
11
+ EDMX = "edmx",
12
+ CDS = "cds"
13
+ }
10
14
  export interface OdataService {
11
15
  url?: string;
12
16
  client?: string;
@@ -14,6 +18,7 @@ export interface OdataService {
14
18
  name: string;
15
19
  instance?: string;
16
20
  };
21
+ type?: ServiceType;
17
22
  path?: string;
18
23
  version: OdataVersion;
19
24
  name?: string;
package/dist/types.js CHANGED
@@ -1,9 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.OdataVersion = void 0;
3
+ exports.ServiceType = exports.OdataVersion = void 0;
4
4
  var OdataVersion;
5
5
  (function (OdataVersion) {
6
6
  OdataVersion["v2"] = "2";
7
7
  OdataVersion["v4"] = "4";
8
8
  })(OdataVersion = exports.OdataVersion || (exports.OdataVersion = {}));
9
+ var ServiceType;
10
+ (function (ServiceType) {
11
+ ServiceType["EDMX"] = "edmx";
12
+ ServiceType["CDS"] = "cds";
13
+ })(ServiceType = exports.ServiceType || (exports.ServiceType = {}));
9
14
  //# sourceMappingURL=types.js.map
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%3Aodata-service-writer"
11
11
  },
12
- "version": "0.15.1",
12
+ "version": "0.16.0",
13
13
  "license": "Apache-2.0",
14
14
  "main": "dist/index.js",
15
15
  "files": [
@@ -37,7 +37,7 @@
37
37
  "@types/semver": "7.5.2",
38
38
  "fs-extra": "10.0.0",
39
39
  "lodash": "4.17.21",
40
- "@sap-ux/project-access": "1.15.4"
40
+ "@sap-ux/project-access": "1.16.1"
41
41
  },
42
42
  "engines": {
43
43
  "pnpm": ">=6.26.1 < 7.0.0 || >=7.1.0",
@@ -8,8 +8,8 @@
8
8
  "annotations": [<%if (locals.annotations && annotations.technicalName) {%>
9
9
  "<%- annotations.name %>"<% if (locals.localAnnotationsName) {%>,<%}%><% } %><% if (locals.localAnnotationsName) { %>
10
10
  "<%- localAnnotationsName %>"<% } %>
11
- ],
12
- "localUri": "localService/metadata.xml"<%if (version === '4') {%>,
11
+ ]<% if (locals.metadata) { %>,
12
+ "localUri": "localService/metadata.xml" <% } %><%if (version === '4') {%>,
13
13
  "odataVersion": "4.0"<% } %><%if (version === '2') {%>,
14
14
  "odataVersion": "2.0"<% } %>
15
15
  }