@sap/artifact-management-types 1.53.3 → 1.53.4

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.
Files changed (31) hide show
  1. package/package.json +2 -2
  2. package/src/commons/CallDeferred.d.ts +1 -1
  3. package/src/commons/ResourceManager.d.ts +1 -1
  4. package/src/cp/CFProjectBuilder.d.ts +1 -1
  5. package/src/cp/Defs.d.ts +4 -4
  6. package/src/mta-generator/MtaBuilder.d.ts +2 -2
  7. package/src/plugins/abap/readers/AbapModuleReader.d.ts +2 -2
  8. package/src/plugins/abap/readers/AbapProjectReader.d.ts +1 -1
  9. package/src/plugins/abap/utils/AbapFioriUtils.d.ts +1 -1
  10. package/src/plugins/bas/readers/BasEmptyModuleReader.d.ts +2 -2
  11. package/src/plugins/bas/readers/BasEmptyProjectReader.d.ts +1 -1
  12. package/src/plugins/cap/readers/CapModuleReader.d.ts +2 -18
  13. package/src/plugins/cap/readers/CapProjectReader.d.ts +1 -1
  14. package/src/plugins/cap/readers/CapSampleDataModuleReader.d.ts +4 -3
  15. package/src/plugins/cap/readers/calculation-view/model/model.d.ts +1 -1
  16. package/src/plugins/cap/readers/calculation-view/model/modelbase.d.ts +4 -4
  17. package/src/plugins/cap/readers/calculation-view/viewmodel/CalculationViewXmlParser.d.ts +1 -1
  18. package/src/plugins/cap/util/CapLogicUtil.d.ts +1 -1
  19. package/src/plugins/java/readers/JavaModuleReader.d.ts +19 -3
  20. package/src/plugins/java/readers/JavaProjectReader.d.ts +1 -1
  21. package/src/plugins/java/readers/JavaSampleDataModuleReader.d.ts +2 -1
  22. package/src/plugins/xsuaa/readers/XsSecurityModuleReader.d.ts +4 -4
  23. package/src/project/PlatformContext.d.ts +2 -2
  24. package/src/project-api/AutoBuilder.d.ts +0 -1
  25. package/src/project-api/ItemSetInstance.d.ts +1 -1
  26. package/src/project-api/ItemWatcher.d.ts +0 -1
  27. package/src/project-api/ItemWatcherApi.d.ts +0 -1
  28. package/src/project-api/LocalFileSystemWatchManager.d.ts +0 -1
  29. package/src/project-api/NodeWorkspace.d.ts +0 -1
  30. package/src/project-api/ProjectEntityInstance.d.ts +2 -3
  31. package/src/project-api/ProjectModulesInstance.d.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sap/artifact-management-types",
3
- "version": "1.53.3",
3
+ "version": "1.53.4",
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.53.3"
13
+ "@sap/artifact-management-base-types": "1.53.4"
14
14
  },
15
15
  "devDependencies": {
16
16
  "gulp": "4.0.2"
@@ -1,4 +1,4 @@
1
- declare type CallDeferredOptions = {
1
+ type CallDeferredOptions = {
2
2
  func: Function;
3
3
  triggerDelay: number;
4
4
  maxTriggerDelay: number;
@@ -1,4 +1,4 @@
1
- declare type Constructor<T> = {
1
+ type Constructor<T> = {
2
2
  new (...args: any): T;
3
3
  };
4
4
  export interface Resource<T> {
@@ -1,7 +1,7 @@
1
1
  import { ProjectFileSystem, Project, NameFactory, ProjectManifestGenerator, ModuleManifestGenerator, Service, ModuleGeneratorContext, UI5ModuleManifestGenerator } from '@sap/artifact-management-base-types';
2
2
  import MtaGeneratorSettings from '../mta-generator/MtaGeneratorSettings';
3
3
  import { ProjectBuilder } from '../project/ProjectBuilder';
4
- export declare type ProjectGeneratorOptions = {
4
+ export type ProjectGeneratorOptions = {
5
5
  project: Project;
6
6
  fs: ProjectFileSystem;
7
7
  options: MtaGeneratorSettings;
package/src/cp/Defs.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  export declare const NavigationMode: Readonly<{
2
- EMBEDDED: string;
3
- NEW_WINDOW: string;
4
- REPLACE: string;
5
- NEW_WINDOW_THEN_EMBEDDED: string;
2
+ EMBEDDED: "embedded";
3
+ NEW_WINDOW: "newWindow";
4
+ REPLACE: "replace";
5
+ NEW_WINDOW_THEN_EMBEDDED: "newWindowThenEmbedded";
6
6
  }>;
7
7
  export declare const WEBAPP_SECTION_DESCRIPTION: {
8
8
  ZERO_APPS: string;
@@ -1,5 +1,5 @@
1
1
  import { ProjectFileSystem } from '@sap/artifact-management-base-types';
2
- export declare type Mta = {
2
+ export type Mta = {
3
3
  '_schema-version': string;
4
4
  ID: string;
5
5
  version: string;
@@ -16,7 +16,7 @@ export declare type Mta = {
16
16
  modules: any;
17
17
  resources: any;
18
18
  };
19
- export declare type MtaRequires = {
19
+ export type MtaRequires = {
20
20
  name: string;
21
21
  parameters: {
22
22
  'content-target'?: boolean;
@@ -15,10 +15,10 @@ export default class AbapModuleReader extends CapModuleReader {
15
15
  matchConditions: {
16
16
  requiredFilePatterns: string[];
17
17
  };
18
- types: string[];
18
+ types: ("com.sap.abap/Service" | "com.sap.abap/ServiceEntity" | "com.sap.abap/ProjectionEntity" | "com.sap.abap/BusinessObjectEntity")[];
19
19
  tags: string[];
20
20
  read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
21
- detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions | undefined) => Promise<Item | undefined>;
21
+ detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions) => Promise<Item | undefined>;
22
22
  }[];
23
23
  read({ fs }: {
24
24
  fs: ProjectFileSystem;
@@ -4,6 +4,6 @@ export default class AbapProjectReader extends ProjectReader {
4
4
  getType(): KeyIn<typeof ProjectType>;
5
5
  getDetectionMechanism(): DetectionMechanism;
6
6
  moduleSearchPattern(): Promise<string[]>;
7
- tags: string[];
7
+ tags: "abap"[];
8
8
  read({ fs, matchedFiles }: ProjectReaderOptions): Promise<ProjectData | undefined>;
9
9
  }
@@ -1,6 +1,6 @@
1
1
  import { Item, ProjectData, ProjectFileSystem, VSCodeFileSystem } from '@sap/artifact-management-base-types';
2
2
  import { AppGenInfoFile } from '@sap/artifact-management-fioriplugin';
3
- export declare type ServiceItemsMap = Map<string, Item[]>;
3
+ export type ServiceItemsMap = Map<string, Item[]>;
4
4
  export declare function updateUiItem(UiItem: Item, serviceItem: Item): void;
5
5
  export declare function updateUiItems(appGenInfoFile: AppGenInfoFile, serviceCsnsMap: ServiceItemsMap, projectFs: ProjectFileSystem | VSCodeFileSystem, fioriUiItem: Item): void;
6
6
  export declare function initFioriUiItem(projectInfo: ProjectData): Item;
@@ -13,11 +13,11 @@ export default class BasEmptyModuleReader extends ModuleReader {
13
13
  matchConditions: {
14
14
  requiredFilePatterns: string[];
15
15
  };
16
- types: string[];
16
+ types: ("com.sap.bas.empty/Service" | "com.sap.bas.empty/Entity")[];
17
17
  tags: string[];
18
18
  read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
19
19
  }[];
20
- tags: string[];
20
+ tags: ("module" | "bas" | "empty")[];
21
21
  prepareItemReaderContext(fs: ProjectFileSystem, context: ProjectContext): Promise<BasItemReaderContext | undefined>;
22
22
  read({ fs }: {
23
23
  fs: ProjectFileSystem;
@@ -6,7 +6,7 @@ export default class BasEmptyProjectReader extends ProjectReader {
6
6
  getDetectionMechanism(): DetectionMechanism;
7
7
  additionalModuleReaders: BasEmptyModuleReader[][];
8
8
  moduleSearchPattern(): Promise<string[]>;
9
- tags: string[];
9
+ tags: ("project" | "bas" | "empty")[];
10
10
  read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
11
11
  private isBasProjectsFolder;
12
12
  private isFristLevelFoder;
@@ -1,4 +1,4 @@
1
- import { ProjectFileSystem, Item, ModuleReader, ModuleType, ModuleData, ProjectEntityReaderReadOptions, DetectionMechanism, KeyIn, ItemDetailInfoOptions, ProjectContext } from '@sap/artifact-management-base-types';
1
+ import { ProjectFileSystem, Item, ModuleReader, ModuleType, ModuleData, ProjectEntityReaderReadOptions, DetectionMechanism, KeyIn, ItemReader, ItemDetailInfoOptions, ProjectContext } from '@sap/artifact-management-base-types';
2
2
  interface CapItemReaderContext {
3
3
  withDetailInfo?: boolean;
4
4
  }
@@ -10,23 +10,7 @@ export default class CapModuleReader extends ModuleReader {
10
10
  };
11
11
  itemTags: string[];
12
12
  testTag: string;
13
- itemReaders: ({
14
- matchConditions: {
15
- requiredFilePatterns: string[];
16
- };
17
- types: string[];
18
- tags: string[];
19
- read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
20
- detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions | undefined) => Promise<Item | undefined>;
21
- } | {
22
- matchConditions: {
23
- requiredFilePatterns: string[];
24
- };
25
- types: string[];
26
- tags: string[];
27
- read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
28
- detailInfo?: undefined;
29
- })[];
13
+ itemReaders: ItemReader[];
30
14
  tags: string[];
31
15
  prepareItemReaderContext(fs: ProjectFileSystem, context: ProjectContext): Promise<CapItemReaderContext | undefined>;
32
16
  getCapModulesFolderMap(fs: ProjectFileSystem): Promise<any>;
@@ -5,7 +5,7 @@ export default class CapProjectReader extends ProjectReader {
5
5
  getType(): KeyIn<typeof ProjectType>;
6
6
  getDetectionMechanism(): DetectionMechanism;
7
7
  additionalModuleReaders: XsSecurityModuleReader[][];
8
- tags: string[];
8
+ tags: ("project" | "cap")[];
9
9
  read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
10
10
  isCapProject(fs: ProjectFileSystem, helper: ProjectReaderHelper): Promise<boolean>;
11
11
  moduleSearchPattern(): Promise<string[]>;
@@ -1,7 +1,8 @@
1
- import { ProjectFileSystem, ModuleData, ProjectEntityReaderReadOptions } from '@sap/artifact-management-base-types';
1
+ import { ProjectFileSystem, ModuleType, ModuleData, ProjectEntityReaderReadOptions } from '@sap/artifact-management-base-types';
2
+ import type { KeyIn } from '@sap/artifact-management-base-types';
2
3
  import CapModuleReader from './CapModuleReader';
3
4
  export default class CapSampleDataModuleReader extends CapModuleReader {
4
- getType(): string;
5
+ getType(): KeyIn<typeof ModuleType>;
5
6
  matchConditions: {
6
7
  requiredFilePatterns: string[];
7
8
  };
@@ -9,7 +10,7 @@ export default class CapSampleDataModuleReader extends CapModuleReader {
9
10
  matchConditions: {
10
11
  requiredFilePatterns: string[];
11
12
  };
12
- types: string[];
13
+ types: "mimetype/csv"[];
13
14
  tags: string[];
14
15
  read: (options: ProjectEntityReaderReadOptions) => Promise<import("@sap/artifact-management-base").Item[]>;
15
16
  }[];
@@ -303,7 +303,7 @@ export declare enum TemporalCondition {
303
303
  INCLUDE_BOTH = "INCLUDE_BOTH"
304
304
  }
305
305
  export declare enum AggregationBehavior {
306
- NONE = "none",
306
+ NONE = "none",// special one; not present in legacy model
307
307
  SUM = "sum",
308
308
  MIN = "min",
309
309
  MAX = "max",
@@ -60,18 +60,18 @@ export declare abstract class AbstractModel {
60
60
  constructor(isLoading?: any);
61
61
  $getModel(): AbstractModel;
62
62
  }
63
- declare type IfEquals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
64
- declare type NonReadonlyKeys<T> = {
63
+ type IfEquals<X, Y> = (<T>() => T extends X ? 1 : 2) extends (<T>() => T extends Y ? 1 : 2) ? true : false;
64
+ type NonReadonlyKeys<T> = {
65
65
  [K in keyof T]: IfEquals<{
66
66
  -readonly [P in K]: T[P];
67
67
  }, {
68
68
  [P in K]: T[P];
69
69
  }> extends true ? K : never;
70
70
  }[keyof T];
71
- declare type NonFunctionKeys<T> = {
71
+ type NonFunctionKeys<T> = {
72
72
  [K in keyof T]: T[K] extends Function ? never : K;
73
73
  }[keyof T];
74
- export declare type WritableCalcViewModel<T> = Partial<Pick<T, NonReadonlyKeys<T> & NonFunctionKeys<T>>>;
74
+ export type WritableCalcViewModel<T> = Partial<Pick<T, NonReadonlyKeys<T> & NonFunctionKeys<T>>>;
75
75
  export declare abstract class AbstractModelClass<T extends AbstractModelClass<T>> {
76
76
  private $$containingFeature;
77
77
  private $$model;
@@ -56,7 +56,7 @@ export default abstract class CalculationViewXmlParser {
56
56
  private static excecuteLoadPostProcessingCallBackQueue;
57
57
  }
58
58
  export declare const getElementFromColumnView: (columnView: ColumnView, name: string) => Element | null;
59
- export declare const getEntity: (columnView: ColumnView, id: string, entityType?: EntityType | undefined) => Entity;
59
+ export declare const getEntity: (columnView: ColumnView, id: string, entityType?: EntityType) => Entity;
60
60
  export declare const getElementFromsharedEntity: (entity: Entity, elementName: string) => Element;
61
61
  export declare const getParameterFromColumnView: (columnView: ColumnView, name: string) => import("../model/model").Parameter | null;
62
62
  export declare const processUDFParameter: (columnView: ColumnView, udfParameter: any, values: any) => any;
@@ -1,5 +1,5 @@
1
1
  import * as t from '@babel/types';
2
- export declare type PhaseType = 'before' | 'on' | 'after';
2
+ export type PhaseType = 'before' | 'on' | 'after';
3
3
  export declare const phases: string[];
4
4
  export declare const EVENT_UNDEFINED = "__undefined__";
5
5
  export declare const DEFAULT_INDENT = 4;
@@ -6,18 +6,34 @@ export default class JavaModuleReader extends CapModuleReader {
6
6
  matchConditions: {
7
7
  requiredFilePatterns: string[];
8
8
  };
9
- types: string[];
9
+ types: ("com.sap.cap/Service" | "com.sap.cap/Function" | "com.sap.cap/Action" | "com.sap.cds/Entity" | "org.oasis-open.odata/Entity")[];
10
10
  tags: string[];
11
11
  read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
12
- detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions | undefined) => Promise<Item | undefined>;
12
+ detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions) => Promise<Item | undefined>;
13
13
  } | {
14
14
  matchConditions: {
15
15
  requiredFilePatterns: string[];
16
16
  };
17
- types: string[];
17
+ types: "mimetype/csv"[];
18
18
  tags: string[];
19
19
  read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
20
20
  detailInfo?: undefined;
21
+ } | {
22
+ matchConditions: {
23
+ requiredFilePatterns: string[];
24
+ };
25
+ types: "com.sap.cap/ApplicationLogic"[];
26
+ tags: string[];
27
+ read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
28
+ detailInfo?: undefined;
29
+ } | {
30
+ matchConditions: {
31
+ requiredFilePatterns: string[];
32
+ };
33
+ types: "com.sap.hana/CalculationView"[];
34
+ tags: "calculationView"[];
35
+ read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
36
+ detailInfo: (fs: ProjectFileSystem, ref: string, options?: ItemDetailInfoOptions) => Promise<Item | undefined>;
21
37
  })[];
22
38
  readJavaApplicationLogic({ fs, matchedFiles }: ProjectEntityReaderReadOptions): Promise<Item[]>;
23
39
  read({ fs }: {
@@ -4,7 +4,7 @@ export default class JavaProjectReader extends ProjectReader {
4
4
  getType(): KeyIn<typeof ProjectType>;
5
5
  getDetectionMechanism(): DetectionMechanism;
6
6
  moduleSearchPattern(): Promise<string[]>;
7
- tags: string[];
7
+ tags: "java"[];
8
8
  capServices: string[];
9
9
  read({ fs }: ProjectReaderOptions): Promise<ProjectData | undefined>;
10
10
  resolveProperty(value: string, properties: Record<string, string>): string;
@@ -1,4 +1,5 @@
1
+ import { ModuleType, KeyIn } from '@sap/artifact-management-base-types';
1
2
  import CapSampleDataModuleReader from '../../cap/readers/CapSampleDataModuleReader';
2
3
  export default class JavaSampleDataModuleReader extends CapSampleDataModuleReader {
3
- getType(): string;
4
+ getType(): KeyIn<typeof ModuleType>;
4
5
  }
@@ -5,16 +5,16 @@ export default class XsSecurityModuleReader extends ModuleReader {
5
5
  matchConditions: {
6
6
  requiredFilePatterns: string[];
7
7
  };
8
- itemTags: string[];
8
+ itemTags: ("item" | "xsuaa")[];
9
9
  itemReaders: {
10
10
  matchConditions: {
11
11
  requiredFilePatterns: string[];
12
12
  };
13
- types: string[];
14
- tags: string[];
13
+ types: ("com.sap.ui/Application" | "com.sap.ui/Component" | "com.sap.ui/View")[];
14
+ tags: ("item" | "xsuaa")[];
15
15
  read: (options: ProjectEntityReaderReadOptions) => Promise<Item[]>;
16
16
  }[];
17
- tags: string[];
17
+ tags: ("module" | "xsuaa")[];
18
18
  readPackageJson(fs: ProjectFileSystem): Promise<any>;
19
19
  readDefaultRoles(fs: ProjectFileSystem): Promise<any>;
20
20
  read({ fs }: {
@@ -1,6 +1,6 @@
1
1
  export declare const PLATFORM: Readonly<{
2
- CF: string;
3
- K8s: string;
2
+ CF: "cloudfoundry";
3
+ K8s: "kubernetes";
4
4
  }>;
5
5
  export interface PlatformContext {
6
6
  platform: string;
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { ProjectFileSystem, FileSystemWatchManager, IProjectInstance } from '@sap/artifact-management-base-types';
4
3
  declare class AutoBuilder extends EventEmitter {
@@ -3,7 +3,7 @@ import ProjectEntityInstance from './ProjectEntityInstance';
3
3
  export default class ItemSetInstance extends ProjectEntityInstance<Item[]> {
4
4
  private itemReader;
5
5
  private itemReaderContext?;
6
- constructor(watchManager: FileSystemWatchManager, fs: ProjectFileSystem, itemReader: ItemReader, itemReaderContext?: any);
6
+ constructor(watchManager: FileSystemWatchManager, fs: ProjectFileSystem, itemReader: ItemReader, itemReaderContext?: any | undefined);
7
7
  getItemReader(): ItemReader;
8
8
  getItems(): Promise<Item[]>;
9
9
  }
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { ItemFilter, Item, FileSystemWatchManager } from '@sap/artifact-management-base-types';
3
2
  import { ProjectInstance } from './ProjectInstance';
4
3
  import { EventEmitter } from 'events';
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Item } from '@sap/artifact-management-base-types';
3
2
  import { EventEmitter } from 'events';
4
3
  declare interface ItemWatcherApi {
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { EventEmitter } from 'events';
3
2
  import { ProjectFileSystem, FileSystemWatchManager, ChangeListener, Observer } from '@sap/artifact-management-base-types';
4
3
  /**
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { FSWatcher } from 'fs';
3
2
  import { IPluginManager, KeyIn, Tag } from '@sap/artifact-management-base-types';
4
3
  import ProjectApi from './ProjectApi';
@@ -1,12 +1,11 @@
1
- /// <reference types="node" />
2
1
  import { ProjectFileSystem, FileSystemWatchManager, ProjectEntityReader } from '@sap/artifact-management-base-types';
3
2
  import { EventEmitter } from 'events';
4
- declare type LoadResult<T> = {
3
+ type LoadResult<T> = {
5
4
  data: T | undefined;
6
5
  watchPatterns: string[];
7
6
  watchContent: string[];
8
7
  } | undefined;
9
- declare type LoadData<T> = () => Promise<LoadResult<T>>;
8
+ type LoadData<T> = () => Promise<LoadResult<T>>;
10
9
  export default class ProjectEntityInstance<T> extends EventEmitter {
11
10
  protected readonly watchManager: FileSystemWatchManager;
12
11
  protected fs: ProjectFileSystem;
@@ -4,7 +4,7 @@ import ProjectEntityInstance from './ProjectEntityInstance';
4
4
  /**
5
5
  * Module directories of the project
6
6
  */
7
- declare type LoadResult<T> = {
7
+ type LoadResult<T> = {
8
8
  data: T | undefined;
9
9
  watchPatterns: string[];
10
10
  watchContent: string[];