create-twenty-app 2.2.0 → 2.3.1
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 +5 -5
- package/dist/cli.cjs +61 -41
- package/dist/cli.mjs +2544 -2474
- package/dist/constants/template/AGENTS.md +67 -0
- package/dist/constants/template/README.md +1 -1
- package/dist/constants/template/src/application-config.ts +0 -2
- package/dist/constants/template/src/default-role.ts +2 -2
- package/dist/create-app.command.d.ts +5 -1
- package/dist/utils/app-template.d.ts +2 -1
- package/dist/utils/install.d.ts +1 -1
- package/package.json +2 -2
- package/src/constants/template/README.md +1 -1
- package/dist/constants/template/AGENT.md +0 -14
- package/dist/constants/template/CLAUDE.md +0 -14
- package/dist/constants/template/LLMS.md +0 -14
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
## Base documentation
|
|
2
|
+
|
|
3
|
+
- Getting started:
|
|
4
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/quick-start.md
|
|
5
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/concepts.md
|
|
6
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/project-structure.md
|
|
7
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/local-server.md
|
|
8
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/scaffolding.md
|
|
9
|
+
- https://docs.twenty.com/developers/extend/apps/getting-started/troubleshooting.md
|
|
10
|
+
- Config:
|
|
11
|
+
- https://docs.twenty.com/developers/extend/apps/config/overview.md
|
|
12
|
+
- https://docs.twenty.com/developers/extend/apps/config/application.md
|
|
13
|
+
- https://docs.twenty.com/developers/extend/apps/config/roles.md
|
|
14
|
+
- https://docs.twenty.com/developers/extend/apps/config/install-hooks.md
|
|
15
|
+
- https://docs.twenty.com/developers/extend/apps/config/public-assets.md
|
|
16
|
+
- Data:
|
|
17
|
+
- https://docs.twenty.com/developers/extend/apps/data/overview.md
|
|
18
|
+
- https://docs.twenty.com/developers/extend/apps/data/objects.md
|
|
19
|
+
- https://docs.twenty.com/developers/extend/apps/data/extending-objects.md
|
|
20
|
+
- https://docs.twenty.com/developers/extend/apps/data/relations.md
|
|
21
|
+
- Logic:
|
|
22
|
+
- https://docs.twenty.com/developers/extend/apps/logic/overview.md
|
|
23
|
+
- https://docs.twenty.com/developers/extend/apps/logic/logic-functions.md
|
|
24
|
+
- https://docs.twenty.com/developers/extend/apps/logic/skills-and-agents.md
|
|
25
|
+
- https://docs.twenty.com/developers/extend/apps/logic/connections.md
|
|
26
|
+
- Layout:
|
|
27
|
+
- https://docs.twenty.com/developers/extend/apps/layout/overview.md
|
|
28
|
+
- https://docs.twenty.com/developers/extend/apps/layout/views.md
|
|
29
|
+
- https://docs.twenty.com/developers/extend/apps/layout/navigation-menu-items.md
|
|
30
|
+
- https://docs.twenty.com/developers/extend/apps/layout/page-layouts.md
|
|
31
|
+
- https://docs.twenty.com/developers/extend/apps/layout/front-components.md
|
|
32
|
+
- https://docs.twenty.com/developers/extend/apps/layout/command-menu-items.md
|
|
33
|
+
- Operations:
|
|
34
|
+
- https://docs.twenty.com/developers/extend/apps/operations/overview.md
|
|
35
|
+
- https://docs.twenty.com/developers/extend/apps/operations/cli.md
|
|
36
|
+
- https://docs.twenty.com/developers/extend/apps/operations/testing.md
|
|
37
|
+
- https://docs.twenty.com/developers/extend/apps/operations/publishing.md
|
|
38
|
+
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/postcard
|
|
39
|
+
|
|
40
|
+
## UUID requirement
|
|
41
|
+
|
|
42
|
+
- All generated UUIDs must be valid UUID v4.
|
|
43
|
+
|
|
44
|
+
## Common Pitfalls
|
|
45
|
+
|
|
46
|
+
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
|
|
47
|
+
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
|
|
48
|
+
- Creating a front-end component that has a scroll instead of being responsive to its fixed widget height and width, unless it is specifically meant to be used in a canvas tab.
|
|
49
|
+
|
|
50
|
+
## Best practice
|
|
51
|
+
|
|
52
|
+
It's highly recommended to create new app entities using `yarn twenty add`. These are the options:
|
|
53
|
+
|
|
54
|
+
| Entity type | Command | Generated file |
|
|
55
|
+
| -------------------- | ------------------------------------ | ------------------------------------- |
|
|
56
|
+
| Object | `yarn twenty add object` | `src/objects/<name>.ts` |
|
|
57
|
+
| Field | `yarn twenty add field` | `src/fields/<name>.ts` |
|
|
58
|
+
| Logic function | `yarn twenty add logicFunction` | `src/logic-functions/<name>.ts` |
|
|
59
|
+
| Front component | `yarn twenty add frontComponent` | `src/front-components/<name>.tsx` |
|
|
60
|
+
| Role | `yarn twenty add role` | `src/roles/<name>.ts` |
|
|
61
|
+
| Skill | `yarn twenty add skill` | `src/skills/<name>.ts` |
|
|
62
|
+
| Agent | `yarn twenty add agent` | `src/agents/<name>.ts` |
|
|
63
|
+
| View | `yarn twenty add view` | `src/views/<name>.ts` |
|
|
64
|
+
| Navigation menu item | `yarn twenty add navigationMenuItem` | `src/navigation-menu-items/<name>.ts` |
|
|
65
|
+
| Page layout | `yarn twenty add pageLayout` | `src/page-layouts/<name>.ts` |
|
|
66
|
+
|
|
67
|
+
This helps automatically generate required IDs etc.
|
|
@@ -6,6 +6,6 @@ Run `yarn twenty help` to list all available commands.
|
|
|
6
6
|
|
|
7
7
|
## Learn More
|
|
8
8
|
|
|
9
|
-
- [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started)
|
|
9
|
+
- [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)
|
|
10
10
|
- [twenty-sdk CLI reference](https://www.npmjs.com/package/twenty-sdk)
|
|
11
11
|
- [Discord](https://discord.gg/cx5n4Jzs57)
|
|
@@ -4,12 +4,10 @@ import {
|
|
|
4
4
|
APP_DESCRIPTION,
|
|
5
5
|
APP_DISPLAY_NAME,
|
|
6
6
|
APPLICATION_UNIVERSAL_IDENTIFIER,
|
|
7
|
-
DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
|
|
8
7
|
} from 'src/constants/universal-identifiers';
|
|
9
8
|
|
|
10
9
|
export default defineApplication({
|
|
11
10
|
universalIdentifier: APPLICATION_UNIVERSAL_IDENTIFIER,
|
|
12
11
|
displayName: APP_DISPLAY_NAME,
|
|
13
12
|
description: APP_DESCRIPTION,
|
|
14
|
-
defaultRoleUniversalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
|
|
15
13
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { defineApplicationRole } from 'twenty-sdk/define';
|
|
2
2
|
|
|
3
3
|
import {
|
|
4
4
|
APP_DISPLAY_NAME,
|
|
5
5
|
DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
|
|
6
6
|
} from 'src/constants/universal-identifiers';
|
|
7
7
|
|
|
8
|
-
export default
|
|
8
|
+
export default defineApplicationRole({
|
|
9
9
|
universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
|
|
10
10
|
label: `${APP_DISPLAY_NAME} default function role`,
|
|
11
11
|
description: `${APP_DISPLAY_NAME} default function role`,
|
|
@@ -8,12 +8,16 @@ type CreateAppOptions = {
|
|
|
8
8
|
yes?: boolean;
|
|
9
9
|
};
|
|
10
10
|
export declare class CreateAppCommand {
|
|
11
|
+
private static TOTAL_STEPS;
|
|
11
12
|
execute(options?: CreateAppOptions): Promise<void>;
|
|
12
13
|
private getAppInfos;
|
|
13
14
|
private validateDirectory;
|
|
14
15
|
private tryDownloadExample;
|
|
15
|
-
private
|
|
16
|
+
private promptScaffoldConfirmation;
|
|
17
|
+
private logStep;
|
|
18
|
+
private logDetail;
|
|
16
19
|
private shouldStartServer;
|
|
20
|
+
private logServerSkipped;
|
|
17
21
|
private promptConnectToLocal;
|
|
18
22
|
private logSuccess;
|
|
19
23
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
export declare const copyBaseApplicationProject: ({ appName, appDisplayName, appDescription, appDirectory, }: {
|
|
1
|
+
export declare const copyBaseApplicationProject: ({ appName, appDisplayName, appDescription, appDirectory, onProgress, }: {
|
|
2
2
|
appName: string;
|
|
3
3
|
appDisplayName: string;
|
|
4
4
|
appDescription: string;
|
|
5
5
|
appDirectory: string;
|
|
6
|
+
onProgress?: (message: string) => void;
|
|
6
7
|
}) => Promise<void>;
|
package/dist/utils/install.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const install: (root: string) => Promise<void>;
|
|
1
|
+
export declare const install: (root: string, onProgress?: (message: string) => void) => Promise<void>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-twenty-app",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "Command-line interface to create Twenty application",
|
|
5
5
|
"main": "dist/cli.cjs",
|
|
6
6
|
"bin": "dist/cli.cjs",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"lodash.camelcase": "^4.3.0",
|
|
37
37
|
"lodash.kebabcase": "^4.1.1",
|
|
38
38
|
"lodash.startcase": "^4.4.0",
|
|
39
|
-
"twenty-sdk": "2.
|
|
39
|
+
"twenty-sdk": "2.3.1",
|
|
40
40
|
"uuid": "^13.0.0"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
@@ -6,6 +6,6 @@ Run `yarn twenty help` to list all available commands.
|
|
|
6
6
|
|
|
7
7
|
## Learn More
|
|
8
8
|
|
|
9
|
-
- [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started)
|
|
9
|
+
- [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)
|
|
10
10
|
- [twenty-sdk CLI reference](https://www.npmjs.com/package/twenty-sdk)
|
|
11
11
|
- [Discord](https://discord.gg/cx5n4Jzs57)
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
## Base documentation
|
|
2
|
-
|
|
3
|
-
- Documentation: https://docs.twenty.com/developers/extend/apps/getting-started
|
|
4
|
-
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/postcard
|
|
5
|
-
|
|
6
|
-
## UUID requirement
|
|
7
|
-
|
|
8
|
-
- All generated UUIDs must be valid UUID v4.
|
|
9
|
-
|
|
10
|
-
## Common Pitfalls
|
|
11
|
-
|
|
12
|
-
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
|
|
13
|
-
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
|
|
14
|
-
- Creating a front-end component that has a scroll instead of being responsive to its fixed widget height and width, unless it is specifically meant to be used in a canvas tab.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
## Base documentation
|
|
2
|
-
|
|
3
|
-
- Documentation: https://docs.twenty.com/developers/extend/apps/getting-started
|
|
4
|
-
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/postcard
|
|
5
|
-
|
|
6
|
-
## UUID requirement
|
|
7
|
-
|
|
8
|
-
- All generated UUIDs must be valid UUID v4.
|
|
9
|
-
|
|
10
|
-
## Common Pitfalls
|
|
11
|
-
|
|
12
|
-
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
|
|
13
|
-
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
|
|
14
|
-
- Creating a front-end component that has a scroll instead of being responsive to its fixed widget height and width, unless it is specifically meant to be used in a canvas tab.
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
## Base documentation
|
|
2
|
-
|
|
3
|
-
- Documentation: https://docs.twenty.com/developers/extend/apps/getting-started
|
|
4
|
-
- Rich app example: https://github.com/twentyhq/twenty/tree/main/packages/twenty-apps/examples/postcard
|
|
5
|
-
|
|
6
|
-
## UUID requirement
|
|
7
|
-
|
|
8
|
-
- All generated UUIDs must be valid UUID v4.
|
|
9
|
-
|
|
10
|
-
## Common Pitfalls
|
|
11
|
-
|
|
12
|
-
- Creating an object without an index view associated. Unless this is a technical object, user will need to visualize it.
|
|
13
|
-
- Creating a view without a navigationMenuItem associated. This will make the view available on the left sidebar.
|
|
14
|
-
- Creating a front-end component that has a scroll instead of being responsive to its fixed widget height and width, unless it is specifically meant to be used in a canvas tab.
|