@sap-ux/project-access 1.38.1 → 2.0.1
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/command/index.d.ts +1 -1
- package/dist/command/index.js +1 -5
- package/dist/command/npm-command.js +3 -6
- package/dist/constants.js +10 -13
- package/dist/file/file-access.d.ts +1 -1
- package/dist/file/file-access.js +18 -32
- package/dist/file/file-search.js +25 -35
- package/dist/file/index.d.ts +2 -2
- package/dist/file/index.js +2 -19
- package/dist/index.d.ts +10 -10
- package/dist/index.js +9 -102
- package/dist/library/constants.js +1 -4
- package/dist/library/helpers.d.ts +1 -1
- package/dist/library/helpers.js +36 -44
- package/dist/library/index.d.ts +1 -1
- package/dist/library/index.js +1 -6
- package/dist/odata/index.d.ts +1 -1
- package/dist/odata/index.js +1 -6
- package/dist/odata/metadata.js +2 -6
- package/dist/path/index.d.ts +1 -1
- package/dist/path/index.js +1 -5
- package/dist/path/normalize.js +3 -6
- package/dist/project/access.d.ts +1 -1
- package/dist/project/access.js +30 -34
- package/dist/project/cap.d.ts +1 -1
- package/dist/project/cap.js +75 -102
- package/dist/project/dependencies.d.ts +1 -1
- package/dist/project/dependencies.js +16 -22
- package/dist/project/flex-changes.js +7 -10
- package/dist/project/i18n/i18n.d.ts +1 -1
- package/dist/project/i18n/i18n.js +22 -22
- package/dist/project/i18n/index.d.ts +3 -3
- package/dist/project/i18n/index.js +3 -13
- package/dist/project/i18n/read.d.ts +1 -1
- package/dist/project/i18n/read.js +11 -15
- package/dist/project/i18n/write.d.ts +1 -1
- package/dist/project/i18n/write.js +22 -28
- package/dist/project/index.d.ts +15 -15
- package/dist/project/index.js +14 -79
- package/dist/project/info.d.ts +1 -1
- package/dist/project/info.js +45 -54
- package/dist/project/module-loader.js +28 -64
- package/dist/project/mta.d.ts +1 -1
- package/dist/project/mta.js +6 -9
- package/dist/project/script.js +11 -18
- package/dist/project/search.d.ts +1 -1
- package/dist/project/search.js +77 -86
- package/dist/project/service.d.ts +1 -1
- package/dist/project/service.js +10 -16
- package/dist/project/specification.js +38 -44
- package/dist/project/ui5-config.js +21 -29
- package/dist/project/ui5-xml-id-validator.js +3 -6
- package/dist/types/access/index.d.ts +4 -4
- package/dist/types/access/index.js +1 -2
- package/dist/types/cap/index.js +1 -2
- package/dist/types/find/index.d.ts +1 -1
- package/dist/types/find/index.js +1 -2
- package/dist/types/i18n/index.js +1 -2
- package/dist/types/index.d.ts +9 -9
- package/dist/types/index.js +9 -25
- package/dist/types/info/index.d.ts +2 -2
- package/dist/types/info/index.js +1 -2
- package/dist/types/library/index.js +5 -2
- package/dist/types/mta/index.js +1 -2
- package/dist/types/package/basic.js +1 -2
- package/dist/types/package/index.d.ts +1 -1
- package/dist/types/package/index.js +1 -2
- package/dist/types/package/literal-union.d.ts +1 -1
- package/dist/types/package/literal-union.js +1 -2
- package/dist/types/package/package-json.d.ts +2 -2
- package/dist/types/package/package-json.js +1 -2
- package/dist/types/package/primitive.js +1 -2
- package/dist/types/vscode/index.js +1 -2
- package/dist/types/webapp/index.d.ts +2 -3
- package/dist/types/webapp/index.js +1 -2
- package/package.json +7 -5
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getI18nPropertiesPaths = getI18nPropertiesPaths;
|
|
4
|
-
exports.getRelativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths;
|
|
5
|
-
const node_path_1 = require("node:path");
|
|
6
|
-
const file_1 = require("../../file");
|
|
1
|
+
import { dirname, join } from 'node:path';
|
|
2
|
+
import { readJSON } from '../../file/index.js';
|
|
7
3
|
/**
|
|
8
4
|
* Return absolute paths to i18n.properties files from manifest.
|
|
9
5
|
*
|
|
@@ -12,17 +8,17 @@ const file_1 = require("../../file");
|
|
|
12
8
|
* @param memFs - optional mem-fs-editor instance
|
|
13
9
|
* @returns - absolute paths to i18n.properties
|
|
14
10
|
*/
|
|
15
|
-
async function getI18nPropertiesPaths(manifestPath, manifest, memFs) {
|
|
16
|
-
const parsedManifest = manifest ?? (await
|
|
17
|
-
const manifestFolder =
|
|
11
|
+
export async function getI18nPropertiesPaths(manifestPath, manifest, memFs) {
|
|
12
|
+
const parsedManifest = manifest ?? (await readJSON(manifestPath, memFs));
|
|
13
|
+
const manifestFolder = dirname(manifestPath);
|
|
18
14
|
const relativeI18nPropertiesPaths = getRelativeI18nPropertiesPaths(parsedManifest);
|
|
19
15
|
const i18nPropertiesPaths = {
|
|
20
|
-
'sap.app':
|
|
16
|
+
'sap.app': join(manifestFolder, relativeI18nPropertiesPaths['sap.app']),
|
|
21
17
|
models: {}
|
|
22
18
|
};
|
|
23
19
|
for (const modelKey in relativeI18nPropertiesPaths.models) {
|
|
24
20
|
i18nPropertiesPaths.models[modelKey] = {
|
|
25
|
-
path:
|
|
21
|
+
path: join(manifestFolder, relativeI18nPropertiesPaths.models[modelKey].path)
|
|
26
22
|
};
|
|
27
23
|
}
|
|
28
24
|
return i18nPropertiesPaths;
|
|
@@ -34,7 +30,7 @@ async function getI18nPropertiesPaths(manifestPath, manifest, memFs) {
|
|
|
34
30
|
* @param manifest - parsed content of manifest.json
|
|
35
31
|
* @returns - paths to i18n.properties files from sap.app and models
|
|
36
32
|
*/
|
|
37
|
-
function getRelativeI18nPropertiesPaths(manifest) {
|
|
33
|
+
export function getRelativeI18nPropertiesPaths(manifest) {
|
|
38
34
|
return {
|
|
39
35
|
'sap.app': getI18nAppPath(manifest),
|
|
40
36
|
models: getI18nModelPaths(manifest)
|
|
@@ -52,20 +48,20 @@ function getRelativeI18nPropertiesPaths(manifest) {
|
|
|
52
48
|
* @returns - path to i18n.properties file
|
|
53
49
|
*/
|
|
54
50
|
function getI18nAppPath(manifest) {
|
|
55
|
-
const defaultPath =
|
|
51
|
+
const defaultPath = join('i18n/i18n.properties');
|
|
56
52
|
if (typeof manifest?.['sap.app']?.i18n === 'string') {
|
|
57
|
-
return
|
|
53
|
+
return join(manifest['sap.app'].i18n);
|
|
58
54
|
}
|
|
59
55
|
if (typeof manifest?.['sap.app']?.i18n === 'object') {
|
|
60
56
|
// bundleName wins over `bundleUrl`
|
|
61
57
|
if ('bundleName' in manifest['sap.app'].i18n) {
|
|
62
58
|
// module name is in dot notation
|
|
63
59
|
const withoutAppId = manifest['sap.app'].i18n.bundleName.replace(manifest['sap.app'].id, '');
|
|
64
|
-
const i18nPath = `${
|
|
65
|
-
return
|
|
60
|
+
const i18nPath = `${join(...withoutAppId.split('.'))}.properties`;
|
|
61
|
+
return join(i18nPath);
|
|
66
62
|
}
|
|
67
63
|
if ('bundleUrl' in manifest['sap.app'].i18n) {
|
|
68
|
-
return
|
|
64
|
+
return join(manifest['sap.app'].i18n.bundleUrl);
|
|
69
65
|
}
|
|
70
66
|
}
|
|
71
67
|
// default
|
|
@@ -95,18 +91,22 @@ function getI18nModelPaths(manifest) {
|
|
|
95
91
|
// bundleName wins over `bundleUrl`
|
|
96
92
|
if (i18nModel.settings.bundleName) {
|
|
97
93
|
// module name is in dot notation
|
|
98
|
-
const
|
|
99
|
-
|
|
100
|
-
|
|
94
|
+
const appId = manifest['sap.app']?.id ?? '';
|
|
95
|
+
if (!appId) {
|
|
96
|
+
continue;
|
|
97
|
+
}
|
|
98
|
+
const withoutAppId = i18nModel.settings.bundleName.replace(appId, '');
|
|
99
|
+
const i18nPath = `${join(...withoutAppId.split('.'))}.properties`;
|
|
100
|
+
result[modelKey] = { path: join(i18nPath) };
|
|
101
101
|
continue;
|
|
102
102
|
}
|
|
103
103
|
if (i18nModel.settings.bundleUrl) {
|
|
104
|
-
result[modelKey] = { path:
|
|
104
|
+
result[modelKey] = { path: join(i18nModel.settings.bundleUrl) };
|
|
105
105
|
continue;
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
if (i18nModel.uri) {
|
|
109
|
-
result[modelKey] = { path:
|
|
109
|
+
result[modelKey] = { path: join(i18nModel.uri) };
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
return result;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { getI18nPropertiesPaths } from './i18n';
|
|
2
|
-
export { getCapI18nFolderNames, getI18nBundles } from './read';
|
|
3
|
-
export { createManifestI18nEntries, createUI5I18nEntries, createAnnotationI18nEntries, createCapI18nEntries } from './write';
|
|
1
|
+
export { getI18nPropertiesPaths } from './i18n.js';
|
|
2
|
+
export { getCapI18nFolderNames, getI18nBundles } from './read.js';
|
|
3
|
+
export { createManifestI18nEntries, createUI5I18nEntries, createAnnotationI18nEntries, createCapI18nEntries } from './write.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,14 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var i18n_1 = require("./i18n");
|
|
5
|
-
Object.defineProperty(exports, "getI18nPropertiesPaths", { enumerable: true, get: function () { return i18n_1.getI18nPropertiesPaths; } });
|
|
6
|
-
var read_1 = require("./read");
|
|
7
|
-
Object.defineProperty(exports, "getCapI18nFolderNames", { enumerable: true, get: function () { return read_1.getCapI18nFolderNames; } });
|
|
8
|
-
Object.defineProperty(exports, "getI18nBundles", { enumerable: true, get: function () { return read_1.getI18nBundles; } });
|
|
9
|
-
var write_1 = require("./write");
|
|
10
|
-
Object.defineProperty(exports, "createManifestI18nEntries", { enumerable: true, get: function () { return write_1.createManifestI18nEntries; } });
|
|
11
|
-
Object.defineProperty(exports, "createUI5I18nEntries", { enumerable: true, get: function () { return write_1.createUI5I18nEntries; } });
|
|
12
|
-
Object.defineProperty(exports, "createAnnotationI18nEntries", { enumerable: true, get: function () { return write_1.createAnnotationI18nEntries; } });
|
|
13
|
-
Object.defineProperty(exports, "createCapI18nEntries", { enumerable: true, get: function () { return write_1.createCapI18nEntries; } });
|
|
1
|
+
export { getI18nPropertiesPaths } from './i18n.js';
|
|
2
|
+
export { getCapI18nFolderNames, getI18nBundles } from './read.js';
|
|
3
|
+
export { createManifestI18nEntries, createUI5I18nEntries, createAnnotationI18nEntries, createCapI18nEntries } from './write.js';
|
|
14
4
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { I18nBundles, I18nPropertiesPaths, ProjectType } from '../../types';
|
|
1
|
+
import type { I18nBundles, I18nPropertiesPaths, ProjectType } from '../../types/index.js';
|
|
2
2
|
import type { Editor } from 'mem-fs-editor';
|
|
3
3
|
/**
|
|
4
4
|
* For a given app in project, retrieves i18n bundles for 'sap.app' namespace,`models` of `sap.ui5` namespace and service for cap services.
|
|
@@ -1,9 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.getI18nBundles = getI18nBundles;
|
|
4
|
-
exports.getCapI18nFolderNames = getCapI18nFolderNames;
|
|
5
|
-
const i18n_1 = require("@sap-ux/i18n");
|
|
6
|
-
const __1 = require("..");
|
|
1
|
+
import { getCapI18nBundle, getI18nFolderNames, getPropertiesI18nBundle } from '@sap-ux/i18n';
|
|
2
|
+
import { getCapEnvironment, getCdsFiles } from '../index.js';
|
|
7
3
|
/**
|
|
8
4
|
* Add error to optional errors object.
|
|
9
5
|
*
|
|
@@ -28,21 +24,21 @@ function addToErrors(result, key, error) {
|
|
|
28
24
|
* When calling this function, adding or removing a CDS file in memory or changing CDS configuration will not be considered until present on real file system.
|
|
29
25
|
* @returns i18n bundles or exception captured in optional errors object
|
|
30
26
|
*/
|
|
31
|
-
async function getI18nBundles(root, i18nPropertiesPaths, projectType, fs) {
|
|
27
|
+
export async function getI18nBundles(root, i18nPropertiesPaths, projectType, fs) {
|
|
32
28
|
const result = {
|
|
33
29
|
'sap.app': {},
|
|
34
30
|
models: {},
|
|
35
31
|
service: {}
|
|
36
32
|
};
|
|
37
33
|
try {
|
|
38
|
-
result['sap.app'] = await
|
|
34
|
+
result['sap.app'] = await getPropertiesI18nBundle(i18nPropertiesPaths['sap.app'], fs);
|
|
39
35
|
}
|
|
40
36
|
catch (error) {
|
|
41
37
|
addToErrors(result, 'sap.app', error);
|
|
42
38
|
}
|
|
43
39
|
for (const key of Object.keys(i18nPropertiesPaths.models)) {
|
|
44
40
|
try {
|
|
45
|
-
result.models[key] = await
|
|
41
|
+
result.models[key] = await getPropertiesI18nBundle(i18nPropertiesPaths.models[key].path, fs);
|
|
46
42
|
}
|
|
47
43
|
catch (error) {
|
|
48
44
|
// add models key with empty model
|
|
@@ -52,9 +48,9 @@ async function getI18nBundles(root, i18nPropertiesPaths, projectType, fs) {
|
|
|
52
48
|
}
|
|
53
49
|
if (projectType === 'CAPJava' || projectType === 'CAPNodejs') {
|
|
54
50
|
try {
|
|
55
|
-
const env = await
|
|
56
|
-
const cdsFiles = await
|
|
57
|
-
result.service = await
|
|
51
|
+
const env = await getCapEnvironment(root);
|
|
52
|
+
const cdsFiles = await getCdsFiles(root, true);
|
|
53
|
+
result.service = await getCapI18nBundle(root, env, cdsFiles, fs);
|
|
58
54
|
}
|
|
59
55
|
catch (error) {
|
|
60
56
|
addToErrors(result, 'service', error);
|
|
@@ -68,8 +64,8 @@ async function getI18nBundles(root, i18nPropertiesPaths, projectType, fs) {
|
|
|
68
64
|
* @param root Project root.
|
|
69
65
|
* @returns ii18n folder names
|
|
70
66
|
*/
|
|
71
|
-
async function getCapI18nFolderNames(root) {
|
|
72
|
-
const environment = await
|
|
73
|
-
return
|
|
67
|
+
export async function getCapI18nFolderNames(root) {
|
|
68
|
+
const environment = await getCapEnvironment(root);
|
|
69
|
+
return getI18nFolderNames(environment);
|
|
74
70
|
}
|
|
75
71
|
//# sourceMappingURL=read.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { NewI18nEntry } from '@sap-ux/i18n';
|
|
2
|
-
import type { I18nPropertiesPaths } from '../../types';
|
|
2
|
+
import type { I18nPropertiesPaths } from '../../types/index.js';
|
|
3
3
|
import type { Editor } from 'mem-fs-editor';
|
|
4
4
|
/**
|
|
5
5
|
* Maintains new translation entries in CAP i18n files.
|
|
@@ -1,14 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports.createManifestI18nEntries = createManifestI18nEntries;
|
|
7
|
-
const i18n_1 = require("@sap-ux/i18n");
|
|
8
|
-
const __1 = require("..");
|
|
9
|
-
const node_path_1 = require("node:path");
|
|
10
|
-
const file_1 = require("../../file");
|
|
11
|
-
const promises_1 = require("node:fs/promises");
|
|
1
|
+
import { createCapI18nEntries as createI18nEntriesBase, createPropertiesI18nEntries } from '@sap-ux/i18n';
|
|
2
|
+
import { getCapEnvironment } from '../index.js';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { readJSON, writeFile } from '../../file/index.js';
|
|
5
|
+
import { mkdir } from 'node:fs/promises';
|
|
12
6
|
/**
|
|
13
7
|
* Maintains new translation entries in CAP i18n files.
|
|
14
8
|
*
|
|
@@ -20,9 +14,9 @@ const promises_1 = require("node:fs/promises");
|
|
|
20
14
|
* When calling this function, adding or removing a CDS file in memory or changing CDS configuration will not be considered until present on real file system.
|
|
21
15
|
* @returns boolean or exception
|
|
22
16
|
*/
|
|
23
|
-
async function createCapI18nEntries(root, filePath, newI18nEntries, fs) {
|
|
24
|
-
const env = await
|
|
25
|
-
return (
|
|
17
|
+
export async function createCapI18nEntries(root, filePath, newI18nEntries, fs) {
|
|
18
|
+
const env = await getCapEnvironment(root);
|
|
19
|
+
return createI18nEntriesBase(root, filePath, newI18nEntries, env, fs);
|
|
26
20
|
}
|
|
27
21
|
/**
|
|
28
22
|
* Maintains new translation entries in an existing i18n file or in a new i18n properties file if it does not exist for given model key.
|
|
@@ -40,15 +34,15 @@ async function createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths,
|
|
|
40
34
|
const i18nFilePath = i18nPropertiesPaths.models[modelKey]?.path;
|
|
41
35
|
if (i18nFilePath) {
|
|
42
36
|
// ensure folder for i18n exists
|
|
43
|
-
const dirPath =
|
|
37
|
+
const dirPath = dirname(i18nFilePath);
|
|
44
38
|
if (!fs) {
|
|
45
39
|
// create directory when mem-fs-editor is not provided. when mem-fs-editor is provided, directory is created on using `.commit()` API
|
|
46
|
-
await
|
|
40
|
+
await mkdir(dirPath, { recursive: true });
|
|
47
41
|
}
|
|
48
|
-
return
|
|
42
|
+
return createPropertiesI18nEntries(i18nFilePath, newEntries, root, fs);
|
|
49
43
|
}
|
|
50
44
|
// update manifest.json entry
|
|
51
|
-
const manifest = await
|
|
45
|
+
const manifest = await readJSON(manifestPath);
|
|
52
46
|
const models = {
|
|
53
47
|
...manifest['sap.ui5']?.models
|
|
54
48
|
};
|
|
@@ -60,14 +54,14 @@ async function createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths,
|
|
|
60
54
|
models
|
|
61
55
|
}
|
|
62
56
|
};
|
|
63
|
-
await
|
|
57
|
+
await writeFile(manifestPath, JSON.stringify(newContent, undefined, 4), fs);
|
|
64
58
|
// make sure i18n folder exists
|
|
65
|
-
const dirPath =
|
|
59
|
+
const dirPath = dirname(defaultPath);
|
|
66
60
|
if (!fs) {
|
|
67
61
|
// create directory when mem-fs-editor is not provided. when mem-fs-editor is provided, directory is created on using `.commit()` API
|
|
68
|
-
await
|
|
62
|
+
await mkdir(join(dirname(manifestPath), dirPath), { recursive: true });
|
|
69
63
|
}
|
|
70
|
-
return
|
|
64
|
+
return createPropertiesI18nEntries(join(dirname(manifestPath), defaultPath), newEntries, root, fs);
|
|
71
65
|
}
|
|
72
66
|
/**
|
|
73
67
|
* Maintains new translation entries in an existing i18n file or in a new i18n properties file if it does not exist.
|
|
@@ -94,7 +88,7 @@ async function createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths,
|
|
|
94
88
|
* }
|
|
95
89
|
* ```
|
|
96
90
|
*/
|
|
97
|
-
async function createUI5I18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, modelKey, fs) {
|
|
91
|
+
export async function createUI5I18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, modelKey, fs) {
|
|
98
92
|
return createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths, newEntries, modelKey, fs);
|
|
99
93
|
}
|
|
100
94
|
/**
|
|
@@ -121,7 +115,7 @@ async function createUI5I18nEntries(root, manifestPath, i18nPropertiesPaths, new
|
|
|
121
115
|
* }
|
|
122
116
|
* ```
|
|
123
117
|
*/
|
|
124
|
-
async function createAnnotationI18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, fs) {
|
|
118
|
+
export async function createAnnotationI18nEntries(root, manifestPath, i18nPropertiesPaths, newEntries, fs) {
|
|
125
119
|
return createUI5I18nEntriesBase(root, manifestPath, i18nPropertiesPaths, newEntries, '@i18n', fs);
|
|
126
120
|
}
|
|
127
121
|
/**
|
|
@@ -134,14 +128,14 @@ async function createAnnotationI18nEntries(root, manifestPath, i18nPropertiesPat
|
|
|
134
128
|
* @returns boolean or exception
|
|
135
129
|
* @description If `i18n` entry is missing from `"sap.app":{}`, default `i18n/i18n.properties` is used. Update of `manifest.json` file is not needed.
|
|
136
130
|
*/
|
|
137
|
-
async function createManifestI18nEntries(root, i18nPropertiesPaths, newEntries, fs) {
|
|
131
|
+
export async function createManifestI18nEntries(root, i18nPropertiesPaths, newEntries, fs) {
|
|
138
132
|
const i18nFilePath = i18nPropertiesPaths['sap.app'];
|
|
139
133
|
// make sure i18n folder exists
|
|
140
|
-
const dirPath =
|
|
134
|
+
const dirPath = dirname(i18nFilePath);
|
|
141
135
|
if (!fs) {
|
|
142
136
|
// create directory when mem-fs-editor is not provided. when mem-fs-editor is provided, directory is created on using `.commit()` API
|
|
143
|
-
await
|
|
137
|
+
await mkdir(dirPath, { recursive: true });
|
|
144
138
|
}
|
|
145
|
-
return
|
|
139
|
+
return createPropertiesI18nEntries(i18nFilePath, newEntries, root, fs);
|
|
146
140
|
}
|
|
147
141
|
//# sourceMappingURL=write.js.map
|
package/dist/project/index.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { clearCdsModuleCache, deleteCapApp, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapProjectType, getCapServiceName, getCdsFiles, getCdsRoots, getCdsServices, isCapProject, isCapJavaProject, isCapNodeJsProject, readCapServiceMetadataEdmx, toReferenceUri, getWorkspaceInfo, hasMinCdsVersion, checkCdsUi5PluginEnabled, processServices, getGlobalCdsHomePath } from './cap';
|
|
2
|
-
export { filterDataSourcesByType, getMainService, getUsedEntitiesFromManifest } from './service';
|
|
3
|
-
export type { UsedEntity } from './service';
|
|
4
|
-
export { addPackageDevDependency, getNodeModulesPath, hasDependency } from './dependencies';
|
|
5
|
-
export { getCapI18nFolderNames, getI18nPropertiesPaths, getI18nBundles } from './i18n';
|
|
6
|
-
export { getAppProgrammingLanguage, getAppType, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getProject, getProjectType } from './info';
|
|
7
|
-
export { loadModuleFromProject } from './module-loader';
|
|
8
|
-
export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath } from './search';
|
|
9
|
-
export { getWebappPath, readUi5Yaml, getAllUi5YamlFileNames, getMockServerConfig, getMockDataPath, getPathMappings, type PathMappings } from './ui5-config';
|
|
10
|
-
export { getMtaPath } from './mta';
|
|
11
|
-
export { createApplicationAccess, createProjectAccess } from './access';
|
|
12
|
-
export { updatePackageScript, hasUI5CliV3 } from './script';
|
|
13
|
-
export { getSpecification, getSpecificationModuleFromCache, getSpecificationPath, refreshSpecificationDistTags } from './specification';
|
|
14
|
-
export { readFlexChanges } from './flex-changes';
|
|
15
|
-
export { isUI5IdUnique } from './ui5-xml-id-validator';
|
|
1
|
+
export { clearCdsModuleCache, deleteCapApp, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapProjectType, getCapServiceName, getCdsFiles, getCdsRoots, getCdsServices, isCapProject, isCapJavaProject, isCapNodeJsProject, readCapServiceMetadataEdmx, toReferenceUri, getWorkspaceInfo, hasMinCdsVersion, checkCdsUi5PluginEnabled, processServices, getGlobalCdsHomePath } from './cap.js';
|
|
2
|
+
export { filterDataSourcesByType, getMainService, getUsedEntitiesFromManifest } from './service.js';
|
|
3
|
+
export type { UsedEntity } from './service.js';
|
|
4
|
+
export { addPackageDevDependency, getNodeModulesPath, hasDependency } from './dependencies.js';
|
|
5
|
+
export { getCapI18nFolderNames, getI18nPropertiesPaths, getI18nBundles } from './i18n/index.js';
|
|
6
|
+
export { getAppProgrammingLanguage, getAppType, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getProject, getProjectType } from './info.js';
|
|
7
|
+
export { loadModuleFromProject } from './module-loader.js';
|
|
8
|
+
export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath } from './search.js';
|
|
9
|
+
export { getWebappPath, readUi5Yaml, getAllUi5YamlFileNames, getMockServerConfig, getMockDataPath, getPathMappings, type PathMappings } from './ui5-config.js';
|
|
10
|
+
export { getMtaPath } from './mta.js';
|
|
11
|
+
export { createApplicationAccess, createProjectAccess } from './access.js';
|
|
12
|
+
export { updatePackageScript, hasUI5CliV3 } from './script.js';
|
|
13
|
+
export { getSpecification, getSpecificationModuleFromCache, getSpecificationPath, refreshSpecificationDistTags } from './specification.js';
|
|
14
|
+
export { readFlexChanges } from './flex-changes.js';
|
|
15
|
+
export { isUI5IdUnique } from './ui5-xml-id-validator.js';
|
|
16
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/project/index.js
CHANGED
|
@@ -1,80 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
Object.defineProperty(exports, "getCdsServices", { enumerable: true, get: function () { return cap_1.getCdsServices; } });
|
|
16
|
-
Object.defineProperty(exports, "isCapProject", { enumerable: true, get: function () { return cap_1.isCapProject; } });
|
|
17
|
-
Object.defineProperty(exports, "isCapJavaProject", { enumerable: true, get: function () { return cap_1.isCapJavaProject; } });
|
|
18
|
-
Object.defineProperty(exports, "isCapNodeJsProject", { enumerable: true, get: function () { return cap_1.isCapNodeJsProject; } });
|
|
19
|
-
Object.defineProperty(exports, "readCapServiceMetadataEdmx", { enumerable: true, get: function () { return cap_1.readCapServiceMetadataEdmx; } });
|
|
20
|
-
Object.defineProperty(exports, "toReferenceUri", { enumerable: true, get: function () { return cap_1.toReferenceUri; } });
|
|
21
|
-
Object.defineProperty(exports, "getWorkspaceInfo", { enumerable: true, get: function () { return cap_1.getWorkspaceInfo; } });
|
|
22
|
-
Object.defineProperty(exports, "hasMinCdsVersion", { enumerable: true, get: function () { return cap_1.hasMinCdsVersion; } });
|
|
23
|
-
Object.defineProperty(exports, "checkCdsUi5PluginEnabled", { enumerable: true, get: function () { return cap_1.checkCdsUi5PluginEnabled; } });
|
|
24
|
-
Object.defineProperty(exports, "processServices", { enumerable: true, get: function () { return cap_1.processServices; } });
|
|
25
|
-
Object.defineProperty(exports, "getGlobalCdsHomePath", { enumerable: true, get: function () { return cap_1.getGlobalCdsHomePath; } });
|
|
26
|
-
var service_1 = require("./service");
|
|
27
|
-
Object.defineProperty(exports, "filterDataSourcesByType", { enumerable: true, get: function () { return service_1.filterDataSourcesByType; } });
|
|
28
|
-
Object.defineProperty(exports, "getMainService", { enumerable: true, get: function () { return service_1.getMainService; } });
|
|
29
|
-
Object.defineProperty(exports, "getUsedEntitiesFromManifest", { enumerable: true, get: function () { return service_1.getUsedEntitiesFromManifest; } });
|
|
30
|
-
var dependencies_1 = require("./dependencies");
|
|
31
|
-
Object.defineProperty(exports, "addPackageDevDependency", { enumerable: true, get: function () { return dependencies_1.addPackageDevDependency; } });
|
|
32
|
-
Object.defineProperty(exports, "getNodeModulesPath", { enumerable: true, get: function () { return dependencies_1.getNodeModulesPath; } });
|
|
33
|
-
Object.defineProperty(exports, "hasDependency", { enumerable: true, get: function () { return dependencies_1.hasDependency; } });
|
|
34
|
-
var i18n_1 = require("./i18n");
|
|
35
|
-
Object.defineProperty(exports, "getCapI18nFolderNames", { enumerable: true, get: function () { return i18n_1.getCapI18nFolderNames; } });
|
|
36
|
-
Object.defineProperty(exports, "getI18nPropertiesPaths", { enumerable: true, get: function () { return i18n_1.getI18nPropertiesPaths; } });
|
|
37
|
-
Object.defineProperty(exports, "getI18nBundles", { enumerable: true, get: function () { return i18n_1.getI18nBundles; } });
|
|
38
|
-
var info_1 = require("./info");
|
|
39
|
-
Object.defineProperty(exports, "getAppProgrammingLanguage", { enumerable: true, get: function () { return info_1.getAppProgrammingLanguage; } });
|
|
40
|
-
Object.defineProperty(exports, "getAppType", { enumerable: true, get: function () { return info_1.getAppType; } });
|
|
41
|
-
Object.defineProperty(exports, "getMinUI5VersionFromManifest", { enumerable: true, get: function () { return info_1.getMinUI5VersionFromManifest; } });
|
|
42
|
-
Object.defineProperty(exports, "getMinUI5VersionAsArray", { enumerable: true, get: function () { return info_1.getMinUI5VersionAsArray; } });
|
|
43
|
-
Object.defineProperty(exports, "getMinimumUI5Version", { enumerable: true, get: function () { return info_1.getMinimumUI5Version; } });
|
|
44
|
-
Object.defineProperty(exports, "getProject", { enumerable: true, get: function () { return info_1.getProject; } });
|
|
45
|
-
Object.defineProperty(exports, "getProjectType", { enumerable: true, get: function () { return info_1.getProjectType; } });
|
|
46
|
-
var module_loader_1 = require("./module-loader");
|
|
47
|
-
Object.defineProperty(exports, "loadModuleFromProject", { enumerable: true, get: function () { return module_loader_1.loadModuleFromProject; } });
|
|
48
|
-
var search_1 = require("./search");
|
|
49
|
-
Object.defineProperty(exports, "findAllApps", { enumerable: true, get: function () { return search_1.findAllApps; } });
|
|
50
|
-
Object.defineProperty(exports, "findCapProjects", { enumerable: true, get: function () { return search_1.findCapProjects; } });
|
|
51
|
-
Object.defineProperty(exports, "findFioriArtifacts", { enumerable: true, get: function () { return search_1.findFioriArtifacts; } });
|
|
52
|
-
Object.defineProperty(exports, "findProjectRoot", { enumerable: true, get: function () { return search_1.findProjectRoot; } });
|
|
53
|
-
Object.defineProperty(exports, "getAppRootFromWebappPath", { enumerable: true, get: function () { return search_1.getAppRootFromWebappPath; } });
|
|
54
|
-
Object.defineProperty(exports, "findCapProjectRoot", { enumerable: true, get: function () { return search_1.findCapProjectRoot; } });
|
|
55
|
-
Object.defineProperty(exports, "findRootsForPath", { enumerable: true, get: function () { return search_1.findRootsForPath; } });
|
|
56
|
-
var ui5_config_1 = require("./ui5-config");
|
|
57
|
-
Object.defineProperty(exports, "getWebappPath", { enumerable: true, get: function () { return ui5_config_1.getWebappPath; } });
|
|
58
|
-
Object.defineProperty(exports, "readUi5Yaml", { enumerable: true, get: function () { return ui5_config_1.readUi5Yaml; } });
|
|
59
|
-
Object.defineProperty(exports, "getAllUi5YamlFileNames", { enumerable: true, get: function () { return ui5_config_1.getAllUi5YamlFileNames; } });
|
|
60
|
-
Object.defineProperty(exports, "getMockServerConfig", { enumerable: true, get: function () { return ui5_config_1.getMockServerConfig; } });
|
|
61
|
-
Object.defineProperty(exports, "getMockDataPath", { enumerable: true, get: function () { return ui5_config_1.getMockDataPath; } });
|
|
62
|
-
Object.defineProperty(exports, "getPathMappings", { enumerable: true, get: function () { return ui5_config_1.getPathMappings; } });
|
|
63
|
-
var mta_1 = require("./mta");
|
|
64
|
-
Object.defineProperty(exports, "getMtaPath", { enumerable: true, get: function () { return mta_1.getMtaPath; } });
|
|
65
|
-
var access_1 = require("./access");
|
|
66
|
-
Object.defineProperty(exports, "createApplicationAccess", { enumerable: true, get: function () { return access_1.createApplicationAccess; } });
|
|
67
|
-
Object.defineProperty(exports, "createProjectAccess", { enumerable: true, get: function () { return access_1.createProjectAccess; } });
|
|
68
|
-
var script_1 = require("./script");
|
|
69
|
-
Object.defineProperty(exports, "updatePackageScript", { enumerable: true, get: function () { return script_1.updatePackageScript; } });
|
|
70
|
-
Object.defineProperty(exports, "hasUI5CliV3", { enumerable: true, get: function () { return script_1.hasUI5CliV3; } });
|
|
71
|
-
var specification_1 = require("./specification");
|
|
72
|
-
Object.defineProperty(exports, "getSpecification", { enumerable: true, get: function () { return specification_1.getSpecification; } });
|
|
73
|
-
Object.defineProperty(exports, "getSpecificationModuleFromCache", { enumerable: true, get: function () { return specification_1.getSpecificationModuleFromCache; } });
|
|
74
|
-
Object.defineProperty(exports, "getSpecificationPath", { enumerable: true, get: function () { return specification_1.getSpecificationPath; } });
|
|
75
|
-
Object.defineProperty(exports, "refreshSpecificationDistTags", { enumerable: true, get: function () { return specification_1.refreshSpecificationDistTags; } });
|
|
76
|
-
var flex_changes_1 = require("./flex-changes");
|
|
77
|
-
Object.defineProperty(exports, "readFlexChanges", { enumerable: true, get: function () { return flex_changes_1.readFlexChanges; } });
|
|
78
|
-
var ui5_xml_id_validator_1 = require("./ui5-xml-id-validator");
|
|
79
|
-
Object.defineProperty(exports, "isUI5IdUnique", { enumerable: true, get: function () { return ui5_xml_id_validator_1.isUI5IdUnique; } });
|
|
1
|
+
export { clearCdsModuleCache, deleteCapApp, getCapCustomPaths, getCapEnvironment, getCapModelAndServices, getCapProjectType, getCapServiceName, getCdsFiles, getCdsRoots, getCdsServices, isCapProject, isCapJavaProject, isCapNodeJsProject, readCapServiceMetadataEdmx, toReferenceUri, getWorkspaceInfo, hasMinCdsVersion, checkCdsUi5PluginEnabled, processServices, getGlobalCdsHomePath } from './cap.js';
|
|
2
|
+
export { filterDataSourcesByType, getMainService, getUsedEntitiesFromManifest } from './service.js';
|
|
3
|
+
export { addPackageDevDependency, getNodeModulesPath, hasDependency } from './dependencies.js';
|
|
4
|
+
export { getCapI18nFolderNames, getI18nPropertiesPaths, getI18nBundles } from './i18n/index.js';
|
|
5
|
+
export { getAppProgrammingLanguage, getAppType, getMinUI5VersionFromManifest, getMinUI5VersionAsArray, getMinimumUI5Version, getProject, getProjectType } from './info.js';
|
|
6
|
+
export { loadModuleFromProject } from './module-loader.js';
|
|
7
|
+
export { findAllApps, findCapProjects, findFioriArtifacts, findProjectRoot, getAppRootFromWebappPath, findCapProjectRoot, findRootsForPath } from './search.js';
|
|
8
|
+
export { getWebappPath, readUi5Yaml, getAllUi5YamlFileNames, getMockServerConfig, getMockDataPath, getPathMappings } from './ui5-config.js';
|
|
9
|
+
export { getMtaPath } from './mta.js';
|
|
10
|
+
export { createApplicationAccess, createProjectAccess } from './access.js';
|
|
11
|
+
export { updatePackageScript, hasUI5CliV3 } from './script.js';
|
|
12
|
+
export { getSpecification, getSpecificationModuleFromCache, getSpecificationPath, refreshSpecificationDistTags } from './specification.js';
|
|
13
|
+
export { readFlexChanges } from './flex-changes.js';
|
|
14
|
+
export { isUI5IdUnique } from './ui5-xml-id-validator.js';
|
|
80
15
|
//# sourceMappingURL=index.js.map
|
package/dist/project/info.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Editor } from 'mem-fs-editor';
|
|
2
|
-
import type { AppProgrammingLanguage, AppType, Manifest, Project, ProjectType } from '../types';
|
|
2
|
+
import type { AppProgrammingLanguage, AppType, Manifest, Project, ProjectType } from '../types/index.js';
|
|
3
3
|
/**
|
|
4
4
|
* Returns the project structure for a given Fiori project.
|
|
5
5
|
*
|