@contentful/app-scripts 1.32.0 → 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 body = {
51
- name: appName,
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,
@@ -6,7 +6,7 @@ const nonInteractive = async () => {
6
6
  (0, feedback_1.openFeedbackLink)();
7
7
  };
8
8
  const interactive = async () => {
9
- // No difference between interactive and non-interactive mode for opening feedback link
9
+ // No difference between interactive and non-interactive mode for opening feedback link.
10
10
  nonInteractive();
11
11
  };
12
12
  exports.feedback = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentful/app-scripts",
3
- "version": "1.32.0",
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",
@@ -54,17 +54,17 @@
54
54
  "bottleneck": "2.19.5",
55
55
  "chalk": "4.1.2",
56
56
  "commander": "12.1.0",
57
- "contentful-management": "11.40.2",
57
+ "contentful-management": "11.40.3",
58
58
  "dotenv": "16.4.7",
59
59
  "esbuild": "^0.24.0",
60
- "ignore": "6.0.2",
60
+ "ignore": "7.0.0",
61
61
  "inquirer": "8.2.6",
62
62
  "lodash": "4.17.21",
63
63
  "open": "8.4.2",
64
64
  "ora": "5.4.1",
65
65
  "zod": "^3.24.1"
66
66
  },
67
- "gitHead": "14a49c8e2b86cfeb35d8b24107e028ef0d807218",
67
+ "gitHead": "5bc6d159d2a14c8df1fc67f5fb30829094146a6b",
68
68
  "devDependencies": {
69
69
  "@types/adm-zip": "0.5.7",
70
70
  "@types/analytics-node": "3.1.14",