@sap/artifact-management-types 1.23.0 → 1.23.3
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/cp/CFProjectBuilder.d.ts +2 -0
- package/src/plugins/bas/readers/BasEmptyModuleReader.d.ts +31 -0
- package/src/plugins/bas/readers/BasEmptyProjectReader.d.ts +2 -0
- package/src/plugins/bas/util/EdmxUtil.d.ts +12 -0
- package/src/plugins/cap/generators/CapDestinationModuleGenerator.d.ts +2 -17
- package/src/plugins/cap/generators/CapProjectGenerator.d.ts +1 -0
- package/src/plugins/cap/readers/CapModuleReader.d.ts +4 -3
- package/src/plugins/cap/util/ItemUtil.d.ts +2 -0
- package/src/project-api/ModuleInstance.d.ts +4 -4
- package/src/project-api/ProjectApi.d.ts +2 -0
- package/src/project-api/ProjectImpl.d.ts +4 -0
- package/src/project-api/VSCodeWorkspace.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sap/artifact-management-types",
|
|
3
|
-
"version": "1.23.
|
|
3
|
+
"version": "1.23.3",
|
|
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.23.
|
|
13
|
+
"@sap/artifact-management-base-types": "1.23.3"
|
|
14
14
|
},
|
|
15
15
|
"devDependencies": {
|
|
16
16
|
"gulp": "4.0.2"
|
|
@@ -32,6 +32,7 @@ export default class CFProjectBuilder implements ProjectBuilder {
|
|
|
32
32
|
private readStatusTracker;
|
|
33
33
|
generateManifest(isDeltaBuild?: boolean): Promise<void>;
|
|
34
34
|
private addResources;
|
|
35
|
+
private resetMainServiceUrl;
|
|
35
36
|
private getResourcesProvidedByGenerators;
|
|
36
37
|
private generateMtaModules;
|
|
37
38
|
postProcessUI5Module(moduleGenerator: UI5ModuleManifestGenerator, context: ModuleGeneratorContext): Promise<void>;
|
|
@@ -53,4 +54,5 @@ export default class CFProjectBuilder implements ProjectBuilder {
|
|
|
53
54
|
private generateOverviewApplication;
|
|
54
55
|
private generateURLFromMetadataService;
|
|
55
56
|
private generateURLFromHtml5RepoService;
|
|
57
|
+
private addDestinationForMtx;
|
|
56
58
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
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 {
|
|
6
|
+
getType(): KeyIn<typeof ModuleType>;
|
|
7
|
+
getDetectionMechanism(): DetectionMechanism;
|
|
8
|
+
matchConditions: {
|
|
9
|
+
requiredFilePatterns: string[];
|
|
10
|
+
};
|
|
11
|
+
itemTags: string[];
|
|
12
|
+
itemReaders: {
|
|
13
|
+
matchConditions: {
|
|
14
|
+
requiredFilePatterns: string[];
|
|
15
|
+
};
|
|
16
|
+
types: string[];
|
|
17
|
+
tags: string[];
|
|
18
|
+
read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
|
|
19
|
+
}[];
|
|
20
|
+
tags: string[];
|
|
21
|
+
prepareItemReaderContext(fs: ProjectFileSystem, context: ProjectContext): Promise<BasItemReaderContext | undefined>;
|
|
22
|
+
read({ fs }: {
|
|
23
|
+
fs: ProjectFileSystem;
|
|
24
|
+
}): Promise<ModuleData | undefined>;
|
|
25
|
+
readItems({ fs, context }: ProjectEntityReaderReadOptions): Promise<Item[]>;
|
|
26
|
+
private getServiceItem;
|
|
27
|
+
private getServiceEntityItems;
|
|
28
|
+
private getEntityItem;
|
|
29
|
+
private addDetailInfo;
|
|
30
|
+
}
|
|
31
|
+
export {};
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { DetectionMechanism, KeyIn, ProjectData, ProjectFileSystem, ProjectReader, ProjectReaderOptions, ProjectType } from '@sap/artifact-management-base-types';
|
|
2
|
+
import BasEmptyModuleReader from './BasEmptyModuleReader';
|
|
2
3
|
export default class BasEmptyProjectReader extends ProjectReader {
|
|
3
4
|
constructor();
|
|
4
5
|
getType(): KeyIn<typeof ProjectType>;
|
|
5
6
|
getDetectionMechanism(): DetectionMechanism;
|
|
7
|
+
additionalModuleReaders: BasEmptyModuleReader[][];
|
|
6
8
|
tags: string[];
|
|
7
9
|
read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
|
|
8
10
|
isFristLevelFoder(absRootPath: string, absBasePath: string): boolean;
|
|
@@ -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,22 +1,7 @@
|
|
|
1
|
-
import { KeyIn, ModuleType, ModuleGeneratorContext, ModuleManifestGenerator,
|
|
1
|
+
import { KeyIn, ModuleType, ModuleGeneratorContext, ModuleManifestGenerator, MtaModule, MtaModuleRequires } from '@sap/artifact-management-base-types';
|
|
2
2
|
export declare class CapDestinationModuleGenerator implements ModuleManifestGenerator {
|
|
3
3
|
getType(): KeyIn<typeof ModuleType>;
|
|
4
|
-
provideResources(context: ModuleGeneratorContext): Promise<
|
|
5
|
-
name: string;
|
|
6
|
-
service: string;
|
|
7
|
-
plan: string;
|
|
8
|
-
type: ServiceType;
|
|
9
|
-
config: {
|
|
10
|
-
HTML5Runtime_enabled: boolean;
|
|
11
|
-
version: string;
|
|
12
|
-
};
|
|
13
|
-
} | {
|
|
14
|
-
name: string;
|
|
15
|
-
service: string;
|
|
16
|
-
plan: string;
|
|
17
|
-
type: ServiceType;
|
|
18
|
-
config?: undefined;
|
|
19
|
-
})[]>;
|
|
4
|
+
provideResources(context: ModuleGeneratorContext): Promise<never[]>;
|
|
20
5
|
beforeBuildCommands(): Promise<string[]>;
|
|
21
6
|
getModuleManifest(context: ModuleGeneratorContext): Promise<MtaModule | null>;
|
|
22
7
|
private getDestinationsToBeCreated;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Service, Mta, MtaModuleRequires, ProjectManifestGenerator, ModuleManifestGenerator, ProjectType, ModuleGeneratorContext, KeyIn } from '@sap/artifact-management-base-types';
|
|
2
2
|
export default class CapProjectGenerator implements ProjectManifestGenerator {
|
|
3
3
|
getType(): KeyIn<typeof ProjectType>;
|
|
4
|
+
beforeBuildCommands(context: ModuleGeneratorContext): Promise<string[]>;
|
|
4
5
|
provideResources(context: ModuleGeneratorContext): Service[];
|
|
5
6
|
getModuleGenerators(context: ModuleGeneratorContext): ModuleManifestGenerator[];
|
|
6
7
|
getProjectManifest(context: ModuleGeneratorContext): Promise<Mta>;
|
|
@@ -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,17 +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
40
|
private addUnboundFunctionItems;
|
|
41
41
|
private addUnboundActionItems;
|
|
42
|
+
private addEventItems;
|
|
42
43
|
}
|
|
43
44
|
export {};
|
|
@@ -20,8 +20,10 @@ export default class ItemUtil {
|
|
|
20
20
|
private static addLinksToAppLogicItemWithoutEntity;
|
|
21
21
|
static addLinkToRoles(cdsObject: CDSDefinition, item: Item): void;
|
|
22
22
|
static getOperationItem(fs: ProjectFileSystem, operation: any, tags: string[], withDetailInfo: boolean): Item;
|
|
23
|
+
static getEventItem(fs: ProjectFileSystem, event: any, tags: string[], withDetailInfo: boolean): Item;
|
|
23
24
|
static addDetailInfoForOperaton(item: Item, operation: any): void;
|
|
24
25
|
static addNamespaceItemFromDBEntityItem(items: Map<string, Item>, dbEntityItem: Item, namespace: string, itemTags: string[]): void;
|
|
25
26
|
static getAttributeInfo(entity: CDSDefinition): any;
|
|
26
27
|
private static collectAttributes;
|
|
28
|
+
private static getPath;
|
|
27
29
|
}
|
|
@@ -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
|
}>;
|
|
@@ -56,6 +56,7 @@ export default interface ProjectApi {
|
|
|
56
56
|
*/
|
|
57
57
|
buildV2(options?: MtaGeneratorSettings, logger?: IChildLogger): Promise<void>;
|
|
58
58
|
buildManifest(options?: MtaGeneratorSettings, logger?: IChildLogger): Promise<void>;
|
|
59
|
+
removeManifest(): Promise<void>;
|
|
59
60
|
/**
|
|
60
61
|
* Deploy already built project
|
|
61
62
|
*/
|
|
@@ -98,4 +99,5 @@ export default interface ProjectApi {
|
|
|
98
99
|
* @param logger
|
|
99
100
|
*/
|
|
100
101
|
getDataInfo(data: any, mainEntityName?: string, logger?: IChildLogger): Promise<any>;
|
|
102
|
+
enableSaas(): Promise<void>;
|
|
101
103
|
}
|
|
@@ -62,6 +62,8 @@ export default class ProjectImpl implements ProjectApi {
|
|
|
62
62
|
deploy(logger?: IChildLogger): Promise<void>;
|
|
63
63
|
deployV2(logger?: IChildLogger): Promise<void>;
|
|
64
64
|
getProjectInfo(logger?: IChildLogger): Promise<ProjectData | undefined>;
|
|
65
|
+
removeManifest(): Promise<void>;
|
|
66
|
+
enableSaas(): Promise<void>;
|
|
65
67
|
getModulesInfo(logger?: IChildLogger): Promise<ModuleData[]>;
|
|
66
68
|
/**
|
|
67
69
|
* @deprecated Use getApplicationDeploymentSummary() instead
|
|
@@ -74,4 +76,6 @@ export default class ProjectImpl implements ProjectApi {
|
|
|
74
76
|
} | undefined>;
|
|
75
77
|
invalidate_cachedLaunchURL(): Promise<void>;
|
|
76
78
|
getDataInfo(data: any, mainEntityName?: string, logger?: IChildLogger): Promise<any>;
|
|
79
|
+
private modifyCDSProfile;
|
|
80
|
+
private modifyCDSProductionDB;
|
|
77
81
|
}
|
|
@@ -31,6 +31,8 @@ export default class VSCodeWorkspace implements WorkspaceApi {
|
|
|
31
31
|
getProjects(tag?: KeyIn<typeof Tag>): Promise<ProjectApi[]>;
|
|
32
32
|
getProject(path: string): Promise<ProjectApi>;
|
|
33
33
|
private getProjectsAllLevels;
|
|
34
|
+
private isExpectedProject;
|
|
35
|
+
private isCorrectBasEmptyProject;
|
|
34
36
|
getProjectUris(): Promise<string[]>;
|
|
35
37
|
startWatch(): void;
|
|
36
38
|
stopWatch(): void;
|