@sap-ux/abap-deploy-config-writer 0.2.18 → 0.2.20
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.js +7 -7
- package/dist/index.js +3 -3
- package/package.json +4 -4
package/dist/file.js
CHANGED
|
@@ -8,9 +8,9 @@ exports.addUi5Dependency = addUi5Dependency;
|
|
|
8
8
|
exports.getLibraryPath = getLibraryPath;
|
|
9
9
|
exports.writeUi5RepositoryFiles = writeUi5RepositoryFiles;
|
|
10
10
|
exports.writeUi5RepositoryIgnore = writeUi5RepositoryIgnore;
|
|
11
|
-
const
|
|
11
|
+
const node_path_1 = require("node:path");
|
|
12
12
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
13
|
-
const
|
|
13
|
+
const node_os_1 = require("node:os");
|
|
14
14
|
const project_access_1 = require("@sap-ux/project-access");
|
|
15
15
|
const constants_1 = require("./constants");
|
|
16
16
|
const semver_1 = require("semver");
|
|
@@ -23,7 +23,7 @@ const semver_1 = require("semver");
|
|
|
23
23
|
* @param depName - the dependency name
|
|
24
24
|
*/
|
|
25
25
|
function addUi5Dependency(fs, basePath, depName) {
|
|
26
|
-
const filePath = (0,
|
|
26
|
+
const filePath = (0, node_path_1.join)(basePath, project_access_1.FileName.Package);
|
|
27
27
|
const packageJson = (fs.readJSON(filePath) ?? {});
|
|
28
28
|
const ui5CliVersion = (0, semver_1.coerce)(packageJson?.devDependencies?.[constants_1.UI5_CLI_LIB]);
|
|
29
29
|
if (ui5CliVersion && (0, semver_1.satisfies)(ui5CliVersion, `>=${constants_1.UI5_CLI_MIN_VERSION}`)) {
|
|
@@ -59,7 +59,7 @@ async function getLibraryPath(basePath) {
|
|
|
59
59
|
* @param addContent - the content to be added
|
|
60
60
|
*/
|
|
61
61
|
const writeUi5RepositoryFile = (fs, basePath, ui5RepositoryFile, addContent) => {
|
|
62
|
-
const filePath = (0,
|
|
62
|
+
const filePath = (0, node_path_1.join)(basePath, ui5RepositoryFile);
|
|
63
63
|
let content;
|
|
64
64
|
if (fs.exists(filePath)) {
|
|
65
65
|
content = fs.read(filePath);
|
|
@@ -80,7 +80,7 @@ exports.writeUi5RepositoryFile = writeUi5RepositoryFile;
|
|
|
80
80
|
* @returns the typescript file paths
|
|
81
81
|
*/
|
|
82
82
|
async function getTypescriptFilePaths(typescriptPattern) {
|
|
83
|
-
const normalisedPath = (0,
|
|
83
|
+
const normalisedPath = (0, node_os_1.platform)() === 'win32' ? typescriptPattern.replace(/\\/g, '/') : typescriptPattern;
|
|
84
84
|
const typeScriptFilesPaths = await (0, fast_glob_1.default)(normalisedPath);
|
|
85
85
|
return typeScriptFilesPaths;
|
|
86
86
|
}
|
|
@@ -92,7 +92,7 @@ async function getTypescriptFilePaths(typescriptPattern) {
|
|
|
92
92
|
*/
|
|
93
93
|
async function writeUi5RepositoryFiles(fs, path) {
|
|
94
94
|
if (path) {
|
|
95
|
-
const typeScriptFilesPaths = await getTypescriptFilePaths((0,
|
|
95
|
+
const typeScriptFilesPaths = await getTypescriptFilePaths((0, node_path_1.join)(path, '/**/*.ts'));
|
|
96
96
|
if (typeScriptFilesPaths?.length > 0) {
|
|
97
97
|
(0, exports.writeUi5RepositoryFile)(fs, path, constants_1.UI5_REPO_TEXT_FILES, '^.*.ts$');
|
|
98
98
|
}
|
|
@@ -106,7 +106,7 @@ async function writeUi5RepositoryFiles(fs, path) {
|
|
|
106
106
|
*/
|
|
107
107
|
async function writeUi5RepositoryIgnore(fs, path) {
|
|
108
108
|
if (path) {
|
|
109
|
-
const typeScriptFilesPaths = await getTypescriptFilePaths((0,
|
|
109
|
+
const typeScriptFilesPaths = await getTypescriptFilePaths((0, node_path_1.join)(path, '/**/*.ts'));
|
|
110
110
|
if (typeScriptFilesPaths?.length > 0) {
|
|
111
111
|
(0, exports.writeUi5RepositoryFile)(fs, path, constants_1.UI5_REPO_IGNORE, '^.*.ts$\n^.*.ts.map$');
|
|
112
112
|
}
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.generate = generate;
|
|
7
|
-
const
|
|
7
|
+
const node_path_1 = require("node:path");
|
|
8
8
|
const mem_fs_1 = require("mem-fs");
|
|
9
9
|
const mem_fs_editor_1 = require("mem-fs-editor");
|
|
10
10
|
const cloneDeep_1 = __importDefault(require("lodash/cloneDeep"));
|
|
@@ -31,11 +31,11 @@ async function generate(basePath, abapDeployConfig, options, fs) {
|
|
|
31
31
|
const baseConfigFile = options?.baseFile ?? project_access_1.FileName.Ui5Yaml;
|
|
32
32
|
const baseConfig = await (0, project_access_1.readUi5Yaml)(basePath, baseConfigFile, fs);
|
|
33
33
|
const isLib = baseConfig.getType() === 'library';
|
|
34
|
-
const baseConfigPath = (0,
|
|
34
|
+
const baseConfigPath = (0, node_path_1.join)(basePath, baseConfigFile);
|
|
35
35
|
(0, config_1.updateBaseConfig)(isLib, baseConfigPath, baseConfig, fs);
|
|
36
36
|
// deploy config
|
|
37
37
|
const deployConfigFile = options?.deployFile ?? project_access_1.FileName.UI5DeployYaml;
|
|
38
|
-
const deployFilePath = (0,
|
|
38
|
+
const deployFilePath = (0, node_path_1.join)(basePath, deployConfigFile);
|
|
39
39
|
const deployConfig = await (0, config_1.getDeployConfig)(abapConfig, baseConfig);
|
|
40
40
|
fs.write(deployFilePath, deployConfig.toString());
|
|
41
41
|
await (0, scripts_1.updateScripts)(basePath, deployConfigFile, fs, options);
|
package/package.json
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
7
7
|
"directory": "packages/abap-deploy-config-writer"
|
|
8
8
|
},
|
|
9
|
-
"version": "0.2.
|
|
9
|
+
"version": "0.2.20",
|
|
10
10
|
"license": "Apache-2.0",
|
|
11
11
|
"main": "dist/index.js",
|
|
12
12
|
"files": [
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"mem-fs": "2.1.0",
|
|
25
25
|
"mem-fs-editor": "9.4.0",
|
|
26
26
|
"semver": "7.5.4",
|
|
27
|
-
"@sap-ux/project-access": "1.32.
|
|
28
|
-
"@sap-ux/system-access": "0.6.
|
|
29
|
-
"@sap-ux/ui5-config": "0.29.
|
|
27
|
+
"@sap-ux/project-access": "1.32.3",
|
|
28
|
+
"@sap-ux/system-access": "0.6.19",
|
|
29
|
+
"@sap-ux/ui5-config": "0.29.7"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/fs-extra": "9.0.13",
|