@mcp-abap-adt/connection 6.0.1 → 8.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/CHANGELOG.md +157 -1
- package/COPYING +674 -0
- package/LICENSE +165 -21
- package/README.md +22 -1
- package/dist/connection/AbstractAbapConnection.d.ts +58 -25
- package/dist/connection/AbstractAbapConnection.d.ts.map +1 -1
- package/dist/connection/AbstractAbapConnection.js +119 -5
- package/dist/connection/CloudHttpTransport.d.ts +19 -0
- package/dist/connection/CloudHttpTransport.d.ts.map +1 -1
- package/dist/connection/CloudHttpTransport.js +21 -0
- package/dist/connection/HttpTransport.d.ts +9 -0
- package/dist/connection/HttpTransport.d.ts.map +1 -1
- package/dist/connection/HttpTransport.js +12 -0
- package/dist/utils/networkErrors.d.ts +2 -0
- package/dist/utils/networkErrors.d.ts.map +1 -0
- package/dist/utils/networkErrors.js +25 -0
- package/docs/MIGRATION-6.0.md +1 -1
- package/package.json +5 -4
package/LICENSE
CHANGED
|
@@ -1,21 +1,165 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
of this
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
1
|
+
GNU LESSER GENERAL PUBLIC LICENSE
|
|
2
|
+
Version 3, 29 June 2007
|
|
3
|
+
|
|
4
|
+
Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
|
|
5
|
+
Everyone is permitted to copy and distribute verbatim copies
|
|
6
|
+
of this license document, but changing it is not allowed.
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
This version of the GNU Lesser General Public License incorporates
|
|
10
|
+
the terms and conditions of version 3 of the GNU General Public
|
|
11
|
+
License, supplemented by the additional permissions listed below.
|
|
12
|
+
|
|
13
|
+
0. Additional Definitions.
|
|
14
|
+
|
|
15
|
+
As used herein, "this License" refers to version 3 of the GNU Lesser
|
|
16
|
+
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
|
17
|
+
General Public License.
|
|
18
|
+
|
|
19
|
+
"The Library" refers to a covered work governed by this License,
|
|
20
|
+
other than an Application or a Combined Work as defined below.
|
|
21
|
+
|
|
22
|
+
An "Application" is any work that makes use of an interface provided
|
|
23
|
+
by the Library, but which is not otherwise based on the Library.
|
|
24
|
+
Defining a subclass of a class defined by the Library is deemed a mode
|
|
25
|
+
of using an interface provided by the Library.
|
|
26
|
+
|
|
27
|
+
A "Combined Work" is a work produced by combining or linking an
|
|
28
|
+
Application with the Library. The particular version of the Library
|
|
29
|
+
with which the Combined Work was made is also called the "Linked
|
|
30
|
+
Version".
|
|
31
|
+
|
|
32
|
+
The "Minimal Corresponding Source" for a Combined Work means the
|
|
33
|
+
Corresponding Source for the Combined Work, excluding any source code
|
|
34
|
+
for portions of the Combined Work that, considered in isolation, are
|
|
35
|
+
based on the Application, and not on the Linked Version.
|
|
36
|
+
|
|
37
|
+
The "Corresponding Application Code" for a Combined Work means the
|
|
38
|
+
object code and/or source code for the Application, including any data
|
|
39
|
+
and utility programs needed for reproducing the Combined Work from the
|
|
40
|
+
Application, but excluding the System Libraries of the Combined Work.
|
|
41
|
+
|
|
42
|
+
1. Exception to Section 3 of the GNU GPL.
|
|
43
|
+
|
|
44
|
+
You may convey a covered work under sections 3 and 4 of this License
|
|
45
|
+
without being bound by section 3 of the GNU GPL.
|
|
46
|
+
|
|
47
|
+
2. Conveying Modified Versions.
|
|
48
|
+
|
|
49
|
+
If you modify a copy of the Library, and, in your modifications, a
|
|
50
|
+
facility refers to a function or data to be supplied by an Application
|
|
51
|
+
that uses the facility (other than as an argument passed when the
|
|
52
|
+
facility is invoked), then you may convey a copy of the modified
|
|
53
|
+
version:
|
|
54
|
+
|
|
55
|
+
a) under this License, provided that you make a good faith effort to
|
|
56
|
+
ensure that, in the event an Application does not supply the
|
|
57
|
+
function or data, the facility still operates, and performs
|
|
58
|
+
whatever part of its purpose remains meaningful, or
|
|
59
|
+
|
|
60
|
+
b) under the GNU GPL, with none of the additional permissions of
|
|
61
|
+
this License applicable to that copy.
|
|
62
|
+
|
|
63
|
+
3. Object Code Incorporating Material from Library Header Files.
|
|
64
|
+
|
|
65
|
+
The object code form of an Application may incorporate material from
|
|
66
|
+
a header file that is part of the Library. You may convey such object
|
|
67
|
+
code under terms of your choice, provided that, if the incorporated
|
|
68
|
+
material is not limited to numerical parameters, data structure
|
|
69
|
+
layouts and accessors, or small macros, inline functions and templates
|
|
70
|
+
(ten or fewer lines in length), you do both of the following:
|
|
71
|
+
|
|
72
|
+
a) Give prominent notice with each copy of the object code that the
|
|
73
|
+
Library is used in it and that the Library and its use are
|
|
74
|
+
covered by this License.
|
|
75
|
+
|
|
76
|
+
b) Accompany the object code with a copy of the GNU GPL and this license
|
|
77
|
+
document.
|
|
78
|
+
|
|
79
|
+
4. Combined Works.
|
|
80
|
+
|
|
81
|
+
You may convey a Combined Work under terms of your choice that,
|
|
82
|
+
taken together, effectively do not restrict modification of the
|
|
83
|
+
portions of the Library contained in the Combined Work and reverse
|
|
84
|
+
engineering for debugging such modifications, if you also do each of
|
|
85
|
+
the following:
|
|
86
|
+
|
|
87
|
+
a) Give prominent notice with each copy of the Combined Work that
|
|
88
|
+
the Library is used in it and that the Library and its use are
|
|
89
|
+
covered by this License.
|
|
90
|
+
|
|
91
|
+
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
|
92
|
+
document.
|
|
93
|
+
|
|
94
|
+
c) For a Combined Work that displays copyright notices during
|
|
95
|
+
execution, include the copyright notice for the Library among
|
|
96
|
+
these notices, as well as a reference directing the user to the
|
|
97
|
+
copies of the GNU GPL and this license document.
|
|
98
|
+
|
|
99
|
+
d) Do one of the following:
|
|
100
|
+
|
|
101
|
+
0) Convey the Minimal Corresponding Source under the terms of this
|
|
102
|
+
License, and the Corresponding Application Code in a form
|
|
103
|
+
suitable for, and under terms that permit, the user to
|
|
104
|
+
recombine or relink the Application with a modified version of
|
|
105
|
+
the Linked Version to produce a modified Combined Work, in the
|
|
106
|
+
manner specified by section 6 of the GNU GPL for conveying
|
|
107
|
+
Corresponding Source.
|
|
108
|
+
|
|
109
|
+
1) Use a suitable shared library mechanism for linking with the
|
|
110
|
+
Library. A suitable mechanism is one that (a) uses at run time
|
|
111
|
+
a copy of the Library already present on the user's computer
|
|
112
|
+
system, and (b) will operate properly with a modified version
|
|
113
|
+
of the Library that is interface-compatible with the Linked
|
|
114
|
+
Version.
|
|
115
|
+
|
|
116
|
+
e) Provide Installation Information, but only if you would otherwise
|
|
117
|
+
be required to provide such information under section 6 of the
|
|
118
|
+
GNU GPL, and only to the extent that such information is
|
|
119
|
+
necessary to install and execute a modified version of the
|
|
120
|
+
Combined Work produced by recombining or relinking the
|
|
121
|
+
Application with a modified version of the Linked Version. (If
|
|
122
|
+
you use option 4d0, the Installation Information must accompany
|
|
123
|
+
the Minimal Corresponding Source and Corresponding Application
|
|
124
|
+
Code. If you use option 4d1, you must provide the Installation
|
|
125
|
+
Information in the manner specified by section 6 of the GNU GPL
|
|
126
|
+
for conveying Corresponding Source.)
|
|
127
|
+
|
|
128
|
+
5. Combined Libraries.
|
|
129
|
+
|
|
130
|
+
You may place library facilities that are a work based on the
|
|
131
|
+
Library side by side in a single library together with other library
|
|
132
|
+
facilities that are not Applications and are not covered by this
|
|
133
|
+
License, and convey such a combined library under terms of your
|
|
134
|
+
choice, if you do both of the following:
|
|
135
|
+
|
|
136
|
+
a) Accompany the combined library with a copy of the same work based
|
|
137
|
+
on the Library, uncombined with any other library facilities,
|
|
138
|
+
conveyed under the terms of this License.
|
|
139
|
+
|
|
140
|
+
b) Give prominent notice with the combined library that part of it
|
|
141
|
+
is a work based on the Library, and explaining where to find the
|
|
142
|
+
accompanying uncombined form of the same work.
|
|
143
|
+
|
|
144
|
+
6. Revised Versions of the GNU Lesser General Public License.
|
|
145
|
+
|
|
146
|
+
The Free Software Foundation may publish revised and/or new versions
|
|
147
|
+
of the GNU Lesser General Public License from time to time. Such new
|
|
148
|
+
versions will be similar in spirit to the present version, but may
|
|
149
|
+
differ in detail to address new problems or concerns.
|
|
150
|
+
|
|
151
|
+
Each version is given a distinguishing version number. If the
|
|
152
|
+
Library as you received it specifies that a certain numbered version
|
|
153
|
+
of the GNU Lesser General Public License "or any later version"
|
|
154
|
+
applies to it, you have the option of following the terms and
|
|
155
|
+
conditions either of that published version or of any later version
|
|
156
|
+
published by the Free Software Foundation. If the Library as you
|
|
157
|
+
received it does not specify a version number of the GNU Lesser
|
|
158
|
+
General Public License, you may choose any version of the GNU Lesser
|
|
159
|
+
General Public License ever published by the Free Software Foundation.
|
|
160
|
+
|
|
161
|
+
If the Library as you received it specifies that a proxy can decide
|
|
162
|
+
whether future versions of the GNU Lesser General Public License shall
|
|
163
|
+
apply, that proxy's public statement of acceptance of any version is
|
|
164
|
+
permanent authorization for you to choose that version for the
|
|
165
|
+
Library.
|
package/README.md
CHANGED
|
@@ -745,7 +745,28 @@ See [CHANGELOG.md](./CHANGELOG.md) for detailed version history and breaking cha
|
|
|
745
745
|
|
|
746
746
|
## License
|
|
747
747
|
|
|
748
|
-
|
|
748
|
+
**GNU Lesser General Public License v3.0 only** (`LGPL-3.0-only`).
|
|
749
|
+
Earlier published versions were MIT and stay MIT — a licence change is not
|
|
750
|
+
retroactive.
|
|
751
|
+
|
|
752
|
+
Copyright © 2025–2026 Oleksii Kyslytsia
|
|
753
|
+
|
|
754
|
+
This library is free software: you can redistribute it and/or modify it under the
|
|
755
|
+
terms of the GNU Lesser General Public License as published by the Free Software
|
|
756
|
+
Foundation, version 3.
|
|
757
|
+
|
|
758
|
+
It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
|
759
|
+
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
|
760
|
+
PURPOSE. See the GNU Lesser General Public License for more details.
|
|
761
|
+
|
|
762
|
+
Both texts ship with the package and both are needed: [`LICENSE`](LICENSE) is the
|
|
763
|
+
LGPL, [`COPYING`](COPYING) is the GPL it is written on top of, since the LGPL is a
|
|
764
|
+
set of additional permissions over the GPL and cannot be read alone.
|
|
765
|
+
|
|
766
|
+
**What this means if you depend on this package.** Linking it into your own
|
|
767
|
+
program — importing it, as every consumer of an npm package does — does not put
|
|
768
|
+
your program under the LGPL. What the licence asks is that changes *to this
|
|
769
|
+
library* stay free, and that your users can replace it with their own build.
|
|
749
770
|
|
|
750
771
|
## Repository
|
|
751
772
|
|
|
@@ -1,32 +1,10 @@
|
|
|
1
|
-
import { type
|
|
1
|
+
import { type IAdtWireResponse, type ICriticalSection, type IRequestProfiling, type ISessionLifecycleAware } from '@mcp-abap-adt/interfaces';
|
|
2
2
|
import type { SapConfig } from '../config/sapConfig.js';
|
|
3
3
|
import type { ILogger } from '../logger.js';
|
|
4
4
|
import { SessionLifecycle } from '../session/SessionLifecycle.js';
|
|
5
5
|
import type { AbapConnection, AbapRequestOptions } from './AbapConnection.js';
|
|
6
6
|
import { type IAdtSessionContext, type IAdtTransport } from './IAdtTransport.js';
|
|
7
|
-
|
|
8
|
-
* Declares the capabilities explicitly rather than satisfying them by accident.
|
|
9
|
-
* `AbapConnection` is the base contract every transport honours; these two are
|
|
10
|
-
* the HTTP session's own, and naming them means a signature that drifts from
|
|
11
|
-
* the published contract fails to compile here instead of at the consumer.
|
|
12
|
-
*
|
|
13
|
-
* **This gives the consumer instruments; it does not decide for it.** `connect()`
|
|
14
|
-
* opens one session and `disconnect()` closes it. How many connections to hold,
|
|
15
|
-
* how long to hold them and when to let go stays with the caller — there are no
|
|
16
|
-
* thresholds here, no pooling and no eviction, because none of that is knowable
|
|
17
|
-
* from inside a single connection. A session this one did not open is not its
|
|
18
|
-
* business: the session limit is per user and the pool is shared, so a SAP GUI
|
|
19
|
-
* logon of the same user sits in the same list.
|
|
20
|
-
*
|
|
21
|
-
* **Nothing the server decides is treated as something to count on.** Whether it
|
|
22
|
-
* issues a session cookie, whether it still holds a session it issued, how many
|
|
23
|
-
* it will tolerate, how fast it answers a logoff — all of that is its own and
|
|
24
|
-
* may differ by system and release. So each is observed and reported, never
|
|
25
|
-
* relied upon: the logoff is best effort under a bound the caller sets, a
|
|
26
|
-
* missing session cookie is a warning rather than a rule, and no code here
|
|
27
|
-
* counts sessions or predicts the next answer from the last one.
|
|
28
|
-
*/
|
|
29
|
-
declare abstract class AbstractAbapConnection implements AbapConnection, ISessionLifecycleAware {
|
|
7
|
+
declare abstract class AbstractAbapConnection implements AbapConnection, ISessionLifecycleAware, ICriticalSection, IRequestProfiling {
|
|
30
8
|
private readonly config;
|
|
31
9
|
/**
|
|
32
10
|
* Required, and constructed by the caller.
|
|
@@ -48,6 +26,22 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
48
26
|
private baseUrl;
|
|
49
27
|
private sessionId;
|
|
50
28
|
private sessionMode;
|
|
29
|
+
/**
|
|
30
|
+
* What this connection asks the server to report about its own processing.
|
|
31
|
+
*
|
|
32
|
+
* Sent on every request as `X-sap-adt-profiling`, which is what Eclipse does
|
|
33
|
+
* — measured from an ADT 3.60.0 trace, where it rides on a stateless source
|
|
34
|
+
* `PUT` as readily as on a lock. `null` stops asking.
|
|
35
|
+
*
|
|
36
|
+
* Settable because it is a request's business, not a session's, and because
|
|
37
|
+
* a caller can already need something other than the default: a profiler run
|
|
38
|
+
* in `@mcp-abap-adt/adt-clients` writes its own value today, by putting the
|
|
39
|
+
* header in the request by hand. Nothing in this package reads the
|
|
40
|
+
* `server-time=…` that comes back — but an investigation does, and this
|
|
41
|
+
* session used it to establish that the unit is microseconds, so the default
|
|
42
|
+
* stays on and the way to turn it off is this property rather than a fork.
|
|
43
|
+
*/
|
|
44
|
+
private profilingRequest;
|
|
51
45
|
/**
|
|
52
46
|
* When true, requests are treated as part of an uninterruptible critical
|
|
53
47
|
* section (e.g. a lock → modify → unlock chain). In this state a short
|
|
@@ -59,6 +53,21 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
59
53
|
* raises the effective timeout to CRITICAL_SECTION_TIMEOUT (a large ceiling)
|
|
60
54
|
* so the request runs to completion instead of being interrupted.
|
|
61
55
|
*/
|
|
56
|
+
/**
|
|
57
|
+
* The last goodbye this connection dispatched, so a caller can wait for it.
|
|
58
|
+
*
|
|
59
|
+
* `disconnect()` sends the logoff without awaiting it, for the reason stated
|
|
60
|
+
* there. That is right for a teardown and wrong for a caller who is about to
|
|
61
|
+
* `connect()` again: the next session opens while the previous one's goodbye
|
|
62
|
+
* is still being assembled, and a caller who recycles in a loop leaves one
|
|
63
|
+
* abandoned session per iteration. Measured against E19 from
|
|
64
|
+
* `@mcp-abap-adt/adt-clients`: a session every 1-2 seconds for a whole test
|
|
65
|
+
* run, none of them released, each surviving to its 30-minute idle timeout.
|
|
66
|
+
*
|
|
67
|
+
* Keeping it costs nothing and is the only thing a caller can hold on to —
|
|
68
|
+
* before this, the promise was created and dropped on the floor.
|
|
69
|
+
*/
|
|
70
|
+
private goodbye;
|
|
62
71
|
private inCriticalSection;
|
|
63
72
|
/** Reference count for nested beginCriticalSection()/endCriticalSection() pairs. */
|
|
64
73
|
private criticalSectionDepth;
|
|
@@ -131,6 +140,14 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
131
140
|
* Get current session mode
|
|
132
141
|
*/
|
|
133
142
|
getSessionMode(): 'stateless' | 'stateful';
|
|
143
|
+
/**
|
|
144
|
+
* What to ask the server to report, or `null` to ask nothing.
|
|
145
|
+
*
|
|
146
|
+
* @param what the `X-sap-adt-profiling` value; `'server-time'` is Eclipse's.
|
|
147
|
+
*/
|
|
148
|
+
setProfilingRequest(what: string | null): void;
|
|
149
|
+
/** What this connection is currently asking for. */
|
|
150
|
+
getProfilingRequest(): string | null;
|
|
134
151
|
/**
|
|
135
152
|
* Enter an uninterruptible critical section.
|
|
136
153
|
*
|
|
@@ -239,6 +256,22 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
239
256
|
* timeout by design.
|
|
240
257
|
*/
|
|
241
258
|
disconnect(): Promise<void>;
|
|
259
|
+
/**
|
|
260
|
+
* Wait for the last dispatched goodbye, bounded.
|
|
261
|
+
*
|
|
262
|
+
* For the caller who ends a session and immediately opens another. Without
|
|
263
|
+
* it the two overlap and the server keeps both; with it the previous session
|
|
264
|
+
* is gone — or known not to be going — before the next one is asked for.
|
|
265
|
+
*
|
|
266
|
+
* Bounded because the goodbye deliberately carries no request timeout: a
|
|
267
|
+
* server that never answers must not hold a teardown open, and it must not
|
|
268
|
+
* hold this open either. On expiry this returns rather than throwing, since
|
|
269
|
+
* "the goodbye has not arrived yet" is not a failure of the caller's next
|
|
270
|
+
* step — and the session it addressed will fall to the idle timeout anyway.
|
|
271
|
+
*
|
|
272
|
+
* Safe to call at any time: with nothing dispatched it returns immediately.
|
|
273
|
+
*/
|
|
274
|
+
flushGoodbye(timeoutMs?: number): Promise<void>;
|
|
242
275
|
isConnected(): boolean;
|
|
243
276
|
/**
|
|
244
277
|
* Fingerprint of the SAP-side session, or null when none is known.
|
|
@@ -394,7 +427,7 @@ declare abstract class AbstractAbapConnection implements AbapConnection, ISessio
|
|
|
394
427
|
protected sessionFingerprint(): Map<string, string>;
|
|
395
428
|
getBaseUrl(): Promise<string>;
|
|
396
429
|
getAuthHeaders(): Promise<Record<string, string>>;
|
|
397
|
-
makeAdtRequest<T = any, D = any>(options: AbapRequestOptions): Promise<
|
|
430
|
+
makeAdtRequest<T = any, D = any>(options: AbapRequestOptions): Promise<IAdtWireResponse<T, D>>;
|
|
398
431
|
private performRequest;
|
|
399
432
|
protected abstract buildAuthorizationHeader(): string;
|
|
400
433
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AbstractAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/AbstractAbapConnection.ts"],"names":[],"mappings":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C,QAAQ,CAAC,wBAAwB,IAAI,MAAM;IAErD;;;;;;;;OAQG;cACa,cAAc,CAC5B,IAAI,EAAE,MAAM,EACZ,UAAU,GAAE,MAAgC,EAC5C,UAAU,GAAE,MAAgC;IAC5C,iFAAiF;IACjF,UAAU,CAAC,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,CAAC;IAqBlB,SAAS,CAAC,YAAY,IAAI,MAAM,GAAG,IAAI;IAIvC;;OAEG;IACH,SAAS,CAAC,YAAY,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI;IAMlD;;OAEG;IACH,SAAS,CAAC,UAAU,IAAI,MAAM,GAAG,IAAI;IAIrC;;;;;;OAMG;IACH,SAAS,CAAC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI;IAMlD;;;;OAIG;IACH,SAAS,CAAC,oBAAoB,IAAI,OAAO,YAAY,EAAE,YAAY;IAInE;;;;;;;;OAQG;YACW,eAAe;IAW7B;;;;;;;;OAQG;IACH,OAAO,CAAC,iBAAiB;IAiBzB,OAAO,CAAC,eAAe;CA6BxB;AAED,OAAO,EAAE,sBAAsB,EAAE,CAAC"}
|
|
@@ -4,6 +4,7 @@ exports.AbstractAbapConnection = void 0;
|
|
|
4
4
|
const node_crypto_1 = require("node:crypto");
|
|
5
5
|
const interfaces_1 = require("@mcp-abap-adt/interfaces");
|
|
6
6
|
const SessionLifecycle_js_1 = require("../session/SessionLifecycle.js");
|
|
7
|
+
const networkErrors_js_1 = require("../utils/networkErrors.js");
|
|
7
8
|
const timeouts_js_1 = require("../utils/timeouts.js");
|
|
8
9
|
const csrfConfig_js_1 = require("./csrfConfig.js");
|
|
9
10
|
const IAdtTransport_js_1 = require("./IAdtTransport.js");
|
|
@@ -29,6 +30,18 @@ const IAdtTransport_js_1 = require("./IAdtTransport.js");
|
|
|
29
30
|
* missing session cookie is a warning rather than a rule, and no code here
|
|
30
31
|
* counts sessions or predicts the next answer from the last one.
|
|
31
32
|
*/
|
|
33
|
+
/**
|
|
34
|
+
* Whether a header is already set, whatever case the caller spelled it in.
|
|
35
|
+
*
|
|
36
|
+
* HTTP header names are case-insensitive and these arrive from two directions —
|
|
37
|
+
* this file writes `X-sap-adt-profiling`, a caller may write
|
|
38
|
+
* `x-sap-adt-profiling` — so a plain key lookup would answer "absent" for a
|
|
39
|
+
* header that is present and write it twice.
|
|
40
|
+
*/
|
|
41
|
+
function hasHeader(headers, name) {
|
|
42
|
+
const wanted = name.toLowerCase();
|
|
43
|
+
return Object.keys(headers).some((key) => key.toLowerCase() === wanted);
|
|
44
|
+
}
|
|
32
45
|
class AbstractAbapConnection {
|
|
33
46
|
config;
|
|
34
47
|
transport;
|
|
@@ -42,6 +55,22 @@ class AbstractAbapConnection {
|
|
|
42
55
|
baseUrl;
|
|
43
56
|
sessionId = null;
|
|
44
57
|
sessionMode = 'stateless';
|
|
58
|
+
/**
|
|
59
|
+
* What this connection asks the server to report about its own processing.
|
|
60
|
+
*
|
|
61
|
+
* Sent on every request as `X-sap-adt-profiling`, which is what Eclipse does
|
|
62
|
+
* — measured from an ADT 3.60.0 trace, where it rides on a stateless source
|
|
63
|
+
* `PUT` as readily as on a lock. `null` stops asking.
|
|
64
|
+
*
|
|
65
|
+
* Settable because it is a request's business, not a session's, and because
|
|
66
|
+
* a caller can already need something other than the default: a profiler run
|
|
67
|
+
* in `@mcp-abap-adt/adt-clients` writes its own value today, by putting the
|
|
68
|
+
* header in the request by hand. Nothing in this package reads the
|
|
69
|
+
* `server-time=…` that comes back — but an investigation does, and this
|
|
70
|
+
* session used it to establish that the unit is microseconds, so the default
|
|
71
|
+
* stays on and the way to turn it off is this property rather than a fork.
|
|
72
|
+
*/
|
|
73
|
+
profilingRequest = 'server-time';
|
|
45
74
|
/**
|
|
46
75
|
* When true, requests are treated as part of an uninterruptible critical
|
|
47
76
|
* section (e.g. a lock → modify → unlock chain). In this state a short
|
|
@@ -53,6 +82,21 @@ class AbstractAbapConnection {
|
|
|
53
82
|
* raises the effective timeout to CRITICAL_SECTION_TIMEOUT (a large ceiling)
|
|
54
83
|
* so the request runs to completion instead of being interrupted.
|
|
55
84
|
*/
|
|
85
|
+
/**
|
|
86
|
+
* The last goodbye this connection dispatched, so a caller can wait for it.
|
|
87
|
+
*
|
|
88
|
+
* `disconnect()` sends the logoff without awaiting it, for the reason stated
|
|
89
|
+
* there. That is right for a teardown and wrong for a caller who is about to
|
|
90
|
+
* `connect()` again: the next session opens while the previous one's goodbye
|
|
91
|
+
* is still being assembled, and a caller who recycles in a loop leaves one
|
|
92
|
+
* abandoned session per iteration. Measured against E19 from
|
|
93
|
+
* `@mcp-abap-adt/adt-clients`: a session every 1-2 seconds for a whole test
|
|
94
|
+
* run, none of them released, each surviving to its 30-minute idle timeout.
|
|
95
|
+
*
|
|
96
|
+
* Keeping it costs nothing and is the only thing a caller can hold on to —
|
|
97
|
+
* before this, the promise was created and dropped on the floor.
|
|
98
|
+
*/
|
|
99
|
+
goodbye = Promise.resolve();
|
|
56
100
|
inCriticalSection = false;
|
|
57
101
|
/** Reference count for nested beginCriticalSection()/endCriticalSection() pairs. */
|
|
58
102
|
criticalSectionDepth = 0;
|
|
@@ -147,6 +191,18 @@ class AbstractAbapConnection {
|
|
|
147
191
|
getSessionMode() {
|
|
148
192
|
return this.sessionMode;
|
|
149
193
|
}
|
|
194
|
+
/**
|
|
195
|
+
* What to ask the server to report, or `null` to ask nothing.
|
|
196
|
+
*
|
|
197
|
+
* @param what the `X-sap-adt-profiling` value; `'server-time'` is Eclipse's.
|
|
198
|
+
*/
|
|
199
|
+
setProfilingRequest(what) {
|
|
200
|
+
this.profilingRequest = what;
|
|
201
|
+
}
|
|
202
|
+
/** What this connection is currently asking for. */
|
|
203
|
+
getProfilingRequest() {
|
|
204
|
+
return this.profilingRequest;
|
|
205
|
+
}
|
|
150
206
|
/**
|
|
151
207
|
* Enter an uninterruptible critical section.
|
|
152
208
|
*
|
|
@@ -310,11 +366,47 @@ class AbstractAbapConnection {
|
|
|
310
366
|
// The context is taken now, while the session is still true: the clear
|
|
311
367
|
// below runs while the close is suspended on its first await.
|
|
312
368
|
const context = this.sessionContext();
|
|
313
|
-
|
|
369
|
+
// Kept, not dropped: `flushGoodbye()` is how a caller who is about to
|
|
370
|
+
// reconnect waits for it. Rejections are absorbed here so that holding
|
|
371
|
+
// the promise never turns a failed goodbye into an unhandled rejection —
|
|
372
|
+
// the transport already logs what went wrong.
|
|
373
|
+
this.goodbye = Promise.resolve(this.transport.close(context)).then(() => undefined, () => undefined);
|
|
314
374
|
this.clearSessionState();
|
|
315
375
|
this.lifecycle.markDisconnected();
|
|
316
376
|
});
|
|
317
377
|
}
|
|
378
|
+
/**
|
|
379
|
+
* Wait for the last dispatched goodbye, bounded.
|
|
380
|
+
*
|
|
381
|
+
* For the caller who ends a session and immediately opens another. Without
|
|
382
|
+
* it the two overlap and the server keeps both; with it the previous session
|
|
383
|
+
* is gone — or known not to be going — before the next one is asked for.
|
|
384
|
+
*
|
|
385
|
+
* Bounded because the goodbye deliberately carries no request timeout: a
|
|
386
|
+
* server that never answers must not hold a teardown open, and it must not
|
|
387
|
+
* hold this open either. On expiry this returns rather than throwing, since
|
|
388
|
+
* "the goodbye has not arrived yet" is not a failure of the caller's next
|
|
389
|
+
* step — and the session it addressed will fall to the idle timeout anyway.
|
|
390
|
+
*
|
|
391
|
+
* Safe to call at any time: with nothing dispatched it returns immediately.
|
|
392
|
+
*/
|
|
393
|
+
async flushGoodbye(timeoutMs = 5000) {
|
|
394
|
+
let timer;
|
|
395
|
+
try {
|
|
396
|
+
await Promise.race([
|
|
397
|
+
this.goodbye,
|
|
398
|
+
new Promise((resolve) => {
|
|
399
|
+
timer = setTimeout(resolve, timeoutMs);
|
|
400
|
+
// Never hold the process open for a goodbye nobody is waiting on.
|
|
401
|
+
timer.unref?.();
|
|
402
|
+
}),
|
|
403
|
+
]);
|
|
404
|
+
}
|
|
405
|
+
finally {
|
|
406
|
+
if (timer)
|
|
407
|
+
clearTimeout(timer);
|
|
408
|
+
}
|
|
409
|
+
}
|
|
318
410
|
isConnected() {
|
|
319
411
|
return this.lifecycle.connected;
|
|
320
412
|
}
|
|
@@ -747,11 +839,33 @@ class AbstractAbapConnection {
|
|
|
747
839
|
if (this.sessionId) {
|
|
748
840
|
requestHeaders['sap-adt-connection-id'] = this.sessionId;
|
|
749
841
|
}
|
|
750
|
-
//
|
|
842
|
+
// A request id identifies the **request**, so every request gets a fresh
|
|
843
|
+
// one. It used to be written only in the stateful branch, which was
|
|
844
|
+
// invisible while every write happened inside a lock window — the window
|
|
845
|
+
// was stateful, so the writes carried it. `@mcp-abap-adt/adt-clients` has
|
|
846
|
+
// since narrowed stateful to the `LOCK` and the `UNLOCK`, and the writes
|
|
847
|
+
// silently lost the header as a side effect. Eclipse sends it on
|
|
848
|
+
// everything: measured on ADT 3.60.0, a stateless source `PUT` carries
|
|
849
|
+
// `sap-adt-request-id` and `X-sap-adt-profiling` and no session type at all.
|
|
850
|
+
//
|
|
851
|
+
// **A default, not an override.** The caller's headers were copied in
|
|
852
|
+
// above, and a caller who names either of these means it: `adt-clients`
|
|
853
|
+
// passes its own id to `getDiscovery({ requestId })` so the id it logs is
|
|
854
|
+
// the id on the wire, and a profiler run asks for something other than
|
|
855
|
+
// `server-time`. Replacing those would break the correlation the caller
|
|
856
|
+
// asked for, silently. The name is matched without case because HTTP does
|
|
857
|
+
// not distinguish it and callers spell it both ways.
|
|
858
|
+
if (!hasHeader(requestHeaders, 'sap-adt-request-id')) {
|
|
859
|
+
requestHeaders['sap-adt-request-id'] = (0, node_crypto_1.randomUUID)().replace(/-/g, '');
|
|
860
|
+
}
|
|
861
|
+
if (this.profilingRequest !== null &&
|
|
862
|
+
!hasHeader(requestHeaders, 'x-sap-adt-profiling')) {
|
|
863
|
+
requestHeaders['X-sap-adt-profiling'] = this.profilingRequest;
|
|
864
|
+
}
|
|
865
|
+
// And this one really is the session's: it says how the server should treat
|
|
866
|
+
// the request, which is the only one of the three that varies with the mode.
|
|
751
867
|
if (this.sessionMode === 'stateful') {
|
|
752
868
|
requestHeaders['x-sap-adt-sessiontype'] = 'stateful';
|
|
753
|
-
requestHeaders['sap-adt-request-id'] = (0, node_crypto_1.randomUUID)().replace(/-/g, '');
|
|
754
|
-
requestHeaders['X-sap-adt-profiling'] = 'server-time';
|
|
755
869
|
}
|
|
756
870
|
// Add auth headers (these MUST NOT be overridden)
|
|
757
871
|
Object.assign(requestHeaders, await this.getAuthHeaders());
|
|
@@ -865,7 +979,7 @@ class AbstractAbapConnection {
|
|
|
865
979
|
}
|
|
866
980
|
// Check if this is a network error (connection refused, timeout, DNS, etc.)
|
|
867
981
|
// Don't retry for network errors - these indicate infrastructure/VPN issues
|
|
868
|
-
const networkError = (0,
|
|
982
|
+
const networkError = (0, networkErrors_js_1.isNetworkError)(error);
|
|
869
983
|
if (networkError) {
|
|
870
984
|
this.logger?.error(`Network error - cannot connect to SAP system: ${errorDetails.message}`, errorDetails);
|
|
871
985
|
throw error;
|
|
@@ -22,6 +22,25 @@ export declare class CloudHttpTransport extends HttpTransport implements ICloudT
|
|
|
22
22
|
readonly kind = "cloud-http";
|
|
23
23
|
/** Which system this wire is for. Read by the compiler, never at runtime. */
|
|
24
24
|
readonly system: "cloud";
|
|
25
|
+
/**
|
|
26
|
+
* `x-sap-security-session: use` — on every request, once there is a session.
|
|
27
|
+
*
|
|
28
|
+
* ABAP Cloud issues its session as a resource asked for at
|
|
29
|
+
* `/sap/bc/adt/core/http/sessions`, and Eclipse then names it on everything
|
|
30
|
+
* that follows rather than relying on the cookie alone. Measured from ADT
|
|
31
|
+
* 3.60.3 against a BTP trial: a plain
|
|
32
|
+
* `GET …/businessservices/odatav4/ZAC_SRVB01` carries it, and so does
|
|
33
|
+
* `POST …/unpublishjobs` — a read and a write, both stateless, both saying
|
|
34
|
+
* `use`.
|
|
35
|
+
*
|
|
36
|
+
* Only when a session exists: saying `use` with nothing to use is a claim
|
|
37
|
+
* about state this wire is not in, and `create` is the request that makes one.
|
|
38
|
+
*
|
|
39
|
+
* On-prem is left alone deliberately. Its session arrives with the logon and
|
|
40
|
+
* there is no trace of Eclipse sending this there, so adding it would be a
|
|
41
|
+
* guess wearing a measurement's clothes.
|
|
42
|
+
*/
|
|
43
|
+
protected sessionHeaders(): Record<string, string>;
|
|
25
44
|
/** The address this server published for our session — the only close target. */
|
|
26
45
|
private resource;
|
|
27
46
|
open(context: IAdtSessionContext): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CloudHttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/CloudHttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa9E,qBAAa,kBACX,SAAQ,aACR,YAAW,eAAe;IAE1B,SAAkB,IAAI,gBAAgB;IAEtC,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAG,OAAO,CAAU;IAEnC,iFAAiF;IACjF,OAAO,CAAC,QAAQ,CAAuB;IAExB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDhD,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4ChE;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAW5B"}
|
|
1
|
+
{"version":3,"file":"CloudHttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/CloudHttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAa9E,qBAAa,kBACX,SAAQ,aACR,YAAW,eAAe;IAE1B,SAAkB,IAAI,gBAAgB;IAEtC,6EAA6E;IAC7E,QAAQ,CAAC,MAAM,EAAG,OAAO,CAAU;IAEnC;;;;;;;;;;;;;;;;;OAiBG;cACgB,cAAc,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;IAI3D,iFAAiF;IACjF,OAAO,CAAC,QAAQ,CAAuB;IAExB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAqDhD,KAAK,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IA4ChE;;;;;OAKG;IACH,OAAO,CAAC,mBAAmB;CAW5B"}
|
|
@@ -32,6 +32,27 @@ class CloudHttpTransport extends HttpTransport_js_1.HttpTransport {
|
|
|
32
32
|
kind = 'cloud-http';
|
|
33
33
|
/** Which system this wire is for. Read by the compiler, never at runtime. */
|
|
34
34
|
system = 'cloud';
|
|
35
|
+
/**
|
|
36
|
+
* `x-sap-security-session: use` — on every request, once there is a session.
|
|
37
|
+
*
|
|
38
|
+
* ABAP Cloud issues its session as a resource asked for at
|
|
39
|
+
* `/sap/bc/adt/core/http/sessions`, and Eclipse then names it on everything
|
|
40
|
+
* that follows rather than relying on the cookie alone. Measured from ADT
|
|
41
|
+
* 3.60.3 against a BTP trial: a plain
|
|
42
|
+
* `GET …/businessservices/odatav4/ZAC_SRVB01` carries it, and so does
|
|
43
|
+
* `POST …/unpublishjobs` — a read and a write, both stateless, both saying
|
|
44
|
+
* `use`.
|
|
45
|
+
*
|
|
46
|
+
* Only when a session exists: saying `use` with nothing to use is a claim
|
|
47
|
+
* about state this wire is not in, and `create` is the request that makes one.
|
|
48
|
+
*
|
|
49
|
+
* On-prem is left alone deliberately. Its session arrives with the logon and
|
|
50
|
+
* there is no trace of Eclipse sending this there, so adding it would be a
|
|
51
|
+
* guess wearing a measurement's clothes.
|
|
52
|
+
*/
|
|
53
|
+
sessionHeaders() {
|
|
54
|
+
return this.sessionEstablished() ? { 'x-sap-security-session': 'use' } : {};
|
|
55
|
+
}
|
|
35
56
|
/** The address this server published for our session — the only close target. */
|
|
36
57
|
resource = null;
|
|
37
58
|
async open(context) {
|
|
@@ -100,6 +100,15 @@ export declare class HttpTransport implements IAdtTransport {
|
|
|
100
100
|
* server is going down, send us elsewhere rather than fail.
|
|
101
101
|
*/
|
|
102
102
|
affinityHeaders(): Record<string, string>;
|
|
103
|
+
/**
|
|
104
|
+
* What this wire says about the session it is already in, on every request.
|
|
105
|
+
*
|
|
106
|
+
* Empty here, because it is not the same on every wire: a cloud session is a
|
|
107
|
+
* resource that has to be named, an on-prem one arrives with the logon, and
|
|
108
|
+
* an RFC conversation has no such notion at all. A wire that has something to
|
|
109
|
+
* say overrides this.
|
|
110
|
+
*/
|
|
111
|
+
protected sessionHeaders(): Record<string, string>;
|
|
103
112
|
/**
|
|
104
113
|
* Earn a CSRF token, and with it the cookies that name the session.
|
|
105
114
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/HttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAS,KAAK,YAAY,EAAE,MAAM,YAAY,CAAC;AAEtD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAG5C,OAAO,KAAK,EACV,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,oBAAoB,CAAC;AAS5B,qBAAa,aAAc,YAAW,aAAa;IA6B/C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IACzC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO;IApC1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;IAE/B,OAAO,CAAC,QAAQ,CAA8B;IAE9C;;;;;;;O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