catalyst-relay 0.5.11 → 0.5.13
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 +9 -1
- package/dist/index.d.ts +9 -1
- package/dist/index.js +14 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +13 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -328,6 +328,14 @@ interface DeleteResult {
|
|
|
328
328
|
status: 'success' | 'error';
|
|
329
329
|
message?: string;
|
|
330
330
|
}
|
|
331
|
+
interface ExternalReference {
|
|
332
|
+
object: ObjectRef;
|
|
333
|
+
referencedBy: Dependency;
|
|
334
|
+
}
|
|
335
|
+
declare class ExternalReferencesError extends Error {
|
|
336
|
+
references: ExternalReference[];
|
|
337
|
+
constructor(references: ExternalReference[]);
|
|
338
|
+
}
|
|
331
339
|
|
|
332
340
|
interface CheckResult {
|
|
333
341
|
name: string;
|
|
@@ -698,4 +706,4 @@ declare function activateLogging(): void;
|
|
|
698
706
|
*/
|
|
699
707
|
declare function deactivateLogging(): void;
|
|
700
708
|
|
|
701
|
-
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 InactiveEntry, type InactiveObject, type InactiveRef, type InactiveTransport, 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 };
|
|
709
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type CheckResult, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type DeleteResult, type Dependency, type DiffHunk, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type ExternalReference, ExternalReferencesError, type FolderNode, type GetPackagesOptions, type InactiveEntry, type InactiveObject, type InactiveRef, type InactiveTransport, type ListFilter, type ModifiedDiffHunk, 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 SimpleDiffHunk, 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
|
@@ -328,6 +328,14 @@ interface DeleteResult {
|
|
|
328
328
|
status: 'success' | 'error';
|
|
329
329
|
message?: string;
|
|
330
330
|
}
|
|
331
|
+
interface ExternalReference {
|
|
332
|
+
object: ObjectRef;
|
|
333
|
+
referencedBy: Dependency;
|
|
334
|
+
}
|
|
335
|
+
declare class ExternalReferencesError extends Error {
|
|
336
|
+
references: ExternalReference[];
|
|
337
|
+
constructor(references: ExternalReference[]);
|
|
338
|
+
}
|
|
331
339
|
|
|
332
340
|
interface CheckResult {
|
|
333
341
|
name: string;
|
|
@@ -698,4 +706,4 @@ declare function activateLogging(): void;
|
|
|
698
706
|
*/
|
|
699
707
|
declare function deactivateLogging(): void;
|
|
700
708
|
|
|
701
|
-
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 InactiveEntry, type InactiveObject, type InactiveRef, type InactiveTransport, 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 };
|
|
709
|
+
export { type ADTClient, type ActivationMessage, type ActivationResult, type Aggregation, type ApiResponse, type AsyncResult, type AuthConfig, type AuthType, type BasicAuthConfig, type BasicFilter, type BetweenFilter, type CheckResult, type ClientConfig, type ColumnInfo, type DataFrame, type DataPreviewQuery, type DeleteResult, type Dependency, type DiffHunk, type DiffResult, type DistinctResult, type ErrorCode, type ErrorResponse, type ExportableSessionState, type ExternalReference, ExternalReferencesError, type FolderNode, type GetPackagesOptions, type InactiveEntry, type InactiveObject, type InactiveRef, type InactiveTransport, type ListFilter, type ModifiedDiffHunk, 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 SimpleDiffHunk, 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
|
@@ -30,6 +30,7 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
30
30
|
// src/index.ts
|
|
31
31
|
var index_exports = {};
|
|
32
32
|
__export(index_exports, {
|
|
33
|
+
ExternalReferencesError: () => ExternalReferencesError,
|
|
33
34
|
activateLogging: () => activateLogging,
|
|
34
35
|
buildSQLQuery: () => buildSQLQuery,
|
|
35
36
|
createClient: () => createClient,
|
|
@@ -1613,7 +1614,9 @@ async function updateObject(client, object, lockHandle, transport) {
|
|
|
1613
1614
|
|
|
1614
1615
|
// src/core/adt/craud/activation.ts
|
|
1615
1616
|
var MAX_POLL_ATTEMPTS = 30;
|
|
1617
|
+
var POLL_RETRY_DELAY_MS = 1e3;
|
|
1616
1618
|
var RUN_ID_REGEX = /\/activation\/runs\/([^?/]+)/;
|
|
1619
|
+
var BACKGROUND_RUN_MEDIA_TYPE = "application/vnd.sap.adt.backgroundrun.v1+xml";
|
|
1617
1620
|
async function activateObjects(client, objects) {
|
|
1618
1621
|
if (objects.length === 0) {
|
|
1619
1622
|
return ok([]);
|
|
@@ -1639,7 +1642,7 @@ async function activateObjects(client, objects) {
|
|
|
1639
1642
|
},
|
|
1640
1643
|
headers: {
|
|
1641
1644
|
"Content-Type": "application/xml",
|
|
1642
|
-
"Accept":
|
|
1645
|
+
"Accept": BACKGROUND_RUN_MEDIA_TYPE
|
|
1643
1646
|
},
|
|
1644
1647
|
body
|
|
1645
1648
|
});
|
|
@@ -1657,22 +1660,25 @@ async function activateObjects(client, objects) {
|
|
|
1657
1660
|
}
|
|
1658
1661
|
const runId = runIdMatch[1];
|
|
1659
1662
|
debug(`Activation run ID: ${runId}`);
|
|
1660
|
-
let pollAttempt =
|
|
1661
|
-
while (pollAttempt < MAX_POLL_ATTEMPTS) {
|
|
1663
|
+
for (let pollAttempt = 1; pollAttempt <= MAX_POLL_ATTEMPTS; pollAttempt++) {
|
|
1662
1664
|
const [pollRes, pollErr] = await client.request({
|
|
1663
1665
|
method: "GET",
|
|
1664
1666
|
path: `/sap/bc/adt/activation/runs/${runId}`,
|
|
1665
1667
|
params: { "withLongPolling": "true" },
|
|
1666
|
-
headers: { "Accept":
|
|
1668
|
+
headers: { "Accept": BACKGROUND_RUN_MEDIA_TYPE }
|
|
1667
1669
|
});
|
|
1668
1670
|
if (pollErr) return err(pollErr);
|
|
1669
|
-
debug(`Activation poll attempt ${pollAttempt
|
|
1671
|
+
debug(`Activation poll attempt ${pollAttempt} status: ${pollRes.status}`);
|
|
1670
1672
|
if (pollRes.ok) break;
|
|
1671
|
-
|
|
1673
|
+
if (pollRes.status >= 400 && pollRes.status < 500) {
|
|
1674
|
+
const errText = await pollRes.text();
|
|
1675
|
+
return err(new Error(`Activation run ${runId} polling rejected (${pollRes.status}): ${extractError(errText)}`));
|
|
1676
|
+
}
|
|
1672
1677
|
if (pollAttempt >= MAX_POLL_ATTEMPTS) {
|
|
1673
1678
|
const errText = await pollRes.text();
|
|
1674
|
-
return err(new Error(`Activation run ${runId} did not complete: ${extractError(errText)}`));
|
|
1679
|
+
return err(new Error(`Activation run ${runId} did not complete after ${MAX_POLL_ATTEMPTS} attempts: ${extractError(errText)}`));
|
|
1675
1680
|
}
|
|
1681
|
+
await new Promise((resolve) => setTimeout(resolve, POLL_RETRY_DELAY_MS));
|
|
1676
1682
|
}
|
|
1677
1683
|
const [resultsRes, resultsErr] = await client.request({
|
|
1678
1684
|
method: "GET",
|
|
@@ -3586,6 +3592,7 @@ function createClient(config) {
|
|
|
3586
3592
|
}
|
|
3587
3593
|
// Annotate the CommonJS export names for ESM import in node:
|
|
3588
3594
|
0 && (module.exports = {
|
|
3595
|
+
ExternalReferencesError,
|
|
3589
3596
|
activateLogging,
|
|
3590
3597
|
buildSQLQuery,
|
|
3591
3598
|
createClient,
|