@contentful/app-scripts 1.2.7 → 1.5.0
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.
|
@@ -22,10 +22,12 @@ NOTE: This will create an app definition in your Contentful organization.
|
|
|
22
22
|
message: `Select where your app can be rendered:`,
|
|
23
23
|
type: 'checkbox',
|
|
24
24
|
choices: [
|
|
25
|
+
{ name: 'App configuration screen (app-config) ', value: 'app-config' },
|
|
25
26
|
{ name: 'Entry field (entry-field) ', value: 'entry-field' },
|
|
26
|
-
{ name: 'Entry editor (entry-editor)', value: 'entry-editor' },
|
|
27
27
|
{ name: 'Entry sidebar (entry-sidebar) ', value: 'entry-sidebar' },
|
|
28
|
+
{ name: 'Entry editor (entry-editor)', value: 'entry-editor' },
|
|
28
29
|
{ name: 'Page (page) ', value: 'page' },
|
|
30
|
+
{ name: 'Home (home) ', value: 'home' },
|
|
29
31
|
],
|
|
30
32
|
},
|
|
31
33
|
{
|
|
@@ -72,8 +74,7 @@ NOTE: This will create an app definition in your Contentful organization.
|
|
|
72
74
|
},
|
|
73
75
|
]);
|
|
74
76
|
|
|
75
|
-
|
|
76
|
-
appDefinitionSettings.locations = ['app-config', 'dialog', ...appDefinitionSettings.locations];
|
|
77
|
+
appDefinitionSettings.locations = ['dialog', ...appDefinitionSettings.locations];
|
|
77
78
|
|
|
78
79
|
return appDefinitionSettings;
|
|
79
80
|
}
|
|
@@ -7,7 +7,12 @@ const { createAppUpload } = require('./create-app-upload');
|
|
|
7
7
|
|
|
8
8
|
async function createAppBundleFromUpload(settings, appUploadId) {
|
|
9
9
|
const clientSpinner = ora('Verifying your upload...').start();
|
|
10
|
-
const client = createClient({
|
|
10
|
+
const client = createClient({
|
|
11
|
+
accessToken: settings.accessToken,
|
|
12
|
+
application: settings.userAgentApplication
|
|
13
|
+
? settings.userAgentApplication
|
|
14
|
+
: 'contentful.app-scripts',
|
|
15
|
+
});
|
|
11
16
|
const organization = await client.getOrganization(settings.organization.value);
|
|
12
17
|
const appDefinition = await organization.getAppDefinition(settings.definition.value);
|
|
13
18
|
clientSpinner.stop();
|
|
@@ -31,18 +36,16 @@ async function createAppBundleFromSettings(settings) {
|
|
|
31
36
|
try {
|
|
32
37
|
appUpload = await createAppUpload(settings);
|
|
33
38
|
console.log(`
|
|
34
|
-
${chalk.yellow(
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
appUpload.sys.id
|
|
38
|
-
)}) has been created.`);
|
|
39
|
+
${chalk.yellow('Done!')} Your files were successfully uploaded and a new AppUpload (${chalk.dim(
|
|
40
|
+
appUpload.sys.id
|
|
41
|
+
)}) has been created.`);
|
|
39
42
|
} catch (err) {
|
|
40
43
|
showCreationError('app upload', err.message);
|
|
41
44
|
}
|
|
42
45
|
|
|
43
46
|
if (!appUpload) return;
|
|
44
47
|
|
|
45
|
-
console.log(
|
|
48
|
+
console.log('');
|
|
46
49
|
console.log(` ----------------------------`);
|
|
47
50
|
const appBundle = await createAppBundleFromUpload(settings, appUpload.sys.id);
|
|
48
51
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.0",
|
|
4
4
|
"description": "A collection of scripts for building Contentful Apps",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
"bottleneck": "2.19.5",
|
|
53
53
|
"chalk": "4.1.2",
|
|
54
54
|
"commander": "9.4.1",
|
|
55
|
-
"contentful-management": "10.
|
|
55
|
+
"contentful-management": "10.23.0",
|
|
56
56
|
"dotenv": "16.0.3",
|
|
57
57
|
"ignore": "5.2.1",
|
|
58
58
|
"inquirer": "8.2.5",
|
|
@@ -60,5 +60,5 @@
|
|
|
60
60
|
"open": "8.4.0",
|
|
61
61
|
"ora": "5.4.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "29c6f21eb53831fa0445ab8522c48ab2f688d764"
|
|
64
64
|
}
|