@contentful/app-scripts 1.23.0 → 1.25.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.
|
@@ -70,10 +70,9 @@ async function promptForParameter() {
|
|
|
70
70
|
type: 'list',
|
|
71
71
|
choices(answers) {
|
|
72
72
|
const parameterTypes = ['Boolean', 'Symbol', 'Number', 'Enum'];
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
// }
|
|
73
|
+
if (answers.instanceOrInstallation === 'Installation') {
|
|
74
|
+
parameterTypes.push('Secret');
|
|
75
|
+
}
|
|
77
76
|
return parameterTypes;
|
|
78
77
|
},
|
|
79
78
|
},
|
|
@@ -101,10 +100,9 @@ async function promptForParameter() {
|
|
|
101
100
|
{
|
|
102
101
|
name: 'default',
|
|
103
102
|
message: 'Default value (leave blank if none):',
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// },
|
|
103
|
+
when(answers) {
|
|
104
|
+
return answers.type !== 'Secret';
|
|
105
|
+
},
|
|
108
106
|
validate(input, answers) {
|
|
109
107
|
return validateDefault(input, answers.type, answers.options);
|
|
110
108
|
},
|
package/lib/utils.js
CHANGED
|
@@ -9,9 +9,11 @@ const chalk_1 = __importDefault(require("chalk"));
|
|
|
9
9
|
const inquirer_1 = __importDefault(require("inquirer"));
|
|
10
10
|
const cache_credential_1 = require("./cache-credential");
|
|
11
11
|
const DEFAULT_MANIFEST_PATH = './contentful-app-manifest.json';
|
|
12
|
-
const
|
|
12
|
+
const functionEvents = {
|
|
13
13
|
fieldMappingEvent: 'graphql.field.mapping',
|
|
14
14
|
queryEvent: 'graphql.query',
|
|
15
|
+
resourceLinksSearchEvent: 'resources.search',
|
|
16
|
+
resourceLinksLookupEvent: 'resources.lookup',
|
|
15
17
|
};
|
|
16
18
|
const appEvents = {
|
|
17
19
|
appEventFilter: 'appevent.filter',
|
|
@@ -101,7 +103,7 @@ function getEntityFromManifest(type) {
|
|
|
101
103
|
? item.allowNetworks.map(exports.stripProtocol)
|
|
102
104
|
: [];
|
|
103
105
|
const accepts = 'accepts' in item && Array.isArray(item.accepts) ? item.accepts : undefined;
|
|
104
|
-
const hasInvalidEvent = accepts?.some((event) => ![...Object.values(
|
|
106
|
+
const hasInvalidEvent = accepts?.some((event) => ![...Object.values(functionEvents), ...Object.values(appEvents)].includes(event));
|
|
105
107
|
const hasInvalidNetwork = allowNetworks.find((netWork) => !(0, exports.isValidNetwork)(netWork));
|
|
106
108
|
if (hasInvalidNetwork) {
|
|
107
109
|
console.log(`${chalk_1.default.red('Error:')} Invalid IP address ${hasInvalidNetwork} found in the allowNetworks array for ${type} "${item.name}".`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentful/app-scripts",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.25.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": "12.1.0",
|
|
55
|
-
"contentful-management": "11.27.
|
|
55
|
+
"contentful-management": "11.27.4",
|
|
56
56
|
"dotenv": "16.4.5",
|
|
57
57
|
"ignore": "5.3.1",
|
|
58
58
|
"inquirer": "8.2.6",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"open": "8.4.2",
|
|
61
61
|
"ora": "5.4.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "12181d922876d806add6afa7e478829182ad1f6d",
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@tsconfig/node18": "18.2.4",
|
|
66
66
|
"@types/adm-zip": "0.5.5",
|
|
@@ -68,11 +68,11 @@
|
|
|
68
68
|
"@types/chai": "4.3.16",
|
|
69
69
|
"@types/inquirer": "8.2.1",
|
|
70
70
|
"@types/lodash": "4.17.5",
|
|
71
|
-
"@types/mocha": "10.0.
|
|
71
|
+
"@types/mocha": "10.0.7",
|
|
72
72
|
"@types/proxyquire": "1.3.31",
|
|
73
73
|
"@types/sinon": "17.0.3",
|
|
74
74
|
"chai": "5.1.1",
|
|
75
|
-
"mocha": "10.
|
|
75
|
+
"mocha": "10.5.2",
|
|
76
76
|
"proxyquire": "2.1.3",
|
|
77
77
|
"sinon": "18.0.0",
|
|
78
78
|
"ts-mocha": "10.0.0",
|