@postman-cse/onboarding-bootstrap 2.9.6 → 2.9.7
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 +20 -14
- package/dist/cli.cjs +20 -14
- package/dist/index.cjs +20 -14
- package/package.json +2 -2
package/dist/action.cjs
CHANGED
|
@@ -265369,25 +265369,31 @@ ${error2.responseBody ?? ""}`
|
|
|
265369
265369
|
} catch (error2) {
|
|
265370
265370
|
if (!isAmbiguousTransportError(error2)) throw error2;
|
|
265371
265371
|
const name = String(item.name ?? "Untitled");
|
|
265372
|
-
const
|
|
265373
|
-
|
|
265374
|
-
|
|
265375
|
-
|
|
265376
|
-
|
|
265377
|
-
|
|
265378
|
-
|
|
265379
|
-
|
|
265380
|
-
|
|
265381
|
-
|
|
265382
|
-
|
|
265383
|
-
|
|
265384
|
-
|
|
265372
|
+
const findCommittedItem = async () => {
|
|
265373
|
+
const matches = (await this.listCollectionItems(cid)).filter((candidate) => {
|
|
265374
|
+
if (String(candidate.name ?? candidate.title ?? "") !== name) return false;
|
|
265375
|
+
if (String(candidate.$kind ?? candidate.type ?? "http-request") !== kind) return false;
|
|
265376
|
+
const position = asRecord8(candidate.position);
|
|
265377
|
+
const parent = asRecord8(position?.parent);
|
|
265378
|
+
const candidateParent = String(parent?.id ?? position?.parent ?? candidate.parent ?? "").trim();
|
|
265379
|
+
return Boolean(candidateParent) && this.bareModelId(candidateParent) === this.bareModelId(parentId);
|
|
265380
|
+
});
|
|
265381
|
+
return adoptExactMatch(
|
|
265382
|
+
`collection-item:${cid}:${parentId}:${kind}:${name}`,
|
|
265383
|
+
matches,
|
|
265384
|
+
(candidate) => String(candidate.id ?? "")
|
|
265385
|
+
);
|
|
265386
|
+
};
|
|
265387
|
+
let match = await findCommittedItem();
|
|
265388
|
+
if (!match) {
|
|
265389
|
+
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
265390
|
+
match = await findCommittedItem();
|
|
265391
|
+
}
|
|
265385
265392
|
if (match) {
|
|
265386
265393
|
created = { data: { id: match.id } };
|
|
265387
265394
|
} else {
|
|
265388
265395
|
const retriable = error2 instanceof HttpError && error2.status >= 500;
|
|
265389
265396
|
if (!retriable || attempt === maxAttempts) throw error2;
|
|
265390
|
-
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
265391
265397
|
continue;
|
|
265392
265398
|
}
|
|
265393
265399
|
}
|
package/dist/cli.cjs
CHANGED
|
@@ -263687,25 +263687,31 @@ ${error.responseBody ?? ""}`
|
|
|
263687
263687
|
} catch (error) {
|
|
263688
263688
|
if (!isAmbiguousTransportError(error)) throw error;
|
|
263689
263689
|
const name = String(item.name ?? "Untitled");
|
|
263690
|
-
const
|
|
263691
|
-
|
|
263692
|
-
|
|
263693
|
-
|
|
263694
|
-
|
|
263695
|
-
|
|
263696
|
-
|
|
263697
|
-
|
|
263698
|
-
|
|
263699
|
-
|
|
263700
|
-
|
|
263701
|
-
|
|
263702
|
-
|
|
263690
|
+
const findCommittedItem = async () => {
|
|
263691
|
+
const matches = (await this.listCollectionItems(cid)).filter((candidate) => {
|
|
263692
|
+
if (String(candidate.name ?? candidate.title ?? "") !== name) return false;
|
|
263693
|
+
if (String(candidate.$kind ?? candidate.type ?? "http-request") !== kind) return false;
|
|
263694
|
+
const position = asRecord8(candidate.position);
|
|
263695
|
+
const parent = asRecord8(position?.parent);
|
|
263696
|
+
const candidateParent = String(parent?.id ?? position?.parent ?? candidate.parent ?? "").trim();
|
|
263697
|
+
return Boolean(candidateParent) && this.bareModelId(candidateParent) === this.bareModelId(parentId);
|
|
263698
|
+
});
|
|
263699
|
+
return adoptExactMatch(
|
|
263700
|
+
`collection-item:${cid}:${parentId}:${kind}:${name}`,
|
|
263701
|
+
matches,
|
|
263702
|
+
(candidate) => String(candidate.id ?? "")
|
|
263703
|
+
);
|
|
263704
|
+
};
|
|
263705
|
+
let match = await findCommittedItem();
|
|
263706
|
+
if (!match) {
|
|
263707
|
+
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
263708
|
+
match = await findCommittedItem();
|
|
263709
|
+
}
|
|
263703
263710
|
if (match) {
|
|
263704
263711
|
created = { data: { id: match.id } };
|
|
263705
263712
|
} else {
|
|
263706
263713
|
const retriable = error instanceof HttpError && error.status >= 500;
|
|
263707
263714
|
if (!retriable || attempt === maxAttempts) throw error;
|
|
263708
|
-
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
263709
263715
|
continue;
|
|
263710
263716
|
}
|
|
263711
263717
|
}
|
package/dist/index.cjs
CHANGED
|
@@ -265394,25 +265394,31 @@ ${error2.responseBody ?? ""}`
|
|
|
265394
265394
|
} catch (error2) {
|
|
265395
265395
|
if (!isAmbiguousTransportError(error2)) throw error2;
|
|
265396
265396
|
const name = String(item.name ?? "Untitled");
|
|
265397
|
-
const
|
|
265398
|
-
|
|
265399
|
-
|
|
265400
|
-
|
|
265401
|
-
|
|
265402
|
-
|
|
265403
|
-
|
|
265404
|
-
|
|
265405
|
-
|
|
265406
|
-
|
|
265407
|
-
|
|
265408
|
-
|
|
265409
|
-
|
|
265397
|
+
const findCommittedItem = async () => {
|
|
265398
|
+
const matches = (await this.listCollectionItems(cid)).filter((candidate) => {
|
|
265399
|
+
if (String(candidate.name ?? candidate.title ?? "") !== name) return false;
|
|
265400
|
+
if (String(candidate.$kind ?? candidate.type ?? "http-request") !== kind) return false;
|
|
265401
|
+
const position = asRecord8(candidate.position);
|
|
265402
|
+
const parent = asRecord8(position?.parent);
|
|
265403
|
+
const candidateParent = String(parent?.id ?? position?.parent ?? candidate.parent ?? "").trim();
|
|
265404
|
+
return Boolean(candidateParent) && this.bareModelId(candidateParent) === this.bareModelId(parentId);
|
|
265405
|
+
});
|
|
265406
|
+
return adoptExactMatch(
|
|
265407
|
+
`collection-item:${cid}:${parentId}:${kind}:${name}`,
|
|
265408
|
+
matches,
|
|
265409
|
+
(candidate) => String(candidate.id ?? "")
|
|
265410
|
+
);
|
|
265411
|
+
};
|
|
265412
|
+
let match = await findCommittedItem();
|
|
265413
|
+
if (!match) {
|
|
265414
|
+
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
265415
|
+
match = await findCommittedItem();
|
|
265416
|
+
}
|
|
265410
265417
|
if (match) {
|
|
265411
265418
|
created = { data: { id: match.id } };
|
|
265412
265419
|
} else {
|
|
265413
265420
|
const retriable = error2 instanceof HttpError && error2.status >= 500;
|
|
265414
265421
|
if (!retriable || attempt === maxAttempts) throw error2;
|
|
265415
|
-
await this.sleep(fullJitterDelayMs(attempt - 1, 300, 2e3, this.random));
|
|
265416
265422
|
continue;
|
|
265417
265423
|
}
|
|
265418
265424
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@postman-cse/onboarding-bootstrap",
|
|
3
|
-
"version": "2.9.
|
|
3
|
+
"version": "2.9.7",
|
|
4
4
|
"description": "Bootstrap Postman workspaces, specs, and collections from OpenAPI.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -79,4 +79,4 @@
|
|
|
79
79
|
"type": "git",
|
|
80
80
|
"url": "https://github.com/postman-cs/postman-bootstrap-action"
|
|
81
81
|
}
|
|
82
|
-
}
|
|
82
|
+
}
|