jetbridge 0.1.0-rc.1 → 0.1.0-rc.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/cli.js +20 -15
- package/dist/cli.js.map +1 -1
- package/dist/index.js +20 -15
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1635,29 +1635,34 @@ function assertDeletable(identifier, protectedIds, config) {
|
|
|
1635
1635
|
);
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
|
-
async function
|
|
1639
|
-
const
|
|
1640
|
-
|
|
1641
|
-
|
|
1642
|
-
|
|
1638
|
+
async function fetchAllPages(client, what, firstPath) {
|
|
1639
|
+
const rows = [];
|
|
1640
|
+
let path = firstPath;
|
|
1641
|
+
for (let page = 0; path && page < 50; page += 1) {
|
|
1642
|
+
const result = await client.request("GET", path);
|
|
1643
|
+
if (result.status !== 200) {
|
|
1644
|
+
fail(
|
|
1645
|
+
`could not list ${what} (HTTP ${result.status}).
|
|
1643
1646
|
Check that the App Store Connect key still has access to this team.`
|
|
1644
|
-
|
|
1647
|
+
);
|
|
1648
|
+
}
|
|
1649
|
+
rows.push(...asArray(result.body.data));
|
|
1650
|
+
const next = result.body.links?.next;
|
|
1651
|
+
path = next ? next.replace(/^https:\/\/api\.appstoreconnect\.apple\.com/, "") : void 0;
|
|
1645
1652
|
}
|
|
1646
|
-
return
|
|
1653
|
+
return rows;
|
|
1654
|
+
}
|
|
1655
|
+
async function fetchBundleIds(client) {
|
|
1656
|
+
const rows = await fetchAllPages(client, "bundle ids", "/v1/bundleIds?limit=200");
|
|
1657
|
+
return rows.map((row) => ({
|
|
1647
1658
|
id: row.id,
|
|
1648
1659
|
identifier: String(row.attributes.identifier ?? ""),
|
|
1649
1660
|
name: String(row.attributes.name ?? "")
|
|
1650
1661
|
}));
|
|
1651
1662
|
}
|
|
1652
1663
|
async function fetchProfiles(client) {
|
|
1653
|
-
const
|
|
1654
|
-
|
|
1655
|
-
fail(
|
|
1656
|
-
`could not list provisioning profiles (HTTP ${result.status}).
|
|
1657
|
-
Check that the App Store Connect key still has access to this team.`
|
|
1658
|
-
);
|
|
1659
|
-
}
|
|
1660
|
-
return asArray(result.body.data).map((row) => ({
|
|
1664
|
+
const rows = await fetchAllPages(client, "provisioning profiles", "/v1/profiles?limit=200");
|
|
1665
|
+
return rows.map((row) => ({
|
|
1661
1666
|
id: row.id,
|
|
1662
1667
|
name: String(row.attributes.name ?? ""),
|
|
1663
1668
|
createdDate: String(row.attributes.createdDate ?? "")
|