Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/purple-comics-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sap-ux/fiori-app-sub-generator': minor
---

Do not ask the user if they want to use code assist with their generated project or not.
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,6 @@ function _setProjectDefaults(project: AppConfig['project']): Project {
localUI5Version: project.localUI5Version ?? ui5Version,
ui5Theme: project.ui5Theme ?? getDefaultUI5Theme(ui5Version),
skipAnnotations: project.skipAnnotations || defaultPromptValues[promptNames.skipAnnotations],
enableCodeAssist: project.enableCodeAssist || defaultPromptValues[promptNames.enableCodeAssist],
enableEslint: project.enableEslint || defaultPromptValues[promptNames.enableEslint],
enableTypeScript: project.enableTypeScript || defaultPromptValues[promptNames.enableTypeScript],
sapux: project.sapux || false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,6 @@ export class FioriAppGenerator extends Generator {
AppGenBusinessHubType: getTelemetryBusinessHubType(service.apiHubConfig?.apiHubType),
EnableEslint: project.enableEslint,
EnableTypeScript: project.enableTypeScript,
EnableCodeAssist: project.enableCodeAssist,
EnableVirtualEndpoints: project.enableVirtualEndpoints,
ToolsId: appConfig.app.sourceTemplate?.toolsId
});
Expand Down Expand Up @@ -440,7 +439,6 @@ export class FioriAppGenerator extends Generator {
{
appPackagePath: this.destinationPath(),
capService: this.state.service.capService,
enableCodeAssist: this.state.project?.enableCodeAssist ?? false,
// Assumption that npm workspaces will be enabled if cds ui5 plugin is a depenedency
useNpmWorkspaces: !!(
this.state.project.enableTypeScript || // If typescript is enabled, it is required that the CAP project will be updated to use NPM workspaces
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,11 @@ import type { CapService } from '@sap-ux/cap-config-writer';
import { TelemetryHelper, sendTelemetry, type ILogWrapper } from '@sap-ux/fiori-generator-shared';
import { CommandRunner, t } from '../utils';

type Dependency = {
[moduleId: string]: string;
};

/**
* The dependencies required for code assist for the root CAP project package.json.
* These are not written to the `app` package.json by the `@sap-ux/ui5-application-writer`, as is done for non-CAP projects.
*/
const codeAssistDeps: Dependency = {
eslint: '7.32.0',
'@sap/eslint-plugin-ui5-jsdocs': '2.0.5',
'@sapui5/ts-types': '1.92.2'
};

/**
* Defines the options used to install deps to a CAP project.
*/
export type CapInstallOptions = {
ui5Version?: string; // Presence of a property indicates specification should be installed, hence adding tools suite support
codeAssist?: boolean; // Add code assist libs during CAP install
rootPath?: string; // Root path for the CAP project
depsInstallPath?: string; // Path to install dependancies in project (app or root),
useWorkspaces?: boolean; // Use NPM workspaces during project generation
Expand All @@ -44,10 +29,6 @@ async function installProjectDependencies(
const runner = new CommandRunner(log);
const runArgs = [];

if (capOptions?.codeAssist) {
runArgs.push(...Object.keys(codeAssistDeps).map((dep) => `${dep}@${codeAssistDeps[dep]}`));
}

runArgs.unshift('install');

try {
Expand Down Expand Up @@ -83,7 +64,6 @@ async function installProjectDependencies(
* @param param0
* @param param0.appPackagePath
* @param param0.capService
* @param param0.enableCodeAssist
* @param param0.useNpmWorkspaces
* @param param0.ui5Version
* @param logger The logger to use for output
Expand All @@ -93,13 +73,11 @@ export async function installDependencies(
{
appPackagePath,
capService,
enableCodeAssist,
useNpmWorkspaces,
ui5Version
}: {
appPackagePath: string;
capService?: CapService;
enableCodeAssist: boolean;
useNpmWorkspaces: boolean;
ui5Version: string;
},
Expand All @@ -109,7 +87,6 @@ export async function installDependencies(
let capInstallOpts: CapInstallOptions | undefined;
if (capService) {
capInstallOpts = {
codeAssist: enableCodeAssist,
rootPath: capService.projectPath,
// if NPM workspaces are used, depsInstallPath will be the CAP projectpackage.json. Otherwise the CAP app package.json.
depsInstallPath: useNpmWorkspaces ? capService.projectPath : appPackagePath,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,9 @@ export async function createUI5ApplicationPromptOptions(
[ui5AppInquirerPromptNames.enableTypeScript]: {
default: defaultPromptValues[ui5AppInquirerPromptNames.enableTypeScript]
},
[ui5AppInquirerPromptNames.enableCodeAssist]: {
hide: true
},
[ui5AppInquirerPromptNames.enableVirtualEndpoints]: {
hide: service.capService?.capType === 'Java'
}
Expand All @@ -313,7 +316,6 @@ export async function createUI5ApplicationPromptOptions(

// Configure the prompts which should be hidden behind the advanced option switch
const advancedPrompts = [
ui5AppInquirerPromptNames.enableCodeAssist,
ui5AppInquirerPromptNames.skipAnnotations,
ui5AppInquirerPromptNames.enableEslint,
ui5AppInquirerPromptNames.ui5Theme
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ function getBaseAppConfig(
ui5Libs: []
},
appOptions: {
codeAssist: project.enableCodeAssist,
eslint: project.enableEslint,
typescript: project.enableTypeScript,
sapux: project.sapux,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ export async function writeAppGenInfoFiles(
appNamespace: project.namespace ?? '',
ui5Theme: project.ui5Theme,
ui5Version: appGenInfoCustom?.ui5Version || project.manifestMinUI5Version || project.ui5Version,
enableCodeAssist: project.enableCodeAssist,
enableEslint: project.enableEslint,
enableTypeScript: project.enableTypeScript,
showMockDataInfo: !!service.edmx && !service.capService,
Expand Down
1 change: 1 addition & 0 deletions packages/fiori-app-sub-generator/src/types/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export interface Project {
localUI5Version: string;
sapux?: boolean;
skipAnnotations?: boolean;
/** @deprecated Code assist prompt is hidden and this property is no longer used */
enableCodeAssist?: boolean;
enableEslint?: boolean;
enableTypeScript?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export interface AppGenEventProperties extends TelemetryProperties {

AppGenSapSystemType: TelemetrySapSystemType;
EnableEslint: boolean;
EnableCodeAssist: boolean;
AppGenLaunchSource: LaunchSource;
/**
* Version of the module which launches the generator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:45:19 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:23 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "OData URL",
"metadataFilename": "",
Expand All @@ -11,7 +11,6 @@
"appNamespace": "testNameSpace",
"ui5Theme": "sap_belize",
"ui5Version": "1.68.0",
"enableCodeAssist": true,
"showMockDataInfo": true,
"generatorVersion": "0.0.0",
"template": "List Report Page V2",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Tue Jun 24 2025 22:45:19 GMT+0100 (Irish Standard Time)|
|**Generation Date and Time**<br>Fri Nov 21 2025 14:53:23 GMT+0000 (Greenwich Mean Time)|
|**App Generator**<br>SAP Fiori Application Generator|
|**App Generator Version**<br>0.0.0|
|**Generation Platform**<br>CLI|
Expand All @@ -13,7 +13,7 @@
|**Namespace**<br>testNameSpace|
|**UI5 Theme**<br>sap_belize|
|**UI5 Version**<br>1.68.0|
|**Enable Code Assist Libraries**<br>True|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|
|**Main Entity**<br>SEPMRA_C_PD_Product|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@
"devDependencies": {
"@ui5/cli": "^4.0.33",
"@sap/ux-ui5-tooling": "1",
"eslint": "8.57.0",
"@sap/eslint-plugin-ui5-jsdocs": "2.0.5",
"@sapui5/ts-types": "~1.76.0",
"@sap-ux/ui5-middleware-fe-mockserver": "2"
},
"scripts": {
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -58,24 +58,9 @@ describe('Optional settings', () => {
});
});

it('Code Assist', async () => {
testProjectName = 'lrop_v2_code_assist';
const expectedOutputPath = getExpectedOutputPath(testProjectName);

const testFEState: Partial<State> = cloneDeep({
...defaultFEState,
project: Object.assign({}, project, {
name: testProjectName,
enableCodeAssist: true
}) as Project
});

await runWritingPhaseGen(testFEState);
expect(join(testDir, testProjectName)).toMatchFolder(expectedOutputPath, ignoreMatcherOpts);
cleanTestDir(join(testDir, testProjectName));
});
// Code Assist test removed - functionality deprecated and hidden

it('Eslint', async () => {
it('Add FLP Config to OData proxy project, without OData service (LCAP)', async () => {
testProjectName = 'lrop_v2_eslint';
const expectedOutputPath = getExpectedOutputPath(testProjectName);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:45:11 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:26 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "None",
"metadataFilename": "",
Expand All @@ -11,11 +11,10 @@
"appNamespace": "",
"ui5Theme": "sap_fiori_3",
"ui5Version": "1.82.2",
"enableCodeAssist": false,
"enableEslint": false,
"enableTypeScript": false,
"showMockDataInfo": false,
"generatorVersion": "0.5.10",
"generatorVersion": "0.8.6",
"template": "Basic",
"generatorName": "SAP Fiori Application Generator",
"entityRelatedConfig": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:45:10 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:26 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "OData URL",
"metadataFilename": "",
Expand All @@ -11,11 +11,10 @@
"appNamespace": "",
"ui5Theme": "sap_fiori_3",
"ui5Version": "1.82.2",
"enableCodeAssist": false,
"enableEslint": false,
"enableTypeScript": false,
"showMockDataInfo": true,
"generatorVersion": "0.5.10",
"generatorVersion": "0.8.6",
"template": "Basic V2",
"generatorName": "SAP Fiori Application Generator",
"entityRelatedConfig": [],
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:44:34 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:21 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "File",
"metadataFilename": "",
Expand All @@ -11,7 +11,6 @@
"appNamespace": "",
"ui5Theme": "sap_fiori_3",
"ui5Version": "1.82.2",
"enableCodeAssist": true,
"showMockDataInfo": false,
"generatorVersion": "0.0.0",
"template": "Basic V2",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
## Application Details
| |
| ------------- |
|**Generation Date and Time**<br>Tue Jun 24 2025 22:44:34 GMT+0100 (Irish Standard Time)|
|**Generation Date and Time**<br>Fri Nov 21 2025 14:53:21 GMT+0000 (Greenwich Mean Time)|
|**App Generator**<br>SAP Fiori Application Generator|
|**App Generator Version**<br>0.0.0|
|**Generation Platform**<br>CLI|
Expand All @@ -13,7 +13,7 @@
|**Namespace**<br>|
|**UI5 Theme**<br>sap_fiori_3|
|**UI5 Version**<br>1.82.2|
|**Enable Code Assist Libraries**<br>True|
|**Enable Code Assist Libraries**<br>False|
|**Enable TypeScript**<br>False|
|**Add Eslint configuration**<br>False|

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,7 @@
"dependencies": {},
"devDependencies": {
"@ui5/cli": "^4.0.33",
"@sap/ux-ui5-tooling": "1",
"eslint": "8.57.0",
"@sap/eslint-plugin-ui5-jsdocs": "2.0.5",
"@sapui5/ts-types": "~1.82.0"
"@sap/ux-ui5-tooling": "1"
},
"scripts": {
"start": "fiori run --open \"test/flp.html#app-preview\"",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:44:35 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:21 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "File",
"metadataFilename": "",
Expand All @@ -11,7 +11,6 @@
"appNamespace": "",
"ui5Theme": "sap_fiori_3",
"ui5Version": "1.82.2",
"enableCodeAssist": false,
"enableEslint": true,
"showMockDataInfo": false,
"generatorVersion": "0.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"generationParameters": {
"generationDate": "Tue Jun 24 2025 22:44:36 GMT+0100 (Irish Standard Time)",
"generationDate": "Fri Nov 21 2025 14:53:21 GMT+0000 (Greenwich Mean Time)",
"generatorPlatform": "CLI",
"serviceType": "File",
"metadataFilename": "",
Expand All @@ -11,7 +11,6 @@
"appNamespace": "test.namespace",
"ui5Theme": "sap_fiori_3",
"ui5Version": "1.102.1",
"enableCodeAssist": false,
"enableEslint": false,
"enableTypeScript": true,
"showMockDataInfo": false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ describe('Freestyle generation', () => {
name: testProjectName,
description: 'An SAP Fiori application.',
title: 'App Title',
enableCodeAssist: true,
enableCodeAssist: false,
ui5Theme: 'sap_fiori_3',
ui5Version: '1.82.2',
localUI5Version: '1.82.2',
Expand Down
Loading
Loading