Skip to content

Commit e0fec0f

Browse files
feat!: [BREAKING CHANGE] Remove actions option from CCA [EXT-6023] (#2358)
* feat!: [BREAKING CHANGE] Remove actions option * feat!: [BREAKING CHANGE] bump node and npm engines BREAKING CHANGE: remove app actions and bump engines
1 parent b88a46b commit e0fec0f

File tree

8 files changed

+4
-107
lines changed

8 files changed

+4
-107
lines changed

packages/contentful--create-contentful-app/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@ Options:
9595
-e, --example <example-name> bootstrap an example app from https://github.com/contentful/apps/tree/master/examples
9696
-s, --source <url> provide a template by its source repository.
9797
format: URL (HTTPS or SSH) or vendor:user/repo (e.g., github:user/repo)
98-
-a, --actions includes a hosted app action in ts or js template
9998
-f, --function <function-template-name> include the specified function template
10099
-h, --help shows all available CLI options
101100
```

packages/contentful--create-contentful-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
"directory": "packages/contentful--create-contentful-app"
1515
},
1616
"engines": {
17-
"node": ">=14.15.0",
18-
"npm": ">=6"
17+
"node": ">=18",
18+
"npm": ">=9"
1919
},
2020
"main": "lib/index.js",
2121
"lint-staged": {

packages/contentful--create-contentful-app/src/getTemplateSource.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export async function makeContentfulExampleSource(options: CLIOptions): Promise<
100100
return selectTemplate(ContentfulExample.Typescript);
101101
}
102102

103-
if (options.function || options.action) {
103+
if (options.function) {
104104
return selectTemplate(ContentfulExample.Typescript);
105105
}
106106

packages/contentful--create-contentful-app/src/includeAppAction.ts

Lines changed: 0 additions & 92 deletions
This file was deleted.

packages/contentful--create-contentful-app/src/index.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import chalk from 'chalk';
1414
import { CREATE_APP_DEFINITION_GUIDE_URL, EXAMPLES_REPO_URL } from './constants';
1515
import { getTemplateSource } from './getTemplateSource';
1616
import { track } from './analytics';
17-
import { cloneAppAction } from './includeAppAction';
1817
import { cloneFunction } from './includeFunction';
1918

2019
const DEFAULT_APP_NAME = 'contentful-app';
@@ -113,8 +112,7 @@ async function initProject(appName: string, options: CLIOptions) {
113112
!normalizedOptions.source &&
114113
!normalizedOptions.javascript &&
115114
!normalizedOptions.typescript &&
116-
!normalizedOptions.function &&
117-
!normalizedOptions.action;
115+
!normalizedOptions.function;
118116

119117
const templateSource = await getTemplateSource(options);
120118

@@ -126,10 +124,6 @@ async function initProject(appName: string, options: CLIOptions) {
126124

127125
await cloneTemplateIn(fullAppFolder, templateSource);
128126

129-
if (!isInteractive && isContentfulTemplate(templateSource) && normalizedOptions.action) {
130-
await cloneAppAction(fullAppFolder, !!normalizedOptions.javascript);
131-
}
132-
133127
if (!isInteractive && isContentfulTemplate(templateSource) && normalizedOptions.function) {
134128
// If function flag is specified, but no function name is provided, we default to external-references
135129
// for legacy support

packages/contentful--create-contentful-app/src/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export type CLIOptions = Partial<{
55
typescript: boolean;
66
source: string;
77
example: string;
8-
action: boolean;
98
function: string | boolean;
109
}>;
1110

packages/contentful--create-contentful-app/src/utils.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,13 @@ export function normalizeOptions(options: CLIOptions): CLIOptions {
6464
delete normalizedOptions.example;
6565
delete normalizedOptions.typescript;
6666
delete normalizedOptions.javascript;
67-
delete normalizedOptions.action;
6867
delete normalizedOptions.function;
6968
}
7069

7170
if (normalizedOptions.example) {
7271
fallbackOption = '--example';
7372
delete normalizedOptions.typescript;
7473
delete normalizedOptions.javascript;
75-
delete normalizedOptions.action;
7674
delete normalizedOptions.function;
7775
}
7876

packages/create-contentful-app/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ Options:
8585
-e, --example <example-name> bootstrap an example app from https://github.com/contentful/apps/tree/master/examples
8686
-s, --source <url> provide a template by its source repository.
8787
format: URL (HTTPS or SSH) or vendor:user/repo (e.g., github:user/repo)
88-
-a, --actions includes a hosted app action in ts or js template
8988
-f, --function <function-template-name> include the specified function template
9089
-h, --help shows all available CLI options
9190
```

0 commit comments

Comments
 (0)