@ui5/task-adaptation 1.6.4 → 1.6.5-rc.1

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 (50) hide show
  1. package/CHANGELOG.md +49 -6
  2. package/dist/adapters/abapAdapter.d.ts +2 -4
  3. package/dist/adapters/abapAdapter.js +2 -4
  4. package/dist/adapters/commands/downloadAnnotationsCommand.d.ts +2 -4
  5. package/dist/adapters/commands/downloadAnnotationsCommand.js +2 -6
  6. package/dist/annotations/abapAnnotationManager.d.ts +17 -0
  7. package/dist/{annotationManager.js → annotations/abapAnnotationManager.js} +12 -10
  8. package/dist/annotations/annotationManager.d.ts +3 -0
  9. package/dist/annotations/annotationManager.js +2 -0
  10. package/dist/annotations/cfAnnotationManager.d.ts +4 -0
  11. package/dist/annotations/cfAnnotationManager.js +7 -0
  12. package/dist/annotations/localAnnotationManager.d.ts +4 -0
  13. package/dist/annotations/localAnnotationManager.js +7 -0
  14. package/dist/annotations/serviceRequestor.d.ts +3 -3
  15. package/dist/annotations/serviceRequestor.js +4 -4
  16. package/dist/appVariantManager.js +2 -5
  17. package/dist/index.js +5 -6
  18. package/dist/landscapeConfiguration.d.ts +9 -0
  19. package/dist/landscapeConfiguration.js +66 -0
  20. package/dist/model/configuration.d.ts +2 -0
  21. package/dist/model/types.d.ts +0 -1
  22. package/dist/previewManager.d.ts +2 -2
  23. package/dist/previewManager.js +7 -7
  24. package/dist/repositories/{abapRepoManager.d.ts → abapRepository.d.ts} +5 -3
  25. package/dist/repositories/{abapRepoManager.js → abapRepository.js} +17 -4
  26. package/dist/repositories/html5Repository.d.ts +18 -0
  27. package/dist/repositories/{html5RepoManager.js → html5Repository.js} +58 -27
  28. package/dist/repositories/localRepository.d.ts +16 -0
  29. package/dist/repositories/localRepository.js +67 -0
  30. package/dist/repositories/repository.d.ts +8 -0
  31. package/dist/repositories/repository.js +2 -0
  32. package/dist/util/commonUtil.d.ts +1 -0
  33. package/dist/util/commonUtil.js +3 -0
  34. package/dist/util/filesUtil.d.ts +0 -2
  35. package/dist/util/filesUtil.js +0 -7
  36. package/dist/util/fsUtil.d.ts +2 -0
  37. package/dist/util/fsUtil.js +34 -0
  38. package/package.json +4 -7
  39. package/scripts/publish.ts +256 -0
  40. package/scripts/test-integration-prep.sh +4 -0
  41. package/dist/annotationManager.d.ts +0 -17
  42. package/dist/processors/abapProcessor.d.ts +0 -18
  43. package/dist/processors/abapProcessor.js +0 -43
  44. package/dist/processors/cfProcessor.d.ts +0 -14
  45. package/dist/processors/cfProcessor.js +0 -46
  46. package/dist/processors/previewProcessor.d.ts +0 -8
  47. package/dist/processors/previewProcessor.js +0 -11
  48. package/dist/processors/processor.d.ts +0 -10
  49. package/dist/processors/processor.js +0 -39
  50. package/dist/repositories/html5RepoManager.d.ts +0 -12
@@ -1,43 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import { cached } from "../cache/cacheHolder.js";
8
- import { validateObject } from "../util/commonUtil.js";
9
- import AbapAdapter from "../adapters/abapAdapter.js";
10
- export default class AbapProcessor {
11
- abapRepoManager;
12
- configuration;
13
- annotationManager;
14
- constructor(configuration, abapRepoManager, annotationManager) {
15
- this.configuration = configuration;
16
- this.abapRepoManager = abapRepoManager;
17
- this.annotationManager = annotationManager;
18
- }
19
- getAppVariantIdHierarchy(appId) {
20
- return this.abapRepoManager.getAppVariantIdHierarchy(appId);
21
- }
22
- getAdapter() {
23
- return new AbapAdapter(this.configuration, this.annotationManager);
24
- }
25
- fetch(repoName, _cachebusterToken) {
26
- return this.abapRepoManager.fetch(repoName);
27
- }
28
- fetchReuseLib() {
29
- throw new Error("Preview is not available on SAP S/4HANA On-Premise or Cloud Systems. Please create a ticket on CA-UI5-FL-ADP-BAS component.");
30
- }
31
- validateConfiguration() {
32
- // validate general app config
33
- const properties = ["appName"];
34
- validateObject(this.configuration, properties, "should be specified in ui5.yaml configuration");
35
- }
36
- getConfigurationType() {
37
- return "abap";
38
- }
39
- }
40
- __decorate([
41
- cached()
42
- ], AbapProcessor.prototype, "fetch", null);
43
- //# sourceMappingURL=abapProcessor.js.map
@@ -1,14 +0,0 @@
1
- import { IAppVariantIdHierarchyItem } from "../model/appVariantIdHierarchyItem.js";
2
- import { IConfiguration, IReuseLibInfo } from "../model/types.js";
3
- import IProcessor from "./processor.js";
4
- import { IAdapter } from "../adapters/adapter.js";
5
- export default class CFProcessor implements IProcessor {
6
- protected configuration: IConfiguration;
7
- constructor(configuration: IConfiguration);
8
- getAdapter(): IAdapter;
9
- getAppVariantIdHierarchy(appId: string): Promise<IAppVariantIdHierarchyItem[]>;
10
- fetch(_repoName: string, _cachebusterToken: string): Promise<Map<string, string>>;
11
- fetchReuseLib(_libName: string, _cachebusterToken: string, lib: IReuseLibInfo): Promise<Map<string, string>>;
12
- validateConfiguration(): void;
13
- getConfigurationType(): string;
14
- }
@@ -1,46 +0,0 @@
1
- var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
3
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
4
- else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
5
- return c > 3 && r && Object.defineProperty(target, key, r), r;
6
- };
7
- import HTML5RepoManager from "../repositories/html5RepoManager.js";
8
- import { cached } from "../cache/cacheHolder.js";
9
- import { validateObject } from "../util/commonUtil.js";
10
- import CFAdapter from "../adapters/cfAdapter.js";
11
- export default class CFProcessor {
12
- configuration;
13
- constructor(configuration) {
14
- this.configuration = configuration;
15
- }
16
- getAdapter() {
17
- return new CFAdapter(this.configuration);
18
- }
19
- async getAppVariantIdHierarchy(appId) {
20
- const metadata = await HTML5RepoManager.getMetadata(this.configuration);
21
- return [{
22
- repoName: this.configuration.appName,
23
- appVariantId: appId,
24
- cachebusterToken: metadata.changedOn
25
- }];
26
- }
27
- fetch(_repoName, _cachebusterToken) {
28
- return HTML5RepoManager.getBaseAppFiles(this.configuration);
29
- }
30
- fetchReuseLib(_libName, _cachebusterToken, lib) {
31
- return HTML5RepoManager.getReuseLibFiles(this.configuration, lib);
32
- }
33
- validateConfiguration() {
34
- validateObject(this.configuration, ["appHostId", "appName", "appVersion"], "should be specified in ui5.yaml configuration");
35
- }
36
- getConfigurationType() {
37
- return "cf";
38
- }
39
- }
40
- __decorate([
41
- cached()
42
- ], CFProcessor.prototype, "fetch", null);
43
- __decorate([
44
- cached()
45
- ], CFProcessor.prototype, "fetchReuseLib", null);
46
- //# sourceMappingURL=cfProcessor.js.map
@@ -1,8 +0,0 @@
1
- import { IAdapter } from "../adapters/adapter.js";
2
- import { IConfiguration } from "../model/types.js";
3
- import CFProcessor from "./cfProcessor.js";
4
- import IProcessor from "./processor.js";
5
- export default class PreviewProcessor extends CFProcessor implements IProcessor {
6
- constructor(configuration: IConfiguration);
7
- getAdapter(): IAdapter;
8
- }
@@ -1,11 +0,0 @@
1
- import PreviewAdapter from "../adapters/previewAdapter.js";
2
- import CFProcessor from "./cfProcessor.js";
3
- export default class PreviewProcessor extends CFProcessor {
4
- constructor(configuration) {
5
- super(configuration);
6
- }
7
- getAdapter() {
8
- return new PreviewAdapter(this.configuration);
9
- }
10
- }
11
- //# sourceMappingURL=previewProcessor.js.map
@@ -1,10 +0,0 @@
1
- import { IAppVariantIdHierarchyItem } from "../model/appVariantIdHierarchyItem.js";
2
- import { IConfiguration, IReuseLibInfo } from "../model/types.js";
3
- import { IAdapter } from "../adapters/adapter.js";
4
- export default interface IProcessor {
5
- getAppVariantIdHierarchy(appId: string): Promise<IAppVariantIdHierarchyItem[]>;
6
- getAdapter(): IAdapter;
7
- fetch(repoName: string, cachebusterToken: string): Promise<Map<string, string>>;
8
- fetchReuseLib(repoName: string, cachebusterToken: string, lib: IReuseLibInfo): Promise<Map<string, string>>;
9
- }
10
- export declare function determineProcessor(configuration: IConfiguration): IProcessor;
@@ -1,39 +0,0 @@
1
- import AbapProcessor from "./abapProcessor.js";
2
- import AbapRepoManager from "../repositories/abapRepoManager.js";
3
- import AnnotationManager from "../annotationManager.js";
4
- import CFProcessor from "./cfProcessor.js";
5
- import PreviewProcessor from "./previewProcessor.js";
6
- export function determineProcessor(configuration) {
7
- const abapRepoManager = new AbapRepoManager(configuration);
8
- const annotationManager = new AnnotationManager(configuration, abapRepoManager);
9
- const processors = [
10
- new CFProcessor(configuration),
11
- new AbapProcessor(configuration, abapRepoManager, annotationManager)
12
- ];
13
- if (isPreviewMode()) {
14
- const processor = new PreviewProcessor(configuration);
15
- processor.validateConfiguration();
16
- return processor;
17
- }
18
- let processor = processors.find(processor => processor.getConfigurationType() === configuration.type);
19
- if (processor) {
20
- processor.validateConfiguration();
21
- return processor;
22
- }
23
- else {
24
- for (const processor of processors) {
25
- try {
26
- processor.validateConfiguration();
27
- return processor;
28
- }
29
- catch (_error) {
30
- continue;
31
- }
32
- }
33
- }
34
- throw new Error("ui5.yaml configuration should correspond either ABAP or SAP BTP landscape");
35
- }
36
- function isPreviewMode() {
37
- return process.env.ADP_BUILDER_MODE === "preview";
38
- }
39
- //# sourceMappingURL=processor.js.map
@@ -1,12 +0,0 @@
1
- import { IConfiguration, IReuseLibInfo } from "./../model/types.js";
2
- export default class HTML5RepoManager {
3
- static getBaseAppFiles(configuration: IConfiguration): Promise<Map<string, string>>;
4
- static getMetadata(configuration: IConfiguration): Promise<any>;
5
- static getReuseLibFiles(configuration: IConfiguration, lib: IReuseLibInfo): Promise<Map<string, string>>;
6
- private static getHtml5RepoInfo;
7
- private static getHTML5Credentials;
8
- private static getToken;
9
- private static requestMetadata;
10
- private static getAppZipEntries;
11
- private static download;
12
- }