@contentful/app-scripts 1.32.1 → 1.32.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.
|
@@ -47,34 +47,36 @@ async function createAppDefinition(accessToken, appDefinitionSettings) {
|
|
|
47
47
|
const selectedOrg = await (0, utils_1.selectFromList)(organizations, 'Select an organization for your app:', constants_1.ORG_ID_ENV_KEY);
|
|
48
48
|
const organizationId = selectedOrg.value;
|
|
49
49
|
const appName = appDefinitionSettings.name || path_1.default.basename(process.cwd());
|
|
50
|
-
const
|
|
51
|
-
|
|
52
|
-
src: 'http://localhost:3000',
|
|
53
|
-
locations: appDefinitionSettings.locations.map((location) => {
|
|
54
|
-
if (location === 'entry-field') {
|
|
55
|
-
return {
|
|
56
|
-
location,
|
|
57
|
-
fieldTypes: appDefinitionSettings.fields || [],
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
if (location === 'page') {
|
|
61
|
-
const { pageNav, pageNavLinkName, pageNavLinkPath } = appDefinitionSettings;
|
|
62
|
-
return {
|
|
63
|
-
location,
|
|
64
|
-
...(pageNav
|
|
65
|
-
? {
|
|
66
|
-
navigationItem: {
|
|
67
|
-
name: pageNavLinkName,
|
|
68
|
-
path: pageNavLinkPath,
|
|
69
|
-
},
|
|
70
|
-
}
|
|
71
|
-
: {}),
|
|
72
|
-
};
|
|
73
|
-
}
|
|
50
|
+
const locations = appDefinitionSettings.locations.map((location) => {
|
|
51
|
+
if (location === 'entry-field') {
|
|
74
52
|
return {
|
|
75
53
|
location,
|
|
54
|
+
fieldTypes: appDefinitionSettings.fields || [],
|
|
76
55
|
};
|
|
77
|
-
}
|
|
56
|
+
}
|
|
57
|
+
if (location === 'page') {
|
|
58
|
+
const { pageNav, pageNavLinkName, pageNavLinkPath } = appDefinitionSettings;
|
|
59
|
+
return {
|
|
60
|
+
location,
|
|
61
|
+
...(pageNav
|
|
62
|
+
? {
|
|
63
|
+
navigationItem: {
|
|
64
|
+
name: pageNavLinkName,
|
|
65
|
+
path: pageNavLinkPath,
|
|
66
|
+
},
|
|
67
|
+
}
|
|
68
|
+
: {}),
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
location,
|
|
73
|
+
};
|
|
74
|
+
});
|
|
75
|
+
const hasFrontendLocation = locations.some(({ location }) => location !== 'dialog');
|
|
76
|
+
const body = {
|
|
77
|
+
name: appName,
|
|
78
|
+
src: hasFrontendLocation ? 'http://localhost:3000' : undefined,
|
|
79
|
+
locations,
|
|
78
80
|
parameters: {
|
|
79
81
|
...(appDefinitionSettings.parameters?.instance && {
|
|
80
82
|
instance: appDefinitionSettings.parameters.instance,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "1.32.
|
|
3
|
+
"version": "1.32.2",
|
|
4
4
|
"description": "A collection of scripts for building Contentful Apps",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
"ora": "5.4.1",
|
|
65
65
|
"zod": "^3.24.1"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "5bc6d159d2a14c8df1fc67f5fb30829094146a6b",
|
|
68
68
|
"devDependencies": {
|
|
69
69
|
"@types/adm-zip": "0.5.7",
|
|
70
70
|
"@types/analytics-node": "3.1.14",
|