@contentful/app-scripts 1.15.0 → 1.17.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/README.md +21 -21
- package/lib/types.d.ts +2 -2
- package/lib/utils.js +2 -1
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -106,14 +106,14 @@ When passing the `--ci` argument the command will fail when the required variabl
|
|
|
106
106
|
|
|
107
107
|
**Options:**
|
|
108
108
|
|
|
109
|
-
| Argument | Description | Default value
|
|
110
|
-
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
111
|
-
| `--bundle-dir` | The directory of your build folder (e.g.: `./build`) |
|
|
112
|
-
| `--organization-id` | The ID of your organization |
|
|
113
|
-
| `--definition-id` | The ID of the app to which to add the bundle |
|
|
114
|
-
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) |
|
|
115
|
-
| `--skip-activation` | (optional) Boolean flag to skip the automatic activation of the `AppBundle` | `false`
|
|
116
|
-
| `--comment` | (optional) A comment which will be associated with the created `AppBundle`. Can be used to differentiate bundles. |
|
|
109
|
+
| Argument | Description | Default value |
|
|
110
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
|
|
111
|
+
| `--bundle-dir` | The directory of your build folder (e.g.: `./build`) | |
|
|
112
|
+
| `--organization-id` | The ID of your organization | |
|
|
113
|
+
| `--definition-id` | The ID of the app to which to add the bundle | |
|
|
114
|
+
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) | |
|
|
115
|
+
| `--skip-activation` | (optional) Boolean flag to skip the automatic activation of the `AppBundle` | `false` |
|
|
116
|
+
| `--comment` | (optional) A comment which will be associated with the created `AppBundle`. Can be used to differentiate bundles. | |
|
|
117
117
|
| `--host` | (optional) Contentful CMA-endpoint to use | `api.contentful.com` |
|
|
118
118
|
|
|
119
119
|
**Note:** You can also pass all arguments in interactive mode to skip being asked for it.
|
|
@@ -149,12 +149,12 @@ When passing the `--ci` argument adding all variables as arguments is required.
|
|
|
149
149
|
|
|
150
150
|
**Options:**
|
|
151
151
|
|
|
152
|
-
| Argument | Description | Default value
|
|
153
|
-
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
154
|
-
| `--bundle-id` | The ID of the AppBundle you want to activate |
|
|
155
|
-
| `--organization-id` | The ID of your organization |
|
|
156
|
-
| `--definition-id` | The ID of the app to which to add the bundle |
|
|
157
|
-
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) |
|
|
152
|
+
| Argument | Description | Default value |
|
|
153
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
|
|
154
|
+
| `--bundle-id` | The ID of the AppBundle you want to activate | |
|
|
155
|
+
| `--organization-id` | The ID of your organization | |
|
|
156
|
+
| `--definition-id` | The ID of the app to which to add the bundle | |
|
|
157
|
+
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) | |
|
|
158
158
|
| `--host` | (optional) Contentful CMA-endpoint to use | `api.contentful.com` |
|
|
159
159
|
|
|
160
160
|
**Note:** You can also pass all arguments in interactive mode to skip being asked for it.
|
|
@@ -210,13 +210,13 @@ When passing the `--ci` argument adding all variables as arguments is required
|
|
|
210
210
|
|
|
211
211
|
**Options:**
|
|
212
212
|
|
|
213
|
-
| Argument | Description
|
|
214
|
-
| ------------------- |
|
|
215
|
-
| `--organization-id` | The ID of your organization
|
|
216
|
-
| `--definition-id` | The ID of the app to which to add the bundle
|
|
217
|
-
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) |
|
|
218
|
-
| `--keep` | (optional) The amount of bundles to keep
|
|
219
|
-
| `--host` | (optional) Contentful CMA-endpoint to use
|
|
213
|
+
| Argument | Description | Default value |
|
|
214
|
+
| ------------------- | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- |
|
|
215
|
+
| `--organization-id` | The ID of your organization | |
|
|
216
|
+
| `--definition-id` | The ID of the app to which to add the bundle | |
|
|
217
|
+
| `--token` | A personal [access token](https://www.contentful.com/developers/docs/references/content-management-api/#/reference/personal-access-tokens) | |
|
|
218
|
+
| `--keep` | (optional) The amount of bundles to keep | `50` |
|
|
219
|
+
| `--host` | (optional) Contentful CMA-endpoint to use | `api.contentful.com` |
|
|
220
220
|
|
|
221
221
|
**Note:** You can also pass all arguments in interactive mode to skip being asked for it.
|
|
222
222
|
|
package/lib/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Definition } from
|
|
2
|
-
import { Organization } from
|
|
1
|
+
import { Definition } from './definition-api';
|
|
2
|
+
import { Organization } from './organization-api';
|
|
3
3
|
export interface FunctionAppAction {
|
|
4
4
|
id: string;
|
|
5
5
|
name: string;
|
package/lib/utils.js
CHANGED
|
@@ -89,12 +89,13 @@ function getEntityFromManifest(type) {
|
|
|
89
89
|
logProgress(`${type === 'actions' ? 'App Actions' : 'functions'} found in ${chalk_1.default.bold(DEFAULT_MANIFEST_PATH)}.`);
|
|
90
90
|
const fieldMappingEvent = "graphql.field.mapping";
|
|
91
91
|
const queryEvent = "graphql.query";
|
|
92
|
+
const appEventFilter = 'appevent.filter';
|
|
92
93
|
const items = manifest[type].map((item) => {
|
|
93
94
|
const allowNetworks = Array.isArray(item.allowNetworks)
|
|
94
95
|
? item.allowNetworks.map(exports.stripProtocol)
|
|
95
96
|
: [];
|
|
96
97
|
const accepts = 'accepts' in item && Array.isArray(item.accepts) ? item.accepts : undefined;
|
|
97
|
-
const hasInvalidEvent = accepts?.some((event) => ![fieldMappingEvent, queryEvent].includes(event));
|
|
98
|
+
const hasInvalidEvent = accepts?.some((event) => ![fieldMappingEvent, queryEvent, appEventFilter].includes(event));
|
|
98
99
|
const hasInvalidNetwork = allowNetworks.find((netWork) => !(0, exports.isValidNetwork)(netWork));
|
|
99
100
|
if (hasInvalidNetwork) {
|
|
100
101
|
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.17.0",
|
|
4
4
|
"description": "A collection of scripts for building Contentful Apps",
|
|
5
5
|
"author": "Contentful GmbH",
|
|
6
6
|
"license": "MIT",
|
|
@@ -48,25 +48,25 @@
|
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
50
|
"@segment/analytics-node": "^2.0.0",
|
|
51
|
-
"adm-zip": "0.5.
|
|
51
|
+
"adm-zip": "0.5.12",
|
|
52
52
|
"bottleneck": "2.19.5",
|
|
53
53
|
"chalk": "4.1.2",
|
|
54
54
|
"commander": "12.0.0",
|
|
55
|
-
"contentful-management": "11.
|
|
56
|
-
"dotenv": "16.4.
|
|
55
|
+
"contentful-management": "11.23.0",
|
|
56
|
+
"dotenv": "16.4.5",
|
|
57
57
|
"ignore": "5.3.1",
|
|
58
58
|
"inquirer": "8.2.6",
|
|
59
59
|
"lodash": "4.17.21",
|
|
60
60
|
"open": "8.4.2",
|
|
61
61
|
"ora": "5.4.1"
|
|
62
62
|
},
|
|
63
|
-
"gitHead": "
|
|
63
|
+
"gitHead": "7576b84daf5069f42177cd8d43117f5f3c7056be",
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@tsconfig/node18": "18.2.2",
|
|
66
66
|
"@types/adm-zip": "0.5.5",
|
|
67
67
|
"@types/analytics-node": "3.1.14",
|
|
68
68
|
"@types/inquirer": "8.2.1",
|
|
69
|
-
"@types/lodash": "4.
|
|
69
|
+
"@types/lodash": "4.17.0",
|
|
70
70
|
"@types/proxyquire": "1.3.31",
|
|
71
71
|
"@types/sinon": "17.0.3",
|
|
72
72
|
"proxyquire": "2.1.3",
|