@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,238 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
import { UriParts } from "./urlparser";
|
|
3
|
+
export type DebuggingMode = "user" | "terminal";
|
|
4
|
+
export interface DebugMessage {
|
|
5
|
+
text: string;
|
|
6
|
+
lang: string;
|
|
7
|
+
}
|
|
8
|
+
export interface DebugListenerError {
|
|
9
|
+
namespace: string;
|
|
10
|
+
type: string;
|
|
11
|
+
message: DebugMessage;
|
|
12
|
+
localizedMessage: DebugMessage;
|
|
13
|
+
conflictText: string;
|
|
14
|
+
ideUser: string;
|
|
15
|
+
"com.sap.adt.communicationFramework.subType": string;
|
|
16
|
+
"T100KEY-ID": string;
|
|
17
|
+
"T100KEY-NO": number;
|
|
18
|
+
}
|
|
19
|
+
export interface Debuggee {
|
|
20
|
+
CLIENT: number;
|
|
21
|
+
DEBUGGEE_ID: string;
|
|
22
|
+
TERMINAL_ID: string;
|
|
23
|
+
IDE_ID: string;
|
|
24
|
+
DEBUGGEE_USER: string;
|
|
25
|
+
PRG_CURR: string;
|
|
26
|
+
INCL_CURR: string;
|
|
27
|
+
LINE_CURR: number;
|
|
28
|
+
RFCDEST: string;
|
|
29
|
+
APPLSERVER: string;
|
|
30
|
+
SYSID: string;
|
|
31
|
+
SYSNR: number;
|
|
32
|
+
DBGKEY: string;
|
|
33
|
+
TSTMP: number;
|
|
34
|
+
DBGEE_KIND: string;
|
|
35
|
+
DUMPID: string;
|
|
36
|
+
DUMPDATE: string;
|
|
37
|
+
DUMPTIME: string;
|
|
38
|
+
DUMPHOST: string;
|
|
39
|
+
DUMPMODNO: number;
|
|
40
|
+
LISTENER_CTX_ID: string;
|
|
41
|
+
IS_ATTACH_IMPOSSIBLE: boolean;
|
|
42
|
+
APPSERVER: string;
|
|
43
|
+
IS_SAME_SERVER: boolean;
|
|
44
|
+
CAN_ADT_CROSS_SERVER: boolean;
|
|
45
|
+
INSTANCE_NAME: string;
|
|
46
|
+
HOST: string;
|
|
47
|
+
DUMP_ID: string;
|
|
48
|
+
DUMP_DATE: string;
|
|
49
|
+
DUMP_TIME: string;
|
|
50
|
+
DUMP_HOST: string;
|
|
51
|
+
DUMP_UNAME: string;
|
|
52
|
+
DUMP_MODNO: number;
|
|
53
|
+
DUMP_CLIENT: string;
|
|
54
|
+
DUMP_URI: string;
|
|
55
|
+
URI: UriParts;
|
|
56
|
+
TYPE: string;
|
|
57
|
+
NAME: string;
|
|
58
|
+
PARENT_URI: string;
|
|
59
|
+
PACKAGE_NAME: string;
|
|
60
|
+
DESCRIPTION: string;
|
|
61
|
+
}
|
|
62
|
+
export interface DebugBreakpoint {
|
|
63
|
+
kind: string;
|
|
64
|
+
clientId: string;
|
|
65
|
+
id: string;
|
|
66
|
+
nonAbapFlavour: string;
|
|
67
|
+
uri: UriParts;
|
|
68
|
+
type: string;
|
|
69
|
+
name: string;
|
|
70
|
+
condition?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface DebugBreakpointError {
|
|
73
|
+
kind: string;
|
|
74
|
+
clientId: string;
|
|
75
|
+
errorMessage: string;
|
|
76
|
+
nonAbapFlavour: string;
|
|
77
|
+
}
|
|
78
|
+
export interface DebugState {
|
|
79
|
+
isRfc: boolean;
|
|
80
|
+
isSameSystem: boolean;
|
|
81
|
+
serverName: string;
|
|
82
|
+
debugSessionId: string;
|
|
83
|
+
processId: number;
|
|
84
|
+
isPostMortem: boolean;
|
|
85
|
+
isUserAuthorizedForChanges: boolean;
|
|
86
|
+
debuggeeSessionId: string;
|
|
87
|
+
abapTraceState: string;
|
|
88
|
+
canAdvancedTableFeatures: boolean;
|
|
89
|
+
isNonExclusive: boolean;
|
|
90
|
+
isNonExclusiveToggled: boolean;
|
|
91
|
+
guiEditorGuid: string;
|
|
92
|
+
sessionTitle: string;
|
|
93
|
+
isSteppingPossible?: boolean;
|
|
94
|
+
isTerminationPossible: boolean;
|
|
95
|
+
actions: DebugAction[];
|
|
96
|
+
}
|
|
97
|
+
export interface DebugAttach extends DebugState {
|
|
98
|
+
reachedBreakpoints: DebugReachedBreakpoint[];
|
|
99
|
+
}
|
|
100
|
+
export interface DebugStep extends DebugState {
|
|
101
|
+
isDebuggeeChanged: boolean;
|
|
102
|
+
settings: DebugSettings;
|
|
103
|
+
reachedBreakpoints?: DebugReachedBreakpoint[];
|
|
104
|
+
}
|
|
105
|
+
export interface DebugAction {
|
|
106
|
+
name: string;
|
|
107
|
+
style: string;
|
|
108
|
+
group: string;
|
|
109
|
+
title: string;
|
|
110
|
+
link: string;
|
|
111
|
+
value: boolean | string;
|
|
112
|
+
disabled: boolean;
|
|
113
|
+
}
|
|
114
|
+
export interface DebugReachedBreakpoint {
|
|
115
|
+
id: string;
|
|
116
|
+
kind: string;
|
|
117
|
+
unresolvableCondition: string;
|
|
118
|
+
unresolvableConditionErrorOffset: string;
|
|
119
|
+
}
|
|
120
|
+
export interface DebugSettings {
|
|
121
|
+
systemDebugging: boolean;
|
|
122
|
+
createExceptionObject: boolean;
|
|
123
|
+
backgroundRFC: boolean;
|
|
124
|
+
sharedObjectDebugging: boolean;
|
|
125
|
+
showDataAging: boolean;
|
|
126
|
+
updateDebugging: boolean;
|
|
127
|
+
}
|
|
128
|
+
export type DebugStackType = "ABAP" | "DYNP" | "ENHANCEMENT";
|
|
129
|
+
export type DebugStackSourceType = "ABAP" | "DYNP" | "ST";
|
|
130
|
+
export interface DebugStackAbap {
|
|
131
|
+
stackPosition: number;
|
|
132
|
+
stackType: DebugStackType;
|
|
133
|
+
stackUri: string;
|
|
134
|
+
programName: string;
|
|
135
|
+
includeName: number | string;
|
|
136
|
+
line: number;
|
|
137
|
+
eventType: string;
|
|
138
|
+
eventName: number | string;
|
|
139
|
+
sourceType: DebugStackSourceType;
|
|
140
|
+
systemProgram: boolean;
|
|
141
|
+
isVit: false;
|
|
142
|
+
uri: UriParts;
|
|
143
|
+
}
|
|
144
|
+
export interface DebugStackSimple {
|
|
145
|
+
programName: string;
|
|
146
|
+
includeName: string;
|
|
147
|
+
line: number;
|
|
148
|
+
eventType: string;
|
|
149
|
+
eventName: string;
|
|
150
|
+
stackPosition: number;
|
|
151
|
+
systemProgram: boolean;
|
|
152
|
+
uri: UriParts;
|
|
153
|
+
}
|
|
154
|
+
export interface DebugStackVit {
|
|
155
|
+
stackPosition: number;
|
|
156
|
+
stackType: DebugStackType;
|
|
157
|
+
stackUri: string;
|
|
158
|
+
programName: string;
|
|
159
|
+
includeName: number | string;
|
|
160
|
+
line: number;
|
|
161
|
+
eventType: string;
|
|
162
|
+
eventName: number | string;
|
|
163
|
+
sourceType: DebugStackSourceType;
|
|
164
|
+
systemProgram: boolean;
|
|
165
|
+
isVit: true;
|
|
166
|
+
uri: UriParts;
|
|
167
|
+
canVitOpen: boolean;
|
|
168
|
+
canVitBreakpoints: boolean;
|
|
169
|
+
canVitBreakpointCondition: boolean;
|
|
170
|
+
canVitJumpToLine: boolean;
|
|
171
|
+
canVitRunToLine: boolean;
|
|
172
|
+
type: string;
|
|
173
|
+
name: string;
|
|
174
|
+
}
|
|
175
|
+
export type DebugStack = DebugStackAbap | DebugStackVit | DebugStackSimple;
|
|
176
|
+
export interface DebugStackInfo {
|
|
177
|
+
isRfc: boolean;
|
|
178
|
+
debugCursorStackIndex?: number;
|
|
179
|
+
isSameSystem: boolean;
|
|
180
|
+
serverName: string;
|
|
181
|
+
stack: DebugStack[];
|
|
182
|
+
}
|
|
183
|
+
export interface DebugChildVariablesInfo {
|
|
184
|
+
hierarchies: DebugChildVariablesHierarchy[];
|
|
185
|
+
variables: DebugVariable[];
|
|
186
|
+
}
|
|
187
|
+
export interface DebugChildVariablesHierarchy {
|
|
188
|
+
PARENT_ID: string;
|
|
189
|
+
CHILD_ID: string;
|
|
190
|
+
CHILD_NAME: string;
|
|
191
|
+
}
|
|
192
|
+
export type DebugMetaTypeSimple = "simple" | "string" | "boxedcomp" | "anonymcomp" | "unknown";
|
|
193
|
+
export type DebugMetaTypeComplex = "structure" | "table" | "dataref" | "objectref" | "class" | "object" | "boxref";
|
|
194
|
+
export type DebuggerScope = "external" | "debugger";
|
|
195
|
+
export type DebugMetaType = DebugMetaTypeSimple | DebugMetaTypeComplex;
|
|
196
|
+
export interface DebugVariable {
|
|
197
|
+
ID: string;
|
|
198
|
+
NAME: string;
|
|
199
|
+
DECLARED_TYPE_NAME: string;
|
|
200
|
+
ACTUAL_TYPE_NAME: string;
|
|
201
|
+
KIND: string;
|
|
202
|
+
INSTANTIATION_KIND: string;
|
|
203
|
+
ACCESS_KIND: string;
|
|
204
|
+
META_TYPE: DebugMetaType;
|
|
205
|
+
PARAMETER_KIND: string;
|
|
206
|
+
VALUE: string;
|
|
207
|
+
HEX_VALUE: string;
|
|
208
|
+
READ_ONLY: string;
|
|
209
|
+
TECHNICAL_TYPE: string;
|
|
210
|
+
LENGTH: number;
|
|
211
|
+
TABLE_BODY: string;
|
|
212
|
+
TABLE_LINES: number;
|
|
213
|
+
IS_VALUE_INCOMPLETE: string;
|
|
214
|
+
IS_EXCEPTION: string;
|
|
215
|
+
INHERITANCE_LEVEL: number;
|
|
216
|
+
INHERITANCE_CLASS: string;
|
|
217
|
+
}
|
|
218
|
+
export type DebugStepType = "stepInto" | "stepOver" | "stepReturn" | "stepContinue" | "stepRunToLine" | "stepJumpToLine" | "terminateDebuggee";
|
|
219
|
+
export declare const debugMetaIsComplex: (m: DebugMetaType) => m is DebugMetaTypeComplex;
|
|
220
|
+
export declare const isDebugListenerError: (e: any) => e is DebugListenerError;
|
|
221
|
+
export declare const isDebuggee: (d: any) => d is Debuggee;
|
|
222
|
+
export declare function debuggerListeners(h: AdtHTTP, debuggingMode: DebuggingMode, terminalId: string, ideId: string, requestUser?: string, checkConflict?: boolean): Promise<DebugListenerError | undefined>;
|
|
223
|
+
export declare function debuggerListen(h: AdtHTTP, debuggingMode: DebuggingMode, terminalId: string, ideId: string, requestUser?: string, checkConflict?: boolean, isNotifiedOnConflict?: boolean): Promise<DebugListenerError | Debuggee | undefined>;
|
|
224
|
+
export declare function debuggerDeleteListener(h: AdtHTTP, debuggingMode: DebuggingMode, terminalId: string, ideId: string, requestUser?: string): Promise<void>;
|
|
225
|
+
export declare const isDebuggerBreakpoint: (x: DebugBreakpointError | DebugBreakpoint) => x is DebugBreakpoint;
|
|
226
|
+
export declare function debuggerSetBreakpoints(h: AdtHTTP, debuggingMode: DebuggingMode, terminalId: string, ideId: string, clientId: string, breakpoints: (DebugBreakpoint | string)[], requestUser?: string, scope?: DebuggerScope, systemDebugging?: boolean, deactivated?: boolean, syncScopeUri?: string): Promise<(DebugBreakpoint | DebugBreakpointError)[]>;
|
|
227
|
+
export declare function debuggerDeleteBreakpoints(h: AdtHTTP, breakpoint: DebugBreakpoint, debuggingMode: DebuggingMode, terminalId: string, ideId: string, requestUser?: string, scope?: DebuggerScope): Promise<void>;
|
|
228
|
+
export declare function debuggerAttach(h: AdtHTTP, debuggingMode: DebuggingMode, debuggeeId: string, requestUser?: string, dynproDebugging?: boolean): Promise<DebugAttach>;
|
|
229
|
+
export declare function debuggerSaveSettings(h: AdtHTTP, settings: Partial<DebugSettings>): Promise<DebugSettings>;
|
|
230
|
+
export declare function debuggerStack(h: AdtHTTP, semanticURIs?: boolean): Promise<DebugStackInfo>;
|
|
231
|
+
export declare function simpleDebuggerStack(h: AdtHTTP, semanticURIs?: boolean): Promise<DebugStackInfo>;
|
|
232
|
+
export declare function debuggerChildVariables(h: AdtHTTP, parents?: string[]): Promise<DebugChildVariablesInfo>;
|
|
233
|
+
export declare function debuggerVariables(h: AdtHTTP, parents: string[]): Promise<DebugVariable[]>;
|
|
234
|
+
export declare function debuggerStep(h: AdtHTTP, method: DebugStepType, uri?: string): Promise<DebugStep>;
|
|
235
|
+
export declare function debuggerGoToStack(h: AdtHTTP, stackUri: string): Promise<void>;
|
|
236
|
+
export declare function debuggerGoToStackOld(h: AdtHTTP, position: number): Promise<void>;
|
|
237
|
+
export declare function debuggerSetVariableValue(h: AdtHTTP, variableName: string, value: string): Promise<string>;
|
|
238
|
+
//# sourceMappingURL=debugger.d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E,OAAO,EAAE,MAAM,EAAE,4BAapE;AAED,wBAAsB,YAAY,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,GAAG,CAAC,EAAE,MAAM,sBAIjF;AAED,wBAAsB,iBAAiB,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAInE;AAED,wBAAsB,oBAAoB,CAAC,CAAC,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAGtE;AAED,wBAAsB,wBAAwB,CAAC,CAAC,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,mBAI7F"}
|
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.debuggerSetVariableValue = exports.debuggerGoToStackOld = exports.debuggerGoToStack = exports.debuggerStep = exports.debuggerVariables = exports.debuggerChildVariables = exports.simpleDebuggerStack = exports.debuggerStack = exports.debuggerSaveSettings = exports.debuggerAttach = exports.debuggerDeleteBreakpoints = exports.debuggerSetBreakpoints = exports.isDebuggerBreakpoint = exports.debuggerDeleteListener = exports.debuggerListen = exports.debuggerListeners = exports.isDebuggee = exports.isDebugListenerError = exports.debugMetaIsComplex = void 0;
|
|
4
|
+
const __1 = require("..");
|
|
5
|
+
const utilities_1 = require("../utilities");
|
|
6
|
+
const urlparser_1 = require("./urlparser");
|
|
7
|
+
const debugMetaIsComplex = (m) => !["simple", "string", "boxedcomp", "anonymcomp", "unknown"].find(e => e === m);
|
|
8
|
+
exports.debugMetaIsComplex = debugMetaIsComplex;
|
|
9
|
+
const parseStep = (body) => {
|
|
10
|
+
var _a;
|
|
11
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
12
|
+
checkException(raw);
|
|
13
|
+
const attrs = (0, utilities_1.xmlNodeAttr)(raw.step);
|
|
14
|
+
const settings = (0, utilities_1.xmlNodeAttr)((_a = raw === null || raw === void 0 ? void 0 : raw.step) === null || _a === void 0 ? void 0 : _a.settings);
|
|
15
|
+
const actions = (0, utilities_1.xmlArray)(raw, "step", "actions", "action").map(utilities_1.xmlNodeAttr);
|
|
16
|
+
return { ...attrs, actions, settings };
|
|
17
|
+
};
|
|
18
|
+
const convertVariable = (v) => ({
|
|
19
|
+
...v, TABLE_LINES: (0, utilities_1.toInt)(v.TABLE_LINES),
|
|
20
|
+
LENGTH: (0, utilities_1.toInt)(v.LENGTH),
|
|
21
|
+
INHERITANCE_LEVEL: (0, utilities_1.toInt)(v.INHERITANCE_LEVEL),
|
|
22
|
+
VALUE: v.VALUE,
|
|
23
|
+
ID: v.ID,
|
|
24
|
+
NAME: v.NAME
|
|
25
|
+
});
|
|
26
|
+
const parseVariables = (body) => {
|
|
27
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true, parseTagValue: false, numberParseOptions: utilities_1.numberParseOptions });
|
|
28
|
+
const variables = (0, utilities_1.xmlArray)(raw, "abap", "values", "DATA", "STPDA_ADT_VARIABLE")
|
|
29
|
+
.map(convertVariable);
|
|
30
|
+
return variables;
|
|
31
|
+
};
|
|
32
|
+
const parseChildVariables = (body) => {
|
|
33
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true, parseTagValue: false, numberParseOptions: utilities_1.numberParseOptions });
|
|
34
|
+
const hierarchies = (0, utilities_1.xmlArray)(raw, "abap", "values", "DATA", "HIERARCHIES", "STPDA_ADT_VARIABLE_HIERARCHY");
|
|
35
|
+
const variables = (0, utilities_1.xmlArray)(raw, "abap", "values", "DATA", "VARIABLES", "STPDA_ADT_VARIABLE")
|
|
36
|
+
.map(convertVariable);
|
|
37
|
+
return { hierarchies, variables };
|
|
38
|
+
};
|
|
39
|
+
const parseStack = (body) => {
|
|
40
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
41
|
+
const stack = (0, utilities_1.xmlArray)(raw, "stack", "stackEntry")
|
|
42
|
+
.map(utilities_1.xmlNodeAttr)
|
|
43
|
+
.map(x => ({ ...x, uri: (0, urlparser_1.parseUri)(x.uri) }));
|
|
44
|
+
const attrs = (0, utilities_1.xmlNodeAttr)(raw.stack);
|
|
45
|
+
return { ...attrs, stack };
|
|
46
|
+
};
|
|
47
|
+
const parseDebugSettings = (body) => {
|
|
48
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
49
|
+
return (0, utilities_1.xmlNodeAttr)(raw.settings);
|
|
50
|
+
};
|
|
51
|
+
const parseAttach = (body) => {
|
|
52
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
53
|
+
const attrs = (0, utilities_1.xmlNodeAttr)(raw.attach);
|
|
54
|
+
const reachedBreakpoints = (0, utilities_1.xmlArray)(raw, "attach", "reachedBreakpoints", "breakpoint").map(utilities_1.xmlNodeAttr);
|
|
55
|
+
const actions = (0, utilities_1.xmlArray)(raw, "attach", "actions", "action").map(utilities_1.xmlNodeAttr);
|
|
56
|
+
return { ...attrs, actions, reachedBreakpoints };
|
|
57
|
+
};
|
|
58
|
+
const parseBreakpoints = (body) => {
|
|
59
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
60
|
+
return (0, utilities_1.xmlArray)(raw, "breakpoints", "breakpoint")
|
|
61
|
+
.map(utilities_1.xmlNodeAttr)
|
|
62
|
+
.map(x => {
|
|
63
|
+
if (x.uri)
|
|
64
|
+
return { ...x, uri: (0, urlparser_1.parseUri)(x.uri) };
|
|
65
|
+
return x;
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
const parseDebugError = (raw) => {
|
|
69
|
+
if (raw.exception) {
|
|
70
|
+
const { namespace: { "@_id": namespace }, type: { "@_id": type }, localizedMessage, message } = raw.exception;
|
|
71
|
+
const parseMessage = (m) => ({ text: m["#text"], lang: m["@_lang"] });
|
|
72
|
+
const entries = {};
|
|
73
|
+
for (const ex of (0, utilities_1.xmlArray)(raw.exception, "properties", "entry"))
|
|
74
|
+
entries[ex["@_key"]] = ex["#text"];
|
|
75
|
+
return {
|
|
76
|
+
...entries,
|
|
77
|
+
namespace,
|
|
78
|
+
type,
|
|
79
|
+
message: parseMessage(message),
|
|
80
|
+
localizedMessage: parseMessage(localizedMessage)
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
const checkException = (raw) => {
|
|
85
|
+
const e = parseDebugError(raw);
|
|
86
|
+
if (e) {
|
|
87
|
+
const err = new Error(e.message.text);
|
|
88
|
+
err.extra = e;
|
|
89
|
+
throw err;
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
const isDebugListenerError = (e) => !!e && "conflictText" in e && "com.sap.adt.communicationFramework.subType" in e;
|
|
93
|
+
exports.isDebugListenerError = isDebugListenerError;
|
|
94
|
+
const isDebuggee = (d) => !!d && !["CLIENT", "DEBUGGEE_ID", "TERMINAL_ID", "IDE_ID", "DEBUGGEE_USER"].find(f => !(f in d));
|
|
95
|
+
exports.isDebuggee = isDebuggee;
|
|
96
|
+
const parseDebugListeners = (body) => {
|
|
97
|
+
if (!body)
|
|
98
|
+
return;
|
|
99
|
+
const raw = (0, utilities_1.fullParse)(body, { removeNSPrefix: true });
|
|
100
|
+
const err = parseDebugError(raw);
|
|
101
|
+
if (err)
|
|
102
|
+
return err;
|
|
103
|
+
const debug = (0, utilities_1.xmlNode)(raw, "abap", "values", "DATA", "STPDA_DEBUGGEE");
|
|
104
|
+
return { ...debug, URI: (0, urlparser_1.parseUri)(debug.URI) };
|
|
105
|
+
};
|
|
106
|
+
async function debuggerListeners(h, debuggingMode, terminalId, ideId, requestUser, checkConflict = true) {
|
|
107
|
+
const qs = {
|
|
108
|
+
debuggingMode,
|
|
109
|
+
requestUser,
|
|
110
|
+
terminalId,
|
|
111
|
+
ideId,
|
|
112
|
+
checkConflict
|
|
113
|
+
};
|
|
114
|
+
const response = await h.request("/sap/bc/adt/debugger/listeners", { qs });
|
|
115
|
+
if (!response.body)
|
|
116
|
+
return;
|
|
117
|
+
const raw = (0, utilities_1.fullParse)(response.body, { removeNSPrefix: true });
|
|
118
|
+
return parseDebugError(raw);
|
|
119
|
+
}
|
|
120
|
+
exports.debuggerListeners = debuggerListeners;
|
|
121
|
+
async function debuggerListen(h, debuggingMode, terminalId, ideId, requestUser, checkConflict = true, isNotifiedOnConflict = true) {
|
|
122
|
+
const qs = {
|
|
123
|
+
debuggingMode,
|
|
124
|
+
requestUser,
|
|
125
|
+
terminalId,
|
|
126
|
+
ideId,
|
|
127
|
+
checkConflict,
|
|
128
|
+
isNotifiedOnConflict
|
|
129
|
+
};
|
|
130
|
+
const response = await h.request("/sap/bc/adt/debugger/listeners", {
|
|
131
|
+
method: "POST",
|
|
132
|
+
timeout: 360000000,
|
|
133
|
+
qs
|
|
134
|
+
});
|
|
135
|
+
return parseDebugListeners(response.body);
|
|
136
|
+
}
|
|
137
|
+
exports.debuggerListen = debuggerListen;
|
|
138
|
+
async function debuggerDeleteListener(h, debuggingMode, terminalId, ideId, requestUser) {
|
|
139
|
+
const qs = {
|
|
140
|
+
debuggingMode,
|
|
141
|
+
requestUser,
|
|
142
|
+
terminalId,
|
|
143
|
+
ideId,
|
|
144
|
+
checkConflict: false,
|
|
145
|
+
notifyConflict: true
|
|
146
|
+
};
|
|
147
|
+
await h.request("/sap/bc/adt/debugger/listeners", { method: "DELETE", qs });
|
|
148
|
+
}
|
|
149
|
+
exports.debuggerDeleteListener = debuggerDeleteListener;
|
|
150
|
+
const formatBreakpoint = (clientId) => (b) => {
|
|
151
|
+
if ((0, utilities_1.isString)(b))
|
|
152
|
+
return `<breakpoint xmlns:adtcore="http://www.sap.com/adt/core" kind="line" clientId="${clientId}" skipCount="0" adtcore:uri="${b}"/>`;
|
|
153
|
+
const uri = `adtcore:uri="${b.uri.uri}#start=${b.uri.range.start.line}"`;
|
|
154
|
+
const condition = b.condition ? `condition="${b.condition}"` : ``;
|
|
155
|
+
return `<breakpoint xmlns:adtcore="http://www.sap.com/adt/core" kind="${b.kind}" clientId="${b.clientId}" skipCount="0" ${uri} ${condition}/>`;
|
|
156
|
+
};
|
|
157
|
+
const isDebuggerBreakpoint = (x) => "uri" in x;
|
|
158
|
+
exports.isDebuggerBreakpoint = isDebuggerBreakpoint;
|
|
159
|
+
async function debuggerSetBreakpoints(h, debuggingMode, terminalId, ideId, clientId, breakpoints, requestUser, scope = "external", systemDebugging = false, deactivated = false, syncScopeUri = "") {
|
|
160
|
+
const syncScope = syncScopeUri ?
|
|
161
|
+
`<syncScope mode="partial"><adtcore:objectReference xmlns:adtcore="http://www.sap.com/adt/core" adtcore:uri="${syncScopeUri}"/></syncScope>`
|
|
162
|
+
: `<syncScope mode="full"></syncScope>`;
|
|
163
|
+
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
|
164
|
+
<dbg:breakpoints scope="${scope}" debuggingMode="${debuggingMode}" requestUser="${requestUser}"
|
|
165
|
+
terminalId="${terminalId}" ideId="${ideId}" systemDebugging="${systemDebugging}" deactivated="${deactivated}"
|
|
166
|
+
xmlns:dbg="http://www.sap.com/adt/debugger">
|
|
167
|
+
${syncScope}
|
|
168
|
+
${breakpoints.map(formatBreakpoint(clientId)).join("")}
|
|
169
|
+
</dbg:breakpoints>`;
|
|
170
|
+
const headers = {
|
|
171
|
+
"Content-Type": "application/xml",
|
|
172
|
+
Accept: "application/xml"
|
|
173
|
+
};
|
|
174
|
+
const response = await h.request("/sap/bc/adt/debugger/breakpoints", {
|
|
175
|
+
method: "POST",
|
|
176
|
+
headers,
|
|
177
|
+
body
|
|
178
|
+
});
|
|
179
|
+
return parseBreakpoints(response.body);
|
|
180
|
+
}
|
|
181
|
+
exports.debuggerSetBreakpoints = debuggerSetBreakpoints;
|
|
182
|
+
async function debuggerDeleteBreakpoints(h, breakpoint, debuggingMode, terminalId, ideId, requestUser, scope = "external") {
|
|
183
|
+
const headers = { Accept: "application/xml" };
|
|
184
|
+
const qs = { scope, debuggingMode, requestUser, terminalId, ideId };
|
|
185
|
+
await h.request(`/sap/bc/adt/debugger/breakpoints/${encodeURIComponent(breakpoint.id)}`, {
|
|
186
|
+
method: "DELETE",
|
|
187
|
+
headers,
|
|
188
|
+
qs
|
|
189
|
+
});
|
|
190
|
+
}
|
|
191
|
+
exports.debuggerDeleteBreakpoints = debuggerDeleteBreakpoints;
|
|
192
|
+
async function debuggerAttach(h, debuggingMode, debuggeeId, requestUser = "", dynproDebugging = true) {
|
|
193
|
+
const headers = {
|
|
194
|
+
Accept: "application/xml"
|
|
195
|
+
};
|
|
196
|
+
const qs = {
|
|
197
|
+
method: "attach",
|
|
198
|
+
debuggeeId,
|
|
199
|
+
dynproDebugging,
|
|
200
|
+
debuggingMode,
|
|
201
|
+
requestUser
|
|
202
|
+
};
|
|
203
|
+
const response = await h.request("/sap/bc/adt/debugger", {
|
|
204
|
+
method: "POST",
|
|
205
|
+
headers,
|
|
206
|
+
qs
|
|
207
|
+
});
|
|
208
|
+
return parseAttach(response.body);
|
|
209
|
+
}
|
|
210
|
+
exports.debuggerAttach = debuggerAttach;
|
|
211
|
+
async function debuggerSaveSettings(h, settings) {
|
|
212
|
+
const headers = {
|
|
213
|
+
"Content-Type": "application/xml",
|
|
214
|
+
Accept: "application/xml"
|
|
215
|
+
};
|
|
216
|
+
const { systemDebugging = false, createExceptionObject = false, backgroundRFC = false, sharedObjectDebugging = false, showDataAging = true, updateDebugging = false } = settings;
|
|
217
|
+
const body = `<?xml version="1.0" encoding="UTF-8"?>
|
|
218
|
+
<dbg:settings xmlns:dbg="http://www.sap.com/adt/debugger"
|
|
219
|
+
systemDebugging="${systemDebugging}" createExceptionObject="${createExceptionObject}"
|
|
220
|
+
backgroundRFC="${backgroundRFC}" sharedObjectDebugging="${sharedObjectDebugging}"
|
|
221
|
+
showDataAging="${showDataAging}" updateDebugging="${updateDebugging}">
|
|
222
|
+
</dbg:settings>`;
|
|
223
|
+
const qs = { method: "setDebuggerSettings" };
|
|
224
|
+
const response = await h.request("/sap/bc/adt/debugger", {
|
|
225
|
+
method: "POST",
|
|
226
|
+
headers,
|
|
227
|
+
body,
|
|
228
|
+
qs
|
|
229
|
+
});
|
|
230
|
+
return parseDebugSettings(response.body);
|
|
231
|
+
}
|
|
232
|
+
exports.debuggerSaveSettings = debuggerSaveSettings;
|
|
233
|
+
async function debuggerStack(h, semanticURIs = true) {
|
|
234
|
+
const headers = { Accept: "application/xml" };
|
|
235
|
+
const qs = { method: "getStack", emode: "_", semanticURIs };
|
|
236
|
+
const response = await h.request("/sap/bc/adt/debugger/stack", {
|
|
237
|
+
headers,
|
|
238
|
+
qs
|
|
239
|
+
});
|
|
240
|
+
return parseStack(response.body);
|
|
241
|
+
}
|
|
242
|
+
exports.debuggerStack = debuggerStack;
|
|
243
|
+
async function simpleDebuggerStack(h, semanticURIs = true) {
|
|
244
|
+
const headers = { Accept: "application/xml" };
|
|
245
|
+
const qs = { method: "getStack", emode: "_", semanticURIs };
|
|
246
|
+
const response = await h.request("/sap/bc/adt/debugger", { headers, method: "POST", qs });
|
|
247
|
+
return parseStack(response.body);
|
|
248
|
+
}
|
|
249
|
+
exports.simpleDebuggerStack = simpleDebuggerStack;
|
|
250
|
+
async function debuggerChildVariables(h, parents = ["@ROOT", "@DATAAGING"]) {
|
|
251
|
+
const headers = {
|
|
252
|
+
Accept: "application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.debugger.ChildVariables",
|
|
253
|
+
"Content-Type": "application/vnd.sap.as+xml; charset=UTF-8; dataname=com.sap.adt.debugger.ChildVariables"
|
|
254
|
+
};
|
|
255
|
+
const hierarchies = parents.map(p => `<STPDA_ADT_VARIABLE_HIERARCHY><PARENT_ID>${(0, utilities_1.encodeEntity)(p)}</PARENT_ID></STPDA_ADT_VARIABLE_HIERARCHY>`);
|
|
256
|
+
const body = `<?xml version="1.0" encoding="UTF-8" ?><asx:abap version="1.0" xmlns:asx="http://www.sap.com/abapxml"><asx:values><DATA>
|
|
257
|
+
<HIERARCHIES>${hierarchies.join("")}</HIERARCHIES>
|
|
258
|
+
</DATA></asx:values></asx:abap>`;
|
|
259
|
+
const qs = { method: "getChildVariables" };
|
|
260
|
+
const response = await h.request("/sap/bc/adt/debugger", { method: "POST", headers, qs, body });
|
|
261
|
+
return parseChildVariables(response.body);
|
|
262
|
+
}
|
|
263
|
+
exports.debuggerChildVariables = debuggerChildVariables;
|
|
264
|
+
async function debuggerVariables(h, parents) {
|
|
265
|
+
const headers = {
|
|
266
|
+
Accept: "application/vnd.sap.as+xml;charset=UTF-8;dataname=com.sap.adt.debugger.Variables",
|
|
267
|
+
"Content-Type": "application/vnd.sap.as+xml; charset=UTF-8; dataname=com.sap.adt.debugger.Variables"
|
|
268
|
+
};
|
|
269
|
+
const mainBody = parents.map(p => `<STPDA_ADT_VARIABLE><ID>${(0, utilities_1.encodeEntity)(p)}</ID></STPDA_ADT_VARIABLE>`).join("");
|
|
270
|
+
const body = `<?xml version="1.0" encoding="UTF-8" ?><asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0"><asx:values>
|
|
271
|
+
<DATA>${mainBody}</DATA></asx:values></asx:abap>`;
|
|
272
|
+
const qs = { method: "getVariables" };
|
|
273
|
+
const response = await h.request("/sap/bc/adt/debugger", { method: "POST", headers, qs, body });
|
|
274
|
+
return parseVariables(response.body);
|
|
275
|
+
}
|
|
276
|
+
exports.debuggerVariables = debuggerVariables;
|
|
277
|
+
async function debuggerStep(h, method, uri) {
|
|
278
|
+
const headers = { Accept: "application/xml" };
|
|
279
|
+
const response = await h.request("/sap/bc/adt/debugger", { method: "POST", headers, qs: { method, uri } });
|
|
280
|
+
return parseStep(response.body);
|
|
281
|
+
}
|
|
282
|
+
exports.debuggerStep = debuggerStep;
|
|
283
|
+
async function debuggerGoToStack(h, stackUri) {
|
|
284
|
+
if (!stackUri.match(/^\/sap\/bc\/adt\/debugger\/stack\/type\/[\w]+\/position\/\d+$/))
|
|
285
|
+
throw (0, __1.adtException)(`Invalid stack URL: ${stackUri}`);
|
|
286
|
+
await h.request(stackUri, { method: "PUT" });
|
|
287
|
+
}
|
|
288
|
+
exports.debuggerGoToStack = debuggerGoToStack;
|
|
289
|
+
async function debuggerGoToStackOld(h, position) {
|
|
290
|
+
const qs = { method: "setStackPosition", position };
|
|
291
|
+
await h.request(`/sap/bc/adt/debugger`, { method: "POST", qs });
|
|
292
|
+
}
|
|
293
|
+
exports.debuggerGoToStackOld = debuggerGoToStackOld;
|
|
294
|
+
async function debuggerSetVariableValue(h, variableName, value) {
|
|
295
|
+
const qs = { variableName };
|
|
296
|
+
const resp = await h.request(`/sap/bc/adt/debugger?method=setVariableValue`, { method: "POST", qs, body: value });
|
|
297
|
+
return resp.body;
|
|
298
|
+
}
|
|
299
|
+
exports.debuggerSetVariableValue = debuggerSetVariableValue;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
export interface RegistrationInfo {
|
|
3
|
+
developer: {
|
|
4
|
+
"reg:isRequired": boolean;
|
|
5
|
+
"reg:name": string;
|
|
6
|
+
"reg:accessKey": number;
|
|
7
|
+
};
|
|
8
|
+
object: {
|
|
9
|
+
"reg:isRequired": boolean;
|
|
10
|
+
"reg:accessKey": string;
|
|
11
|
+
"reg:transportPGMID": string;
|
|
12
|
+
"reg:transportType": string;
|
|
13
|
+
"reg:transportName": string;
|
|
14
|
+
};
|
|
15
|
+
"reg:release": number;
|
|
16
|
+
"reg:installationNumber": string;
|
|
17
|
+
}
|
|
18
|
+
export declare function objectRegistrationInfo(h: AdtHTTP, objectUrl: string): Promise<RegistrationInfo>;
|
|
19
|
+
export declare function deleteObject(h: AdtHTTP, objectUrl: string, lockHandle: string, transport?: string): Promise<void>;
|
|
20
|
+
//# sourceMappingURL=delete.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete.d.ts","sourceRoot":"","sources":["../../src/api/delete.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,MAAM,WAAW,gBAAgB;IAC/B,SAAS,EAAE;QACT,gBAAgB,EAAE,OAAO,CAAA;QACzB,UAAU,EAAE,MAAM,CAAA;QAClB,eAAe,EAAE,MAAM,CAAA;KACxB,CAAA;IACD,MAAM,EAAE;QACN,gBAAgB,EAAE,OAAO,CAAA;QACzB,eAAe,EAAE,MAAM,CAAA;QACvB,oBAAoB,EAAE,MAAM,CAAA;QAC5B,mBAAmB,EAAE,MAAM,CAAA;QAC3B,mBAAmB,EAAE,MAAM,CAAA;KAC5B,CAAA;IACD,aAAa,EAAE,MAAM,CAAA;IACrB,wBAAwB,EAAE,MAAM,CAAA;CACjC;AACD,wBAAsB,sBAAsB,CAAC,CAAC,EAAE,OAAO,EAAE,SAAS,EAAE,MAAM,6BAWzE;AAED,wBAAsB,YAAY,CAChC,CAAC,EAAE,OAAO,EACV,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,SAAS,CAAC,EAAE,MAAM,iBASnB"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.deleteObject = exports.objectRegistrationInfo = void 0;
|
|
4
|
+
const AdtException_1 = require("../AdtException");
|
|
5
|
+
const utilities_1 = require("../utilities");
|
|
6
|
+
async function objectRegistrationInfo(h, objectUrl) {
|
|
7
|
+
(0, AdtException_1.ValidateObjectUrl)(objectUrl);
|
|
8
|
+
const response = await h.request("/sap/bc/adt/sscr/registration/objects", {
|
|
9
|
+
qs: { uri: objectUrl }
|
|
10
|
+
});
|
|
11
|
+
const raw = (0, utilities_1.fullParse)(response.body)["reg:objectRegistrationResponse"];
|
|
12
|
+
return {
|
|
13
|
+
developer: (0, utilities_1.xmlNodeAttr)(raw["reg:developer"]),
|
|
14
|
+
object: (0, utilities_1.xmlNodeAttr)(raw["reg:object"]),
|
|
15
|
+
...(0, utilities_1.xmlNodeAttr)(raw)
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
exports.objectRegistrationInfo = objectRegistrationInfo;
|
|
19
|
+
async function deleteObject(h, objectUrl, lockHandle, transport) {
|
|
20
|
+
(0, AdtException_1.ValidateObjectUrl)(objectUrl);
|
|
21
|
+
(0, AdtException_1.ValidateStateful)(h);
|
|
22
|
+
const qs = { lockHandle };
|
|
23
|
+
if (transport)
|
|
24
|
+
qs.corrNr = transport;
|
|
25
|
+
const method = "DELETE";
|
|
26
|
+
// no return value, will throw on failure
|
|
27
|
+
await h.request(objectUrl, { method, qs });
|
|
28
|
+
}
|
|
29
|
+
exports.deleteObject = deleteObject;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { AdtHTTP } from "../AdtHTTP";
|
|
2
|
+
export interface AdtDiscoveryResult {
|
|
3
|
+
collection: Array<{
|
|
4
|
+
href: string;
|
|
5
|
+
templateLinks: Array<{
|
|
6
|
+
rel: string;
|
|
7
|
+
template: string;
|
|
8
|
+
title?: string;
|
|
9
|
+
type?: string;
|
|
10
|
+
}>;
|
|
11
|
+
title?: string;
|
|
12
|
+
}>;
|
|
13
|
+
title: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AdtCoreDiscoveryResult {
|
|
16
|
+
title: string;
|
|
17
|
+
collection: {
|
|
18
|
+
href: string;
|
|
19
|
+
title: string;
|
|
20
|
+
category: string;
|
|
21
|
+
};
|
|
22
|
+
}
|
|
23
|
+
export interface AdtGraphNode {
|
|
24
|
+
nameSpace: string;
|
|
25
|
+
name: string;
|
|
26
|
+
}
|
|
27
|
+
export interface AdtCompatibilityGraph {
|
|
28
|
+
nodes: AdtGraphNode[];
|
|
29
|
+
edges: Array<{
|
|
30
|
+
sourceNode: AdtGraphNode;
|
|
31
|
+
targetNode: AdtGraphNode;
|
|
32
|
+
}>;
|
|
33
|
+
}
|
|
34
|
+
export declare function adtDiscovery(h: AdtHTTP): Promise<AdtDiscoveryResult[]>;
|
|
35
|
+
export declare function adtCoreDiscovery(h: AdtHTTP): Promise<AdtCoreDiscoveryResult[]>;
|
|
36
|
+
export declare function adtCompatibilityGraph(h: AdtHTTP): Promise<AdtCompatibilityGraph>;
|
|
37
|
+
export interface ObjectTypeDescriptor {
|
|
38
|
+
name: string;
|
|
39
|
+
description: string;
|
|
40
|
+
type: string;
|
|
41
|
+
usedBy: string[];
|
|
42
|
+
}
|
|
43
|
+
export declare function objectTypes(h: AdtHTTP): Promise<ObjectTypeDescriptor[]>;
|
|
44
|
+
//# sourceMappingURL=discovery.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discovery.d.ts","sourceRoot":"","sources":["../../src/api/discovery.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAA;AAGpC,MAAM,WAAW,kBAAkB;IACjC,UAAU,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAA;QACZ,aAAa,EAAE,KAAK,CAAC;YACnB,GAAG,EAAE,MAAM,CAAA;YACX,QAAQ,EAAE,MAAM,CAAA;YAChB,KAAK,CAAC,EAAE,MAAM,CAAA;YACd,IAAI,CAAC,EAAE,MAAM,CAAA;SACd,CAAC,CAAA;QACF,KAAK,CAAC,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IACF,KAAK,EAAE,MAAM,CAAA;CACd;AACD,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;CAC9D;AAED,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;CACb;AACD,MAAM,WAAW,qBAAqB;IACpC,KAAK,EAAE,YAAY,EAAE,CAAA;IACrB,KAAK,EAAE,KAAK,CAAC;QAAE,UAAU,EAAE,YAAY,CAAC;QAAC,UAAU,EAAE,YAAY,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