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.d.mts
CHANGED
|
@@ -535,6 +535,15 @@ interface TransportObject {
|
|
|
535
535
|
position: string;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
/**
|
|
539
|
+
* Parse Transport Tasks — Extract task IDs and their objects from transport XML
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
interface TaskContents {
|
|
543
|
+
taskId: string;
|
|
544
|
+
objects: TransportObject[];
|
|
545
|
+
}
|
|
546
|
+
|
|
538
547
|
/**
|
|
539
548
|
* Git Diff — Compare local content with server content
|
|
540
549
|
*
|
|
@@ -613,6 +622,7 @@ interface ADTClient {
|
|
|
613
622
|
createTransport(config: TransportConfig): AsyncResult<string>;
|
|
614
623
|
deleteTransport(transportId: string, removeObjects?: boolean): AsyncResult<void>;
|
|
615
624
|
removeFromTransport(transportId: string, objectName: string): AsyncResult<void>;
|
|
625
|
+
viewTransportObjects(transportId: string): AsyncResult<TaskContents[]>;
|
|
616
626
|
gitDiff(objects: ObjectContent[]): AsyncResult<DiffResult[]>;
|
|
617
627
|
getObjectConfig(): ObjectConfig[];
|
|
618
628
|
}
|
|
@@ -639,4 +649,4 @@ declare function activateLogging(): void;
|
|
|
639
649
|
*/
|
|
640
650
|
declare function deactivateLogging(): void;
|
|
641
651
|
|
|
642
|
-
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchOptions, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type TransportObject, type TreeQuery, type TreeResponse, type UpsertResult, activateLogging, buildSQLQuery, createClient, deactivateLogging, err, ok };
|
|
652
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchOptions, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type TaskContents, type Transport, type TransportConfig, type TransportObject, type TreeQuery, type TreeResponse, type UpsertResult, activateLogging, buildSQLQuery, createClient, deactivateLogging, err, ok };
|
package/dist/index.d.ts
CHANGED
|
@@ -535,6 +535,15 @@ interface TransportObject {
|
|
|
535
535
|
position: string;
|
|
536
536
|
}
|
|
537
537
|
|
|
538
|
+
/**
|
|
539
|
+
* Parse Transport Tasks — Extract task IDs and their objects from transport XML
|
|
540
|
+
*/
|
|
541
|
+
|
|
542
|
+
interface TaskContents {
|
|
543
|
+
taskId: string;
|
|
544
|
+
objects: TransportObject[];
|
|
545
|
+
}
|
|
546
|
+
|
|
538
547
|
/**
|
|
539
548
|
* Git Diff — Compare local content with server content
|
|
540
549
|
*
|
|
@@ -613,6 +622,7 @@ interface ADTClient {
|
|
|
613
622
|
createTransport(config: TransportConfig): AsyncResult<string>;
|
|
614
623
|
deleteTransport(transportId: string, removeObjects?: boolean): AsyncResult<void>;
|
|
615
624
|
removeFromTransport(transportId: string, objectName: string): AsyncResult<void>;
|
|
625
|
+
viewTransportObjects(transportId: string): AsyncResult<TaskContents[]>;
|
|
616
626
|
gitDiff(objects: ObjectContent[]): AsyncResult<DiffResult[]>;
|
|
617
627
|
getObjectConfig(): ObjectConfig[];
|
|
618
628
|
}
|
|
@@ -639,4 +649,4 @@ declare function activateLogging(): void;
|
|
|
639
649
|
*/
|
|
640
650
|
declare function deactivateLogging(): void;
|
|
641
651
|
|
|
642
|
-
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchOptions, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type Transport, type TransportConfig, type TransportObject, type TreeQuery, type TreeResponse, type UpsertResult, activateLogging, buildSQLQuery, createClient, deactivateLogging, err, ok };
|
|
652
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type Dependency, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type FolderNode, type ListFilter, type ObjectConfig, type ObjectContent, type ObjectMetadata, type ObjectNode, type ObjectRef, type ObjectWithContent, type Package, type PackageNode, type Parameter, type PreviewSQL, type QueryFilter, type Result, type SamlAuthConfig, type SearchOptions, type SearchResult, type Session, type Sorting, type SsoAuthConfig, type SuccessResponse, type TaskContents, type Transport, type TransportConfig, type TransportObject, type TreeQuery, type TreeResponse, type UpsertResult, activateLogging, buildSQLQuery, createClient, deactivateLogging, err, ok };
|
package/dist/index.js
CHANGED
|
@@ -2668,6 +2668,26 @@ async function deleteTransport(client, transportId, removeObjects = false) {
|
|
|
2668
2668
|
return deleteRequest(client, transportId);
|
|
2669
2669
|
}
|
|
2670
2670
|
|
|
2671
|
+
// src/core/adt/transports/viewTransportObjects.ts
|
|
2672
|
+
var ACCEPT_HEADER3 = "application/vnd.sap.adt.transportorganizer.v1+xml";
|
|
2673
|
+
async function viewTransportObjects(client, transportId) {
|
|
2674
|
+
const [response, requestErr] = await client.request({
|
|
2675
|
+
method: "GET",
|
|
2676
|
+
path: `/sap/bc/adt/cts/transportrequests/${transportId}`,
|
|
2677
|
+
headers: { "Accept": ACCEPT_HEADER3 }
|
|
2678
|
+
});
|
|
2679
|
+
if (requestErr) return err(requestErr);
|
|
2680
|
+
if (!response.ok) {
|
|
2681
|
+
const text2 = await response.text();
|
|
2682
|
+
const errorMsg = extractError(text2);
|
|
2683
|
+
return err(new Error(`Failed to read transport ${transportId}: ${errorMsg}`));
|
|
2684
|
+
}
|
|
2685
|
+
const text = await response.text();
|
|
2686
|
+
const [doc, parseErr] = safeParseXml(text);
|
|
2687
|
+
if (parseErr) return err(parseErr);
|
|
2688
|
+
return ok(parseTransportTasks(doc));
|
|
2689
|
+
}
|
|
2690
|
+
|
|
2671
2691
|
// src/core/adt/craud/gitDiff.ts
|
|
2672
2692
|
var import_diff = require("diff");
|
|
2673
2693
|
function computeDiff(serverLines, localLines) {
|
|
@@ -2937,6 +2957,12 @@ async function removeFromTransport2(state, requestor, transportId, objectName) {
|
|
|
2937
2957
|
return removeFromTransport(requestor, transportId, objectName);
|
|
2938
2958
|
}
|
|
2939
2959
|
|
|
2960
|
+
// src/client/methods/transport/viewTransportObjects.ts
|
|
2961
|
+
async function viewTransportObjects2(state, requestor, transportId) {
|
|
2962
|
+
if (!state.session) return err(new Error("Not logged in"));
|
|
2963
|
+
return viewTransportObjects(requestor, transportId);
|
|
2964
|
+
}
|
|
2965
|
+
|
|
2940
2966
|
// src/client/methods/diff/gitDiff.ts
|
|
2941
2967
|
async function gitDiff2(state, requestor, objects) {
|
|
2942
2968
|
if (!state.session) return err(new Error("Not logged in"));
|
|
@@ -3319,6 +3345,9 @@ var ADTClientImpl = class {
|
|
|
3319
3345
|
async removeFromTransport(transportId, objectName) {
|
|
3320
3346
|
return removeFromTransport2(this.state, this.requestor, transportId, objectName);
|
|
3321
3347
|
}
|
|
3348
|
+
async viewTransportObjects(transportId) {
|
|
3349
|
+
return viewTransportObjects2(this.state, this.requestor, transportId);
|
|
3350
|
+
}
|
|
3322
3351
|
// --- Diff Operations ---
|
|
3323
3352
|
async gitDiff(objects) {
|
|
3324
3353
|
return gitDiff2(this.state, this.requestor, objects);
|