@sap-ux/adp-tooling 0.11.0 → 0.11.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.
|
@@ -9,11 +9,11 @@ export declare class WriterFactory {
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates an instance of a writer based on the specified generator type.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @returns
|
|
16
|
-
* @throws
|
|
12
|
+
* @param type - The type of the change which will be handled by the writer.
|
|
13
|
+
* @param fs - The filesystem editor instance.
|
|
14
|
+
* @param projectPath - The path to the project for which the writer is created.
|
|
15
|
+
* @returns An instance of the writer associated with the specified generator type.
|
|
16
|
+
* @throws If the specified generator type is not supported.
|
|
17
17
|
*/
|
|
18
18
|
static createWriter<T extends ChangeType>(type: T, fs: Editor, projectPath: string): IWriterData<T>;
|
|
19
19
|
}
|
|
@@ -9,11 +9,11 @@ class WriterFactory {
|
|
|
9
9
|
/**
|
|
10
10
|
* Creates an instance of a writer based on the specified generator type.
|
|
11
11
|
*
|
|
12
|
-
* @param
|
|
13
|
-
* @param
|
|
14
|
-
* @param
|
|
15
|
-
* @returns
|
|
16
|
-
* @throws
|
|
12
|
+
* @param type - The type of the change which will be handled by the writer.
|
|
13
|
+
* @param fs - The filesystem editor instance.
|
|
14
|
+
* @param projectPath - The path to the project for which the writer is created.
|
|
15
|
+
* @returns An instance of the writer associated with the specified generator type.
|
|
16
|
+
* @throws If the specified generator type is not supported.
|
|
17
17
|
*/
|
|
18
18
|
static createWriter(type, fs, projectPath) {
|
|
19
19
|
const WriterClass = this.writers.get(type);
|
package/dist/writer/options.js
CHANGED
|
@@ -9,9 +9,13 @@ exports.enhanceManifestChangeContentWithFlpConfig = exports.enhanceUI5DeployYaml
|
|
|
9
9
|
*/
|
|
10
10
|
function enhanceUI5Yaml(ui5Config, config) {
|
|
11
11
|
var _a;
|
|
12
|
-
const middlewares = ((_a = config.options) === null || _a === void 0 ? void 0 : _a.fioriTools) ? getFioriToolsMiddlwares(config) : getOpenSourceMiddlewares(config);
|
|
13
12
|
ui5Config.setConfiguration({ propertiesFileSourceEncoding: 'UTF-8' });
|
|
14
|
-
|
|
13
|
+
if ((_a = config.options) === null || _a === void 0 ? void 0 : _a.fioriTools) {
|
|
14
|
+
addFioriToolsMiddlwares(ui5Config, config);
|
|
15
|
+
}
|
|
16
|
+
else {
|
|
17
|
+
addOpenSourceMiddlewares(ui5Config, config);
|
|
18
|
+
}
|
|
15
19
|
}
|
|
16
20
|
exports.enhanceUI5Yaml = enhanceUI5Yaml;
|
|
17
21
|
/**
|
|
@@ -62,21 +66,16 @@ exports.enhanceUI5DeployYaml = enhanceUI5DeployYaml;
|
|
|
62
66
|
/**
|
|
63
67
|
* Get a list of required middlewares using the Fiori tools.
|
|
64
68
|
*
|
|
69
|
+
* @param ui5Config configuration representing the ui5.yaml
|
|
65
70
|
* @param config full project configuration
|
|
66
|
-
* @returns list of required middlewares.
|
|
67
71
|
*/
|
|
68
|
-
function
|
|
72
|
+
function addFioriToolsMiddlwares(ui5Config, config) {
|
|
69
73
|
var _a, _b, _c, _d;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
port: 35729,
|
|
76
|
-
path: 'webapp',
|
|
77
|
-
delay: 300
|
|
78
|
-
}
|
|
79
|
-
},
|
|
74
|
+
const backendConfig = Object.assign({}, config.target);
|
|
75
|
+
(_a = backendConfig.url) !== null && _a !== void 0 ? _a : (backendConfig.url = 'https://REQUIRED_FOR_VSCODE.example');
|
|
76
|
+
backendConfig.path = '/sap';
|
|
77
|
+
ui5Config.addFioriToolsAppReloadMiddleware();
|
|
78
|
+
ui5Config.addCustomMiddleware([
|
|
80
79
|
{
|
|
81
80
|
name: 'fiori-tools-preview',
|
|
82
81
|
afterMiddleware: 'fiori-tools-appreload',
|
|
@@ -86,32 +85,24 @@ function getFioriToolsMiddlwares(config) {
|
|
|
86
85
|
ignoreCertErrors: false
|
|
87
86
|
}
|
|
88
87
|
}
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: 'fiori-tools-proxy',
|
|
92
|
-
afterMiddleware: 'fiori-tools-preview',
|
|
93
|
-
configuration: {
|
|
94
|
-
ignoreCertErrors: false,
|
|
95
|
-
ui5: {
|
|
96
|
-
version: (_b = (_a = config === null || config === void 0 ? void 0 : config.ui5) === null || _a === void 0 ? void 0 : _a.minVersion) !== null && _b !== void 0 ? _b : '', //default to latest if version is not set
|
|
97
|
-
path: ['/resources', '/test-resources'],
|
|
98
|
-
url: (_d = (_c = config === null || config === void 0 ? void 0 : config.ui5) === null || _c === void 0 ? void 0 : _c.frameworkUrl) !== null && _d !== void 0 ? _d : 'https://ui5.sap.com'
|
|
99
|
-
},
|
|
100
|
-
backend: [
|
|
101
|
-
Object.assign(Object.assign({}, config.target), { path: '/sap' })
|
|
102
|
-
]
|
|
103
|
-
}
|
|
104
88
|
}
|
|
105
|
-
];
|
|
89
|
+
]);
|
|
90
|
+
ui5Config.addFioriToolsProxydMiddleware({
|
|
91
|
+
ui5: {
|
|
92
|
+
url: (_b = config === null || config === void 0 ? void 0 : config.ui5) === null || _b === void 0 ? void 0 : _b.frameworkUrl,
|
|
93
|
+
version: (_d = (_c = config === null || config === void 0 ? void 0 : config.ui5) === null || _c === void 0 ? void 0 : _c.minVersion) !== null && _d !== void 0 ? _d : '' //default to latest if version is not set
|
|
94
|
+
},
|
|
95
|
+
backend: [backendConfig]
|
|
96
|
+
});
|
|
106
97
|
}
|
|
107
98
|
/**
|
|
108
99
|
* Get a list of required middlewares using the open source middlewares.
|
|
109
100
|
*
|
|
101
|
+
* @param ui5Config configuration representing the ui5.yaml
|
|
110
102
|
* @param config full project configuration
|
|
111
|
-
* @returns list of required middlewares.
|
|
112
103
|
*/
|
|
113
|
-
function
|
|
114
|
-
|
|
104
|
+
function addOpenSourceMiddlewares(ui5Config, config) {
|
|
105
|
+
ui5Config.addCustomMiddleware([
|
|
115
106
|
{
|
|
116
107
|
name: 'reload-middleware',
|
|
117
108
|
afterMiddleware: 'compression',
|
|
@@ -153,7 +144,7 @@ function getOpenSourceMiddlewares(config) {
|
|
|
153
144
|
}
|
|
154
145
|
}
|
|
155
146
|
}
|
|
156
|
-
];
|
|
147
|
+
]);
|
|
157
148
|
}
|
|
158
149
|
/**
|
|
159
150
|
* Get a list of required custom tasks for Cloud application.
|
package/package.json
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"bugs": {
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
|
|
11
11
|
},
|
|
12
|
-
"version": "0.11.
|
|
12
|
+
"version": "0.11.1",
|
|
13
13
|
"license": "Apache-2.0",
|
|
14
14
|
"author": "@SAP/ux-tools-team",
|
|
15
15
|
"main": "dist/index.js",
|
|
@@ -30,10 +30,10 @@
|
|
|
30
30
|
"prompts": "2.4.2",
|
|
31
31
|
"adm-zip": "0.5.10",
|
|
32
32
|
"@sap-ux/axios-extension": "1.13.1",
|
|
33
|
-
"@sap-ux/project-access": "1.22.
|
|
33
|
+
"@sap-ux/project-access": "1.22.1",
|
|
34
34
|
"@sap-ux/logger": "0.5.1",
|
|
35
35
|
"@sap-ux/system-access": "0.4.1",
|
|
36
|
-
"@sap-ux/ui5-config": "0.22.
|
|
36
|
+
"@sap-ux/ui5-config": "0.22.8",
|
|
37
37
|
"@sap-ux/btp-utils": "0.14.4"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|