@rayutek/abap-adt-api 6.2.1-pkg-1.0.0
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/.abapgit.xml +27 -0
- package/LICENSE +21 -0
- package/README.md +23 -0
- package/build/AdtClient.d.ts +292 -0
- package/build/AdtClient.d.ts.map +1 -0
- package/build/AdtClient.js +628 -0
- package/build/AdtException.d.ts +62 -0
- package/build/AdtException.d.ts.map +1 -0
- package/build/AdtException.js +185 -0
- package/build/AdtHTTP.d.ts +113 -0
- package/build/AdtHTTP.d.ts.map +1 -0
- package/build/AdtHTTP.js +285 -0
- package/build/api/abapgit.d.ts +86 -0
- package/build/api/abapgit.d.ts.map +1 -0
- package/build/api/abapgit.js +300 -0
- package/build/api/activate.d.ts +39 -0
- package/build/api/activate.d.ts.map +1 -0
- package/build/api/activate.js +105 -0
- package/build/api/atc.d.ts +163 -0
- package/build/api/atc.d.ts.map +1 -0
- package/build/api/atc.js +440 -0
- package/build/api/cds.d.ts +52 -0
- package/build/api/cds.d.ts.map +1 -0
- package/build/api/cds.js +147 -0
- package/build/api/debugger.d.ts +238 -0
- package/build/api/debugger.d.ts.map +1 -0
- package/build/api/debugger.js +299 -0
- package/build/api/delete.d.ts +20 -0
- package/build/api/delete.d.ts.map +1 -0
- package/build/api/delete.js +29 -0
- package/build/api/discovery.d.ts +44 -0
- package/build/api/discovery.d.ts.map +1 -0
- package/build/api/discovery.js +78 -0
- package/build/api/feeds.d.ts +63 -0
- package/build/api/feeds.d.ts.map +1 -0
- package/build/api/feeds.js +65 -0
- package/build/api/index.d.ts +22 -0
- package/build/api/index.d.ts.map +1 -0
- package/build/api/index.js +37 -0
- package/build/api/nodeContents.d.ts +41 -0
- package/build/api/nodeContents.d.ts.map +1 -0
- package/build/api/nodeContents.js +78 -0
- package/build/api/objectcontents.d.ts +21 -0
- package/build/api/objectcontents.d.ts.map +1 -0
- package/build/api/objectcontents.js +68 -0
- package/build/api/objectcreator.d.ts +103 -0
- package/build/api/objectcreator.d.ts.map +1 -0
- package/build/api/objectcreator.js +372 -0
- package/build/api/objectstructure.d.ts +71 -0
- package/build/api/objectstructure.d.ts.map +1 -0
- package/build/api/objectstructure.js +37 -0
- package/build/api/refactor.d.ts +122 -0
- package/build/api/refactor.d.ts.map +1 -0
- package/build/api/refactor.js +470 -0
- package/build/api/revisions.d.ts +12 -0
- package/build/api/revisions.d.ts.map +1 -0
- package/build/api/revisions.js +61 -0
- package/build/api/search.d.ts +25 -0
- package/build/api/search.d.ts.map +1 -0
- package/build/api/search.js +67 -0
- package/build/api/syntax.d.ts +133 -0
- package/build/api/syntax.d.ts.map +1 -0
- package/build/api/syntax.js +327 -0
- package/build/api/tablecontents.d.ts +141 -0
- package/build/api/tablecontents.d.ts.map +1 -0
- package/build/api/tablecontents.js +186 -0
- package/build/api/trace.test.d.ts +2 -0
- package/build/api/trace.test.d.ts.map +1 -0
- package/build/api/trace.test.js +39 -0
- package/build/api/traces.d.ts +13 -0
- package/build/api/traces.d.ts.map +1 -0
- package/build/api/traces.js +97 -0
- package/build/api/tracetypes.d.ts +276 -0
- package/build/api/tracetypes.d.ts.map +1 -0
- package/build/api/tracetypes.js +474 -0
- package/build/api/transports.d.ts +158 -0
- package/build/api/transports.d.ts.map +1 -0
- package/build/api/transports.js +292 -0
- package/build/api/unittest.d.ts +81 -0
- package/build/api/unittest.d.ts.map +1 -0
- package/build/api/unittest.js +164 -0
- package/build/api/urlparser.d.ts +34 -0
- package/build/api/urlparser.d.ts.map +1 -0
- package/build/api/urlparser.js +86 -0
- package/build/index.d.ts +10 -0
- package/build/index.d.ts.map +1 -0
- package/build/index.js +49 -0
- package/build/requestLogger.d.ts +30 -0
- package/build/requestLogger.d.ts.map +1 -0
- package/build/requestLogger.js +100 -0
- package/build/utilities.d.ts +42 -0
- package/build/utilities.d.ts.map +1 -0
- package/build/utilities.js +221 -0
- package/jest.config.js +32 -0
- package/package.json +45 -0
- package/setenv_sample.js +27 -0
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
import { Link } from "./objectstructure";
|
|
3
|
+
export interface SyntaxCheckResult {
|
|
4
|
+
uri: string;
|
|
5
|
+
line: number;
|
|
6
|
+
offset: number;
|
|
7
|
+
severity: string;
|
|
8
|
+
text: string;
|
|
9
|
+
}
|
|
10
|
+
export interface UsageReference {
|
|
11
|
+
uri: string;
|
|
12
|
+
objectIdentifier: string;
|
|
13
|
+
parentUri: string;
|
|
14
|
+
isResult: boolean;
|
|
15
|
+
canHaveChildren: boolean;
|
|
16
|
+
usageInformation: string;
|
|
17
|
+
"adtcore:responsible": string;
|
|
18
|
+
"adtcore:name": string;
|
|
19
|
+
"adtcore:type"?: string;
|
|
20
|
+
"adtcore:description"?: string;
|
|
21
|
+
packageRef: {
|
|
22
|
+
"adtcore:uri": string;
|
|
23
|
+
"adtcore:name": string;
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
export declare function syntaxCheckTypes(h: AdtHTTP): Promise<Map<string, string[]>>;
|
|
27
|
+
export declare function parseCheckResults(raw: any): SyntaxCheckResult[];
|
|
28
|
+
export declare function syntaxCheck(h: AdtHTTP, inclUrl: string, sourceUrl: string, content: string, mainProgram?: string, version?: string): Promise<SyntaxCheckResult[]>;
|
|
29
|
+
export interface CompletionProposal {
|
|
30
|
+
KIND: number;
|
|
31
|
+
IDENTIFIER: string;
|
|
32
|
+
ICON: number;
|
|
33
|
+
SUBICON: number;
|
|
34
|
+
BOLD: number;
|
|
35
|
+
COLOR: number;
|
|
36
|
+
QUICKINFO_EVENT: number;
|
|
37
|
+
INSERT_EVENT: number;
|
|
38
|
+
IS_META: number;
|
|
39
|
+
PREFIXLENGTH: number;
|
|
40
|
+
ROLE: number;
|
|
41
|
+
LOCATION: number;
|
|
42
|
+
GRADE: number;
|
|
43
|
+
VISIBILITY: number;
|
|
44
|
+
IS_INHERITED: number;
|
|
45
|
+
PROP1: number;
|
|
46
|
+
PROP2: number;
|
|
47
|
+
PROP3: number;
|
|
48
|
+
SYNTCNTXT: number;
|
|
49
|
+
}
|
|
50
|
+
export interface CompletionElementInfo {
|
|
51
|
+
name: string;
|
|
52
|
+
type: string;
|
|
53
|
+
href: string;
|
|
54
|
+
doc: string;
|
|
55
|
+
components: {
|
|
56
|
+
"adtcore:type": string;
|
|
57
|
+
"adtcore:name": string;
|
|
58
|
+
entries: {
|
|
59
|
+
key: string;
|
|
60
|
+
value: string;
|
|
61
|
+
}[];
|
|
62
|
+
}[];
|
|
63
|
+
}
|
|
64
|
+
export interface DefinitionLocation {
|
|
65
|
+
url: string;
|
|
66
|
+
line: number;
|
|
67
|
+
column: number;
|
|
68
|
+
}
|
|
69
|
+
export declare function codeCompletion(h: AdtHTTP, url: string, body: string, line: number, offset: number): Promise<CompletionProposal[]>;
|
|
70
|
+
export declare function codeCompletionFull(h: AdtHTTP, url: string, body: string, line: number, offset: number, patternKey: string): Promise<string>;
|
|
71
|
+
export declare function codeCompletionElement(h: AdtHTTP, url: string, body: string, line: number, offset: number): Promise<CompletionElementInfo | string>;
|
|
72
|
+
export declare function findDefinition(h: AdtHTTP, url: string, body: string, line: number, firstof: number, lastof: number, implementation: boolean, mainProgram?: string): Promise<DefinitionLocation>;
|
|
73
|
+
export declare function usageReferences(h: AdtHTTP, url: string, line?: number, column?: number): Promise<UsageReference[]>;
|
|
74
|
+
export interface Location {
|
|
75
|
+
line: number;
|
|
76
|
+
column: number;
|
|
77
|
+
}
|
|
78
|
+
export interface ReferenceUri {
|
|
79
|
+
uri: string;
|
|
80
|
+
context?: string;
|
|
81
|
+
start?: Location;
|
|
82
|
+
end?: Location;
|
|
83
|
+
type?: string;
|
|
84
|
+
name?: string;
|
|
85
|
+
}
|
|
86
|
+
export interface UsageReferenceSnippet {
|
|
87
|
+
objectIdentifier: string;
|
|
88
|
+
snippets: {
|
|
89
|
+
uri: ReferenceUri;
|
|
90
|
+
matches: string;
|
|
91
|
+
content: string;
|
|
92
|
+
description: string;
|
|
93
|
+
}[];
|
|
94
|
+
}
|
|
95
|
+
export declare function usageReferenceSnippets(h: AdtHTTP, references: UsageReference[]): Promise<UsageReferenceSnippet[]>;
|
|
96
|
+
export interface ClassComponent {
|
|
97
|
+
"adtcore:name": string;
|
|
98
|
+
"adtcore:type": string;
|
|
99
|
+
links: Link[];
|
|
100
|
+
visibility: string;
|
|
101
|
+
"xml:base": string;
|
|
102
|
+
components: ClassComponent[];
|
|
103
|
+
constant?: boolean;
|
|
104
|
+
level?: string;
|
|
105
|
+
readOnly?: boolean;
|
|
106
|
+
}
|
|
107
|
+
export declare function classComponents(h: AdtHTTP, url: string): Promise<ClassComponent>;
|
|
108
|
+
export interface FragmentLocation {
|
|
109
|
+
uri: string;
|
|
110
|
+
line: number;
|
|
111
|
+
column: number;
|
|
112
|
+
}
|
|
113
|
+
export declare function fragmentMappings(h: AdtHTTP, url: string, type: string, name: string): Promise<FragmentLocation>;
|
|
114
|
+
export type PrettyPrinterStyle = "toLower" | "toUpper" | "keywordUpper" | "keywordLower" | "keywordAuto" | "none";
|
|
115
|
+
export interface PrettyPrinterSettings {
|
|
116
|
+
"abapformatter:indentation": boolean;
|
|
117
|
+
"abapformatter:style": PrettyPrinterStyle;
|
|
118
|
+
}
|
|
119
|
+
export declare function prettyPrinterSetting(h: AdtHTTP): Promise<PrettyPrinterSettings>;
|
|
120
|
+
export declare function setPrettyPrinterSetting(h: AdtHTTP, indent: boolean, style: PrettyPrinterStyle): Promise<string>;
|
|
121
|
+
export declare function prettyPrinter(h: AdtHTTP, body: string): Promise<string>;
|
|
122
|
+
export interface HierarchyNode {
|
|
123
|
+
hasDefOrImpl: boolean;
|
|
124
|
+
uri: string;
|
|
125
|
+
line: number;
|
|
126
|
+
character: number;
|
|
127
|
+
type: string;
|
|
128
|
+
name: string;
|
|
129
|
+
parentUri: string;
|
|
130
|
+
description: string;
|
|
131
|
+
}
|
|
132
|
+
export declare function typeHierarchy(h: AdtHTTP, url: string, body: string, line: number, offset: number, superTypes?: boolean): Promise<HierarchyNode[]>;
|
|
133
|
+
//# sourceMappingURL=syntax.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"syntax.d.ts","sourceRoot":"","sources":["../../src/api/syntax.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAWpC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAA;AAExC,MAAM,WAAW,iBAAiB;IAChC,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,MAAM,EAAE,MAAM,CAAA;IACd,QAAQ,EAAE,MAAM,CAAA;IAChB,IAAI,EAAE,MAAM,CAAA;CACb;AAED,MAAM,WAAW,cAAc;IAC7B,GAAG,EAAE,MAAM,CAAA;IACX,gBAAgB,EAAE,MAAM,CAAA;IACxB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,OAAO,CAAA;IACjB,eAAe,EAAE,OAAO,CAAA;IACxB,gBAAgB,EAAE,MAAM,CAAA;IACxB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,cAAc,EAAE,MAAM,CAAA;IACtB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,qBAAqB,CAAC,EAAE,MAAM,CAAA;IAC9B,UAAU,EAAE;QACV,aAAa,EAAE,MAAM,CAAA;QACrB,cAAc,EAAE,MAAM,CAAA;KACvB,CAAA;CACF;AACD,wBAAsB,gBAAgB,CAAC,CAAC,EAAE,OAAO,kCAYhD;AACD,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,GAAG,uBA0BzC;AACD,wBAAsB,WAAW,CAC/B,CAAC,EAAE,OAAO,EACV,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAW,EACxB,OAAO,GAAE,MAAiB,gCA0B3B;AACD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,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E,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;CACpB;AAED,wBAAsB,aAAa,CACjC,CAAC,EAAE,OAAO,EACV,GAAG,EAAE,MAAM,EACX,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,UAAU,UAAQ,4BAoCnB"}
|
|
@@ -0,0 +1,327 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.typeHierarchy = exports.prettyPrinter = exports.setPrettyPrinterSetting = exports.prettyPrinterSetting = exports.fragmentMappings = exports.classComponents = exports.usageReferenceSnippets = exports.usageReferences = exports.findDefinition = exports.codeCompletionElement = exports.codeCompletionFull = exports.codeCompletion = exports.syntaxCheck = exports.parseCheckResults = exports.syntaxCheckTypes = void 0;
|
|
4
|
+
const AdtException_1 = require("../AdtException");
|
|
5
|
+
const utilities_1 = require("../utilities");
|
|
6
|
+
async function syntaxCheckTypes(h) {
|
|
7
|
+
const response = await h.request("/sap/bc/adt/checkruns/reporters");
|
|
8
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
9
|
+
const reporters = (0, utilities_1.xmlArray)(raw, "chkrun:checkReporters", "chkrun:reporter").reduce((acc, cur) => {
|
|
10
|
+
acc.set(cur["@_chkrun:name"], (0, utilities_1.xmlArray)(cur, "chkrun:supportedType"));
|
|
11
|
+
return acc;
|
|
12
|
+
}, new Map());
|
|
13
|
+
return reporters;
|
|
14
|
+
}
|
|
15
|
+
exports.syntaxCheckTypes = syntaxCheckTypes;
|
|
16
|
+
function parseCheckResults(raw) {
|
|
17
|
+
const messages = [];
|
|
18
|
+
(0, utilities_1.xmlArray)(raw, "chkrun:checkRunReports", "chkrun:checkReport", "chkrun:checkMessageList", "chkrun:checkMessage").forEach((m) => {
|
|
19
|
+
const rawUri = m["@_chkrun:uri"] || "";
|
|
20
|
+
let message = {
|
|
21
|
+
uri: rawUri,
|
|
22
|
+
line: 0,
|
|
23
|
+
offset: 0,
|
|
24
|
+
severity: m["@_chkrun:type"],
|
|
25
|
+
text: m["@_chkrun:shortText"]
|
|
26
|
+
};
|
|
27
|
+
const matches = rawUri.match(/([^#]+)#start=([\d]+),([\d]+)/);
|
|
28
|
+
if (matches) {
|
|
29
|
+
const [uri, line, offset] = matches.slice(1);
|
|
30
|
+
message = { ...message, uri, line: (0, utilities_1.toInt)(line), offset: (0, utilities_1.toInt)(offset) };
|
|
31
|
+
}
|
|
32
|
+
messages.push(message);
|
|
33
|
+
});
|
|
34
|
+
return messages;
|
|
35
|
+
}
|
|
36
|
+
exports.parseCheckResults = parseCheckResults;
|
|
37
|
+
async function syntaxCheck(h, inclUrl, sourceUrl, content, mainProgram = "", version = "active") {
|
|
38
|
+
const source = mainProgram
|
|
39
|
+
? `${sourceUrl}?context=${encodeURIComponent(mainProgram)}`
|
|
40
|
+
: sourceUrl;
|
|
41
|
+
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
|
42
|
+
<chkrun:checkObjectList xmlns:chkrun="http://www.sap.com/adt/checkrun" xmlns:adtcore="http://www.sap.com/adt/core">
|
|
43
|
+
<chkrun:checkObject adtcore:uri="${source}" chkrun:version="${version}">
|
|
44
|
+
<chkrun:artifacts>
|
|
45
|
+
<chkrun:artifact chkrun:contentType="text/plain; charset=utf-8" chkrun:uri="${inclUrl}">
|
|
46
|
+
<chkrun:content>${(0, utilities_1.btoa)(content)}</chkrun:content>
|
|
47
|
+
</chkrun:artifact>
|
|
48
|
+
</chkrun:artifacts>
|
|
49
|
+
</chkrun:checkObject>
|
|
50
|
+
</chkrun:checkObjectList>`;
|
|
51
|
+
const headers = {
|
|
52
|
+
// Accept: "application/vnd.sap.adt.checkmessages+xml",
|
|
53
|
+
// "Content-Type": "application/vnd.sap.adt.checkobjects+xml"
|
|
54
|
+
"Content-Type": "application/*"
|
|
55
|
+
};
|
|
56
|
+
const response = await h.request("/sap/bc/adt/checkruns?reporters=abapCheckRun", { method: "POST", headers, body });
|
|
57
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
58
|
+
return parseCheckResults(raw);
|
|
59
|
+
}
|
|
60
|
+
exports.syntaxCheck = syntaxCheck;
|
|
61
|
+
async function codeCompletion(h, url, body, line, offset) {
|
|
62
|
+
const uri = `${url}#start=${line},${offset}`;
|
|
63
|
+
const qs = { uri, signalCompleteness: true };
|
|
64
|
+
const headers = { "Content-Type": "application/*" };
|
|
65
|
+
const response = await h.request("/sap/bc/adt/abapsource/codecompletion/proposal", { method: "POST", qs, headers, body });
|
|
66
|
+
const raw = (0, utilities_1.parse)(response.body);
|
|
67
|
+
const proposals = (0, utilities_1.xmlArray)(raw, "asx:abap", "asx:values", "DATA", "SCC_COMPLETION")
|
|
68
|
+
.filter((p) => p.IDENTIFIER && p.IDENTIFIER !== "@end")
|
|
69
|
+
.map((p) => ({
|
|
70
|
+
...p,
|
|
71
|
+
IDENTIFIER: p.IDENTIFIER
|
|
72
|
+
}));
|
|
73
|
+
return proposals;
|
|
74
|
+
}
|
|
75
|
+
exports.codeCompletion = codeCompletion;
|
|
76
|
+
async function codeCompletionFull(h, url, body, line, offset, patternKey) {
|
|
77
|
+
const uri = `${url}#start=${line},${offset}`;
|
|
78
|
+
const qs = { uri, patternKey };
|
|
79
|
+
const headers = { "Content-Type": "application/*" };
|
|
80
|
+
const response = await h.request("/sap/bc/adt/abapsource/codecompletion/insertion", { method: "POST", qs, headers, body });
|
|
81
|
+
return response.body;
|
|
82
|
+
}
|
|
83
|
+
exports.codeCompletionFull = codeCompletionFull;
|
|
84
|
+
function extractDocLink(raw) {
|
|
85
|
+
const link = (0, utilities_1.xmlNode)(raw, "abapsource:elementInfo", "atom:link", "@_href") || "";
|
|
86
|
+
return link.replace(/\w+:\/\/[^\/]*/, "");
|
|
87
|
+
}
|
|
88
|
+
async function codeCompletionElement(h, url, body, line, offset) {
|
|
89
|
+
const qs = { uri: `${url}#start=${line},${offset}` };
|
|
90
|
+
const headers = { "Content-Type": "text/plain", Accept: "application/*" };
|
|
91
|
+
const response = await h.request("/sap/bc/adt/abapsource/codecompletion/elementinfo", { method: "POST", qs, headers, body });
|
|
92
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
93
|
+
if (!(0, utilities_1.xmlNode)(raw, "abapsource:elementInfo"))
|
|
94
|
+
return response.body;
|
|
95
|
+
const elinfo = (0, utilities_1.xmlNodeAttr)((0, utilities_1.xmlNode)(raw, "abapsource:elementInfo"));
|
|
96
|
+
const doc = (0, utilities_1.xmlNode)(raw, "abapsource:elementInfo", "abapsource:documentation", "#text") || "";
|
|
97
|
+
const href = extractDocLink(raw);
|
|
98
|
+
const components = (0, utilities_1.xmlArray)(raw, "abapsource:elementInfo", "abapsource:elementInfo").map((c) => {
|
|
99
|
+
return {
|
|
100
|
+
...(0, utilities_1.xmlNodeAttr)(c),
|
|
101
|
+
entries: (0, utilities_1.xmlArray)(c, "abapsource:properties", "abapsource:entry").map((e) => {
|
|
102
|
+
return {
|
|
103
|
+
value: e["#text"],
|
|
104
|
+
key: e["@_abapsource:key"]
|
|
105
|
+
};
|
|
106
|
+
})
|
|
107
|
+
};
|
|
108
|
+
});
|
|
109
|
+
return {
|
|
110
|
+
name: elinfo["adtcore:name"],
|
|
111
|
+
type: elinfo["adtcore:type"],
|
|
112
|
+
doc,
|
|
113
|
+
href,
|
|
114
|
+
components
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
exports.codeCompletionElement = codeCompletionElement;
|
|
118
|
+
async function findDefinition(h, url, body, line, firstof, lastof, implementation, mainProgram) {
|
|
119
|
+
const ctx = mainProgram ? `?context=${encodeURIComponent(mainProgram)}` : "";
|
|
120
|
+
const qs = {
|
|
121
|
+
uri: `${url}${ctx}#start=${line},${firstof};end=${line},${lastof}`,
|
|
122
|
+
filter: implementation ? "implementation" : "definition"
|
|
123
|
+
};
|
|
124
|
+
const headers = { "Content-Type": "text/plain", Accept: "application/*" };
|
|
125
|
+
const response = await h.request("/sap/bc/adt/navigation/target", {
|
|
126
|
+
method: "POST",
|
|
127
|
+
qs,
|
|
128
|
+
headers,
|
|
129
|
+
body
|
|
130
|
+
});
|
|
131
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
132
|
+
const rawLink = (0, utilities_1.xmlNode)(raw, "adtcore:objectReference", "@_adtcore:uri") || "";
|
|
133
|
+
const match = rawLink.match(/([^#]+)#start=(\d+),(\d+)/);
|
|
134
|
+
return {
|
|
135
|
+
url: (match && match[1]) || rawLink,
|
|
136
|
+
line: (0, utilities_1.toInt)(match && match[2]),
|
|
137
|
+
column: (0, utilities_1.toInt)(match && match[3])
|
|
138
|
+
};
|
|
139
|
+
}
|
|
140
|
+
exports.findDefinition = findDefinition;
|
|
141
|
+
async function usageReferences(h, url, line, column) {
|
|
142
|
+
const headers = { "Content-Type": "application/*", Accept: "application/*" };
|
|
143
|
+
const uri = line && column ? `${url}#start=${line},${column}` : url;
|
|
144
|
+
const qs = { uri };
|
|
145
|
+
const body = `<?xml version="1.0" encoding="ASCII"?>
|
|
146
|
+
<usagereferences:usageReferenceRequest xmlns:usagereferences="http://www.sap.com/adt/ris/usageReferences">
|
|
147
|
+
<usagereferences:affectedObjects/>
|
|
148
|
+
</usagereferences:usageReferenceRequest>`;
|
|
149
|
+
const response = await h.request("/sap/bc/adt/repository/informationsystem/usageReferences", {
|
|
150
|
+
method: "POST",
|
|
151
|
+
qs,
|
|
152
|
+
headers,
|
|
153
|
+
body
|
|
154
|
+
});
|
|
155
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
156
|
+
const rawreferences = (0, utilities_1.xmlArray)(raw, "usageReferences:usageReferenceResult", "usageReferences:referencedObjects", "usageReferences:referencedObject");
|
|
157
|
+
const references = rawreferences.map((r) => {
|
|
158
|
+
const reference = {
|
|
159
|
+
...(0, utilities_1.xmlNodeAttr)(r),
|
|
160
|
+
...(0, utilities_1.xmlNodeAttr)((0, utilities_1.xmlNode)(r, "usageReferences:adtObject") || {}),
|
|
161
|
+
packageRef: (0, utilities_1.xmlNodeAttr)((0, utilities_1.xmlNode)(r, "usageReferences:adtObject", "adtcore:packageRef") || {}),
|
|
162
|
+
objectIdentifier: r.objectIdentifier || ""
|
|
163
|
+
};
|
|
164
|
+
// older systems hide the type in the URI
|
|
165
|
+
if (!reference["adtcore:type"]) {
|
|
166
|
+
const uriParts = splitReferenceUri(reference.uri, "");
|
|
167
|
+
reference["adtcore:type"] = uriParts.type;
|
|
168
|
+
}
|
|
169
|
+
return reference;
|
|
170
|
+
});
|
|
171
|
+
return references;
|
|
172
|
+
}
|
|
173
|
+
exports.usageReferences = usageReferences;
|
|
174
|
+
function splitReferenceUri(url, matches) {
|
|
175
|
+
const [uri, context, hash] = (0, utilities_1.parts)(url, /([^#\?]*)(?:\?context=([^#]*))?(?:#(.*))/);
|
|
176
|
+
const uparts = { uri, context };
|
|
177
|
+
if (hash) {
|
|
178
|
+
hash.split(";").forEach(p => {
|
|
179
|
+
const [name, value] = p.split("=");
|
|
180
|
+
if (name === "start" || name === "end") {
|
|
181
|
+
const [line, column] = value.split(",");
|
|
182
|
+
if (line)
|
|
183
|
+
uparts[name] = { line: (0, utilities_1.toInt)(line), column: (0, utilities_1.toInt)(column) };
|
|
184
|
+
}
|
|
185
|
+
else if (name === "type" || name === "name")
|
|
186
|
+
uparts[name] = decodeURIComponent(value);
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
const [start, end] = (0, utilities_1.parts)(matches, /(\d+)-(\d+)/);
|
|
190
|
+
if (!uparts.start)
|
|
191
|
+
uparts.start = { line: 0, column: (0, utilities_1.toInt)(start) };
|
|
192
|
+
if (!uparts.start.column)
|
|
193
|
+
uparts.start.column = (0, utilities_1.toInt)(start);
|
|
194
|
+
if (!uparts.end)
|
|
195
|
+
uparts.end = {
|
|
196
|
+
line: uparts.start.line,
|
|
197
|
+
column: (0, utilities_1.toInt)(end) || uparts.start.column
|
|
198
|
+
};
|
|
199
|
+
return uparts;
|
|
200
|
+
}
|
|
201
|
+
async function usageReferenceSnippets(h, references) {
|
|
202
|
+
const headers = { "Content-Type": "application/*", Accept: "application/*" };
|
|
203
|
+
const refNodes = references
|
|
204
|
+
.filter(r => r.objectIdentifier)
|
|
205
|
+
.reduce((last, current) => `${last}<usagereferences:objectIdentifier optional="false">${current.objectIdentifier}</usagereferences:objectIdentifier>`, "");
|
|
206
|
+
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
|
207
|
+
<usagereferences:usageSnippetRequest xmlns:usagereferences="http://www.sap.com/adt/ris/usageReferences">
|
|
208
|
+
<usagereferences:objectIdentifiers>
|
|
209
|
+
${refNodes}
|
|
210
|
+
</usagereferences:objectIdentifiers>
|
|
211
|
+
<usagereferences:affectedObjects/>
|
|
212
|
+
</usagereferences:usageSnippetRequest>`;
|
|
213
|
+
const response = await h.request("/sap/bc/adt/repository/informationsystem/usageSnippets", {
|
|
214
|
+
method: "POST",
|
|
215
|
+
headers,
|
|
216
|
+
body
|
|
217
|
+
});
|
|
218
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
219
|
+
const snippetReferences = (0, utilities_1.xmlArray)(raw, "usageReferences:usageSnippetResult", "usageReferences:codeSnippetObjects", "usageReferences:codeSnippetObject").map((o) => {
|
|
220
|
+
const snippets = (0, utilities_1.xmlArray)(o, "usageReferences:codeSnippets", "usageReferences:codeSnippet").map((s) => {
|
|
221
|
+
const parms = (0, utilities_1.xmlNodeAttr)(s);
|
|
222
|
+
const uri = splitReferenceUri(parms.uri, parms.matches);
|
|
223
|
+
return {
|
|
224
|
+
uri,
|
|
225
|
+
matches: parms.matches,
|
|
226
|
+
content: s.content,
|
|
227
|
+
description: s.description
|
|
228
|
+
};
|
|
229
|
+
});
|
|
230
|
+
return { objectIdentifier: o.objectIdentifier, snippets };
|
|
231
|
+
});
|
|
232
|
+
return snippetReferences;
|
|
233
|
+
}
|
|
234
|
+
exports.usageReferenceSnippets = usageReferenceSnippets;
|
|
235
|
+
const parseElement = (e) => {
|
|
236
|
+
const attrs = (0, utilities_1.xmlNodeAttr)(e);
|
|
237
|
+
const links = (0, utilities_1.xmlArray)(e, "atom:link").map(utilities_1.xmlNodeAttr);
|
|
238
|
+
const components = (0, utilities_1.xmlArray)(e, "abapsource:objectStructureElement").map(parseElement);
|
|
239
|
+
return { ...attrs, links, components };
|
|
240
|
+
};
|
|
241
|
+
async function classComponents(h, url) {
|
|
242
|
+
(0, AdtException_1.ValidateObjectUrl)(url);
|
|
243
|
+
const uri = `${url}/objectstructure`;
|
|
244
|
+
const qs = { version: "active", withShortDescriptions: true };
|
|
245
|
+
const headers = { "Content-Type": "application/*" };
|
|
246
|
+
const response = await h.request(uri, { qs, headers });
|
|
247
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
248
|
+
const header = parseElement((0, utilities_1.xmlNode)(raw, "abapsource:objectStructureElement"));
|
|
249
|
+
return header;
|
|
250
|
+
}
|
|
251
|
+
exports.classComponents = classComponents;
|
|
252
|
+
async function fragmentMappings(h, url, type, name) {
|
|
253
|
+
(0, AdtException_1.ValidateObjectUrl)(url);
|
|
254
|
+
const qs = { uri: `${url}#type=${type};name=${name}` };
|
|
255
|
+
const headers = { "Content-Type": "application/*" };
|
|
256
|
+
const response = await h.request("/sap/bc/adt/urifragmentmappings", {
|
|
257
|
+
qs,
|
|
258
|
+
headers
|
|
259
|
+
});
|
|
260
|
+
const [sourceUrl, line, column] = (0, utilities_1.parts)(response.body, /([^#]*)#start=([\d]+),([\d]+)/);
|
|
261
|
+
if (!column)
|
|
262
|
+
throw (0, AdtException_1.adtException)("Fragment not found");
|
|
263
|
+
const location = {
|
|
264
|
+
uri: sourceUrl,
|
|
265
|
+
line: (0, utilities_1.toInt)(line),
|
|
266
|
+
column: (0, utilities_1.toInt)(column)
|
|
267
|
+
};
|
|
268
|
+
return location;
|
|
269
|
+
}
|
|
270
|
+
exports.fragmentMappings = fragmentMappings;
|
|
271
|
+
async function prettyPrinterSetting(h) {
|
|
272
|
+
const response = await h.request("/sap/bc/adt/abapsource/prettyprinter/settings");
|
|
273
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
274
|
+
const settings = (0, utilities_1.xmlNodeAttr)(raw["abapformatter:PrettyPrinterSettings"]);
|
|
275
|
+
return settings;
|
|
276
|
+
}
|
|
277
|
+
exports.prettyPrinterSetting = prettyPrinterSetting;
|
|
278
|
+
async function setPrettyPrinterSetting(h, indent, style) {
|
|
279
|
+
const headers = { "Content-Type": "application/*" };
|
|
280
|
+
const body = `<?xml version="1.0" encoding="UTF-8"?><prettyprintersettings:PrettyPrinterSettings
|
|
281
|
+
xmlns:prettyprintersettings="http://www.sap.com/adt/prettyprintersettings"
|
|
282
|
+
prettyprintersettings:indentation="${indent}" prettyprintersettings:style="${style}"/>`;
|
|
283
|
+
const response = await h.request("/sap/bc/adt/abapsource/prettyprinter/settings", { method: "PUT", headers, body });
|
|
284
|
+
return response.body || "";
|
|
285
|
+
}
|
|
286
|
+
exports.setPrettyPrinterSetting = setPrettyPrinterSetting;
|
|
287
|
+
async function prettyPrinter(h, body) {
|
|
288
|
+
const headers = { "Content-Type": "text/plain", Accept: "text/plain" };
|
|
289
|
+
const response = await h.request("/sap/bc/adt/abapsource/prettyprinter", {
|
|
290
|
+
method: "POST",
|
|
291
|
+
headers,
|
|
292
|
+
body
|
|
293
|
+
});
|
|
294
|
+
return (response.body || body).toString();
|
|
295
|
+
}
|
|
296
|
+
exports.prettyPrinter = prettyPrinter;
|
|
297
|
+
async function typeHierarchy(h, url, body, line, offset, superTypes = false) {
|
|
298
|
+
const qs = {
|
|
299
|
+
uri: `${url}#start=${line},${offset}`,
|
|
300
|
+
type: superTypes ? "superTypes" : "subTypes"
|
|
301
|
+
};
|
|
302
|
+
const headers = { "Content-Type": "text/plain", Accept: "application/*" };
|
|
303
|
+
const response = await h.request("/sap/bc/adt/abapsource/typehierarchy", {
|
|
304
|
+
method: "POST",
|
|
305
|
+
qs,
|
|
306
|
+
headers,
|
|
307
|
+
body
|
|
308
|
+
});
|
|
309
|
+
const raw = (0, utilities_1.fullParse)(response.body);
|
|
310
|
+
const hierarchy = (0, utilities_1.xmlArray)(raw, "hierarchy:info", "entries", "entry").map(he => {
|
|
311
|
+
const rawh = (0, utilities_1.xmlNodeAttr)(he);
|
|
312
|
+
const [uri, srcline, character] = (0, utilities_1.parts)(rawh["adtcore:uri"], /([^#]+)(?:#start=(\d+)(?:,(\d+))?)?/);
|
|
313
|
+
const node = {
|
|
314
|
+
hasDefOrImpl: rawh.hasDefOrImpl,
|
|
315
|
+
uri,
|
|
316
|
+
line: (0, utilities_1.toInt)(srcline),
|
|
317
|
+
character: (0, utilities_1.toInt)(character),
|
|
318
|
+
type: rawh["adtcore:type"] || "",
|
|
319
|
+
name: rawh["adtcore:name"] || "",
|
|
320
|
+
parentUri: rawh["adtcore:parentUri"] || "",
|
|
321
|
+
description: rawh["adtcore:description"] || ""
|
|
322
|
+
};
|
|
323
|
+
return node;
|
|
324
|
+
});
|
|
325
|
+
return hierarchy;
|
|
326
|
+
}
|
|
327
|
+
exports.typeHierarchy = typeHierarchy;
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
import { Link } from "./objectstructure";
|
|
3
|
+
export declare enum TypeKinds {
|
|
4
|
+
ANY = "~",
|
|
5
|
+
CHAR = "C",
|
|
6
|
+
CLASS = "*",
|
|
7
|
+
CLIKE = "&",
|
|
8
|
+
CSEQUENCE = "?",
|
|
9
|
+
DATA = "#",
|
|
10
|
+
DATE = "D",
|
|
11
|
+
DECFLOAT = "/",
|
|
12
|
+
DECFLOAT16 = "a",
|
|
13
|
+
DECFLOAT34 = "e",
|
|
14
|
+
DREF = "l",
|
|
15
|
+
FLOAT = "F",
|
|
16
|
+
HEX = "X",
|
|
17
|
+
INT = "I",
|
|
18
|
+
INT1 = "b",
|
|
19
|
+
INT8 = "8",
|
|
20
|
+
INT2 = "s",
|
|
21
|
+
INTF = "+",
|
|
22
|
+
IREF = "m",
|
|
23
|
+
NUM = "N",
|
|
24
|
+
NUMERIC = "%",
|
|
25
|
+
OREF = "r",
|
|
26
|
+
PACKED = "P",
|
|
27
|
+
SIMPLE = "$",
|
|
28
|
+
STRING = "g",
|
|
29
|
+
STRUCT1 = "u",
|
|
30
|
+
STRUCT2 = "v",
|
|
31
|
+
TABLE = "h",
|
|
32
|
+
TIME = "T",
|
|
33
|
+
W = "w",
|
|
34
|
+
XSEQUENCE = "!",
|
|
35
|
+
XSTRING = "y",
|
|
36
|
+
BREF = "j"
|
|
37
|
+
}
|
|
38
|
+
export interface QueryResultColumn {
|
|
39
|
+
name: string;
|
|
40
|
+
type: TypeKinds;
|
|
41
|
+
description: string;
|
|
42
|
+
keyAttribute: boolean;
|
|
43
|
+
colType: string;
|
|
44
|
+
isKeyFigure: boolean;
|
|
45
|
+
length: number;
|
|
46
|
+
}
|
|
47
|
+
export interface QueryResult {
|
|
48
|
+
columns: QueryResultColumn[];
|
|
49
|
+
values: any[];
|
|
50
|
+
}
|
|
51
|
+
export interface ServiceBinding {
|
|
52
|
+
releaseSupported: boolean;
|
|
53
|
+
published: boolean;
|
|
54
|
+
repair: boolean;
|
|
55
|
+
bindingCreated: boolean;
|
|
56
|
+
responsible: string;
|
|
57
|
+
masterLanguage: string;
|
|
58
|
+
masterSystem: string;
|
|
59
|
+
name: string;
|
|
60
|
+
type: string;
|
|
61
|
+
changedAt: string;
|
|
62
|
+
version: string;
|
|
63
|
+
createdAt: string;
|
|
64
|
+
changedBy: string;
|
|
65
|
+
createdBy: string;
|
|
66
|
+
description: string;
|
|
67
|
+
language: string;
|
|
68
|
+
packageRef: ServiceBindingPackageRef;
|
|
69
|
+
links: Link[];
|
|
70
|
+
services: ServiceBindingService[];
|
|
71
|
+
binding: ServiceBindingBinding;
|
|
72
|
+
}
|
|
73
|
+
export interface ServiceBindingBinding {
|
|
74
|
+
type: string;
|
|
75
|
+
version: string;
|
|
76
|
+
category: number;
|
|
77
|
+
implementation: {
|
|
78
|
+
name: string;
|
|
79
|
+
};
|
|
80
|
+
}
|
|
81
|
+
export interface ServiceBindingPackageRef {
|
|
82
|
+
uri: string;
|
|
83
|
+
type: string;
|
|
84
|
+
name: string;
|
|
85
|
+
description?: string;
|
|
86
|
+
}
|
|
87
|
+
export interface ServiceBindingService {
|
|
88
|
+
name: string;
|
|
89
|
+
version: number;
|
|
90
|
+
releaseState: string;
|
|
91
|
+
serviceDefinition: ServiceBindingPackageRef;
|
|
92
|
+
}
|
|
93
|
+
export interface BindingServiceResult {
|
|
94
|
+
link: Link;
|
|
95
|
+
services: BindingService[];
|
|
96
|
+
}
|
|
97
|
+
export interface BindingService {
|
|
98
|
+
repositoryId: string;
|
|
99
|
+
serviceId: string;
|
|
100
|
+
serviceVersion: string;
|
|
101
|
+
serviceUrl: string;
|
|
102
|
+
annotationUrl: string;
|
|
103
|
+
published: string;
|
|
104
|
+
created: string;
|
|
105
|
+
serviceInformation: BindingServiceInformation;
|
|
106
|
+
}
|
|
107
|
+
export interface BindingServiceInformation {
|
|
108
|
+
name: string;
|
|
109
|
+
version: string;
|
|
110
|
+
url: string;
|
|
111
|
+
collection: BindingServiceCollection[];
|
|
112
|
+
}
|
|
113
|
+
export interface BindingServiceCollection {
|
|
114
|
+
name: string;
|
|
115
|
+
navigation: BindingServiceNavigation[];
|
|
116
|
+
}
|
|
117
|
+
export interface BindingServiceNavigation {
|
|
118
|
+
name: string;
|
|
119
|
+
target: string;
|
|
120
|
+
}
|
|
121
|
+
export declare const parseServiceBinding: (xml: string) => ServiceBinding;
|
|
122
|
+
export declare const extractBindingLinks: (binding: ServiceBinding) => {
|
|
123
|
+
service: ServiceBindingService;
|
|
124
|
+
query: {
|
|
125
|
+
servicename: string;
|
|
126
|
+
serviceversion: number;
|
|
127
|
+
srvdname: string;
|
|
128
|
+
};
|
|
129
|
+
url: string;
|
|
130
|
+
}[];
|
|
131
|
+
export declare const decodeQueryResult: (original: QueryResult) => QueryResult;
|
|
132
|
+
export declare function parseQueryResponse(body: string): {
|
|
133
|
+
columns: QueryResultColumn[];
|
|
134
|
+
values: any[];
|
|
135
|
+
};
|
|
136
|
+
export declare const parseBindingDetails: (xml: string) => BindingServiceResult;
|
|
137
|
+
export declare const servicePreviewUrl: (service: BindingService, collectionName: string) => string | undefined;
|
|
138
|
+
export declare function tableContents(h: AdtHTTP, ddicEntityName: string, rowNumber?: number, decode?: boolean, sqlQuery?: string): Promise<QueryResult>;
|
|
139
|
+
export declare function runQuery(h: AdtHTTP, sqlQuery: string, rowNumber?: number, decode?: boolean): Promise<QueryResult>;
|
|
140
|
+
export declare function bindingDetails(h: AdtHTTP, binding: ServiceBinding, index?: number): Promise<BindingServiceResult>;
|
|
141
|
+
//# sourceMappingURL=tablecontents.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tablecontents.d.ts","sourceRoot":"","sources":["../../src/api/tablecontents.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AAErC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,oBAAY,SAAS;IACjB,GAAG,MAAM;IACT,IAAI,MAAM;IACV,KAAK,MAAM;IACX,KAAK,MAAM;IACX,SAAS,MAAM;IACf,IAAI,MAAM;IACV,IAAI,MAAM;IACV,QAAQ,MAAM;IACd,UAAU,MAAM;IAChB,UAAU,MAAM;IAChB,IAAI,MAAM;IACV,KAAK,MAAM;IACX,GAAG,MAAM;IACT,GAAG,MAAM;IACT,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,IAAI,MAAM;IACV,GAAG,MAAM;IACT,OAAO,MAAM;IACb,IAAI,MAAM;IACV,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ,MAAM,MAAM;IACZ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