@sap-ux/ui-service-sub-generator 0.1.28 → 0.1.29
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getTelemetryData =
|
|
3
|
+
exports.getTelemetryData = getTelemetryData;
|
|
4
4
|
const ui_service_inquirer_1 = require("@sap-ux/ui-service-inquirer");
|
|
5
5
|
/**
|
|
6
6
|
* Get the telemetry data for the UI Service generator event.
|
|
@@ -24,5 +24,4 @@ function getTelemetryData(answers, optionsData) {
|
|
|
24
24
|
LaunchAppGen: !!answers.launchAppGen
|
|
25
25
|
};
|
|
26
26
|
}
|
|
27
|
-
exports.getTelemetryData = getTelemetryData;
|
|
28
27
|
//# sourceMappingURL=telemetryHelper.js.map
|
|
@@ -35,8 +35,8 @@ export type ReqAuth = {
|
|
|
35
35
|
password: string;
|
|
36
36
|
};
|
|
37
37
|
export declare const BAS_OBJECT: {
|
|
38
|
-
BUSINESS_OBJECT:
|
|
39
|
-
CDS:
|
|
38
|
+
BUSINESS_OBJECT: BusinessObjectType;
|
|
39
|
+
CDS: CDSType;
|
|
40
40
|
};
|
|
41
41
|
export interface AppWizardWithCache extends AppWizard {
|
|
42
42
|
[UI_SERVICE_CACHE]?: any;
|
package/generators/app/utils.js
CHANGED
|
@@ -3,7 +3,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.generateService = generateService;
|
|
7
|
+
exports.writeBASMetadata = writeBASMetadata;
|
|
8
|
+
exports.getRelativeUrlFromContent = getRelativeUrlFromContent;
|
|
9
|
+
exports.getMetadata = getMetadata;
|
|
10
|
+
exports.getServiceMedadataContent = getServiceMedadataContent;
|
|
11
|
+
exports.runPostGenHook = runPostGenHook;
|
|
12
|
+
exports.getAppGenSystemData = getAppGenSystemData;
|
|
13
|
+
exports.authenticateInputData = authenticateInputData;
|
|
14
|
+
exports.validateConnection = validateConnection;
|
|
15
|
+
exports.checkConnection = checkConnection;
|
|
16
|
+
exports.setToolbarMessage = setToolbarMessage;
|
|
17
|
+
exports.addToCache = addToCache;
|
|
18
|
+
exports.getFromCache = getFromCache;
|
|
7
19
|
const yeoman_ui_types_1 = require("@sap-devx/yeoman-ui-types");
|
|
8
20
|
const btp_utils_1 = require("@sap-ux/btp-utils");
|
|
9
21
|
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
@@ -39,7 +51,6 @@ async function generateService(objectGeneator, content, transportReqNumber, appW
|
|
|
39
51
|
});
|
|
40
52
|
});
|
|
41
53
|
}
|
|
42
|
-
exports.generateService = generateService;
|
|
43
54
|
/**
|
|
44
55
|
* Write the service metadata file into the BAS Storyboard project.
|
|
45
56
|
*
|
|
@@ -69,7 +80,6 @@ async function writeBASMetadata(serviceConfig, fs, appWizard, inputData, provide
|
|
|
69
80
|
logger_1.default.logger.info((0, i18n_1.t)('info.generationSuccessfulMetadataFail', { serviceName: serviceConfig.serviceName }));
|
|
70
81
|
}
|
|
71
82
|
}
|
|
72
|
-
exports.writeBASMetadata = writeBASMetadata;
|
|
73
83
|
/**
|
|
74
84
|
* Get the relative URL from the service content.
|
|
75
85
|
*
|
|
@@ -85,7 +95,6 @@ function getRelativeUrlFromContent(content) {
|
|
|
85
95
|
}
|
|
86
96
|
return `/sap/opu/odata4/${serviceNamespace}/${contentJson.businessService.serviceBinding.serviceBindingName}/srvd/${serviceNamespace}/${contentJson.businessService.serviceDefinition.serviceDefinitionName}/0001/`;
|
|
87
97
|
}
|
|
88
|
-
exports.getRelativeUrlFromContent = getRelativeUrlFromContent;
|
|
89
98
|
/**
|
|
90
99
|
* Get the metadata for the service url provided. Has a 5 second retry if the metadata is not fetched on first attempt.
|
|
91
100
|
*
|
|
@@ -107,7 +116,6 @@ async function getMetadata(relativeURL, provider, retry = false) {
|
|
|
107
116
|
return '';
|
|
108
117
|
});
|
|
109
118
|
}
|
|
110
|
-
exports.getMetadata = getMetadata;
|
|
111
119
|
/**
|
|
112
120
|
* Get the service metadata content to be written to the .service.metadata file.
|
|
113
121
|
*
|
|
@@ -128,7 +136,6 @@ function getServiceMedadataContent(providerSystem, relativeURL, metadata, conten
|
|
|
128
136
|
providerType: service_provider_apis_1.ProviderType.SapSystem
|
|
129
137
|
};
|
|
130
138
|
}
|
|
131
|
-
exports.getServiceMedadataContent = getServiceMedadataContent;
|
|
132
139
|
/**
|
|
133
140
|
* Run the post generation hook to open the application generator via command with specific payload.
|
|
134
141
|
*
|
|
@@ -160,7 +167,6 @@ async function runPostGenHook(options, systemData, content, provider) {
|
|
|
160
167
|
options.vscode?.commands?.executeCommand?.(options.data?.appGenLaunchCommand ?? 'sap.ux.service.generated.handler', appGenData);
|
|
161
168
|
}, 500);
|
|
162
169
|
}
|
|
163
|
-
exports.runPostGenHook = runPostGenHook;
|
|
164
170
|
/**
|
|
165
171
|
* Get the system data for the application generator.
|
|
166
172
|
*
|
|
@@ -176,7 +182,6 @@ function getAppGenSystemData(system) {
|
|
|
176
182
|
client: system.connectedSystem?.backendSystem?.client ?? ''
|
|
177
183
|
};
|
|
178
184
|
}
|
|
179
|
-
exports.getAppGenSystemData = getAppGenSystemData;
|
|
180
185
|
/**
|
|
181
186
|
* Authenticate the auth input data provided by BAS Service Center.
|
|
182
187
|
*
|
|
@@ -187,7 +192,6 @@ async function authenticateInputData(data, system) {
|
|
|
187
192
|
const reqAuth = data.user && data.password ? { username: data.user, password: data.password } : undefined;
|
|
188
193
|
await validateConnection(data.systemName, system, reqAuth);
|
|
189
194
|
}
|
|
190
|
-
exports.authenticateInputData = authenticateInputData;
|
|
191
195
|
/**
|
|
192
196
|
* Validate the connection to the system.
|
|
193
197
|
*
|
|
@@ -217,7 +221,6 @@ async function validateConnection(systemName, system, reqAuth) {
|
|
|
217
221
|
return;
|
|
218
222
|
}
|
|
219
223
|
}
|
|
220
|
-
exports.validateConnection = validateConnection;
|
|
221
224
|
/**
|
|
222
225
|
* Check the connection to the system.
|
|
223
226
|
*
|
|
@@ -237,7 +240,6 @@ async function checkConnection(provider) {
|
|
|
237
240
|
return false;
|
|
238
241
|
}
|
|
239
242
|
}
|
|
240
|
-
exports.checkConnection = checkConnection;
|
|
241
243
|
/**
|
|
242
244
|
* Set the Yeoman UI (AppWizard) toolbar message based on the input data.
|
|
243
245
|
*
|
|
@@ -258,7 +260,6 @@ function setToolbarMessage(data, systemSelectionAnswers, appWizard) {
|
|
|
258
260
|
appWizard.showWarning((0, i18n_1.t)('info.generationWarning'), yeoman_ui_types_1.MessageType.prompt);
|
|
259
261
|
}
|
|
260
262
|
}
|
|
261
|
-
exports.setToolbarMessage = setToolbarMessage;
|
|
262
263
|
/**
|
|
263
264
|
* Add the system selection and object answers to the cache.
|
|
264
265
|
*
|
|
@@ -275,7 +276,6 @@ function addToCache(appWizard, systemSelectionAnswers, objectAnswers) {
|
|
|
275
276
|
});
|
|
276
277
|
}
|
|
277
278
|
}
|
|
278
|
-
exports.addToCache = addToCache;
|
|
279
279
|
/**
|
|
280
280
|
* Get the system selection answers and system name from the cache.
|
|
281
281
|
*
|
|
@@ -288,5 +288,4 @@ function getFromCache(appWizard) {
|
|
|
288
288
|
appWizard[utils_1.UI_SERVICE_CACHE].systemName
|
|
289
289
|
];
|
|
290
290
|
}
|
|
291
|
-
exports.getFromCache = getFromCache;
|
|
292
291
|
//# sourceMappingURL=utils.js.map
|
package/generators/utils/i18n.js
CHANGED
|
@@ -3,14 +3,14 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.
|
|
6
|
+
exports.initI18n = initI18n;
|
|
7
|
+
exports.t = t;
|
|
7
8
|
const i18next_1 = __importDefault(require("i18next"));
|
|
8
9
|
const ui_service_generator_i18n_json_1 = __importDefault(require("../translations/ui-service-generator.i18n.json"));
|
|
9
10
|
const uiServiceGeneratorNs = 'ui-service-generator';
|
|
10
11
|
async function initI18n() {
|
|
11
12
|
await i18next_1.default.init({ lng: 'en', fallbackLng: 'en' }, () => i18next_1.default.addResourceBundle('en', uiServiceGeneratorNs, ui_service_generator_i18n_json_1.default));
|
|
12
13
|
}
|
|
13
|
-
exports.initI18n = initI18n;
|
|
14
14
|
/**
|
|
15
15
|
* Helper function facading the call to i18next. Unless a namespace option is provided the local namespace will be used.
|
|
16
16
|
*
|
|
@@ -24,7 +24,6 @@ function t(key, options) {
|
|
|
24
24
|
}
|
|
25
25
|
return i18next_1.default.t(key, options);
|
|
26
26
|
}
|
|
27
|
-
exports.t = t;
|
|
28
27
|
initI18n().catch(() => {
|
|
29
28
|
// Needed for lint
|
|
30
29
|
});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap-ux/ui-service-sub-generator",
|
|
3
3
|
"description": "Generator for creating UI Service",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.29",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
@@ -22,15 +22,15 @@
|
|
|
22
22
|
"@sap-devx/yeoman-ui-types": "1.16.9",
|
|
23
23
|
"i18next": "23.5.1",
|
|
24
24
|
"yeoman-generator": "5.10.0",
|
|
25
|
-
"@sap-ux/axios-extension": "1.22.
|
|
26
|
-
"@sap-ux/btp-utils": "1.1.0",
|
|
25
|
+
"@sap-ux/axios-extension": "1.22.2",
|
|
27
26
|
"@sap-ux/feature-toggle": "0.3.0",
|
|
27
|
+
"@sap-ux/btp-utils": "1.1.0",
|
|
28
28
|
"@sap-ux/fiori-generator-shared": "0.12.8",
|
|
29
29
|
"@sap-ux/inquirer-common": "0.7.13",
|
|
30
|
-
"@sap-ux/
|
|
31
|
-
"@sap-ux/system-access": "0.6.6",
|
|
30
|
+
"@sap-ux/system-access": "0.6.7",
|
|
32
31
|
"@sap-ux/telemetry": "0.6.3",
|
|
33
|
-
"@sap-ux/ui-service-inquirer": "0.1.
|
|
32
|
+
"@sap-ux/ui-service-inquirer": "0.1.29",
|
|
33
|
+
"@sap-ux/logger": "0.7.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@sap/service-provider-apis": "2.1.5",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"mem-fs": "2.1.0",
|
|
46
46
|
"mem-fs-editor": "9.4.0",
|
|
47
47
|
"rimraf": "5.0.5",
|
|
48
|
-
"typescript": "5.3.3",
|
|
49
48
|
"yeoman-test": "6.3.0",
|
|
50
49
|
"@sap-ux/jest-file-matchers": "0.2.2",
|
|
51
50
|
"@sap-ux/store": "1.1.0"
|