@sap-ux/fiori-app-sub-generator 0.15.21 → 1.0.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.
- package/generators/app/index.d.ts +1 -1
- package/generators/app/index.js +2 -4
- package/generators/app-headless/index.d.ts +2 -2
- package/generators/app-headless/index.js +17 -21
- package/generators/app-headless/resolve.js +11 -16
- package/generators/app-headless/transforms.d.ts +1 -1
- package/generators/app-headless/transforms.js +35 -38
- package/generators/fiori-app-generator/end.d.ts +1 -1
- package/generators/fiori-app-generator/end.js +23 -25
- package/generators/fiori-app-generator/fioriAppGenerator.d.ts +2 -2
- package/generators/fiori-app-generator/fioriAppGenerator.js +92 -99
- package/generators/fiori-app-generator/fioriAppGeneratorOptions.d.ts +1 -1
- package/generators/fiori-app-generator/fioriAppGeneratorOptions.js +1 -2
- package/generators/fiori-app-generator/index.d.ts +2 -2
- package/generators/fiori-app-generator/index.js +2 -18
- package/generators/fiori-app-generator/install.js +10 -13
- package/generators/fiori-app-generator/prompting.d.ts +1 -1
- package/generators/fiori-app-generator/prompting.js +60 -70
- package/generators/fiori-app-generator/subgenHelpers.d.ts +1 -1
- package/generators/fiori-app-generator/subgenHelpers.js +8 -12
- package/generators/fiori-app-generator/transforms.d.ts +2 -3
- package/generators/fiori-app-generator/transforms.js +63 -66
- package/generators/fiori-app-generator/writing.d.ts +1 -1
- package/generators/fiori-app-generator/writing.js +18 -22
- package/generators/index.d.ts +5 -5
- package/generators/index.js +5 -21
- package/generators/types/common.js +1 -2
- package/generators/types/constants.d.ts +1 -1
- package/generators/types/constants.js +59 -52
- package/generators/types/external.d.ts +5 -4
- package/generators/types/external.js +40 -45
- package/generators/types/index.d.ts +6 -6
- package/generators/types/index.js +6 -22
- package/generators/types/state.d.ts +2 -2
- package/generators/types/state.js +1 -2
- package/generators/types/telemetryEvents.js +1 -2
- package/generators/types/yeomanUiStepConfig.js +1 -2
- package/generators/utils/appWizardCache.d.ts +1 -1
- package/generators/utils/appWizardCache.js +9 -15
- package/generators/utils/command-runner.js +9 -13
- package/generators/utils/common.d.ts +3 -3
- package/generators/utils/common.js +64 -81
- package/generators/utils/eventHooks.js +6 -10
- package/generators/utils/i18n.js +15 -23
- package/generators/utils/index.d.ts +8 -8
- package/generators/utils/index.js +8 -24
- package/generators/utils/sapuxLayer.js +3 -6
- package/generators/utils/stepsHelper.d.ts +3 -4
- package/generators/utils/stepsHelper.js +10 -17
- package/generators/utils/telemetry.d.ts +1 -1
- package/generators/utils/telemetry.js +9 -12
- package/package.json +27 -25
|
@@ -1,11 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
6
|
-
const node_path_1 = require("node:path");
|
|
7
|
-
const types_1 = require("../types");
|
|
8
|
-
const utils_1 = require("../utils");
|
|
1
|
+
import { generateAppGenInfo, getHostEnvironment } from '@sap-ux/fiori-generator-shared';
|
|
2
|
+
import { basename, join } from 'node:path';
|
|
3
|
+
import { DEFAULT_CAP_HOST } from '../types/index.js';
|
|
4
|
+
import { getLaunchText, getReadMeDataSourceLabel, isAbapCloud, t } from '../utils/index.js';
|
|
9
5
|
/**
|
|
10
6
|
* Writes app related information files - README.md & .appGenInfo.json.
|
|
11
7
|
* The files are based on the project, service, and additional properties.
|
|
@@ -22,45 +18,45 @@ const utils_1 = require("../utils");
|
|
|
22
18
|
* @param fs
|
|
23
19
|
* @param existingAppGenInfo
|
|
24
20
|
*/
|
|
25
|
-
async function writeAppGenInfoFiles({ project, service, floorplan, entityRelatedConfig, appGenInfo }, generatorName, generatorVersion, targetPath, fs, existingAppGenInfo) {
|
|
26
|
-
const templateLabel =
|
|
21
|
+
export async function writeAppGenInfoFiles({ project, service, floorplan, entityRelatedConfig, appGenInfo }, generatorName, generatorVersion, targetPath, fs, existingAppGenInfo) {
|
|
22
|
+
const templateLabel = t(`floorplans.label.${floorplan}`, {
|
|
27
23
|
odataVersion: service.version
|
|
28
24
|
});
|
|
29
|
-
const datasourceLabel =
|
|
25
|
+
const datasourceLabel = getReadMeDataSourceLabel(service.source, isAbapCloud(service.connectedSystem), service.apiHubConfig?.apiHubType);
|
|
30
26
|
// Assign any custom overriding properties that may be provided via headless, adaptors
|
|
31
27
|
const appGenInfoCustom = Object.assign({
|
|
32
28
|
generatorName,
|
|
33
29
|
generatorVersion,
|
|
34
30
|
template: templateLabel,
|
|
35
31
|
serviceType: datasourceLabel,
|
|
36
|
-
serviceUrl: `${service.capService ?
|
|
37
|
-
|
|
32
|
+
serviceUrl: `${service.capService ? DEFAULT_CAP_HOST : (service.host ?? '')}${service.servicePath ?? ''}` ||
|
|
33
|
+
t('texts.notApplicable')
|
|
38
34
|
}, existingAppGenInfo, appGenInfo);
|
|
39
35
|
appGenInfoCustom.entityRelatedConfig ??= [];
|
|
40
36
|
if (entityRelatedConfig?.mainEntity) {
|
|
41
37
|
appGenInfoCustom.entityRelatedConfig.push({
|
|
42
|
-
type:
|
|
38
|
+
type: t('readme.label.mainEntity'),
|
|
43
39
|
value: entityRelatedConfig.mainEntity.entitySetName
|
|
44
40
|
});
|
|
45
41
|
}
|
|
46
42
|
if (entityRelatedConfig?.navigationEntity) {
|
|
47
43
|
appGenInfoCustom.entityRelatedConfig.push({
|
|
48
|
-
type:
|
|
44
|
+
type: t('readme.label.navigationEntity'),
|
|
49
45
|
value: entityRelatedConfig.navigationEntity.navigationPropertyName || 'None'
|
|
50
46
|
});
|
|
51
47
|
}
|
|
52
48
|
if (entityRelatedConfig?.filterEntitySet) {
|
|
53
49
|
appGenInfoCustom.entityRelatedConfig.push({
|
|
54
|
-
type:
|
|
50
|
+
type: t('readme.label.filterEntityType'),
|
|
55
51
|
value: entityRelatedConfig.filterEntitySet.entitySetName
|
|
56
52
|
});
|
|
57
53
|
}
|
|
58
|
-
const launchText = await
|
|
54
|
+
const launchText = await getLaunchText(service.capService, project.name, !!project.enableTypeScript, project.namespace);
|
|
59
55
|
const genInfo = {
|
|
60
56
|
generationDate: appGenInfoCustom?.generationDate ?? new Date().toString(),
|
|
61
|
-
generatorPlatform: appGenInfoCustom?.generatorPlatform ??
|
|
57
|
+
generatorPlatform: appGenInfoCustom?.generatorPlatform ?? getHostEnvironment().name,
|
|
62
58
|
serviceType: appGenInfoCustom?.serviceType,
|
|
63
|
-
metadataFilename: service.localEdmxFilePath ?
|
|
59
|
+
metadataFilename: service.localEdmxFilePath ? basename(service.localEdmxFilePath) : '',
|
|
64
60
|
serviceId: service.serviceId,
|
|
65
61
|
serviceUrl: appGenInfoCustom?.serviceUrl,
|
|
66
62
|
appName: project.name,
|
|
@@ -80,7 +76,7 @@ async function writeAppGenInfoFiles({ project, service, floorplan, entityRelated
|
|
|
80
76
|
launchText,
|
|
81
77
|
valueHelpDownloaded: service.valueListMetadata && service.valueListMetadata.length > 0
|
|
82
78
|
};
|
|
83
|
-
|
|
79
|
+
generateAppGenInfo(targetPath, genInfo, fs);
|
|
84
80
|
}
|
|
85
81
|
/**
|
|
86
82
|
* Create the files for apiHub integration.
|
|
@@ -89,8 +85,8 @@ async function writeAppGenInfoFiles({ project, service, floorplan, entityRelated
|
|
|
89
85
|
* @param destPath
|
|
90
86
|
* @param apiHubConfig
|
|
91
87
|
*/
|
|
92
|
-
function writeAPIHubKeyFiles(fs, destPath, apiHubConfig) {
|
|
93
|
-
const envFilePath =
|
|
88
|
+
export function writeAPIHubKeyFiles(fs, destPath, apiHubConfig) {
|
|
89
|
+
const envFilePath = join(destPath, '.env');
|
|
94
90
|
const envContent = `API_HUB_API_KEY=${apiHubConfig.apiHubKey}\nAPI_HUB_TYPE=${apiHubConfig.apiHubType}`;
|
|
95
91
|
// Create .env to store apiHub integration.
|
|
96
92
|
fs.write(envFilePath, envContent);
|
package/generators/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export * from './types';
|
|
2
|
-
export * from './app';
|
|
3
|
-
export * from './app-headless';
|
|
4
|
-
export * from './utils';
|
|
5
|
-
export * from './fiori-app-generator';
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export * from './app/index.js';
|
|
3
|
+
export * from './app-headless/index.js';
|
|
4
|
+
export * from './utils/index.js';
|
|
5
|
+
export * from './fiori-app-generator/index.js';
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/generators/index.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./types"), exports);
|
|
18
|
-
__exportStar(require("./app"), exports);
|
|
19
|
-
__exportStar(require("./app-headless"), exports);
|
|
20
|
-
__exportStar(require("./utils"), exports);
|
|
21
|
-
__exportStar(require("./fiori-app-generator"), exports);
|
|
1
|
+
export * from './types/index.js';
|
|
2
|
+
export * from './app/index.js';
|
|
3
|
+
export * from './app-headless/index.js';
|
|
4
|
+
export * from './utils/index.js';
|
|
5
|
+
export * from './fiori-app-generator/index.js';
|
|
22
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { FioriStep } from './yeomanUiStepConfig';
|
|
1
|
+
import type { FioriStep } from './yeomanUiStepConfig.js';
|
|
2
2
|
export declare const LEGACY_CAP_TYPE_NODE = "capNode";
|
|
3
3
|
export declare const LEGACY_CAP_TYPE_JAVA = "capJava";
|
|
4
4
|
export declare const enum SapSystemSourceType {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { t } from '../utils/i18n.js';
|
|
2
|
+
export const LEGACY_CAP_TYPE_NODE = 'capNode';
|
|
3
|
+
export const LEGACY_CAP_TYPE_JAVA = 'capJava';
|
|
4
|
+
export var SapSystemSourceType;
|
|
5
|
+
(function (SapSystemSourceType) {
|
|
6
|
+
SapSystemSourceType["ABAP_CLOUD"] = "abapCloud";
|
|
7
|
+
SapSystemSourceType["ON_PREM"] = "onPrem";
|
|
8
|
+
})(SapSystemSourceType || (SapSystemSourceType = {}));
|
|
9
|
+
export const PLATFORMS = {
|
|
8
10
|
VSCODE: {
|
|
9
11
|
name: 'Visual Studio Code',
|
|
10
12
|
technical: 'VSCode'
|
|
@@ -18,83 +20,88 @@ exports.PLATFORMS = {
|
|
|
18
20
|
technical: 'CLI'
|
|
19
21
|
}
|
|
20
22
|
};
|
|
21
|
-
|
|
23
|
+
export const UI5_VERSION_PROPS = {
|
|
22
24
|
OFFICIAL_URL: 'https://ui5.sap.com',
|
|
23
25
|
BCP_OFFICIAL_URL: 'https://sapui5.hana.ondemand.com',
|
|
24
26
|
SNAPSHOT_URL: 'https://sapui5preview-sapui5.dispatcher.int.sap.eu2.hana.ondemand.com',
|
|
25
27
|
VERSIONS_FILE: 'neo-app.json'
|
|
26
28
|
};
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
29
|
+
export const SAP_CLIENT_KEY = 'sap-client';
|
|
30
|
+
export const API_HUB_API_KEY = 'API_HUB_API_KEY';
|
|
31
|
+
export const API_HUB_TYPE = 'API_HUB_TYPE';
|
|
32
|
+
export var ApiHubType;
|
|
33
|
+
(function (ApiHubType) {
|
|
34
|
+
ApiHubType["apiHub"] = "API_HUB";
|
|
35
|
+
ApiHubType["apiHubEnterprise"] = "API_HUB_ENTERPRISE";
|
|
36
|
+
})(ApiHubType || (ApiHubType = {}));
|
|
37
|
+
export const STEP_FLOORPLAN = 'FLOORPLAN';
|
|
38
|
+
export const STEP_DATASOURCE_AND_SERVICE = 'DATASOURCE_AND_SERVICE';
|
|
39
|
+
export const STEP_ENTITY = 'ENTITY';
|
|
40
|
+
export const STEP_PROJECT_ATTRIBUTES = 'PROJECT_ATTRIBUTES';
|
|
41
|
+
export const STEP_DEPLOY_CONFIG = 'DEPLOY_CONFIG';
|
|
42
|
+
export const STEP_FLP_CONFIG = 'FLP_CONFIG';
|
|
36
43
|
// All steps keyed on name
|
|
37
|
-
|
|
44
|
+
export const FIORI_STEPS = [
|
|
38
45
|
{
|
|
39
|
-
key:
|
|
40
|
-
name:
|
|
41
|
-
description:
|
|
46
|
+
key: STEP_FLOORPLAN,
|
|
47
|
+
name: t('steps.templateSelection.title'),
|
|
48
|
+
description: t('steps.templateSelection.description'),
|
|
42
49
|
order: 0
|
|
43
50
|
},
|
|
44
51
|
{
|
|
45
|
-
key:
|
|
46
|
-
name:
|
|
47
|
-
description:
|
|
52
|
+
key: STEP_DATASOURCE_AND_SERVICE,
|
|
53
|
+
name: t('steps.datasourceAndServiceSelection.title'),
|
|
54
|
+
description: t('steps.datasourceAndServiceSelection.description'),
|
|
48
55
|
order: 1
|
|
49
56
|
},
|
|
50
57
|
{
|
|
51
|
-
key:
|
|
52
|
-
name:
|
|
53
|
-
description:
|
|
58
|
+
key: STEP_ENTITY,
|
|
59
|
+
name: t('steps.entityOrViewConfig.title'),
|
|
60
|
+
description: t('steps.entityOrViewConfig.description'),
|
|
54
61
|
order: 2
|
|
55
62
|
},
|
|
56
63
|
{
|
|
57
|
-
key:
|
|
58
|
-
name:
|
|
59
|
-
description:
|
|
64
|
+
key: STEP_PROJECT_ATTRIBUTES,
|
|
65
|
+
name: t('steps.projectAttributesConfig.title'),
|
|
66
|
+
description: t('steps.projectAttributesConfig.description'),
|
|
60
67
|
order: 3
|
|
61
68
|
},
|
|
62
69
|
{
|
|
63
|
-
key:
|
|
64
|
-
name:
|
|
65
|
-
description:
|
|
66
|
-
dependency:
|
|
70
|
+
key: STEP_DEPLOY_CONFIG,
|
|
71
|
+
name: t('steps.deployConfig.title'),
|
|
72
|
+
description: t('steps.deployConfig.description'),
|
|
73
|
+
dependency: t('steps.projectAttributesConfig.title'),
|
|
67
74
|
order: 4
|
|
68
75
|
},
|
|
69
76
|
{
|
|
70
|
-
key:
|
|
71
|
-
name:
|
|
72
|
-
description:
|
|
73
|
-
dependency:
|
|
77
|
+
key: STEP_FLP_CONFIG,
|
|
78
|
+
name: t('steps.flpConfig.title'),
|
|
79
|
+
description: t('steps.flpConfig.description'),
|
|
80
|
+
dependency: t('steps.projectAttributesConfig.title'),
|
|
74
81
|
order: 5
|
|
75
82
|
}
|
|
76
83
|
];
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
84
|
+
export const DEFAULT_HOST = 'http://localhost';
|
|
85
|
+
export const DEFAULT_CAP_HOST = 'http://localhost:4004';
|
|
86
|
+
export const DEFAULT_SERVICE_PATH = '/sap/opu/odata';
|
|
80
87
|
// Manifest constants
|
|
81
|
-
|
|
82
|
-
|
|
88
|
+
export const MAIN_DATASOURCE_NAME = 'mainService';
|
|
89
|
+
export const MAIN_MODEL_NAME = 'mainModel';
|
|
83
90
|
// The generator name to appear in README.md, telemetry events and logs
|
|
84
|
-
|
|
85
|
-
|
|
91
|
+
export const generatorName = 'SAP Fiori Application Generator';
|
|
92
|
+
export const FPM_DEFAULT_PAGE_NAME = 'Main';
|
|
86
93
|
// App gen specific (not writer specific) supported UI5 versions
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
export const minSupportedUi5Version = '1.65.0';
|
|
95
|
+
export const minSupportedUi5VersionV4 = '1.84.0';
|
|
89
96
|
// The minimum UI5 version required for page building block feature
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
export const minUi5VersionForPageBuildingBlock = '1.136.0';
|
|
98
|
+
export const defaultNavActionTile = 'tile';
|
|
99
|
+
export const defaultNavActionDisplay = 'display';
|
|
93
100
|
/**
|
|
94
101
|
* Represents a list of App Generator specific feature toggles.
|
|
95
102
|
*/
|
|
96
|
-
var Features;
|
|
103
|
+
export var Features;
|
|
97
104
|
(function (Features) {
|
|
98
105
|
Features["enableGAIntegration"] = "enableGAIntegration"; // Adds support for GA launch commands with GA links
|
|
99
|
-
})(Features || (
|
|
106
|
+
})(Features || (Features = {}));
|
|
100
107
|
//# sourceMappingURL=constants.js.map
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import type { IPrompt as Step } from '@sap-devx/yeoman-ui-types';
|
|
2
2
|
import { TemplateType as FETemplateType } from '@sap-ux/fiori-elements-writer';
|
|
3
3
|
import { TemplateType as FFTemplateType } from '@sap-ux/fiori-freestyle-writer';
|
|
4
|
-
import { AppConfig,
|
|
4
|
+
import type { AppConfig, Floorplan } from '@sap-ux/fiori-generator-shared';
|
|
5
5
|
import type { CapRuntime, EntityRelatedAnswers } from '@sap-ux/odata-service-inquirer';
|
|
6
6
|
import { OdataVersion } from '@sap-ux/odata-service-inquirer';
|
|
7
|
-
import type { FioriGeneratorPromptSettings, SubGeneratorPromptSettings } from './common';
|
|
7
|
+
import type { FioriGeneratorPromptSettings, SubGeneratorPromptSettings } from './common.js';
|
|
8
8
|
import type { Answers } from 'inquirer';
|
|
9
|
-
import { type ALPOptions, type Project, type Service } from './state';
|
|
10
|
-
export { Floorplan,
|
|
9
|
+
import { type ALPOptions, type Project, type Service } from './state.js';
|
|
10
|
+
export type { Floorplan, AppConfig } from '@sap-ux/fiori-generator-shared';
|
|
11
|
+
export { FloorplanFE, FloorplanFF } from '@sap-ux/fiori-generator-shared';
|
|
11
12
|
type FloorplanAttributesType = {
|
|
12
13
|
[K in Floorplan]: {
|
|
13
14
|
supportedODataVersion: OdataVersion[];
|
|
@@ -1,43 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
const constants_1 = require("./constants");
|
|
13
|
-
exports.FloorplanAttributes = {
|
|
14
|
-
[fiori_generator_shared_1.FloorplanFE.FE_LROP]: {
|
|
15
|
-
supportedODataVersion: [odata_service_inquirer_1.OdataVersion.v2, odata_service_inquirer_1.OdataVersion.v4],
|
|
16
|
-
templateType: fiori_elements_writer_1.TemplateType.ListReportObjectPage
|
|
1
|
+
import { TemplateType as FETemplateType } from '@sap-ux/fiori-elements-writer';
|
|
2
|
+
import { TemplateType as FFTemplateType } from '@sap-ux/fiori-freestyle-writer';
|
|
3
|
+
import { FloorplanFE, FloorplanFF } from '@sap-ux/fiori-generator-shared';
|
|
4
|
+
import { OdataVersion } from '@sap-ux/odata-service-inquirer';
|
|
5
|
+
import { promptNames as ui5AppInquirerPromptNames } from '@sap-ux/ui5-application-inquirer';
|
|
6
|
+
import { LEGACY_CAP_TYPE_JAVA, LEGACY_CAP_TYPE_NODE } from './constants.js';
|
|
7
|
+
export { FloorplanFE, FloorplanFF } from '@sap-ux/fiori-generator-shared';
|
|
8
|
+
export const FloorplanAttributes = {
|
|
9
|
+
[FloorplanFE.FE_LROP]: {
|
|
10
|
+
supportedODataVersion: [OdataVersion.v2, OdataVersion.v4],
|
|
11
|
+
templateType: FETemplateType.ListReportObjectPage
|
|
17
12
|
},
|
|
18
|
-
[
|
|
19
|
-
supportedODataVersion: [
|
|
20
|
-
templateType:
|
|
13
|
+
[FloorplanFE.FE_ALP]: {
|
|
14
|
+
supportedODataVersion: [OdataVersion.v2, OdataVersion.v4],
|
|
15
|
+
templateType: FETemplateType.AnalyticalListPage
|
|
21
16
|
},
|
|
22
|
-
[
|
|
23
|
-
supportedODataVersion: [
|
|
24
|
-
templateType:
|
|
17
|
+
[FloorplanFE.FE_WORKLIST]: {
|
|
18
|
+
supportedODataVersion: [OdataVersion.v2, OdataVersion.v4],
|
|
19
|
+
templateType: FETemplateType.Worklist
|
|
25
20
|
},
|
|
26
|
-
[
|
|
27
|
-
supportedODataVersion: [
|
|
28
|
-
templateType:
|
|
21
|
+
[FloorplanFE.FE_FEOP]: {
|
|
22
|
+
supportedODataVersion: [OdataVersion.v4],
|
|
23
|
+
templateType: FETemplateType.FormEntryObjectPage
|
|
29
24
|
},
|
|
30
|
-
[
|
|
31
|
-
supportedODataVersion: [
|
|
32
|
-
templateType:
|
|
25
|
+
[FloorplanFE.FE_OVP]: {
|
|
26
|
+
supportedODataVersion: [OdataVersion.v2, OdataVersion.v4],
|
|
27
|
+
templateType: FETemplateType.OverviewPage
|
|
33
28
|
},
|
|
34
|
-
[
|
|
35
|
-
supportedODataVersion: [
|
|
36
|
-
templateType:
|
|
29
|
+
[FloorplanFE.FE_FPM]: {
|
|
30
|
+
supportedODataVersion: [OdataVersion.v4],
|
|
31
|
+
templateType: FETemplateType.FlexibleProgrammingModel
|
|
37
32
|
},
|
|
38
|
-
[
|
|
39
|
-
supportedODataVersion: [
|
|
40
|
-
templateType:
|
|
33
|
+
[FloorplanFF.FF_SIMPLE]: {
|
|
34
|
+
supportedODataVersion: [OdataVersion.v2, OdataVersion.v4],
|
|
35
|
+
templateType: FFTemplateType.Basic
|
|
41
36
|
}
|
|
42
37
|
};
|
|
43
38
|
/**
|
|
@@ -47,11 +42,11 @@ exports.FloorplanAttributes = {
|
|
|
47
42
|
* @param capType - legacyCapType (capNode, capJava) OR cds runtime (Node.js, Java)
|
|
48
43
|
* @returns - CapRuntime (Node.js, Java)
|
|
49
44
|
*/
|
|
50
|
-
function capTypeConversion(capType) {
|
|
51
|
-
if (capType ===
|
|
45
|
+
export function capTypeConversion(capType) {
|
|
46
|
+
if (capType === LEGACY_CAP_TYPE_NODE || capType === 'Node.js') {
|
|
52
47
|
return 'Node.js';
|
|
53
48
|
}
|
|
54
|
-
else if (capType ===
|
|
49
|
+
else if (capType === LEGACY_CAP_TYPE_JAVA || capType === 'Java') {
|
|
55
50
|
return 'Java';
|
|
56
51
|
}
|
|
57
52
|
return 'Node.js';
|
|
@@ -61,7 +56,7 @@ function capTypeConversion(capType) {
|
|
|
61
56
|
*
|
|
62
57
|
* @deprecated Use FloorplanFE instead, will be removed shortly
|
|
63
58
|
*/
|
|
64
|
-
var PROJECT_TYPE;
|
|
59
|
+
export var PROJECT_TYPE;
|
|
65
60
|
(function (PROJECT_TYPE) {
|
|
66
61
|
PROJECT_TYPE["Worklist"] = "worklist";
|
|
67
62
|
PROJECT_TYPE["OverviewPage"] = "ovp";
|
|
@@ -69,19 +64,19 @@ var PROJECT_TYPE;
|
|
|
69
64
|
PROJECT_TYPE["AnalyticalListPage"] = "alp";
|
|
70
65
|
PROJECT_TYPE["FormEntryObjectPage"] = "feop";
|
|
71
66
|
PROJECT_TYPE["FlexibleProgrammingModel"] = "fpm";
|
|
72
|
-
})(PROJECT_TYPE || (
|
|
67
|
+
})(PROJECT_TYPE || (PROJECT_TYPE = {}));
|
|
73
68
|
/**
|
|
74
69
|
* Fiori Freestyle internal floorplan/template/project types
|
|
75
70
|
*
|
|
76
71
|
* @deprecated Use FloorplanFF instead, will be removed shortly
|
|
77
72
|
*/
|
|
78
|
-
var Template;
|
|
73
|
+
export var Template;
|
|
79
74
|
(function (Template) {
|
|
80
75
|
Template["Simple"] = "basic";
|
|
81
|
-
})(Template || (
|
|
82
|
-
|
|
83
|
-
[
|
|
84
|
-
[
|
|
85
|
-
[
|
|
76
|
+
})(Template || (Template = {}));
|
|
77
|
+
export const defaultPromptValues = {
|
|
78
|
+
[ui5AppInquirerPromptNames.enableEslint]: true,
|
|
79
|
+
[ui5AppInquirerPromptNames.skipAnnotations]: false,
|
|
80
|
+
[ui5AppInquirerPromptNames.enableTypeScript]: false
|
|
86
81
|
};
|
|
87
82
|
//# sourceMappingURL=external.js.map
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export * from './state';
|
|
2
|
-
export * from './constants';
|
|
3
|
-
export * from './common';
|
|
4
|
-
export * from './yeomanUiStepConfig';
|
|
5
|
-
export * from './external';
|
|
6
|
-
export * from './telemetryEvents';
|
|
1
|
+
export * from './state.js';
|
|
2
|
+
export * from './constants.js';
|
|
3
|
+
export * from './common.js';
|
|
4
|
+
export * from './yeomanUiStepConfig.js';
|
|
5
|
+
export * from './external.js';
|
|
6
|
+
export * from './telemetryEvents.js';
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,23 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./state"), exports);
|
|
18
|
-
__exportStar(require("./constants"), exports);
|
|
19
|
-
__exportStar(require("./common"), exports);
|
|
20
|
-
__exportStar(require("./yeomanUiStepConfig"), exports);
|
|
21
|
-
__exportStar(require("./external"), exports);
|
|
22
|
-
__exportStar(require("./telemetryEvents"), exports);
|
|
1
|
+
export * from './state.js';
|
|
2
|
+
export * from './constants.js';
|
|
3
|
+
export * from './common.js';
|
|
4
|
+
export * from './yeomanUiStepConfig.js';
|
|
5
|
+
export * from './external.js';
|
|
6
|
+
export * from './telemetryEvents.js';
|
|
23
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -4,8 +4,8 @@ import type { CapServiceCdsInfo } from '@sap-ux/cap-config-writer';
|
|
|
4
4
|
import type { CdsUi5PluginInfo, UI5FlexLayer } from '@sap-ux/project-access';
|
|
5
5
|
import type { TableSelectionMode } from '@sap-ux/fiori-elements-writer';
|
|
6
6
|
import type { CapService, DatasourceType, EntityRelatedAnswers, OdataServiceAnswers, OdataVersion } from '@sap-ux/odata-service-inquirer';
|
|
7
|
-
import type { ApiHubType, SapSystemSourceType } from '../types/constants';
|
|
8
|
-
import type { Script } from './common';
|
|
7
|
+
import type { ApiHubType, SapSystemSourceType } from '../types/constants.js';
|
|
8
|
+
import type { Script } from './common.js';
|
|
9
9
|
import type { AppGenInfo, Floorplan } from '@sap-ux/fiori-generator-shared';
|
|
10
10
|
export interface Project {
|
|
11
11
|
targetFolder: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type ILogWrapper } from '@sap-ux/fiori-generator-shared';
|
|
2
|
-
import type { State } from '../types';
|
|
2
|
+
import type { State } from '../types/index.js';
|
|
3
3
|
import type { AppWizard } from '@sap-devx/yeoman-ui-types';
|
|
4
4
|
declare const FIORI_CACHE = "$fiori-cache";
|
|
5
5
|
export type AppWizardCache = AppWizard & {
|
|
@@ -1,20 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
exports.initAppWizardCache = initAppWizardCache;
|
|
4
|
-
exports.addToCache = addToCache;
|
|
5
|
-
exports.getFromCache = getFromCache;
|
|
6
|
-
exports.deleteCache = deleteCache;
|
|
7
|
-
const fiori_generator_shared_1 = require("@sap-ux/fiori-generator-shared");
|
|
8
|
-
const i18n_1 = require("./i18n");
|
|
1
|
+
import { getHostEnvironment, hostEnvironment } from '@sap-ux/fiori-generator-shared';
|
|
2
|
+
import { t } from './i18n.js';
|
|
9
3
|
const FIORI_CACHE = '$fiori-cache';
|
|
10
|
-
const hostEnv =
|
|
4
|
+
const hostEnv = getHostEnvironment();
|
|
11
5
|
/**
|
|
12
6
|
* Initialize the cache object in the appWizard object. N.B. this will update the passed reference.
|
|
13
7
|
*
|
|
14
8
|
* @param logger
|
|
15
9
|
* @param appWizard
|
|
16
10
|
*/
|
|
17
|
-
function initAppWizardCache(logger, appWizard) {
|
|
11
|
+
export function initAppWizardCache(logger, appWizard) {
|
|
18
12
|
if (appWizard && !appWizard[FIORI_CACHE]) {
|
|
19
13
|
appWizard[FIORI_CACHE] = {};
|
|
20
14
|
logger.debug('AppWizard based cache initialized.');
|
|
@@ -27,7 +21,7 @@ function initAppWizardCache(logger, appWizard) {
|
|
|
27
21
|
* @param state
|
|
28
22
|
* @param logger
|
|
29
23
|
*/
|
|
30
|
-
function addToCache(appWizard, state, logger) {
|
|
24
|
+
export function addToCache(appWizard, state, logger) {
|
|
31
25
|
logIfCacheMissing(appWizard, logger);
|
|
32
26
|
if (appWizard?.[FIORI_CACHE]) {
|
|
33
27
|
Object.assign(appWizard[FIORI_CACHE], state);
|
|
@@ -41,7 +35,7 @@ function addToCache(appWizard, state, logger) {
|
|
|
41
35
|
* @param logger
|
|
42
36
|
* @returns
|
|
43
37
|
*/
|
|
44
|
-
function getFromCache(appWizard, stateKey, logger) {
|
|
38
|
+
export function getFromCache(appWizard, stateKey, logger) {
|
|
45
39
|
logIfCacheMissing(appWizard, logger);
|
|
46
40
|
return appWizard?.[FIORI_CACHE]?.[stateKey];
|
|
47
41
|
}
|
|
@@ -51,7 +45,7 @@ function getFromCache(appWizard, stateKey, logger) {
|
|
|
51
45
|
* @param appWizard
|
|
52
46
|
* @param logger
|
|
53
47
|
*/
|
|
54
|
-
function deleteCache(appWizard, logger) {
|
|
48
|
+
export function deleteCache(appWizard, logger) {
|
|
55
49
|
logIfCacheMissing(appWizard, logger);
|
|
56
50
|
if (appWizard?.[FIORI_CACHE]) {
|
|
57
51
|
delete appWizard[FIORI_CACHE];
|
|
@@ -65,8 +59,8 @@ function deleteCache(appWizard, logger) {
|
|
|
65
59
|
*/
|
|
66
60
|
function logIfCacheMissing(appWizard, logger) {
|
|
67
61
|
// YUI cache only available in vscode
|
|
68
|
-
if (hostEnv ===
|
|
69
|
-
logger.info(
|
|
62
|
+
if (hostEnv === hostEnvironment.vscode && !appWizard?.[FIORI_CACHE]) {
|
|
63
|
+
logger.info(t('logMessages.warningCachingNotSupported'));
|
|
70
64
|
}
|
|
71
65
|
}
|
|
72
66
|
//# sourceMappingURL=appWizardCache.js.map
|