@sap-ux/project-access 1.1.1 → 1.1.3
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/file/file-search.js +9 -9
- package/dist/index.js +5 -1
- package/dist/project/cap.js +7 -7
- package/dist/project/module-loader.js +7 -2
- package/dist/project/search.js +22 -22
- package/dist/project/ui5-config.js +5 -5
- package/dist/types/cap/index.d.ts +17 -17
- package/dist/types/index.js +5 -1
- package/dist/types/package/basic.d.ts +6 -6
- package/dist/types/package/index.d.ts +2 -2
- package/dist/types/package/literal-union.d.ts +1 -1
- package/dist/types/package/package-json.d.ts +1 -1
- package/dist/types/package/primitive.d.ts +1 -1
- package/dist/types/webapp/index.d.ts +1 -1
- package/package.json +2 -2
package/dist/file/file-search.js
CHANGED
|
@@ -26,7 +26,7 @@ const file_access_1 = require("./file-access");
|
|
|
26
26
|
function getMemFsFilter(changes, filename) {
|
|
27
27
|
const deleted = Object.entries(changes)
|
|
28
28
|
.filter(([, info]) => info.state === 'deleted')
|
|
29
|
-
.map(([file]) => path_1.join(path_1.basename(path_1.join(file)) === filename ? path_1.dirname(file) : file));
|
|
29
|
+
.map(([file]) => (0, path_1.join)((0, path_1.basename)((0, path_1.join)(file)) === filename ? (0, path_1.dirname)(file) : file));
|
|
30
30
|
return (path) => !deleted.find((entry) => path.startsWith(entry));
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
@@ -39,8 +39,8 @@ function getMemFsFilter(changes, filename) {
|
|
|
39
39
|
*/
|
|
40
40
|
function concatNewFoldersFromMemFs(folders, changes, filename) {
|
|
41
41
|
const modified = Object.entries(changes)
|
|
42
|
-
.filter(([file, info]) => info.state === 'modified' && path_1.basename(path_1.join(file)) === filename)
|
|
43
|
-
.map(([file]) => path_1.dirname(path_1.join(file)));
|
|
42
|
+
.filter(([file, info]) => info.state === 'modified' && (0, path_1.basename)((0, path_1.join)(file)) === filename)
|
|
43
|
+
.map(([file]) => (0, path_1.dirname)((0, path_1.join)(file)));
|
|
44
44
|
return [...new Set([...folders, ...modified])];
|
|
45
45
|
}
|
|
46
46
|
/**
|
|
@@ -55,16 +55,16 @@ function concatNewFoldersFromMemFs(folders, changes, filename) {
|
|
|
55
55
|
function findFiles(filename, root, excludeFolders, fs) {
|
|
56
56
|
return new Promise((resolve, reject) => {
|
|
57
57
|
const results = [];
|
|
58
|
-
const finder = findit2_1.default(root);
|
|
58
|
+
const finder = (0, findit2_1.default)(root);
|
|
59
59
|
finder.on('directory', (dir, _stat, stop) => {
|
|
60
|
-
const base = path_1.basename(dir);
|
|
60
|
+
const base = (0, path_1.basename)(dir);
|
|
61
61
|
if (excludeFolders.includes(base)) {
|
|
62
62
|
stop();
|
|
63
63
|
}
|
|
64
64
|
});
|
|
65
65
|
finder.on('file', (file) => {
|
|
66
66
|
if (file.endsWith(path_1.sep + filename)) {
|
|
67
|
-
results.push(path_1.dirname(file));
|
|
67
|
+
results.push((0, path_1.dirname)(file));
|
|
68
68
|
}
|
|
69
69
|
});
|
|
70
70
|
finder.on('end', () => {
|
|
@@ -92,12 +92,12 @@ exports.findFiles = findFiles;
|
|
|
92
92
|
*/
|
|
93
93
|
function findFileUp(fileName, startPath, fs) {
|
|
94
94
|
return __awaiter(this, void 0, void 0, function* () {
|
|
95
|
-
const filePath = path_1.join(startPath, fileName);
|
|
96
|
-
if (yield file_access_1.fileExists(filePath, fs)) {
|
|
95
|
+
const filePath = (0, path_1.join)(startPath, fileName);
|
|
96
|
+
if (yield (0, file_access_1.fileExists)(filePath, fs)) {
|
|
97
97
|
return filePath;
|
|
98
98
|
}
|
|
99
99
|
else {
|
|
100
|
-
return path_1.dirname(startPath) !== startPath ? findFileUp(fileName, path_1.dirname(startPath), fs) : undefined;
|
|
100
|
+
return (0, path_1.dirname)(startPath) !== startPath ? findFileUp(fileName, (0, path_1.dirname)(startPath), fs) : undefined;
|
|
101
101
|
}
|
|
102
102
|
});
|
|
103
103
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
package/dist/project/cap.js
CHANGED
|
@@ -34,7 +34,7 @@ exports.isCapNodeJsProject = isCapNodeJsProject;
|
|
|
34
34
|
function isCapJavaProject(projectRoot) {
|
|
35
35
|
return __awaiter(this, void 0, void 0, function* () {
|
|
36
36
|
const { srv } = yield getCapCustomPaths(projectRoot);
|
|
37
|
-
return file_1.fileExists(path_1.join(projectRoot, srv, 'src', 'main', 'resources', 'application.yaml'));
|
|
37
|
+
return (0, file_1.fileExists)((0, path_1.join)(projectRoot, srv, 'src', 'main', 'resources', 'application.yaml'));
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
exports.isCapJavaProject = isCapJavaProject;
|
|
@@ -51,7 +51,7 @@ function getCapProjectType(projectRoot) {
|
|
|
51
51
|
}
|
|
52
52
|
let packageJson;
|
|
53
53
|
try {
|
|
54
|
-
packageJson = yield file_1.readJSON(path_1.join(projectRoot, constants_1.FileName.Package));
|
|
54
|
+
packageJson = yield (0, file_1.readJSON)((0, path_1.join)(projectRoot, constants_1.FileName.Package));
|
|
55
55
|
}
|
|
56
56
|
catch (_a) {
|
|
57
57
|
// Ignore errors while reading the package.json file
|
|
@@ -77,7 +77,7 @@ function getCapCustomPaths(capProjectPath) {
|
|
|
77
77
|
srv: 'srv/'
|
|
78
78
|
};
|
|
79
79
|
try {
|
|
80
|
-
const cds = yield module_loader_1.loadModuleFromProject(capProjectPath, '@sap/cds');
|
|
80
|
+
const cds = yield (0, module_loader_1.loadModuleFromProject)(capProjectPath, '@sap/cds');
|
|
81
81
|
const cdsCustomPaths = cds.env.for('cds', capProjectPath);
|
|
82
82
|
if (cdsCustomPaths.folders) {
|
|
83
83
|
result.app = cdsCustomPaths.folders.app;
|
|
@@ -99,12 +99,12 @@ exports.getCapCustomPaths = getCapCustomPaths;
|
|
|
99
99
|
*/
|
|
100
100
|
function getCapModelAndServices(projectRoot) {
|
|
101
101
|
return __awaiter(this, void 0, void 0, function* () {
|
|
102
|
-
const cds = yield module_loader_1.loadModuleFromProject(projectRoot, '@sap/cds');
|
|
102
|
+
const cds = yield (0, module_loader_1.loadModuleFromProject)(projectRoot, '@sap/cds');
|
|
103
103
|
const capProjectPaths = yield getCapCustomPaths(projectRoot);
|
|
104
104
|
const modelPaths = [
|
|
105
|
-
path_1.join(projectRoot, capProjectPaths.app),
|
|
106
|
-
path_1.join(projectRoot, capProjectPaths.srv),
|
|
107
|
-
path_1.join(projectRoot, capProjectPaths.db)
|
|
105
|
+
(0, path_1.join)(projectRoot, capProjectPaths.app),
|
|
106
|
+
(0, path_1.join)(projectRoot, capProjectPaths.srv),
|
|
107
|
+
(0, path_1.join)(projectRoot, capProjectPaths.db)
|
|
108
108
|
];
|
|
109
109
|
const model = yield cds.load(modelPaths);
|
|
110
110
|
const services = cds.compile.to['serviceinfo'](model, { root: projectRoot });
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -38,10 +42,11 @@ exports.loadModuleFromProject = void 0;
|
|
|
38
42
|
*/
|
|
39
43
|
function loadModuleFromProject(projectRoot, moduleName) {
|
|
40
44
|
return __awaiter(this, void 0, void 0, function* () {
|
|
45
|
+
var _a;
|
|
41
46
|
let module;
|
|
42
47
|
try {
|
|
43
48
|
const modulePath = require.resolve(moduleName, { paths: [projectRoot] });
|
|
44
|
-
module = (yield Promise.resolve().then(() => __importStar(require(
|
|
49
|
+
module = (yield (_a = modulePath, Promise.resolve().then(() => __importStar(require(_a)))));
|
|
45
50
|
}
|
|
46
51
|
catch (error) {
|
|
47
52
|
throw Error(`Module '${moduleName}' not installed in project '${projectRoot}'`);
|
package/dist/project/search.js
CHANGED
|
@@ -51,7 +51,7 @@ function findAllManifest(wsFolders) {
|
|
|
51
51
|
const manifests = [];
|
|
52
52
|
for (const root of wsRoots) {
|
|
53
53
|
try {
|
|
54
|
-
manifests.push(...(yield file_1.findFiles(constants_1.FileName.Manifest, root, ['.git', 'node_modules', 'dist'])));
|
|
54
|
+
manifests.push(...(yield (0, file_1.findFiles)(constants_1.FileName.Manifest, root, ['.git', 'node_modules', 'dist'])));
|
|
55
55
|
}
|
|
56
56
|
catch (_a) {
|
|
57
57
|
// ignore exceptions during find
|
|
@@ -69,18 +69,18 @@ function findAllManifest(wsFolders) {
|
|
|
69
69
|
*/
|
|
70
70
|
function findProjectRoot(path, sapuxRequired = true, silent = false) {
|
|
71
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
72
|
-
const packageJson = yield file_1.findFileUp(constants_1.FileName.Package, path);
|
|
72
|
+
const packageJson = yield (0, file_1.findFileUp)(constants_1.FileName.Package, path);
|
|
73
73
|
if (!packageJson) {
|
|
74
74
|
if (silent) {
|
|
75
75
|
return '';
|
|
76
76
|
}
|
|
77
77
|
throw new Error(`Could not find any project root for '${path}'. Search was done for ${sapuxRequired ? 'Fiori elements' : 'All'} projects.`);
|
|
78
78
|
}
|
|
79
|
-
let root = path_1.dirname(packageJson);
|
|
79
|
+
let root = (0, path_1.dirname)(packageJson);
|
|
80
80
|
if (sapuxRequired) {
|
|
81
|
-
const sapux = (yield file_1.readJSON(packageJson)).sapux;
|
|
81
|
+
const sapux = (yield (0, file_1.readJSON)(packageJson)).sapux;
|
|
82
82
|
if (!sapux) {
|
|
83
|
-
root = yield findProjectRoot(path_1.dirname(root), sapuxRequired);
|
|
83
|
+
root = yield findProjectRoot((0, path_1.dirname)(root), sapuxRequired, silent);
|
|
84
84
|
}
|
|
85
85
|
}
|
|
86
86
|
return root;
|
|
@@ -107,11 +107,11 @@ function findRootsWithSapux(sapux, path, root) {
|
|
|
107
107
|
// Backward compatibility for FE apps in CAP projects that have no app package.json,
|
|
108
108
|
// but are listed in CAP root sapux array
|
|
109
109
|
const pathWithSep = path.endsWith(path_1.sep) ? path : path + path_1.sep;
|
|
110
|
-
const relAppPaths = sapux.map((a) => path_1.join(...a.split(/[\\/]/)));
|
|
111
|
-
const relApp = relAppPaths.find((app) => pathWithSep.startsWith(path_1.join(root, app) + path_1.sep));
|
|
110
|
+
const relAppPaths = sapux.map((a) => (0, path_1.join)(...a.split(/[\\/]/)));
|
|
111
|
+
const relApp = relAppPaths.find((app) => pathWithSep.startsWith((0, path_1.join)(root, app) + path_1.sep));
|
|
112
112
|
if (relApp) {
|
|
113
113
|
return {
|
|
114
|
-
appRoot: path_1.join(root, relApp),
|
|
114
|
+
appRoot: (0, path_1.join)(root, relApp),
|
|
115
115
|
projectRoot: root
|
|
116
116
|
};
|
|
117
117
|
}
|
|
@@ -127,11 +127,11 @@ function findRootsWithSapux(sapux, path, root) {
|
|
|
127
127
|
*/
|
|
128
128
|
function getAppRootFromWebappPath(webappPath) {
|
|
129
129
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
-
const ui5YamlPath = yield file_1.findFileUp(constants_1.FileName.Ui5Yaml, webappPath);
|
|
131
|
-
let appRoot = path_1.dirname(webappPath);
|
|
130
|
+
const ui5YamlPath = yield (0, file_1.findFileUp)(constants_1.FileName.Ui5Yaml, webappPath);
|
|
131
|
+
let appRoot = (0, path_1.dirname)(webappPath);
|
|
132
132
|
if (ui5YamlPath) {
|
|
133
|
-
const candidate = path_1.dirname(ui5YamlPath);
|
|
134
|
-
const webapp = yield ui5_config_1.getWebappPath(candidate);
|
|
133
|
+
const candidate = (0, path_1.dirname)(ui5YamlPath);
|
|
134
|
+
const webapp = yield (0, ui5_config_1.getWebappPath)(candidate);
|
|
135
135
|
if (webapp === webappPath) {
|
|
136
136
|
appRoot = candidate;
|
|
137
137
|
}
|
|
@@ -163,19 +163,19 @@ function findRootsForPath(path) {
|
|
|
163
163
|
if (!appRoot) {
|
|
164
164
|
return null;
|
|
165
165
|
}
|
|
166
|
-
const appPckJson = yield file_1.readJSON(path_1.join(appRoot, constants_1.FileName.Package));
|
|
166
|
+
const appPckJson = yield (0, file_1.readJSON)((0, path_1.join)(appRoot, constants_1.FileName.Package));
|
|
167
167
|
// Check for most common app, Fiori elements with sapux=true in package.json
|
|
168
168
|
if (appPckJson.sapux) {
|
|
169
169
|
return findRootsWithSapux(appPckJson.sapux, path, appRoot);
|
|
170
170
|
}
|
|
171
|
-
if (cap_1.isCapNodeJsProject(appPckJson) || (yield cap_1.isCapJavaProject(appRoot))) {
|
|
171
|
+
if ((0, cap_1.isCapNodeJsProject)(appPckJson) || (yield (0, cap_1.isCapJavaProject)(appRoot))) {
|
|
172
172
|
// App is part of a CAP project, but doesn't have own package.json and is not mentioned in sapux array
|
|
173
173
|
// in root -> not supported
|
|
174
174
|
return null;
|
|
175
175
|
}
|
|
176
176
|
// Now we have the app root folder. Check for freestyle non CAP
|
|
177
|
-
if ((yield file_1.fileExists(path_1.join(appRoot, constants_1.FileName.Ui5LocalYaml))) &&
|
|
178
|
-
dependencies_1.hasDependency(appPckJson, '@sap/ux-ui5-tooling')) {
|
|
177
|
+
if ((yield (0, file_1.fileExists)((0, path_1.join)(appRoot, constants_1.FileName.Ui5LocalYaml))) &&
|
|
178
|
+
(0, dependencies_1.hasDependency)(appPckJson, '@sap/ux-ui5-tooling')) {
|
|
179
179
|
return {
|
|
180
180
|
appRoot,
|
|
181
181
|
projectRoot: appRoot
|
|
@@ -183,20 +183,20 @@ function findRootsForPath(path) {
|
|
|
183
183
|
}
|
|
184
184
|
// Project must be CAP, find project root
|
|
185
185
|
try {
|
|
186
|
-
const { root } = path_1.parse(appRoot);
|
|
187
|
-
let projectRoot = path_1.dirname(appRoot);
|
|
186
|
+
const { root } = (0, path_1.parse)(appRoot);
|
|
187
|
+
let projectRoot = (0, path_1.dirname)(appRoot);
|
|
188
188
|
while (projectRoot !== root) {
|
|
189
|
-
if (yield cap_1.getCapProjectType(projectRoot)) {
|
|
189
|
+
if (yield (0, cap_1.getCapProjectType)(projectRoot)) {
|
|
190
190
|
// We have found a CAP project as root. Check if the found app is not directly in CAP's 'app/' folder.
|
|
191
191
|
// Sometime there is a <CAP_ROOT>/app/package.json file that is used for app router (not an app)
|
|
192
|
-
if (path_1.join(projectRoot, 'app') !== appRoot) {
|
|
192
|
+
if ((0, path_1.join)(projectRoot, 'app') !== appRoot) {
|
|
193
193
|
return {
|
|
194
194
|
appRoot,
|
|
195
195
|
projectRoot
|
|
196
196
|
};
|
|
197
197
|
}
|
|
198
198
|
}
|
|
199
|
-
projectRoot = path_1.dirname(projectRoot);
|
|
199
|
+
projectRoot = (0, path_1.dirname)(projectRoot);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
202
202
|
catch (_a) {
|
|
@@ -222,7 +222,7 @@ function findAllApps(wsFolders) {
|
|
|
222
222
|
for (const manifestPath of manifestPaths) {
|
|
223
223
|
try {
|
|
224
224
|
// All UI5 apps have at least sap.app: { id: <ID>, type: "application" } in manifest.json
|
|
225
|
-
const manifest = yield file_1.readJSON(path_1.join(manifestPath, constants_1.FileName.Manifest));
|
|
225
|
+
const manifest = yield (0, file_1.readJSON)((0, path_1.join)(manifestPath, constants_1.FileName.Manifest));
|
|
226
226
|
if (!manifest['sap.app'] || !manifest['sap.app'].id || manifest['sap.app'].type !== 'application') {
|
|
227
227
|
continue;
|
|
228
228
|
}
|
|
@@ -23,14 +23,14 @@ const file_1 = require("../file");
|
|
|
23
23
|
function getWebappPath(projectRoot) {
|
|
24
24
|
var _a, _b;
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
|
-
let webappPath = path_1.join(projectRoot, 'webapp');
|
|
27
|
-
const ui5YamlPath = path_1.join(projectRoot, constants_1.FileName.Ui5Yaml);
|
|
28
|
-
if (yield file_1.fileExists(ui5YamlPath)) {
|
|
29
|
-
const yamlString = yield file_1.readFile(ui5YamlPath);
|
|
26
|
+
let webappPath = (0, path_1.join)(projectRoot, 'webapp');
|
|
27
|
+
const ui5YamlPath = (0, path_1.join)(projectRoot, constants_1.FileName.Ui5Yaml);
|
|
28
|
+
if (yield (0, file_1.fileExists)(ui5YamlPath)) {
|
|
29
|
+
const yamlString = yield (0, file_1.readFile)(ui5YamlPath);
|
|
30
30
|
const ui5Config = yield ui5_config_1.UI5Config.newInstance(yamlString);
|
|
31
31
|
const relativeWebappPath = (_b = (_a = ui5Config.getConfiguration()) === null || _a === void 0 ? void 0 : _a.paths) === null || _b === void 0 ? void 0 : _b.webapp;
|
|
32
32
|
if (relativeWebappPath) {
|
|
33
|
-
webappPath = path_1.join(projectRoot, relativeWebappPath);
|
|
33
|
+
webappPath = (0, path_1.join)(projectRoot, relativeWebappPath);
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
return webappPath;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type CapProjectType = 'CAPJava' | 'CAPNodejs';
|
|
2
2
|
export interface CapCustomPaths {
|
|
3
3
|
app: string;
|
|
4
4
|
db: string;
|
|
5
5
|
srv: string;
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
type SELECT = {
|
|
8
8
|
SELECT: {
|
|
9
9
|
distinct?: true;
|
|
10
10
|
one?: boolean;
|
|
@@ -21,41 +21,41 @@ declare type SELECT = {
|
|
|
21
21
|
};
|
|
22
22
|
};
|
|
23
23
|
};
|
|
24
|
-
|
|
24
|
+
type source = (ref | SELECT) & {
|
|
25
25
|
as?: name;
|
|
26
26
|
join?: name;
|
|
27
27
|
on?: xpr;
|
|
28
28
|
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
type name = string;
|
|
30
|
+
type operator = string;
|
|
31
|
+
type predicate = _xpr;
|
|
32
|
+
type _xpr = (expr | operator)[];
|
|
33
|
+
type expr = ref | val | xpr | SELECT;
|
|
34
|
+
type ref = {
|
|
35
35
|
ref: (name & {
|
|
36
36
|
id?: string;
|
|
37
37
|
where?: expr;
|
|
38
38
|
args?: expr[];
|
|
39
39
|
})[];
|
|
40
40
|
};
|
|
41
|
-
|
|
41
|
+
type val = {
|
|
42
42
|
val: any;
|
|
43
43
|
};
|
|
44
|
-
|
|
44
|
+
type xpr = {
|
|
45
45
|
xpr: _xpr;
|
|
46
46
|
};
|
|
47
|
-
|
|
47
|
+
type ordering_term = expr & {
|
|
48
48
|
asc?: true;
|
|
49
49
|
desc?: true;
|
|
50
50
|
};
|
|
51
|
-
|
|
51
|
+
type column_expr = expr & {
|
|
52
52
|
as?: name;
|
|
53
53
|
cast?: any;
|
|
54
54
|
expand?: column_expr[];
|
|
55
55
|
inline?: column_expr[];
|
|
56
56
|
};
|
|
57
57
|
/** A parsed model. */
|
|
58
|
-
export
|
|
58
|
+
export type csn = CSN;
|
|
59
59
|
export interface CSN {
|
|
60
60
|
/** The assigned namespace. If parsed from multiple sources, this is the topmost model's namespace, if any, not the ones of imported models. */
|
|
61
61
|
namespace?: string;
|
|
@@ -77,12 +77,12 @@ interface DefinitionRegistry {
|
|
|
77
77
|
entity: Entity;
|
|
78
78
|
Association: Association;
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
type Definition = DefinitionRegistry[keyof DefinitionRegistry];
|
|
81
81
|
interface Definitions {
|
|
82
82
|
[name: string]: Definition;
|
|
83
83
|
}
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
type kind = 'context' | 'service' | 'type' | 'entity' | 'element' | 'const' | 'annotation';
|
|
85
|
+
type Element = Type & Struct & Association & {
|
|
86
86
|
kind: 'element' | undefined;
|
|
87
87
|
};
|
|
88
88
|
interface Type {
|
package/dist/types/index.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
3
|
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
5
9
|
}) : (function(o, m, k, k2) {
|
|
6
10
|
if (k2 === undefined) k2 = k;
|
|
7
11
|
o[k2] = m[k];
|
|
@@ -3,7 +3,7 @@ Matches a [`class`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Refe
|
|
|
3
3
|
|
|
4
4
|
@category Class
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type Class<T, Arguments extends unknown[] = any[]> = Constructor<T, Arguments> & {
|
|
7
7
|
prototype: T;
|
|
8
8
|
};
|
|
9
9
|
/**
|
|
@@ -11,7 +11,7 @@ Matches a [`class` constructor](https://developer.mozilla.org/en-US/docs/Web/Jav
|
|
|
11
11
|
|
|
12
12
|
@category Class
|
|
13
13
|
*/
|
|
14
|
-
export
|
|
14
|
+
export type Constructor<T, Arguments extends unknown[] = any[]> = new (...arguments_: Arguments) => T;
|
|
15
15
|
/**
|
|
16
16
|
Matches a JSON object.
|
|
17
17
|
|
|
@@ -19,7 +19,7 @@ This type can be useful to enforce some input to be JSON-compatible or as a supe
|
|
|
19
19
|
|
|
20
20
|
@category JSON
|
|
21
21
|
*/
|
|
22
|
-
export
|
|
22
|
+
export type JsonObject = {
|
|
23
23
|
[Key in string]: JsonValue;
|
|
24
24
|
} & {
|
|
25
25
|
[Key in string]?: JsonValue | undefined;
|
|
@@ -29,13 +29,13 @@ Matches a JSON array.
|
|
|
29
29
|
|
|
30
30
|
@category JSON
|
|
31
31
|
*/
|
|
32
|
-
export
|
|
32
|
+
export type JsonArray = JsonValue[];
|
|
33
33
|
/**
|
|
34
34
|
Matches any valid JSON primitive value.
|
|
35
35
|
|
|
36
36
|
@category JSON
|
|
37
37
|
*/
|
|
38
|
-
export
|
|
38
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
39
39
|
/**
|
|
40
40
|
Matches any valid JSON value.
|
|
41
41
|
|
|
@@ -43,5 +43,5 @@ Matches any valid JSON value.
|
|
|
43
43
|
|
|
44
44
|
@category JSON
|
|
45
45
|
*/
|
|
46
|
-
export
|
|
46
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonArray;
|
|
47
47
|
//# sourceMappingURL=basic.d.ts.map
|
|
@@ -8,7 +8,7 @@ interface SapUxPackage {
|
|
|
8
8
|
};
|
|
9
9
|
remarkConfig?: object;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
export
|
|
11
|
+
export type UI5FlexLayer = 'VENDOR' | 'CUSTOMER_BASE';
|
|
12
|
+
export type Package = PackageJson & SapUxPackage;
|
|
13
13
|
export {};
|
|
14
14
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -28,5 +28,5 @@ const pet: Pet2 = '';
|
|
|
28
28
|
|
|
29
29
|
@category Type
|
|
30
30
|
*/
|
|
31
|
-
export
|
|
31
|
+
export type LiteralUnion<LiteralType, BaseType extends Primitive> = LiteralType | (BaseType & Record<never, never>);
|
|
32
32
|
//# sourceMappingURL=literal-union.d.ts.map
|
|
@@ -505,6 +505,6 @@ Type for [npm's `package.json` file](https://docs.npmjs.com/creating-a-package-j
|
|
|
505
505
|
|
|
506
506
|
@category File
|
|
507
507
|
*/
|
|
508
|
-
export
|
|
508
|
+
export type PackageJson = JsonObject & PackageJson.NodeJsStandard & PackageJson.PackageJsonStandard & PackageJson.NonStandardEntryPoints & PackageJson.TypeScriptConfiguration & PackageJson.YarnConfiguration & PackageJson.JSPMConfiguration;
|
|
509
509
|
export {};
|
|
510
510
|
//# sourceMappingURL=package-json.d.ts.map
|
|
@@ -3,5 +3,5 @@ Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/
|
|
|
3
3
|
|
|
4
4
|
@category Type
|
|
5
5
|
*/
|
|
6
|
-
export
|
|
6
|
+
export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
|
|
7
7
|
//# sourceMappingURL=primitive.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type * as ManifestNamespace from '@ui5/manifest/types/manifest';
|
|
2
2
|
export { ManifestNamespace };
|
|
3
|
-
export
|
|
3
|
+
export type Manifest = ManifestNamespace.SAPJSONSchemaForWebApplicationManifestFile;
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/project-access",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.3",
|
|
4
4
|
"description": "Library to access SAP Fiori tools projects",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"node": ">= 14.16.0 < 15.0.0 || >=16.1.0 < 17.0.0 || >=18.0.0 < 19.0.0"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@sap-ux/ui5-config": "0.16.
|
|
27
|
+
"@sap-ux/ui5-config": "0.16.4",
|
|
28
28
|
"findit2": "2.2.3",
|
|
29
29
|
"mem-fs": "2.1.0",
|
|
30
30
|
"mem-fs-editor": "9.4.0"
|