@sap/artifact-management-types 1.22.1 → 1.23.2
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/package.json +2 -2
- package/src/definitions/PluginFactory.d.ts +1 -1
- package/src/plugins/bas/index.d.ts +3 -0
- package/src/plugins/{ui5/readers/UI5ModuleReader.d.ts → bas/readers/BasEmptyModuleReader.d.ts} +12 -13
- package/src/plugins/bas/readers/BasEmptyProjectReader.d.ts +14 -0
- package/src/plugins/bas/util/EdmxUtil.d.ts +12 -0
- package/src/plugins/cap/readers/CapModuleReader.d.ts +6 -29
- package/src/plugins/cap/util/CdsUtil.d.ts +10 -0
- package/src/plugins/cap/util/ItemUtil.d.ts +29 -0
- package/src/plugins/cap/util/PathUtil.d.ts +9 -0
- package/src/project-api/ModuleInstance.d.ts +4 -4
- package/src/project-api/WorkspaceApi.d.ts +1 -1
- package/src/project-api/WorkspaceImpl.d.ts +1 -1
- package/sap-artifact-management-types-1.22.1.tgz +0 -0
- package/src/plugins/ui5/InfoList.d.ts +0 -34
- package/src/plugins/ui5/generators/UI5ModuleGenerator.d.ts +0 -10
- package/src/plugins/ui5/index.d.ts +0 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/artifact-management-types",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.2",
|
|
4
4
|
"description": "Type signatures for artifact management",
|
|
5
5
|
"types": "./src/index.d.ts",
|
|
6
6
|
"main": "./src/index.d.ts",
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"pack": "npm run modify-types-import && npm pack"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@sap/artifact-management-base-types": "1.
|
|
13
|
+
"@sap/artifact-management-base-types": "1.23.2"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"gulp": "4.0.2"
|
|
@@ -19,7 +19,7 @@ declare class PluginFactory {
|
|
|
19
19
|
getProjectReaders(readModuleAsProject: boolean): ProjectReader[];
|
|
20
20
|
getProjectWrappers(): ProjectReader[];
|
|
21
21
|
getProjectReaderFor(projectType: KeyIn<typeof ProjectType>, readModuleAsProject?: boolean): ProjectReader;
|
|
22
|
-
getModuleReaders(): ModuleReader[];
|
|
22
|
+
getModuleReaders(projectType?: KeyIn<typeof ProjectType>): ModuleReader[];
|
|
23
23
|
getModuleReaderFor(moduleType: KeyIn<typeof ModuleType>): ModuleReader;
|
|
24
24
|
getItemReaderFor(itemType: KeyIn<typeof ItemType>): ItemReader;
|
|
25
25
|
addModuleReader(reader: ModuleReader): void;
|
package/src/plugins/{ui5/readers/UI5ModuleReader.d.ts → bas/readers/BasEmptyModuleReader.d.ts}
RENAMED
|
@@ -1,14 +1,12 @@
|
|
|
1
|
-
import { ProjectFileSystem, ProjectEntityReaderReadOptions, ModuleType, Item, ModuleData, ModuleReader, DetectionMechanism, KeyIn } from '@sap/artifact-management-base-types';
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { ProjectFileSystem, ProjectEntityReaderReadOptions, ModuleType, Item, ModuleData, ModuleReader, DetectionMechanism, KeyIn, ProjectContext } from '@sap/artifact-management-base-types';
|
|
2
|
+
interface BasItemReaderContext {
|
|
3
|
+
withDetailInfo?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export default class BasEmptyModuleReader extends ModuleReader {
|
|
4
6
|
getType(): KeyIn<typeof ModuleType>;
|
|
5
7
|
getDetectionMechanism(): DetectionMechanism;
|
|
6
8
|
matchConditions: {
|
|
7
9
|
requiredFilePatterns: string[];
|
|
8
|
-
rule: (context: {
|
|
9
|
-
matchType: 'required' | 'mustNotExist';
|
|
10
|
-
fs: ProjectFileSystem;
|
|
11
|
-
}) => Promise<boolean>;
|
|
12
10
|
};
|
|
13
11
|
itemTags: string[];
|
|
14
12
|
itemReaders: {
|
|
@@ -20,13 +18,14 @@ export default class UI5ModuleReader extends ModuleReader {
|
|
|
20
18
|
read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
|
|
21
19
|
}[];
|
|
22
20
|
tags: string[];
|
|
21
|
+
prepareItemReaderContext(fs: ProjectFileSystem, context: ProjectContext): Promise<BasItemReaderContext | undefined>;
|
|
23
22
|
read({ fs }: {
|
|
24
23
|
fs: ProjectFileSystem;
|
|
25
24
|
}): Promise<ModuleData | undefined>;
|
|
26
|
-
readItems({ fs }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
27
|
-
private
|
|
28
|
-
private
|
|
29
|
-
private
|
|
30
|
-
private
|
|
31
|
-
private getTemplateData;
|
|
25
|
+
readItems({ fs, context }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
26
|
+
private getServiceItem;
|
|
27
|
+
private getServiceEntityItems;
|
|
28
|
+
private getEntityItem;
|
|
29
|
+
private addDetailInfo;
|
|
32
30
|
}
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { DetectionMechanism, KeyIn, ProjectData, ProjectFileSystem, ProjectReader, ProjectReaderOptions, ProjectType } from '@sap/artifact-management-base-types';
|
|
2
|
+
import BasEmptyModuleReader from './BasEmptyModuleReader';
|
|
3
|
+
export default class BasEmptyProjectReader extends ProjectReader {
|
|
4
|
+
constructor();
|
|
5
|
+
getType(): KeyIn<typeof ProjectType>;
|
|
6
|
+
getDetectionMechanism(): DetectionMechanism;
|
|
7
|
+
additionalModuleReaders: BasEmptyModuleReader[][];
|
|
8
|
+
tags: string[];
|
|
9
|
+
read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
|
|
10
|
+
isFristLevelFoder(absRootPath: string, absBasePath: string): boolean;
|
|
11
|
+
isEmptyProject(fs: ProjectFileSystem): Promise<boolean>;
|
|
12
|
+
isNotInAcceptedFolders(folder: string): boolean;
|
|
13
|
+
isNotInAcceptedFiles(file: string): boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export interface EntitySet {
|
|
2
|
+
name: string;
|
|
3
|
+
type: string;
|
|
4
|
+
}
|
|
5
|
+
export default class EdmxUtil {
|
|
6
|
+
static parse(content: string): undefined;
|
|
7
|
+
static getEntitySet(edmxObject: any): EntitySet[];
|
|
8
|
+
static getEntityTypeProperties(edmxObject: any, type: string): any[];
|
|
9
|
+
private static getDataServices;
|
|
10
|
+
private static getEntitySetFromDataServices;
|
|
11
|
+
private static getEntitySetFromDataService;
|
|
12
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ProjectFileSystem, Item, ModuleReader, ModuleType, ModuleData, ProjectEntityReaderReadOptions, DetectionMechanism, KeyIn, ItemDetailInfoOptions } from '@sap/artifact-management-base-types';
|
|
1
|
+
import { ProjectFileSystem, Item, ModuleReader, ModuleType, ModuleData, ProjectEntityReaderReadOptions, DetectionMechanism, KeyIn, ItemDetailInfoOptions, ProjectContext } from '@sap/artifact-management-base-types';
|
|
2
2
|
interface CapItemReaderContext {
|
|
3
3
|
withDetailInfo?: boolean;
|
|
4
4
|
}
|
|
@@ -27,41 +27,18 @@ export default class CapModuleReader extends ModuleReader {
|
|
|
27
27
|
detailInfo?: undefined;
|
|
28
28
|
})[];
|
|
29
29
|
tags: string[];
|
|
30
|
-
prepareItemReaderContext(fs: ProjectFileSystem,
|
|
30
|
+
prepareItemReaderContext(fs: ProjectFileSystem, context: ProjectContext): Promise<CapItemReaderContext | undefined>;
|
|
31
31
|
getCapModulesFolderMap(fs: ProjectFileSystem): Promise<any>;
|
|
32
32
|
getMappedFolderType(folderPath: string, fs: ProjectFileSystem): Promise<string | undefined>;
|
|
33
33
|
read({ fs }: {
|
|
34
34
|
fs: ProjectFileSystem;
|
|
35
35
|
}): Promise<ModuleData | undefined>;
|
|
36
|
-
provideFromCds({ fs, context }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
36
|
+
provideFromCds({ fs, matchedFiles, context }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
37
37
|
detailInfo(fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions): Promise<Item | undefined>;
|
|
38
38
|
readCSV({ fs, matchedFiles }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
39
39
|
readApplicationLogic({ fs, matchedFiles }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
40
|
-
private
|
|
41
|
-
private
|
|
42
|
-
private
|
|
43
|
-
/**
|
|
44
|
-
* Get the service ref from service object.
|
|
45
|
-
* The method parses the service object and
|
|
46
|
-
* creates a ref following the same step as done be CDS.
|
|
47
|
-
* As a result, the value will match the service endpoint value generated by CDS.
|
|
48
|
-
*/
|
|
49
|
-
private getServiceRef;
|
|
50
|
-
private getServiceEntityRef;
|
|
51
|
-
/**
|
|
52
|
-
* Since the path would be relative to the root, in case of win OS,
|
|
53
|
-
* we need to find the correct root drive and we need to prefix the path with the correct root drive (C:, D: etc.)
|
|
54
|
-
*/
|
|
55
|
-
private getLocationForWindows;
|
|
56
|
-
private needLinkTo;
|
|
57
|
-
private isEnteranlEntity;
|
|
58
|
-
private isDBEntity;
|
|
59
|
-
private addLink;
|
|
60
|
-
private getOperationItem;
|
|
61
|
-
private getOperationRef;
|
|
62
|
-
private addDetailInfoForOperaton;
|
|
63
|
-
private getNamespace;
|
|
64
|
-
private isContained;
|
|
65
|
-
private addNamespaceItemFromDBEntityItem;
|
|
40
|
+
private addUnboundFunctionItems;
|
|
41
|
+
private addUnboundActionItems;
|
|
42
|
+
private addEventItems;
|
|
66
43
|
}
|
|
67
44
|
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ProjectFileSystem } from '@sap/artifact-management-base-types';
|
|
2
|
+
import { CDSDefinition } from '@sap/artifact-management-base/dist/types/src/cp/CapApi';
|
|
3
|
+
export default class CdsUtil {
|
|
4
|
+
static isProjectionEntity(entity: CDSDefinition): boolean;
|
|
5
|
+
static getNamespace(entity: CDSDefinition): string;
|
|
6
|
+
static getBaseEntity(entity: any): any;
|
|
7
|
+
static isDBEntity(entity: CDSDefinition): boolean;
|
|
8
|
+
static isEnteranlEntity(dbEntity: CDSDefinition): boolean;
|
|
9
|
+
static isContained(fs: ProjectFileSystem, cdsObject: any): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Item, LinkType, ProjectFileSystem } from '@sap/artifact-management-base-types';
|
|
2
|
+
import CapApi, { CDSDefinition } from '@sap/artifact-management-base/dist/types/src/cp/CapApi';
|
|
3
|
+
export default class ItemUtil {
|
|
4
|
+
static getRef(fileName: string): string;
|
|
5
|
+
/**
|
|
6
|
+
* Get the service ref from service object.
|
|
7
|
+
* The method parses the service object and
|
|
8
|
+
* creates a ref following the same step as done be CDS.
|
|
9
|
+
* As a result, the value will match the service endpoint value generated by CDS.
|
|
10
|
+
*/
|
|
11
|
+
static getServiceRef(service: any): string;
|
|
12
|
+
static getServiceEntityRef(serviceEnity: any): string;
|
|
13
|
+
static getOperationRef(operation: any): string;
|
|
14
|
+
static needLinkTo(dbEntity: any): boolean;
|
|
15
|
+
static addLink(entity: Item, target: any, linkType: LinkType, serviceRefs: {
|
|
16
|
+
[key: string]: string;
|
|
17
|
+
}): void;
|
|
18
|
+
static addLinksToAppLogicItem(fs: ProjectFileSystem, file: string, capApi: CapApi, logicItem: Item): Promise<void>;
|
|
19
|
+
private static addLinksToAppLogicItemWithEntity;
|
|
20
|
+
private static addLinksToAppLogicItemWithoutEntity;
|
|
21
|
+
static addLinkToRoles(cdsObject: CDSDefinition, item: Item): void;
|
|
22
|
+
static getOperationItem(fs: ProjectFileSystem, operation: any, tags: string[], withDetailInfo: boolean): Item;
|
|
23
|
+
static getEventItem(fs: ProjectFileSystem, event: any, tags: string[], withDetailInfo: boolean): Item;
|
|
24
|
+
static addDetailInfoForOperaton(item: Item, operation: any): void;
|
|
25
|
+
static addNamespaceItemFromDBEntityItem(items: Map<string, Item>, dbEntityItem: Item, namespace: string, itemTags: string[]): void;
|
|
26
|
+
static getAttributeInfo(entity: CDSDefinition): any;
|
|
27
|
+
private static collectAttributes;
|
|
28
|
+
private static getPath;
|
|
29
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ProjectFileSystem } from '@sap/artifact-management-base-types';
|
|
2
|
+
export default class PathUtil {
|
|
3
|
+
/**
|
|
4
|
+
* Since the path would be relative to the root, in case of win OS,
|
|
5
|
+
* we need to find the correct root drive and we need to prefix the path with the correct root drive (C:, D: etc.)
|
|
6
|
+
*/
|
|
7
|
+
static getLocationForWindows(path: string, rootPath: string): string;
|
|
8
|
+
static getExternalServicePaths(fs: ProjectFileSystem): Promise<Set<string>>;
|
|
9
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ModuleData, Item, ProjectFileSystem, FileSystemWatchManager, ModuleReader } from '@sap/artifact-management-base-types';
|
|
1
|
+
import { ModuleData, Item, ProjectFileSystem, FileSystemWatchManager, ModuleReader, ProjectContext } from '@sap/artifact-management-base-types';
|
|
2
2
|
import ItemSetInstance from './ItemSetInstance';
|
|
3
3
|
import ProjectEntityInstance from './ProjectEntityInstance';
|
|
4
4
|
declare class ModuleInstance extends ProjectEntityInstance<ModuleData | undefined> {
|
|
@@ -6,11 +6,11 @@ declare class ModuleInstance extends ProjectEntityInstance<ModuleData | undefine
|
|
|
6
6
|
constructor(watchManager: FileSystemWatchManager, fs: ProjectFileSystem, readers: ModuleReader[]);
|
|
7
7
|
watchForChangesInModuleRootFolder(): void;
|
|
8
8
|
getFs(): ProjectFileSystem;
|
|
9
|
-
loadItemSets(moduleData: ModuleData | undefined,
|
|
9
|
+
loadItemSets(moduleData: ModuleData | undefined, projectContext: ProjectContext): Promise<ItemSetInstance[]>;
|
|
10
10
|
getData(): Promise<ModuleData | undefined>;
|
|
11
|
-
getItemSets(
|
|
11
|
+
getItemSets(context: ProjectContext): Promise<ItemSetInstance[]>;
|
|
12
12
|
getModuleType(): Promise<string>;
|
|
13
|
-
getItems(
|
|
13
|
+
getItems(context: ProjectContext): Promise<{
|
|
14
14
|
items: Item[];
|
|
15
15
|
info?: {};
|
|
16
16
|
}>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IPluginManager, KeyIn, Tag } from '@sap/artifact-management-base-types';
|
|
2
2
|
import ProjectApi from './ProjectApi';
|
|
3
3
|
export default interface WorkspaceApi {
|
|
4
|
-
getProjects(tag?: KeyIn<typeof Tag
|
|
4
|
+
getProjects(tag?: KeyIn<typeof Tag>, path?: string): Promise<ProjectApi[]>;
|
|
5
5
|
getProject(path: string): Promise<ProjectApi>;
|
|
6
6
|
/**
|
|
7
7
|
* Get all paths that contain projects in the workspace
|
|
@@ -6,7 +6,7 @@ export { VSCodeLike };
|
|
|
6
6
|
export default class WorkspaceImpl implements WorkspaceApi {
|
|
7
7
|
private api;
|
|
8
8
|
constructor(pathOrWorkspace: string | VSCodeLike, readModuleAsProject?: boolean);
|
|
9
|
-
getProjects(tag?: KeyIn<typeof Tag
|
|
9
|
+
getProjects(tag?: KeyIn<typeof Tag>, path?: string): Promise<ProjectApi[]>;
|
|
10
10
|
getProject(path: string): Promise<ProjectApi>;
|
|
11
11
|
getProjectUris(): Promise<string[]>;
|
|
12
12
|
startWatch(): void;
|
|
Binary file
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
export declare const InfoList: {
|
|
2
|
-
ERR_MODULE_SAP_APP_ID_UNDEFINED: {
|
|
3
|
-
code: string;
|
|
4
|
-
description: string;
|
|
5
|
-
};
|
|
6
|
-
ERR_METADATA_NAME_UNDEFINED: {
|
|
7
|
-
code: string;
|
|
8
|
-
description: string;
|
|
9
|
-
};
|
|
10
|
-
ERR_SAP_APP_TITLE_UNDEFINED: {
|
|
11
|
-
code: string;
|
|
12
|
-
description: string;
|
|
13
|
-
};
|
|
14
|
-
ERR_CROSSNAVIGSTION_SEMANTIC_OBJECT_UNDEFINED: {
|
|
15
|
-
code: string;
|
|
16
|
-
description: string;
|
|
17
|
-
};
|
|
18
|
-
ERR_CROSSNAVIGSTION_ACTION_UNDEFINED: {
|
|
19
|
-
code: string;
|
|
20
|
-
description: string;
|
|
21
|
-
};
|
|
22
|
-
ERR_TARGET_ID_UNDEFINED: {
|
|
23
|
-
code: string;
|
|
24
|
-
description: string;
|
|
25
|
-
};
|
|
26
|
-
ERR_SOURCETEMPLATE_ID_UNDEFINED: {
|
|
27
|
-
code: string;
|
|
28
|
-
description: string;
|
|
29
|
-
};
|
|
30
|
-
ERR_ITEM_SAP_APP_ID_UNDEFINED: {
|
|
31
|
-
code: string;
|
|
32
|
-
description: string;
|
|
33
|
-
};
|
|
34
|
-
};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { KeyIn, ModuleType, ModuleGeneratorContext, XSAppJson, MtaModuleRequires, MtaModule, UI5ModuleManifestGenerator } from '@sap/artifact-management-base-types';
|
|
2
|
-
export default class UI5ModuleGenerator implements UI5ModuleManifestGenerator {
|
|
3
|
-
getXSAppJson(context: ModuleGeneratorContext): XSAppJson;
|
|
4
|
-
private modifyManifestJson;
|
|
5
|
-
getType(): KeyIn<typeof ModuleType>;
|
|
6
|
-
provideResources(): Promise<never[]>;
|
|
7
|
-
beforeBuildCommands(): Promise<string[]>;
|
|
8
|
-
getModuleManifest(context: ModuleGeneratorContext, useHeadlessGenerator?: boolean): Promise<MtaModule | null>;
|
|
9
|
-
requires(): MtaModuleRequires[];
|
|
10
|
-
}
|