@sap-ux/cf-deploy-config-writer 1.0.9 → 1.0.10
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/mta-config/index.js +1 -1
- package/dist/mta-config/mta.js +5 -9
- package/dist/utils.d.ts +2 -5
- package/dist/utils.js +5 -11
- package/package.json +4 -4
- package/templates/common/xs-security.json +2 -3
package/dist/mta-config/index.js
CHANGED
|
@@ -133,7 +133,7 @@ async function createCAPMTAAppFrontend(config, fs) {
|
|
|
133
133
|
mtaVersion: config.mtaVersion ?? MTAVersion
|
|
134
134
|
});
|
|
135
135
|
// Add missing configurations
|
|
136
|
-
addXSSecurityConfig(config, fs
|
|
136
|
+
addXSSecurityConfig(config, fs);
|
|
137
137
|
LoggerHelper.logger?.debug(t('debug.mtaCreated', { mtaPath: config.mtaPath }));
|
|
138
138
|
}
|
|
139
139
|
/**
|
package/dist/mta-config/mta.js
CHANGED
|
@@ -161,7 +161,7 @@ export class MtaConfig {
|
|
|
161
161
|
path: './xs-security.json',
|
|
162
162
|
'service-name': `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-xsuaa-service`,
|
|
163
163
|
config: {
|
|
164
|
-
xsappname: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}
|
|
164
|
+
xsappname: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-\${org}-\${space}`,
|
|
165
165
|
'tenant-mode': 'dedicated'
|
|
166
166
|
}
|
|
167
167
|
}
|
|
@@ -338,14 +338,10 @@ export class MtaConfig {
|
|
|
338
338
|
service: 'xsuaa',
|
|
339
339
|
'service-name': `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-xsuaa-service`,
|
|
340
340
|
'service-plan': 'application',
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
'tenant-mode': 'dedicated'
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
: {})
|
|
341
|
+
config: {
|
|
342
|
+
xsappname: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-\${org}-\${space}`,
|
|
343
|
+
'tenant-mode': 'dedicated'
|
|
344
|
+
}
|
|
349
345
|
}
|
|
350
346
|
};
|
|
351
347
|
await this.mta?.addResource(resource);
|
package/dist/utils.d.ts
CHANGED
|
@@ -76,11 +76,9 @@ export declare function validateVersion(mtaVersion?: string): boolean;
|
|
|
76
76
|
*
|
|
77
77
|
* @param config MTA base configuration
|
|
78
78
|
* @param config.mtaPath Path to the MTA project
|
|
79
|
-
* @param config.mtaId MTA ID used for security configuration
|
|
80
79
|
* @param fs Reference to a mem-fs editor
|
|
81
|
-
* @param addTenant If true, append tenant configuration to the xs-security.json file (default: true)
|
|
82
80
|
*/
|
|
83
|
-
export declare function addXSSecurityConfig({ mtaPath
|
|
81
|
+
export declare function addXSSecurityConfig({ mtaPath }: MTABaseConfig, fs: Editor): void;
|
|
84
82
|
/**
|
|
85
83
|
* Appends .gitignore to project folder.
|
|
86
84
|
*
|
|
@@ -109,9 +107,8 @@ export declare function addCommonPackageDependencies(targetPath: string, fs: Edi
|
|
|
109
107
|
*
|
|
110
108
|
* @param config Writer configuration
|
|
111
109
|
* @param fs Reference to a mem-fs editor
|
|
112
|
-
* @param addTenant If true, append tenant configuration to the xs-security.json file (default: true)
|
|
113
110
|
*/
|
|
114
|
-
export declare function generateSupportingConfig(config: MTABaseConfig, fs: Editor
|
|
111
|
+
export declare function generateSupportingConfig(config: MTABaseConfig, fs: Editor): Promise<void>;
|
|
115
112
|
/**
|
|
116
113
|
* Update the writer configuration with defaults.
|
|
117
114
|
*
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ import { coerce, satisfies } from 'semver';
|
|
|
3
3
|
import { CommandRunner } from '@sap-ux/nodejs-utils';
|
|
4
4
|
import { isAppStudio, listDestinations, isFullUrlDestination } from '@sap-ux/btp-utils';
|
|
5
5
|
import { addPackageDevDependency, FileName, updatePackageScript } from '@sap-ux/project-access';
|
|
6
|
-
import { MTAVersion, UI5Package, UI5PackageVersion, UI5TaskZipperPackage, UI5TaskZipperPackageVersion, rootDeployMTAScript, undeployMTAScript, Rimraf, RimrafVersion, MbtPackageVersion, MbtPackage, MTABuildScript, CDSDKPackage, CDSPackage
|
|
6
|
+
import { MTAVersion, UI5Package, UI5PackageVersion, UI5TaskZipperPackage, UI5TaskZipperPackageVersion, rootDeployMTAScript, undeployMTAScript, Rimraf, RimrafVersion, MbtPackageVersion, MbtPackage, MTABuildScript, CDSDKPackage, CDSPackage } from './constants.js';
|
|
7
7
|
import { fileURLToPath } from 'node:url';
|
|
8
8
|
/**
|
|
9
9
|
* Read manifest file for processing.
|
|
@@ -104,15 +104,10 @@ export function validateVersion(mtaVersion) {
|
|
|
104
104
|
*
|
|
105
105
|
* @param config MTA base configuration
|
|
106
106
|
* @param config.mtaPath Path to the MTA project
|
|
107
|
-
* @param config.mtaId MTA ID used for security configuration
|
|
108
107
|
* @param fs Reference to a mem-fs editor
|
|
109
|
-
* @param addTenant If true, append tenant configuration to the xs-security.json file (default: true)
|
|
110
108
|
*/
|
|
111
|
-
export function addXSSecurityConfig({ mtaPath
|
|
112
|
-
fs.copyTpl(getTemplatePath(`common/${FileName.XSSecurityJson}`), join(mtaPath, FileName.XSSecurityJson), {
|
|
113
|
-
id: mtaId.slice(0, MAX_MTA_PREFIX_LENGTH),
|
|
114
|
-
addTenant
|
|
115
|
-
});
|
|
109
|
+
export function addXSSecurityConfig({ mtaPath }, fs) {
|
|
110
|
+
fs.copyTpl(getTemplatePath(`common/${FileName.XSSecurityJson}`), join(mtaPath, FileName.XSSecurityJson), {});
|
|
116
111
|
}
|
|
117
112
|
/**
|
|
118
113
|
* Appends .gitignore to project folder.
|
|
@@ -151,14 +146,13 @@ export async function addCommonPackageDependencies(targetPath, fs) {
|
|
|
151
146
|
*
|
|
152
147
|
* @param config Writer configuration
|
|
153
148
|
* @param fs Reference to a mem-fs editor
|
|
154
|
-
* @param addTenant If true, append tenant configuration to the xs-security.json file (default: true)
|
|
155
149
|
*/
|
|
156
|
-
export async function generateSupportingConfig(config, fs
|
|
150
|
+
export async function generateSupportingConfig(config, fs) {
|
|
157
151
|
if (config.mtaId && !fs.exists(join(config.mtaPath, 'package.json'))) {
|
|
158
152
|
addRootPackage(config, fs);
|
|
159
153
|
}
|
|
160
154
|
if (config.mtaId && !fs.exists(join(config.mtaPath, FileName.XSSecurityJson))) {
|
|
161
|
-
addXSSecurityConfig(config, fs
|
|
155
|
+
addXSSecurityConfig(config, fs);
|
|
162
156
|
}
|
|
163
157
|
// Be a good citizen and add a .gitignore if missing from the existing project root
|
|
164
158
|
if (!fs.exists(join(config.mtaPath, '.gitignore'))) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/cf-deploy-config-writer",
|
|
3
3
|
"description": "Add or amend Cloud Foundry and ABAP deployment configuration for SAP projects",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.10",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"mem-fs": "2.1.0",
|
|
31
31
|
"mem-fs-editor": "9.4.0",
|
|
32
32
|
"hasbin": "1.2.3",
|
|
33
|
+
"@sap-ux/project-access": "2.1.2",
|
|
34
|
+
"@sap-ux/yaml": "1.0.1",
|
|
33
35
|
"@sap-ux/btp-utils": "2.0.2",
|
|
34
36
|
"@sap-ux/logger": "1.0.1",
|
|
35
|
-
"@sap-ux/project-access": "2.1.2",
|
|
36
37
|
"@sap-ux/ui5-config": "1.0.3",
|
|
37
|
-
"@sap-ux/nodejs-utils": "1.0.3"
|
|
38
|
-
"@sap-ux/yaml": "1.0.1"
|
|
38
|
+
"@sap-ux/nodejs-utils": "1.0.3"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
41
|
"@jest/globals": "30.3.0",
|