Skip to content

Commit 8ff10dd

Browse files
committed
lint fixes
1 parent 5c4366d commit 8ff10dd

File tree

12 files changed

+79
-23
lines changed

12 files changed

+79
-23
lines changed

packages/adp-tooling/src/base/helper.ts

Lines changed: 19 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -124,24 +124,27 @@ export function filterAndMapInboundsToManifest(inbounds: Inbound[]): ManifestNam
124124
if (!inbounds || inbounds.length === 0) {
125125
return undefined;
126126
}
127-
const filteredInbounds = inbounds.reduce((acc: { [key: string]: InboundContent }, inbound) => {
128-
// Skip if hideLauncher is not false
129-
if (!inbound?.content || inbound.content.hideLauncher !== false) {
130-
return acc;
131-
}
132-
const { semanticObject, action, signature } = inbound.content;
133-
if (semanticObject && action) {
134-
const key = `${semanticObject}-${action}`;
135-
136-
// Temporary filtration of parameters to avoid issues with merged manifest until release of ABAP Platform Cloud 2508
137-
if (signature?.parameters) {
138-
filterIboundsParameters(signature);
127+
const filteredInbounds = inbounds.reduce(
128+
(acc: { [key: string]: InboundContent }, inbound) => {
129+
// Skip if hideLauncher is not false
130+
if (!inbound?.content || inbound.content.hideLauncher !== false) {
131+
return acc;
139132
}
133+
const { semanticObject, action, signature } = inbound.content;
134+
if (semanticObject && action) {
135+
const key = `${semanticObject}-${action}`;
140136

141-
acc[key] = inbound.content;
142-
}
143-
return acc;
144-
}, {} as { [key: string]: InboundContent });
137+
// Temporary filtration of parameters to avoid issues with merged manifest until release of ABAP Platform Cloud 2508
138+
if (signature?.parameters) {
139+
filterIboundsParameters(signature);
140+
}
141+
142+
acc[key] = inbound.content;
143+
}
144+
return acc;
145+
},
146+
{} as { [key: string]: InboundContent }
147+
);
145148

146149
return Object.keys(filteredInbounds).length === 0 ? undefined : filteredInbounds;
147150
}

packages/adp-tooling/test/unit/ui5/validator.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@ import { validateEmptyString } from '@sap-ux/project-input-validator';
33
import { getOfficialBaseUI5VersionUrl, getFormattedVersion } from '../../../src/ui5/format';
44
import { validateUI5VersionExists } from '../../../src';
55
import { fetchMock } from '../../__mock__/global';
6-
import { t } from '../../../src/i18n';
7-
import { initI18n } from '../../../src/i18n';
6+
import { t, initI18n } from '../../../src/i18n';
87

98
jest.mock('@sap-ux/project-input-validator', () => ({
109
validateEmptyString: jest.fn()

packages/fiori-app-sub-generator/src/utils/common.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ export async function generateLaunchConfig(
243243
vscode: vscode,
244244
addStartCmd,
245245
sapClientParam: options.sapClientParam,
246-
flpAppId: options?.enableVirtualEndpoints ? 'app-preview' : options.flpAppId ?? '',
246+
flpAppId: options?.enableVirtualEndpoints ? 'app-preview' : (options.flpAppId ?? ''),
247247
flpSandboxAvailable: !options?.enableVirtualEndpoints,
248248
isAppStudio: isAppStudio(),
249249
writeToAppOnly

packages/generator-adp/test/app.test.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,8 @@ import {
1919
import * as Logger from '@sap-ux/logger';
2020
import { isAppStudio } from '@sap-ux/btp-utils';
2121
import type { ToolsLogger } from '@sap-ux/logger';
22-
import type { Manifest } from '@sap-ux/project-access';
22+
import type { Manifest, ManifestNamespace } from '@sap-ux/project-access';
2323
import { getCredentialsFromStore } from '@sap-ux/system-access';
24-
import type { ManifestNamespace } from '@sap-ux/project-access';
2524
import { isCli, sendTelemetry } from '@sap-ux/fiori-generator-shared';
2625
import { type AbapServiceProvider, AdaptationProjectType } from '@sap-ux/axios-extension';
2726
import type { AttributesAnswers, ConfigAnswers, Language, SourceApplication, VersionDetail } from '@sap-ux/adp-tooling';

packages/store/src/data-access/filesystem.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,13 @@ class FilesystemStore<E extends object> implements DataAccess<E> {
150150
return Promise.resolve(entity);
151151
}
152152

153+
/**
154+
*
155+
* @param root0
156+
* @param root0.entityName
157+
* @param root0.id
158+
* @param root0.entity
159+
*/
153160
public async partialUpdate({
154161
entityName,
155162
id,
@@ -173,11 +180,22 @@ class FilesystemStore<E extends object> implements DataAccess<E> {
173180
return this.write({ entityName, id, entity: updatedEntity });
174181
}
175182

183+
/**
184+
*
185+
* @param update
186+
* @param existingSystem
187+
*/
176188
private mergeProperties(update: Partial<E>, existingSystem: E): E {
177189
const updatedEntity = { ...existingSystem, ...update };
178190
return { ...updatedEntity };
179191
}
180192

193+
/**
194+
*
195+
* @param root0
196+
* @param root0.entityName
197+
* @param root0.id
198+
*/
181199
async del({ entityName, id }: { entityName: string; id: string }): Promise<boolean> {
182200
const name = toPersistenceName(entityName);
183201
if (!name) {

packages/store/src/data-access/hybrid.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ class HybridStore<E extends object> implements DataAccess<E> {
6767
}
6868
}
6969

70+
/**
71+
*
72+
* @param root0
73+
* @param root0.entityName
74+
* @param root0.includeSensitiveData
75+
*/
7076
public async getAll({
7177
entityName,
7278
includeSensitiveData = true
@@ -77,6 +83,12 @@ class HybridStore<E extends object> implements DataAccess<E> {
7783
return Object.values(await this.readAll({ entityName, includeSensitiveData })) as unknown as E[];
7884
}
7985

86+
/**
87+
*
88+
* @param root0
89+
* @param root0.entityName
90+
* @param root0.includeSensitiveData
91+
*/
8092
async readAll({
8193
entityName,
8294
includeSensitiveData = true
@@ -172,6 +184,13 @@ class HybridStore<E extends object> implements DataAccess<E> {
172184
return deletedinFs || deletedInSecureStore;
173185
}
174186

187+
/**
188+
*
189+
* @param root0
190+
* @param root0.entityName
191+
* @param root0.id
192+
* @param root0.entity
193+
*/
175194
public async partialUpdate({
176195
entityName,
177196
id,

packages/store/src/data-provider/backend-system.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,11 @@ export const SystemDataProvider: DataProviderConstructor<BackendSystem, BackendS
6262
});
6363
}
6464

65+
/**
66+
*
67+
* @param root0
68+
* @param root0.includeSensitiveData
69+
*/
6570
public async getAll({
6671
includeSensitiveData = true
6772
}: {
@@ -89,6 +94,10 @@ export const SystemDataProvider: DataProviderConstructor<BackendSystem, BackendS
8994
return Object.values(systems);
9095
}
9196

97+
/**
98+
*
99+
* @param systems
100+
*/
92101
private async ensureSystemTypesExist(systems: Record<string, BackendSystem>): Promise<boolean> {
93102
let allSystemsHaveType = true;
94103

packages/store/src/data-provider/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ export interface DataProvider<E, K extends EntityKey> {
2323
/**
2424
* Returns the data as an array related to the entity.
2525
*
26-
* @param includeSensitiveData If true and relevant for the entity, sensitive data will be returned - defaults to true.
26+
* @param options If true and relevant for the entity, sensitive data will be returned - defaults to true.
27+
* @param options.includeSensitiveData If set to true, sensitive data will be included in the result.
2728
*/
2829
getAll(options?: { includeSensitiveData?: boolean }): Promise<E[] | []>;
2930
}

packages/store/src/entities/backend-system.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ export class BackendSystem {
3737
* @param root0.password
3838
* @param root0.userDisplayName
3939
* @param root0.authenticationType
40+
* @param root0.systemType
4041
*/
4142
constructor({
4243
name,

packages/store/src/services/backend-system.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ export class SystemService implements Service<BackendSystem, BackendSystemKey> {
9595
public async delete(entity: BackendSystem): Promise<boolean> {
9696
return this.dataProvider.delete(entity);
9797
}
98+
/**
99+
*
100+
* @param options
101+
*/
98102
public async getAll(options: ServiceRetrievalOptions): Promise<BackendSystem[] | []> {
99103
return this.dataProvider.getAll(options);
100104
}

0 commit comments

Comments
 (0)