@mcp-abap-adt/connection 16.0.0 → 17.1.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.
Files changed (41) hide show
  1. package/CHANGELOG.md +63 -1
  2. package/README.md +74 -18
  3. package/dist/connection/AbstractAbapConnection.d.ts +67 -19
  4. package/dist/connection/AbstractAbapConnection.d.ts.map +1 -1
  5. package/dist/connection/AbstractAbapConnection.js +141 -32
  6. package/dist/connection/AdtCloudConnector.d.ts +6 -1
  7. package/dist/connection/AdtCloudConnector.d.ts.map +1 -1
  8. package/dist/connection/AdtCloudConnector.js +7 -2
  9. package/dist/connection/AdtOnPremConnector.d.ts +6 -1
  10. package/dist/connection/AdtOnPremConnector.d.ts.map +1 -1
  11. package/dist/connection/AdtOnPremConnector.js +7 -2
  12. package/dist/connection/CloudHttpTransport.d.ts.map +1 -1
  13. package/dist/connection/CloudHttpTransport.js +2 -3
  14. package/dist/connection/CredentialAbapConnection.d.ts +3 -1
  15. package/dist/connection/CredentialAbapConnection.d.ts.map +1 -1
  16. package/dist/connection/CredentialAbapConnection.js +4 -2
  17. package/dist/connection/GenericWebSocketTransport.d.ts.map +1 -1
  18. package/dist/connection/GenericWebSocketTransport.js +7 -4
  19. package/dist/connection/HttpTransport.d.ts +19 -0
  20. package/dist/connection/HttpTransport.d.ts.map +1 -1
  21. package/dist/connection/HttpTransport.js +115 -5
  22. package/dist/connection/IAdtTransport.d.ts +34 -3
  23. package/dist/connection/IAdtTransport.d.ts.map +1 -1
  24. package/dist/connection/RfcTransport.d.ts +7 -0
  25. package/dist/connection/RfcTransport.d.ts.map +1 -1
  26. package/dist/connection/RfcTransport.js +14 -3
  27. package/dist/connection/createConnection.d.ts +18 -0
  28. package/dist/connection/createConnection.d.ts.map +1 -1
  29. package/dist/connection/createConnection.js +8 -3
  30. package/dist/index.d.ts +0 -1
  31. package/dist/index.d.ts.map +1 -1
  32. package/dist/index.js +1 -5
  33. package/docs/INDEX.md +2 -0
  34. package/docs/MIGRATION-17.0.md +119 -0
  35. package/docs/SCOPE.md +7 -2
  36. package/docs/STATEFUL_SESSION_GUIDE.md +12 -11
  37. package/docs/USAGE.md +119 -36
  38. package/package.json +1 -1
  39. package/dist/utils/timeouts.d.ts +0 -18
  40. package/dist/utils/timeouts.d.ts.map +0 -1
  41. package/dist/utils/timeouts.js +0 -37
@@ -5,7 +5,6 @@ const node_crypto_1 = require("node:crypto");
5
5
  const interfaces_adt_connection_1 = require("@mcp-abap-adt/interfaces-adt-connection");
6
6
  const SessionLifecycle_js_1 = require("../session/SessionLifecycle.js");
7
7
  const networkErrors_js_1 = require("../utils/networkErrors.js");
8
- const timeouts_js_1 = require("../utils/timeouts.js");
9
8
  const authErrors_js_1 = require("./authErrors.js");
10
9
  const csrfConfig_js_1 = require("./csrfConfig.js");
11
10
  const IAdtTransport_js_1 = require("./IAdtTransport.js");
@@ -83,14 +82,11 @@ class AbstractAbapConnection {
83
82
  profilingRequest = 'server-time';
84
83
  /**
85
84
  * When true, requests are treated as part of an uninterruptible critical
86
- * section (e.g. a lock → modify → unlock chain). In this state a short
87
- * per-request timeout must NOT abort the request mid-flight: the abort ends
88
- * nothing server-side — only the server ends an ABAP session, on an idle
89
- * timeout this side cannot see — it ends what this side KNOWS. Whether the
90
- * change was applied becomes unknowable, and the handle `unlock` needs is
91
- * lost while the lock lives on in that session. While set, makeAdtRequest
92
- * raises the effective timeout to CRITICAL_SECTION_TIMEOUT (a large ceiling)
93
- * so the request runs to completion instead of being interrupted.
85
+ * section (e.g. a lock → modify → unlock chain). In this state a request
86
+ * carries no deadline at all, not even the caller's: a client deadline closes
87
+ * the socket, SAP then ends the request running on it — a write in it lost —
88
+ * and what this side knew goes with it: whether the change was applied, and
89
+ * the handle `unlock` needs, while the lock lives on in that session.
94
90
  */
95
91
  /**
96
92
  * The last goodbye this connection dispatched, so a caller can wait for it.
@@ -128,6 +124,12 @@ class AbstractAbapConnection {
128
124
  * `disconnect()` waits for (the writes) and `flushGoodbye()` (the answers).
129
125
  */
130
126
  ended = null;
127
+ /**
128
+ * The existing session this instance takes over at `connect()`, instead of
129
+ * logging on: its cookies, as `sessionCookies()` handed them out. Dropped
130
+ * once the takeover is attempted — a session is taken over once.
131
+ */
132
+ resumeFrom;
131
133
  inCriticalSection = false;
132
134
  /** Reference count for nested beginCriticalSection()/endCriticalSection() pairs. */
133
135
  criticalSectionDepth = 0;
@@ -185,10 +187,22 @@ class AbstractAbapConnection {
185
187
  * arrives built. The credential's TLS material is not among them: the
186
188
  * provider offers it to the wire at logon.
187
189
  */
188
- transport, logger, sessionId) {
190
+ transport, logger, sessionId,
191
+ /**
192
+ * An existing session to take over instead of logging on: the cookies
193
+ * `sessionCookies()` handed out for it. `connect()` then sends no logon
194
+ * and asks SAP, without the credential, whether that session is alive.
195
+ */
196
+ session) {
189
197
  this.config = config;
190
198
  this.transport = transport;
191
199
  this.logger = logger;
200
+ // Fixed words: the session's cookies are never echoed.
201
+ if (session !== undefined &&
202
+ (typeof session !== 'string' || session.trim() === '')) {
203
+ throw new TypeError('session: the cookies of an existing session, as sessionCookies() returned them; an empty one names no session.');
204
+ }
205
+ this.resumeFrom = session ?? null;
192
206
  // Generate sessionId (used for sap-adt-connection-id header)
193
207
  this.sessionId = sessionId || (0, node_crypto_1.randomUUID)();
194
208
  // Initialize baseUrl from config (required, will throw if invalid)
@@ -242,14 +256,13 @@ class AbstractAbapConnection {
242
256
  * Enter an uninterruptible critical section.
243
257
  *
244
258
  * Call this BEFORE acquiring a lock (and pair it with endCriticalSection()
245
- * in a finally, AFTER unlocking). While in a critical section, a short
246
- * per-request timeout is not applied — makeAdtRequest uses a large ceiling
247
- * (CRITICAL_SECTION_TIMEOUT, env SAP_TIMEOUT_CRITICAL) instead — so a slow
248
- * PUT/activate/unlock is not aborted mid-flight. An abort does not end the
249
- * ABAP session — that session is the server's, and only the server ends it,
250
- * on an idle timeout this side cannot influence — it strands the caller:
251
- * the outcome is unknown and the handle `unlock` needs is gone, while the
252
- * lock survives inside the ABAP session that owns it.
259
+ * in a finally, AFTER unlocking). While in a critical section a request
260
+ * carries no deadline — the caller's `timeout` is not applied — so a slow
261
+ * PUT/activate/unlock is not cut mid-flight. A client deadline closes the
262
+ * socket, and SAP then ends the request that was running on it (a write in
263
+ * it lost); and it strands the caller: the outcome is unknown and the handle
264
+ * `unlock` needs is gone, while the lock survives inside the ABAP session
265
+ * that owns it.
253
266
  *
254
267
  * Nesting is reference-counted so nested begin/end pairs are safe.
255
268
  */
@@ -260,8 +273,8 @@ class AbstractAbapConnection {
260
273
  }
261
274
  /**
262
275
  * Leave the uninterruptible critical section. See beginCriticalSection().
263
- * Safe to call more times than begin (clamped at 0). Normal per-request
264
- * timeouts resume once the outermost section ends.
276
+ * Safe to call more times than begin (clamped at 0). The caller's own
277
+ * per-request timeouts apply again once the outermost section ends.
265
278
  */
266
279
  endCriticalSection() {
267
280
  if (this.criticalSectionDepth > 0) {
@@ -338,6 +351,12 @@ class AbstractAbapConnection {
338
351
  // Before the wire opens, so that a credential which cannot get ready
339
352
  // sends nothing and the wire's logon has something to bring.
340
353
  await this.prepareCredential();
354
+ // An instance built on an existing session takes it over: no logon,
355
+ // and SAP's answer to one request says whether the session is alive.
356
+ if (this.resumeFrom !== null) {
357
+ await this.resumeAndCommit(baselineEpoch);
358
+ return;
359
+ }
341
360
  // The wire logs on inside, through the context, and then the session is
342
361
  // established: one step, which a refused logon repeats once.
343
362
  try {
@@ -408,6 +427,12 @@ class AbstractAbapConnection {
408
427
  * `connect()` rejects, so a caller's `disconnect()` in its `finally` is the
409
428
  * first of that life and has nothing of it to wait for.
410
429
  *
430
+ * **On an instance built on an existing session, without `connect()`**, this
431
+ * logs that session off: the handed cookies go to the wire, and the logoff
432
+ * is sent with them as for any instance — no request before it, no
433
+ * credential, the provider's `prepare()` never called. A string naming no
434
+ * `SAP_SESSIONID` sends nothing. The instance is spent either way.
435
+ *
411
436
  * **Requests already in flight are not waited for, and the logoff ends the
412
437
  * session they are running on** — so they will start failing against a
413
438
  * session that no longer exists. That is the caller having asked to
@@ -448,6 +473,18 @@ class AbstractAbapConnection {
448
473
  // The context is taken now, while the session is still true: the clear
449
474
  // below runs while the close is suspended on its first await.
450
475
  const context = this.sessionContext();
476
+ // An instance built on an existing session whose `connect()` never took
477
+ // it over: the session is still the caller's handed string, held by
478
+ // nothing. The wire is given its cookies — no request, no credential,
479
+ // nothing asked of the provider — so the logoff below ends it as for any
480
+ // instance: sent only when they name a live `SAP_SESSIONID`, without
481
+ // `sap-contextid`. A caller ending a leftover session of a process that
482
+ // is gone wants neither a probe nor a logon for it.
483
+ if (this.resumeFrom !== null) {
484
+ const session = this.resumeFrom;
485
+ this.resumeFrom = null;
486
+ this.seedHandedSession(session);
487
+ }
451
488
  // Kept, not dropped: `flushGoodbye()` is how a caller who is about to
452
489
  // open a new connection waits for it. Rejections are absorbed here so that holding
453
490
  // the promise never turns a failed goodbye into an unhandled rejection —
@@ -465,6 +502,29 @@ class AbstractAbapConnection {
465
502
  // by the write.
466
503
  await written;
467
504
  }
505
+ /**
506
+ * Puts the cookies of a handed session into the wire, as `resume()` seeds
507
+ * its jar, and sends nothing: what the wire held goes first, and the
508
+ * session's cookies arrive as a `Set-Cookie` the wire folds in through its
509
+ * own `ingest()`. A wire whose session no cookie names (RFC) keeps nothing
510
+ * of it, and its close then has nothing to end. Never throws — it is
511
+ * reached from `disconnect()`: a custom wire that throws here is logged in
512
+ * fixed words (the cookies are never echoed) and its close decides alone.
513
+ */
514
+ seedHandedSession(session) {
515
+ try {
516
+ this.transport.forgetSession();
517
+ this.transport.ingest({
518
+ 'set-cookie': session
519
+ .split(';')
520
+ .map((entry) => entry.trim())
521
+ .filter((entry) => entry !== ''),
522
+ });
523
+ }
524
+ catch {
525
+ this.logger?.debug('Could not hand the session to the wire for its logoff');
526
+ }
527
+ }
468
528
  /**
469
529
  * Wait for SAP's answer to the last dispatched goodbye.
470
530
  *
@@ -788,6 +848,47 @@ class AbstractAbapConnection {
788
848
  }
789
849
  this.lifecycle.markConnected(this.sessionFingerprint());
790
850
  }
851
+ /**
852
+ * Takes over the session `resumeFrom` names, and publishes it — the
853
+ * counterpart of `establishAndCommit` for an instance built on an existing
854
+ * session.
855
+ *
856
+ * No logon: the wire makes one request in that session without the
857
+ * credential (`IAdtTransport.resume`). Alive, the session is this
858
+ * instance's — its `SAP_SESSIONID`, and its `sap-contextid` when the caller
859
+ * kept one — and `disconnect()` logs it off as for any instance. Gone, or
860
+ * any answer that is not the session's: `connect()` rejects with SAP's
861
+ * answer as it is, nothing is logged off — nothing was opened — and the
862
+ * instance is spent.
863
+ */
864
+ async resumeAndCommit(baselineEpoch) {
865
+ if (this.spent)
866
+ throw spentError();
867
+ if (this.lifecycle.teardownEpoch !== baselineEpoch) {
868
+ throw (0, SessionLifecycle_js_1.sessionError)(interfaces_adt_connection_1.ADT_SESSION_ERROR.NOT_CONNECTED, 'Establishment abandoned: a teardown was requested for this connection');
869
+ }
870
+ const session = this.resumeFrom;
871
+ this.resumeFrom = null;
872
+ this.lifecycle.forgetIdentity();
873
+ try {
874
+ await this.transport.resume(this.sessionContext(), session);
875
+ }
876
+ catch (error) {
877
+ // Nothing was opened, so nothing is logged off: the session was the
878
+ // caller's, and whatever it is now, it stays theirs. What the wire was
879
+ // seeded with goes, and the instance is spent.
880
+ this.spent = true;
881
+ this.invalidateSession();
882
+ this.lifecycle.markDisconnected();
883
+ throw error;
884
+ }
885
+ if (this.lifecycle.teardownEpoch !== baselineEpoch) {
886
+ // As in `establishAndCommit`: the queued teardown clears, and — the
887
+ // session now being this instance's — logs it off.
888
+ throw (0, SessionLifecycle_js_1.sessionError)(interfaces_adt_connection_1.ADT_SESSION_ERROR.NOT_CONNECTED, 'Establishment abandoned: a teardown was requested while it was in flight');
889
+ }
890
+ this.lifecycle.markConnected(this.sessionFingerprint());
891
+ }
791
892
  /** The teardown epoch, for a recovery to capture before it starts. */
792
893
  get teardownEpoch() {
793
894
  return this.lifecycle.teardownEpoch;
@@ -945,6 +1046,18 @@ class AbstractAbapConnection {
945
1046
  sessionFingerprint() {
946
1047
  return this.transport.sessionFingerprint();
947
1048
  }
1049
+ /**
1050
+ * The cookies of this instance's SAP session, for the caller to keep: the
1051
+ * string `createConnection({ …, session })` takes to build a later instance
1052
+ * on the same session. `null` before a session, after it ended, and over
1053
+ * RFC, whose session is a conversation no cookie names.
1054
+ *
1055
+ * It authenticates as the session's user for as long as the session lives:
1056
+ * keep it as a secret. Nothing here logs it.
1057
+ */
1058
+ sessionCookies() {
1059
+ return this.transport.sessionCookies();
1060
+ }
948
1061
  async getBaseUrl() {
949
1062
  return this.baseUrl;
950
1063
  }
@@ -1088,16 +1201,13 @@ class AbstractAbapConnection {
1088
1201
  }
1089
1202
  }
1090
1203
  }
1091
- // Inside an uninterruptible critical section (lock → modify → unlock), a
1092
- // short per-request timeout must not abort the request mid-flight — not
1093
- // because the abort ends the ABAP session (only the server does that), but
1094
- // because it leaves the outcome unknown and the unlock handle lost while
1095
- // the lock stays held in that session. Raise the effective
1096
- // timeout to the large critical-section ceiling for the whole request
1097
- // (also honoured on the retry paths below, which reuse requestConfig).
1098
- const effectiveTimeout = this.inCriticalSection
1099
- ? Math.max(timeout ?? 0, (0, timeouts_js_1.getCriticalSectionTimeout)())
1100
- : timeout;
1204
+ // The only deadline a request carries is the caller's own, and inside an
1205
+ // uninterruptible critical section (lock → modify → unlock) not even that:
1206
+ // a client deadline closes the socket, SAP then ends the request running
1207
+ // on it — a write in it lost — and the outcome is unknown, the unlock
1208
+ // handle lost while the lock stays held in that session. Decided once for
1209
+ // the whole request: the retry paths below reuse requestConfig.
1210
+ const callerTimeout = this.inCriticalSection ? undefined : timeout;
1101
1211
  const requestConfig = {
1102
1212
  method: normalizedMethod,
1103
1213
  url: requestUrl,
@@ -1109,7 +1219,7 @@ class AbstractAbapConnection {
1109
1219
  headers: await this.authorizedFrom(requestHeaders).catch((error) => {
1110
1220
  throw this.staleOr(error, lease);
1111
1221
  }),
1112
- timeout: effectiveTimeout,
1222
+ ...(callerTimeout !== undefined ? { timeout: callerTimeout } : {}),
1113
1223
  // `unknown` on the caller's options, a record on the seam: the two
1114
1224
  // transports serialise a query differently and both need the pairs.
1115
1225
  params: params,
@@ -1516,7 +1626,6 @@ class AbstractAbapConnection {
1516
1626
  : this.leasedContext(fence)),
1517
1627
  retries: retryCount,
1518
1628
  retryDelayMs: retryDelay,
1519
- timeoutMs: (0, timeouts_js_1.getTimeout)('csrf'),
1520
1629
  isFatal: (error) => this.endsTheExchange(error),
1521
1630
  });
1522
1631
  const token = this.transport.csrfToken();
@@ -29,6 +29,11 @@ export declare class AdtCloudConnector<TCredential extends IAuthProvider = IAuth
29
29
  */
30
30
  TTransport extends ICloudTransport = CloudHttpTransport> extends CredentialAbapConnection<TCredential> {
31
31
  readonly transport: TTransport;
32
- constructor(config: SapConfig, credential: TCredential, transport: TTransport, logger?: ILogger | null, sessionId?: string);
32
+ constructor(config: SapConfig, credential: TCredential, transport: TTransport, logger?: ILogger | null, sessionId?: string,
33
+ /**
34
+ * An existing session to take over instead of logging on: the cookies
35
+ * `sessionCookies()` returned for it. HTTP wires only.
36
+ */
37
+ session?: string);
33
38
  }
34
39
  //# sourceMappingURL=AdtCloudConnector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtCloudConnector.d.ts","sourceRoot":"","sources":["../../src/connection/AdtCloudConnector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,iBAAiB,CAC5B,WAAW,SAAS,aAAa,GAAG,aAAa;AACjD;;;;GAIG;AACH,UAAU,SAAS,eAAe,GAAG,kBAAkB,CACvD,SAAQ,wBAAwB,CAAC,WAAW,CAAC;IAC7C,SAAiB,SAAS,EAAE,UAAU,CAAC;gBAGrC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,WAAW,EACvB,SAAS,EAAE,UAAU,EACrB,MAAM,GAAE,OAAO,GAAG,IAAW,EAC7B,SAAS,CAAC,EAAE,MAAM;CAIrB"}
1
+ {"version":3,"file":"AdtCloudConnector.d.ts","sourceRoot":"","sources":["../../src/connection/AdtCloudConnector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAE1D,qBAAa,iBAAiB,CAC5B,WAAW,SAAS,aAAa,GAAG,aAAa;AACjD;;;;GAIG;AACH,UAAU,SAAS,eAAe,GAAG,kBAAkB,CACvD,SAAQ,wBAAwB,CAAC,WAAW,CAAC;IAC7C,SAAiB,SAAS,EAAE,UAAU,CAAC;gBAGrC,MAAM,EAAE,SAAS,EACjB,UAAU,EAAE,WAAW,EACvB,SAAS,EAAE,UAAU,EACrB,MAAM,GAAE,OAAO,GAAG,IAAW,EAC7B,SAAS,CAAC,EAAE,MAAM;IAClB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM;CAInB"}
@@ -20,8 +20,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
20
20
  exports.AdtCloudConnector = void 0;
21
21
  const CredentialAbapConnection_js_1 = require("./CredentialAbapConnection.js");
22
22
  class AdtCloudConnector extends CredentialAbapConnection_js_1.CredentialAbapConnection {
23
- constructor(config, credential, transport, logger = null, sessionId) {
24
- super(config, credential, transport, logger, sessionId);
23
+ constructor(config, credential, transport, logger = null, sessionId,
24
+ /**
25
+ * An existing session to take over instead of logging on: the cookies
26
+ * `sessionCookies()` returned for it. HTTP wires only.
27
+ */
28
+ session) {
29
+ super(config, credential, transport, logger, sessionId, session);
25
30
  }
26
31
  }
27
32
  exports.AdtCloudConnector = AdtCloudConnector;
@@ -38,6 +38,11 @@ TTransport extends IOnPremTransport = OnPremHttpTransport> extends CredentialAba
38
38
  * taking any connection and casting.
39
39
  */
40
40
  readonly transport: TTransport;
41
- constructor(config: SapConfig, credential: TCredential, transport: TTransport, logger?: ILogger | null, sessionId?: string);
41
+ constructor(config: SapConfig, credential: TCredential, transport: TTransport, logger?: ILogger | null, sessionId?: string,
42
+ /**
43
+ * An existing session to take over instead of logging on: the cookies
44
+ * `sessionCookies()` returned for it. HTTP wires only.
45
+ */
46
+ session?: string);
42
47
  }
43
48
  //# sourceMappingURL=AdtOnPremConnector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AdtOnPremConnector.d.ts","sourceRoot":"","sources":["../../src/connection/AdtOnPremConnector.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAA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AE,MAAM;CAInB"}
@@ -21,8 +21,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
21
21
  exports.AdtOnPremConnector = void 0;
22
22
  const CredentialAbapConnection_js_1 = require("./CredentialAbapConnection.js");
23
23
  class AdtOnPremConnector extends CredentialAbapConnection_js_1.CredentialAbapConnection {
24
- constructor(config, credential, transport, logger = null, sessionId) {
25
- super(config, credential, transport, logger, sessionId);
24
+ constructor(config, credential, transport, logger = null, sessionId,
25
+ /**
26
+ * An existing session to take over instead of logging on: the cookies
27
+ * `sessionCookies()` returned for it. HTTP wires only.
28
+ */
29
+ session) {
30
+ super(config, credential, transport, logger, sessionId, session);
26
31
  }
27
32
  }
28
33
  exports.AdtOnPremConnector = AdtOnPremConnector;
@@ -1 +1 @@
1
- {"version":3,"file":"CloudHttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/CloudHttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAKH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgB9E,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,iGAAiG;IACjG,OAAO,CAAC,MAAM,CAAuB;IAEtB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiEhD,KAAK,CAClB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,OAAO,CAAC,IAAI,CAAC;IA8ChB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAenB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAWjB"}
1
+ {"version":3,"file":"CloudHttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/CloudHttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAIH,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,KAAK,EAAE,kBAAkB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAgB9E,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,iGAAiG;IACjG,OAAO,CAAC,MAAM,CAAuB;IAEtB,IAAI,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,IAAI,CAAC;IAiEhD,KAAK,CAClB,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,MAAM,IAAI,GACnB,OAAO,CAAC,IAAI,CAAC;IA8ChB;;;;OAIG;IACH,OAAO,CAAC,WAAW;IAenB;;;;;OAKG;IACH,OAAO,CAAC,QAAQ;CAWjB"}
@@ -34,7 +34,6 @@
34
34
  Object.defineProperty(exports, "__esModule", { value: true });
35
35
  exports.CloudHttpTransport = void 0;
36
36
  const cookies_js_1 = require("../utils/cookies.js");
37
- const timeouts_js_1 = require("../utils/timeouts.js");
38
37
  const authErrors_js_1 = require("./authErrors.js");
39
38
  const HttpTransport_js_1 = require("./HttpTransport.js");
40
39
  const SESSIONS_PATH = '/sap/bc/adt/core/http/sessions';
@@ -87,8 +86,8 @@ class CloudHttpTransport extends HttpTransport_js_1.HttpTransport {
87
86
  // from anything's cache — a cached session document would hand back an
88
87
  // address that belongs to a session somebody else already ended.
89
88
  url: `${context.baseUrl}${SESSIONS_PATH}?_=${Date.now()}`,
90
- // Bounded: connect() waits for this one.
91
- timeout: (0, timeouts_js_1.getTimeout)('csrf'),
89
+ // No deadline: a client deadline closes the socket, and SAP then
90
+ // ends what was running on it. connect() waits for SAP's answer.
92
91
  headers: {
93
92
  ...auth,
94
93
  ...context.extraHeaders,
@@ -22,7 +22,9 @@ export declare abstract class CredentialAbapConnection<TCredential extends IAuth
22
22
  readonly credential: TCredential;
23
23
  constructor(config: SapConfig,
24
24
  /** Public because the type is the point: a caller can reach what it gave. */
25
- credential: TCredential, transport: IAdtTransport, logger?: ILogger | null, sessionId?: string);
25
+ credential: TCredential, transport: IAdtTransport, logger?: ILogger | null, sessionId?: string,
26
+ /** An existing session to take over; see `createConnection`'s `session`. */
27
+ session?: string);
26
28
  /**
27
29
  * Whatever the credential needs before the first request goes out.
28
30
  *
@@ -1 +1 @@
1
- {"version":3,"file":"CredentialAbapConnection.d.ts","sourceRoot":"","sources":["../../src/connection/CredentialAbapConnection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EACV,aAAa,EACb,cAAc,EACd,YAAY,EACb,MAAM,+BAA+B,CAAC;AACvC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AACrE,OAAO,EAAoB,KAAK,aAAa,EAAW,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAE,KAAK,aAAa,EAAa,MAAM,oBAAoB,CAAC;AAGnE,8BAAsB,wBAAwB,CAC5C,WAAW,SAAS,aAAa,GAAG,aAAa,CACjD,SAAQ,sBAAsB;IAG5B,6EAA6E;IAC7E,QAAQ,CAAC,UAAU,EAAE,WAAW;gBAFhC,MAAM,EAAE,SAAS;IACjB,6EAA6E;IACpE,UAAU,EAAE,WAAW,EAChC,SAAS,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AAS,CAAC,EAAE,MAAM;IAClB,4EAA4E;IAC5E,OAAO,CAAC,EAAE,MAAM;IAKlB;;;;;;;;;;OAUG;cACsB,iBAAiB,IAAI,OAAO,CAAC,IAAI,CAAC;IAU3D;;;;;;;OAOG;cACsB,gBAAgB,CACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAC9B,OAAO,CAAC,IAAI,CAAC;IAYhB,6EAA6E;cACpD,KAAK,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC;IAUnE;;;OAGG;cACsB,kBAAkB,CACzC,SAAS,EAAE,cAAc,GACxB,OAAO,CAAC,aAAa,CAAC;cAIT,gBAAgB,IAAI,OAAO,CAAC,IAAI,CAAC;CA+ClD"}
@@ -22,8 +22,10 @@ class CredentialAbapConnection extends AbstractAbapConnection_js_1.AbstractAbapC
22
22
  credential;
23
23
  constructor(config,
24
24
  /** Public because the type is the point: a caller can reach what it gave. */
25
- credential, transport, logger = null, sessionId) {
26
- super(config, transport, logger, sessionId);
25
+ credential, transport, logger = null, sessionId,
26
+ /** An existing session to take over; see `createConnection`'s `session`. */
27
+ session) {
28
+ super(config, transport, logger, sessionId, session);
27
29
  this.credential = credential;
28
30
  }
29
31
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"GenericWebSocketTransport.d.ts","sourceRoot":"","sources":["../../src/connection/GenericWebSocketTransport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,mBAAmB,EACnB,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,mBAAmB,EACpB,MAAM,kCAAkC,CAAC;AAE1C;;GAEG;AACH,UAAU,cAAc;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5C,MAAM,EAAE,CA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AC,OAAO,EAAE,CAAC,IAAI,EAAE,mBAAmB,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI;IAI3E,WAAW,IAAI,OAAO;YAIR,qBAAqB;IAoBnC,OAAO,CAAC,cAAc;YAUR,QAAQ;YAMR,SAAS;YAMT,SAAS;CAKxB;AAED,YAAY,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC"}
@@ -16,13 +16,16 @@ class GenericWebSocketTransport {
16
16
  if (this.socket && this.isConnected()) {
17
17
  return;
18
18
  }
19
- const connectTimeoutMs = options?.connectTimeoutMs ?? 15000;
19
+ // The caller's deadline, or none: no default of this package's own.
20
+ const connectTimeoutMs = options?.connectTimeoutMs;
20
21
  const socket = this.factory.create(url, options?.protocols, options);
21
22
  this.socket = socket;
22
23
  await new Promise((resolve, reject) => {
23
- const timeoutId = setTimeout(() => {
24
- reject(new Error(`WebSocket connect timeout after ${connectTimeoutMs}ms`));
25
- }, connectTimeoutMs);
24
+ const timeoutId = connectTimeoutMs === undefined
25
+ ? undefined
26
+ : setTimeout(() => {
27
+ reject(new Error(`WebSocket connect timeout after ${connectTimeoutMs}ms`));
28
+ }, connectTimeoutMs);
26
29
  socket.onopen = () => {
27
30
  clearTimeout(timeoutId);
28
31
  this.emitOpen().catch(() => {
@@ -86,6 +86,25 @@ export declare class HttpTransport implements IAdtTransport {
86
86
  ingest(headers?: Record<string, unknown>): void;
87
87
  /** What to put on the `Cookie` header, or nothing if the jar is empty. */
88
88
  cookies(): string | null;
89
+ /**
90
+ * The session's cookies, for the caller to keep and hand back to
91
+ * `resume()`: the jar without `sap-XSRF_*`, which belongs to the CSRF token
92
+ * and is earned again with it. `SAP_SESSIONID_*`, `sap-usercontext`,
93
+ * `sap-contextid` — so a stateful request after the resume reaches the same
94
+ * ABAP context — and whatever else the server set to keep the session where
95
+ * it lives. `null` while the wire holds no live `SAP_SESSIONID`.
96
+ */
97
+ sessionCookies(): string | null;
98
+ /**
99
+ * Take over the session `session` names: see `IAdtTransport.resume`.
100
+ *
101
+ * The request is the CSRF fetch on the discovery endpoint — the fallback on
102
+ * a `404` there, as `establish()` does, in the same session — with no
103
+ * credential and no retry. On the cloud wire it says
104
+ * `x-sap-security-session: use`, because the seeded jar holds a session
105
+ * (`sessionHeaders`).
106
+ */
107
+ resume(context: IAdtSessionContext, session: string): Promise<void>;
89
108
  /**
90
109
  * Which ABAP session this wire is on.
91
110
  *
@@ -1 +1 @@
1
- {"version":3,"file":"HttpTransport.d.ts","sourceRoot":"","sources":["../../src/connection/HttpTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAGH,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,eAAe,EACpB,KAAK,cAAc,EACpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAS,KAAK,YAAY,EAA2B,MAAM,YAAY,CAAC;AAE/E,OAAO,KAAK,EAGV,YAAY,EACb,MAAM,+BAA+B,CAAC;AAEvC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAI5C,OAAO,EACL,KAAK,oBAAoB,EACzB,KAAK,kBAAkB,EACvB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,qBAAqB,EAE3B,MAAM,oBAAoB,CAAC;AAiE5B,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AA6DzD,qBAAa,aAAc,YAAW,aAAa;IAsC/C,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,GAAG,IAAI;IACzC;;;;;OAKG;IACH,OAAO,CAAC,QAAQ,CAAC,OAAO;IA7C1B;;;;;;;;;OASG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAU;IAE/B,OAAO,CAAC,QAAQ,CAA8B;IAE9C;;;OAGG;IACH,OAAO,CAAC,QAAQ,CAAqC;IAErD,iFAAiF;IACjF,OAAO,CAAC,cAAc,CAAS;IA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