@contentful/app-scripts 1.23.0 → 1.24.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.
- package/lib/utils.js +4 -2
- package/package.json +3 -3
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.24.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.1",
|
|
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": "7441f7531b4d9165d7936372acafbb82a180dccd",
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@tsconfig/node18": "18.2.4",
|
|
66
66
|
"@types/adm-zip": "0.5.5",
|