@sap-ux/abap-deploy-config-writer 0.2.17 → 0.2.19
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.d.ts +0 -8
- package/dist/file.js +0 -13
- package/dist/index.js +1 -2
- package/dist/scripts.d.ts +3 -2
- package/dist/scripts.js +5 -5
- package/dist/types.d.ts +4 -0
- package/package.json +3 -3
package/dist/file.d.ts
CHANGED
|
@@ -38,12 +38,4 @@ export declare function writeUi5RepositoryFiles(fs: Editor, path?: string): Prom
|
|
|
38
38
|
* @param path - the path where the file will be written
|
|
39
39
|
*/
|
|
40
40
|
export declare function writeUi5RepositoryIgnore(fs: Editor, path?: string): Promise<void>;
|
|
41
|
-
/**
|
|
42
|
-
* Checks if the project is a TypeScript project.
|
|
43
|
-
*
|
|
44
|
-
* @param fs - the memfs editor instance
|
|
45
|
-
* @param basePath - the base path
|
|
46
|
-
* @returns true if the project is a TypeScript project, false otherwise
|
|
47
|
-
*/
|
|
48
|
-
export declare function isTsProject(fs: Editor, basePath: string): boolean;
|
|
49
41
|
//# sourceMappingURL=file.d.ts.map
|
package/dist/file.js
CHANGED
|
@@ -8,11 +8,9 @@ exports.addUi5Dependency = addUi5Dependency;
|
|
|
8
8
|
exports.getLibraryPath = getLibraryPath;
|
|
9
9
|
exports.writeUi5RepositoryFiles = writeUi5RepositoryFiles;
|
|
10
10
|
exports.writeUi5RepositoryIgnore = writeUi5RepositoryIgnore;
|
|
11
|
-
exports.isTsProject = isTsProject;
|
|
12
11
|
const path_1 = require("path");
|
|
13
12
|
const fast_glob_1 = __importDefault(require("fast-glob"));
|
|
14
13
|
const os_1 = require("os");
|
|
15
|
-
const fs_1 = require("fs");
|
|
16
14
|
const project_access_1 = require("@sap-ux/project-access");
|
|
17
15
|
const constants_1 = require("./constants");
|
|
18
16
|
const semver_1 = require("semver");
|
|
@@ -114,15 +112,4 @@ async function writeUi5RepositoryIgnore(fs, path) {
|
|
|
114
112
|
}
|
|
115
113
|
}
|
|
116
114
|
}
|
|
117
|
-
/**
|
|
118
|
-
* Checks if the project is a TypeScript project.
|
|
119
|
-
*
|
|
120
|
-
* @param fs - the memfs editor instance
|
|
121
|
-
* @param basePath - the base path
|
|
122
|
-
* @returns true if the project is a TypeScript project, false otherwise
|
|
123
|
-
*/
|
|
124
|
-
function isTsProject(fs, basePath) {
|
|
125
|
-
const tsconfigPath = (0, path_1.join)(basePath, project_access_1.FileName.Tsconfig);
|
|
126
|
-
return fs.exists(tsconfigPath) || (0, fs_1.existsSync)(tsconfigPath);
|
|
127
|
-
}
|
|
128
115
|
//# sourceMappingURL=file.js.map
|
package/dist/index.js
CHANGED
|
@@ -38,8 +38,7 @@ async function generate(basePath, abapDeployConfig, options, fs) {
|
|
|
38
38
|
const deployFilePath = (0, path_1.join)(basePath, deployConfigFile);
|
|
39
39
|
const deployConfig = await (0, config_1.getDeployConfig)(abapConfig, baseConfig);
|
|
40
40
|
fs.write(deployFilePath, deployConfig.toString());
|
|
41
|
-
|
|
42
|
-
await (0, scripts_1.updateScripts)(basePath, deployConfigFile, fs, includeBuildScript);
|
|
41
|
+
await (0, scripts_1.updateScripts)(basePath, deployConfigFile, fs, options);
|
|
43
42
|
if (isLib) {
|
|
44
43
|
// ui5 repo ignore file
|
|
45
44
|
await (0, project_access_1.addPackageDevDependency)(basePath, constants_1.UI5_TASK_FLATTEN_LIB, constants_1.UI5_TASK_FLATTEN_LIB_VERSION, fs);
|
package/dist/scripts.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import type { Editor } from 'mem-fs-editor';
|
|
2
|
+
import type { DeployConfigOptions } from './types';
|
|
2
3
|
/**
|
|
3
4
|
* Updates the scripts in the package.json file with the provided scripts object.
|
|
4
5
|
*
|
|
5
6
|
* @param {string} basePath - The path to the base directory.
|
|
6
7
|
* @param {string} deployConfigFile - The path to the deploy config file.
|
|
7
8
|
* @param {Editor} fs - The file system editor.
|
|
8
|
-
* @param {
|
|
9
|
+
* @param {DeployConfigOptions} options - The deploy config options.
|
|
9
10
|
*/
|
|
10
|
-
export declare function updateScripts(basePath: string, deployConfigFile: string, fs: Editor,
|
|
11
|
+
export declare function updateScripts(basePath: string, deployConfigFile: string, fs: Editor, options?: DeployConfigOptions): Promise<void>;
|
|
11
12
|
//# sourceMappingURL=scripts.d.ts.map
|
package/dist/scripts.js
CHANGED
|
@@ -9,18 +9,18 @@ const constants_1 = require("./constants");
|
|
|
9
9
|
* @param {string} basePath - The path to the base directory.
|
|
10
10
|
* @param {string} deployConfigFile - The path to the deploy config file.
|
|
11
11
|
* @param {Editor} fs - The file system editor.
|
|
12
|
-
* @param {
|
|
12
|
+
* @param {DeployConfigOptions} options - The deploy config options.
|
|
13
13
|
*/
|
|
14
|
-
async function updateScripts(basePath, deployConfigFile, fs,
|
|
15
|
-
const buildPrefix =
|
|
14
|
+
async function updateScripts(basePath, deployConfigFile, fs, options) {
|
|
15
|
+
const buildPrefix = options?.addBuildToUndeployScript ?? true ? `${constants_1.BUILD_SCRIPT} && ` : '';
|
|
16
16
|
// deploy script
|
|
17
|
-
const deployScript = `${
|
|
17
|
+
const deployScript = `${constants_1.BUILD_SCRIPT} && ${constants_1.DEPLOY_SCRIPT} --config ${deployConfigFile}`;
|
|
18
18
|
await (0, project_access_1.updatePackageScript)(basePath, 'deploy', deployScript, fs);
|
|
19
19
|
// undeploy script
|
|
20
20
|
const undeployScript = `${buildPrefix}${constants_1.UNDEPLOY_SCRIPT} --config ${deployConfigFile}`;
|
|
21
21
|
await (0, project_access_1.updatePackageScript)(basePath, 'undeploy', undeployScript, fs);
|
|
22
22
|
// test mode script
|
|
23
|
-
const deployTestModeScript = `${
|
|
23
|
+
const deployTestModeScript = `${constants_1.BUILD_SCRIPT} && ${constants_1.DEPLOY_SCRIPT} --config ${deployConfigFile} --testMode true`;
|
|
24
24
|
await (0, project_access_1.updatePackageScript)(basePath, 'deploy-test', deployTestModeScript, fs);
|
|
25
25
|
// dependencies
|
|
26
26
|
await (0, project_access_1.addPackageDevDependency)(basePath, constants_1.RIMRAF, constants_1.RIMRAF_VERSION, fs);
|
package/dist/types.d.ts
CHANGED
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.19",
|
|
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.
|
|
27
|
+
"@sap-ux/project-access": "1.32.2",
|
|
28
28
|
"@sap-ux/system-access": "0.6.18",
|
|
29
|
-
"@sap-ux/ui5-config": "0.29.
|
|
29
|
+
"@sap-ux/ui5-config": "0.29.6"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"@types/fs-extra": "9.0.13",
|