@postman-cse/onboarding-repo-sync 0.13.1 → 0.13.2
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/action.cjs +15 -0
- package/dist/cli.cjs +15 -0
- package/dist/index.cjs +15 -0
- package/package.json +1 -1
package/dist/action.cjs
CHANGED
|
@@ -24512,6 +24512,15 @@ var HttpError = class _HttpError extends Error {
|
|
|
24512
24512
|
};
|
|
24513
24513
|
|
|
24514
24514
|
// src/lib/postman/internal-integration-adapter.ts
|
|
24515
|
+
function extractDuplicateWorkspaceId(body) {
|
|
24516
|
+
try {
|
|
24517
|
+
const parsed = JSON.parse(body);
|
|
24518
|
+
const candidate = parsed?.error?.meta?.workspaceId ?? parsed?.meta?.workspaceId;
|
|
24519
|
+
return typeof candidate === "string" && candidate.trim() ? candidate.trim() : void 0;
|
|
24520
|
+
} catch {
|
|
24521
|
+
return void 0;
|
|
24522
|
+
}
|
|
24523
|
+
}
|
|
24515
24524
|
var BifrostInternalIntegrationAdapter = class {
|
|
24516
24525
|
accessToken;
|
|
24517
24526
|
bifrostBaseUrl;
|
|
@@ -24599,6 +24608,12 @@ var BifrostInternalIntegrationAdapter = class {
|
|
|
24599
24608
|
const body = await response.text();
|
|
24600
24609
|
const isDuplicate = body.includes("invalidParamError") && body.includes("already exists") || body.includes("projectAlreadyConnected");
|
|
24601
24610
|
if (isDuplicate) {
|
|
24611
|
+
const existingWorkspaceId = extractDuplicateWorkspaceId(body);
|
|
24612
|
+
if (existingWorkspaceId && existingWorkspaceId !== workspaceId) {
|
|
24613
|
+
throw new Error(
|
|
24614
|
+
`Repository is already linked to workspace ${existingWorkspaceId}, so Bifrost refused the link to workspace ${workspaceId}. If that workspace was deleted, its filesystem record still reserves this repo and path; disconnect the stale link (restore the old workspace and disconnect the repository, or have a team admin remove it) and re-run.`
|
|
24615
|
+
);
|
|
24616
|
+
}
|
|
24602
24617
|
return;
|
|
24603
24618
|
}
|
|
24604
24619
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -22615,6 +22615,15 @@ var HttpError = class _HttpError extends Error {
|
|
|
22615
22615
|
};
|
|
22616
22616
|
|
|
22617
22617
|
// src/lib/postman/internal-integration-adapter.ts
|
|
22618
|
+
function extractDuplicateWorkspaceId(body) {
|
|
22619
|
+
try {
|
|
22620
|
+
const parsed = JSON.parse(body);
|
|
22621
|
+
const candidate = parsed?.error?.meta?.workspaceId ?? parsed?.meta?.workspaceId;
|
|
22622
|
+
return typeof candidate === "string" && candidate.trim() ? candidate.trim() : void 0;
|
|
22623
|
+
} catch {
|
|
22624
|
+
return void 0;
|
|
22625
|
+
}
|
|
22626
|
+
}
|
|
22618
22627
|
var BifrostInternalIntegrationAdapter = class {
|
|
22619
22628
|
accessToken;
|
|
22620
22629
|
bifrostBaseUrl;
|
|
@@ -22702,6 +22711,12 @@ var BifrostInternalIntegrationAdapter = class {
|
|
|
22702
22711
|
const body = await response.text();
|
|
22703
22712
|
const isDuplicate = body.includes("invalidParamError") && body.includes("already exists") || body.includes("projectAlreadyConnected");
|
|
22704
22713
|
if (isDuplicate) {
|
|
22714
|
+
const existingWorkspaceId = extractDuplicateWorkspaceId(body);
|
|
22715
|
+
if (existingWorkspaceId && existingWorkspaceId !== workspaceId) {
|
|
22716
|
+
throw new Error(
|
|
22717
|
+
`Repository is already linked to workspace ${existingWorkspaceId}, so Bifrost refused the link to workspace ${workspaceId}. If that workspace was deleted, its filesystem record still reserves this repo and path; disconnect the stale link (restore the old workspace and disconnect the repository, or have a team admin remove it) and re-run.`
|
|
22718
|
+
);
|
|
22719
|
+
}
|
|
22705
22720
|
return;
|
|
22706
22721
|
}
|
|
22707
22722
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -24527,6 +24527,15 @@ var HttpError = class _HttpError extends Error {
|
|
|
24527
24527
|
};
|
|
24528
24528
|
|
|
24529
24529
|
// src/lib/postman/internal-integration-adapter.ts
|
|
24530
|
+
function extractDuplicateWorkspaceId(body) {
|
|
24531
|
+
try {
|
|
24532
|
+
const parsed = JSON.parse(body);
|
|
24533
|
+
const candidate = parsed?.error?.meta?.workspaceId ?? parsed?.meta?.workspaceId;
|
|
24534
|
+
return typeof candidate === "string" && candidate.trim() ? candidate.trim() : void 0;
|
|
24535
|
+
} catch {
|
|
24536
|
+
return void 0;
|
|
24537
|
+
}
|
|
24538
|
+
}
|
|
24530
24539
|
var BifrostInternalIntegrationAdapter = class {
|
|
24531
24540
|
accessToken;
|
|
24532
24541
|
bifrostBaseUrl;
|
|
@@ -24614,6 +24623,12 @@ var BifrostInternalIntegrationAdapter = class {
|
|
|
24614
24623
|
const body = await response.text();
|
|
24615
24624
|
const isDuplicate = body.includes("invalidParamError") && body.includes("already exists") || body.includes("projectAlreadyConnected");
|
|
24616
24625
|
if (isDuplicate) {
|
|
24626
|
+
const existingWorkspaceId = extractDuplicateWorkspaceId(body);
|
|
24627
|
+
if (existingWorkspaceId && existingWorkspaceId !== workspaceId) {
|
|
24628
|
+
throw new Error(
|
|
24629
|
+
`Repository is already linked to workspace ${existingWorkspaceId}, so Bifrost refused the link to workspace ${workspaceId}. If that workspace was deleted, its filesystem record still reserves this repo and path; disconnect the stale link (restore the old workspace and disconnect the repository, or have a team admin remove it) and re-run.`
|
|
24630
|
+
);
|
|
24631
|
+
}
|
|
24617
24632
|
return;
|
|
24618
24633
|
}
|
|
24619
24634
|
}
|