catalyst-relay 0.5.8 → 0.5.9
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.mts +11 -1
- package/dist/index.d.ts +11 -1
- package/dist/index.js +29 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -2634,6 +2634,26 @@ async function deleteTransport(client, transportId, removeObjects = false) {
|
|
|
2634
2634
|
return deleteRequest(client, transportId);
|
|
2635
2635
|
}
|
|
2636
2636
|
|
|
2637
|
+
// src/core/adt/transports/viewTransportObjects.ts
|
|
2638
|
+
var ACCEPT_HEADER3 = "application/vnd.sap.adt.transportorganizer.v1+xml";
|
|
2639
|
+
async function viewTransportObjects(client, transportId) {
|
|
2640
|
+
const [response, requestErr] = await client.request({
|
|
2641
|
+
method: "GET",
|
|
2642
|
+
path: `/sap/bc/adt/cts/transportrequests/${transportId}`,
|
|
2643
|
+
headers: { "Accept": ACCEPT_HEADER3 }
|
|
2644
|
+
});
|
|
2645
|
+
if (requestErr) return err(requestErr);
|
|
2646
|
+
if (!response.ok) {
|
|
2647
|
+
const text2 = await response.text();
|
|
2648
|
+
const errorMsg = extractError(text2);
|
|
2649
|
+
return err(new Error(`Failed to read transport ${transportId}: ${errorMsg}`));
|
|
2650
|
+
}
|
|
2651
|
+
const text = await response.text();
|
|
2652
|
+
const [doc, parseErr] = safeParseXml(text);
|
|
2653
|
+
if (parseErr) return err(parseErr);
|
|
2654
|
+
return ok(parseTransportTasks(doc));
|
|
2655
|
+
}
|
|
2656
|
+
|
|
2637
2657
|
// src/core/adt/craud/gitDiff.ts
|
|
2638
2658
|
import { diffArrays } from "diff";
|
|
2639
2659
|
function computeDiff(serverLines, localLines) {
|
|
@@ -2903,6 +2923,12 @@ async function removeFromTransport2(state, requestor, transportId, objectName) {
|
|
|
2903
2923
|
return removeFromTransport(requestor, transportId, objectName);
|
|
2904
2924
|
}
|
|
2905
2925
|
|
|
2926
|
+
// src/client/methods/transport/viewTransportObjects.ts
|
|
2927
|
+
async function viewTransportObjects2(state, requestor, transportId) {
|
|
2928
|
+
if (!state.session) return err(new Error("Not logged in"));
|
|
2929
|
+
return viewTransportObjects(requestor, transportId);
|
|
2930
|
+
}
|
|
2931
|
+
|
|
2906
2932
|
// src/client/methods/diff/gitDiff.ts
|
|
2907
2933
|
async function gitDiff2(state, requestor, objects) {
|
|
2908
2934
|
if (!state.session) return err(new Error("Not logged in"));
|
|
@@ -3285,6 +3311,9 @@ var ADTClientImpl = class {
|
|
|
3285
3311
|
async removeFromTransport(transportId, objectName) {
|
|
3286
3312
|
return removeFromTransport2(this.state, this.requestor, transportId, objectName);
|
|
3287
3313
|
}
|
|
3314
|
+
async viewTransportObjects(transportId) {
|
|
3315
|
+
return viewTransportObjects2(this.state, this.requestor, transportId);
|
|
3316
|
+
}
|
|
3288
3317
|
// --- Diff Operations ---
|
|
3289
3318
|
async gitDiff(objects) {
|
|
3290
3319
|
return gitDiff2(this.state, this.requestor, objects);
|