@mcp-abap-adt/adt-clients 34.1.0 → 34.2.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/dist/index.d.ts
CHANGED
|
@@ -26,5 +26,5 @@ export * from './index.executors';
|
|
|
26
26
|
export * from './index.readings';
|
|
27
27
|
export * from './index.runtime';
|
|
28
28
|
export * from './index.ws';
|
|
29
|
-
export { exemptFromAcceptNegotiation } from './utils/acceptNegotiation';
|
|
29
|
+
export { exemptFromAcceptNegotiation, getBaseRequest, } from './utils/acceptNegotiation';
|
|
30
30
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAC7C,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACxD,cAAc,iBAAiB,CAAC;AAChC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,OAAO,EACL,2BAA2B,EAC3B,cAAc,GACf,MAAM,2BAA2B,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -34,7 +34,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
34
34
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
35
35
|
};
|
|
36
36
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
-
exports.exemptFromAcceptNegotiation = exports.CT_INCLUDE = exports.AdtInclude = exports.AdtBatchConnection = void 0;
|
|
37
|
+
exports.getBaseRequest = exports.exemptFromAcceptNegotiation = exports.CT_INCLUDE = exports.AdtInclude = exports.AdtBatchConnection = void 0;
|
|
38
38
|
var batch_1 = require("./batch");
|
|
39
39
|
Object.defineProperty(exports, "AdtBatchConnection", { enumerable: true, get: function () { return batch_1.AdtBatchConnection; } });
|
|
40
40
|
var include_1 = require("./core/include");
|
|
@@ -48,3 +48,4 @@ __exportStar(require("./index.runtime"), exports);
|
|
|
48
48
|
__exportStar(require("./index.ws"), exports);
|
|
49
49
|
var acceptNegotiation_1 = require("./utils/acceptNegotiation");
|
|
50
50
|
Object.defineProperty(exports, "exemptFromAcceptNegotiation", { enumerable: true, get: function () { return acceptNegotiation_1.exemptFromAcceptNegotiation; } });
|
|
51
|
+
Object.defineProperty(exports, "getBaseRequest", { enumerable: true, get: function () { return acceptNegotiation_1.getBaseRequest; } });
|
|
@@ -26,8 +26,10 @@ export declare function extractSupportedContentType(error: unknown): string[];
|
|
|
26
26
|
* wrapped it: accept negotiation corrects and resends nothing. The
|
|
27
27
|
* connection's own handling (credential, CSRF, session) is untouched.
|
|
28
28
|
*
|
|
29
|
-
* Exported for the batch connection
|
|
30
|
-
*
|
|
29
|
+
* Exported for the batch connection, and public for a consumer that forwards a
|
|
30
|
+
* batch's envelope through a connection of its own over one an `AdtClient`
|
|
31
|
+
* wrapped: what SAP answers to an envelope is the caller's to read. For a
|
|
32
|
+
* connection never wrapped it is the connection's own `makeAdtRequest`, bound.
|
|
31
33
|
*/
|
|
32
34
|
export declare function getBaseRequest(connection: IAbapConnection): IAbapConnection['makeAdtRequest'];
|
|
33
35
|
export declare function wrapConnectionAcceptNegotiation(connection: IAbapConnection, logger?: ILogger): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"acceptNegotiation.d.ts","sourceRoot":"","sources":["../../src/utils/acceptNegotiation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAkD9D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAM7E;AAaD,MAAM,WAAW,yBAAyB;IACxC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAIlE;AAED,6DAA6D;AAC7D,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,OAAO,GAChB,IAAI,CAEN;AAED,wEAAwE;AACxE,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,eAAe,GAC1B,OAAO,CAIT;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAoC/D;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAsCpE;AAMD
|
|
1
|
+
{"version":3,"file":"acceptNegotiation.d.ts","sourceRoot":"","sources":["../../src/utils/acceptNegotiation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,mBAAmB,EACnB,gBAAgB,EACjB,MAAM,yCAAyC,CAAC;AAEjD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gCAAgC,CAAC;AAkD9D;;;;;;;GAOG;AACH,wBAAgB,2BAA2B,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAM7E;AAaD,MAAM,WAAW,yBAAyB;IACxC,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,eAAe,GAAG,IAAI,CAIlE;AAED,6DAA6D;AAC7D,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,eAAe,EAC3B,OAAO,CAAC,EAAE,OAAO,GAChB,IAAI,CAEN;AAED,wEAAwE;AACxE,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,eAAe,GAC1B,OAAO,CAIT;AAED,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAoC/D;AAED,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,EAAE,CAsCpE;AAMD;;;;;;;;;GASG;AACH,wBAAgB,cAAc,CAC5B,UAAU,EAAE,eAAe,GAC1B,eAAe,CAAC,gBAAgB,CAAC,CAInC;AAED,wBAAgB,+BAA+B,CAC7C,UAAU,EAAE,eAAe,EAC3B,MAAM,CAAC,EAAE,OAAO,GACf,IAAI,CAkBN;AAED,wBAAsB,mCAAmC,CACvD,CAAC,GAAG,OAAO,EACX,CAAC,GAAG,OAAO,EAEX,UAAU,EAAE,eAAe,EAC3B,OAAO,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,yBAAyB,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAkFjC"}
|
|
@@ -139,8 +139,10 @@ function buildCacheKey(request) {
|
|
|
139
139
|
* wrapped it: accept negotiation corrects and resends nothing. The
|
|
140
140
|
* connection's own handling (credential, CSRF, session) is untouched.
|
|
141
141
|
*
|
|
142
|
-
* Exported for the batch connection
|
|
143
|
-
*
|
|
142
|
+
* Exported for the batch connection, and public for a consumer that forwards a
|
|
143
|
+
* batch's envelope through a connection of its own over one an `AdtClient`
|
|
144
|
+
* wrapped: what SAP answers to an envelope is the caller's to read. For a
|
|
145
|
+
* connection never wrapped it is the connection's own `makeAdtRequest`, bound.
|
|
144
146
|
*/
|
|
145
147
|
function getBaseRequest(connection) {
|
|
146
148
|
return (baseRequestMap.get(connection) ?? connection.makeAdtRequest.bind(connection));
|
package/docs/usage/BATCH.md
CHANGED
|
@@ -83,7 +83,10 @@ that part's answer like any other status; nothing reads it, corrects it or
|
|
|
83
83
|
sends it again. A connection of your own that members send through instead of
|
|
84
84
|
the batch connection — a per-call wrapper over it, say — is a different object
|
|
85
85
|
and is negotiated like any other; mark it with `exemptFromAcceptNegotiation(wrapper)`
|
|
86
|
-
(exported by the package) and it is exempt too.
|
|
86
|
+
(exported by the package) and it is exempt too. When the batch connection wraps
|
|
87
|
+
a forwarder of yours over a connection an `AdtClient` wrapped, forward through
|
|
88
|
+
`getBaseRequest(thatConnection)` (exported): the envelope then bypasses that
|
|
89
|
+
connection's accept negotiation and is sent once. A batch is yours, and so is
|
|
87
90
|
what SAP answered to each of its parts. The envelope request itself still goes
|
|
88
91
|
through the connection's own handling — credential renewal, CSRF recovery and
|
|
89
92
|
session — as every request does: that is about the connection to the endpoint,
|