@contentful/app-scripts 1.31.0 → 1.31.1
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/lib/definition-api.js +10 -2
- package/package.json +5 -5
package/lib/definition-api.js
CHANGED
|
@@ -10,8 +10,16 @@ const constants_1 = require("./constants");
|
|
|
10
10
|
async function fetchDefinitions(client, orgId) {
|
|
11
11
|
try {
|
|
12
12
|
const organization = await client.getOrganization(orgId);
|
|
13
|
-
const
|
|
14
|
-
|
|
13
|
+
const batchedAppDefinitions = [];
|
|
14
|
+
let skip = 0;
|
|
15
|
+
let totalNumOfAppDefinitions = 0;
|
|
16
|
+
while (skip === 0 || batchedAppDefinitions.length < totalNumOfAppDefinitions) {
|
|
17
|
+
const appDefinitionsResponse = await organization.getAppDefinitions({ skip, limit: 100 });
|
|
18
|
+
totalNumOfAppDefinitions = appDefinitionsResponse.total;
|
|
19
|
+
batchedAppDefinitions.push(...appDefinitionsResponse.items);
|
|
20
|
+
skip += 100;
|
|
21
|
+
}
|
|
22
|
+
return batchedAppDefinitions.map((def) => ({
|
|
15
23
|
name: def.name,
|
|
16
24
|
value: def.sys.id,
|
|
17
25
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "1.31.
|
|
3
|
+
"version": "1.31.1",
|
|
4
4
|
"description": "A collection of scripts for building Contentful Apps",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,18 +52,18 @@
|
|
|
52
52
|
"bottleneck": "2.19.5",
|
|
53
53
|
"chalk": "4.1.2",
|
|
54
54
|
"commander": "12.1.0",
|
|
55
|
-
"contentful-management": "11.
|
|
56
|
-
"dotenv": "16.4.
|
|
55
|
+
"contentful-management": "11.40.0",
|
|
56
|
+
"dotenv": "16.4.6",
|
|
57
57
|
"ignore": "6.0.2",
|
|
58
58
|
"inquirer": "8.2.6",
|
|
59
59
|
"lodash": "4.17.21",
|
|
60
60
|
"open": "8.4.2",
|
|
61
61
|
"ora": "5.4.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "abfff61de7708ed53d3f3afbbb59f64673ca5a4a",
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@tsconfig/node18": "18.2.4",
|
|
66
|
-
"@types/adm-zip": "0.5.
|
|
66
|
+
"@types/adm-zip": "0.5.7",
|
|
67
67
|
"@types/analytics-node": "3.1.14",
|
|
68
68
|
"@types/chai": "4.3.16",
|
|
69
69
|
"@types/inquirer": "8.2.1",
|