create-twenty-app 2.5.1 → 2.7.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.
@@ -49,19 +49,19 @@
49
49
 
50
50
  ## Best practice
51
51
 
52
- It's highly recommended to create new app entities using `yarn twenty add`. These are the options:
52
+ It's highly recommended to create new app entities using `yarn twenty dev:add`. These are the options:
53
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` |
54
+ | Entity type | Command | Generated file |
55
+ | -------------------- | ---------------------------------------- | ------------------------------------- |
56
+ | Object | `yarn twenty dev:add object` | `src/objects/<name>.ts` |
57
+ | Field | `yarn twenty dev:add field` | `src/fields/<name>.ts` |
58
+ | Logic function | `yarn twenty dev:add logicFunction` | `src/logic-functions/<name>.ts` |
59
+ | Front component | `yarn twenty dev:add frontComponent` | `src/front-components/<name>.tsx` |
60
+ | Role | `yarn twenty dev:add role` | `src/roles/<name>.ts` |
61
+ | Skill | `yarn twenty dev:add skill` | `src/skills/<name>.ts` |
62
+ | Agent | `yarn twenty dev:add agent` | `src/agents/<name>.ts` |
63
+ | View | `yarn twenty dev:add view` | `src/views/<name>.ts` |
64
+ | Navigation menu item | `yarn twenty dev:add navigationMenuItem` | `src/navigation-menu-items/<name>.ts` |
65
+ | Page layout | `yarn twenty dev:add pageLayout` | `src/page-layouts/<name>.ts` |
66
66
 
67
67
  This helps automatically generate required IDs etc.
@@ -11,8 +11,8 @@ Run `yarn twenty help` to list all available commands.
11
11
  ## Useful Commands
12
12
 
13
13
  - `yarn twenty dev` - Start the development server and sync your app
14
- - `yarn twenty server status` - Check the local Twenty server status
15
- - `yarn twenty server start` - Start the local Twenty server
14
+ - `yarn twenty docker:status` - Check the local Twenty server status
15
+ - `yarn twenty docker:start` - Start the local Twenty server
16
16
  - `yarn test` - Run integration tests
17
17
 
18
18
  ## Learn More
@@ -14,7 +14,7 @@ function validateEnv(): { apiUrl: string; apiKey: string } {
14
14
  if (!apiUrl || !apiKey) {
15
15
  throw new Error(
16
16
  'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' +
17
- 'Start a local server: yarn twenty server start\n' +
17
+ 'Start a local server: yarn twenty docker:start\n' +
18
18
  'Or set them in vitest env config.',
19
19
  );
20
20
  }
@@ -1,4 +1,11 @@
1
1
  import { defineFrontComponent } from 'twenty-sdk/define';
2
+ import {
3
+ Avatar,
4
+ IconBox,
5
+ IconHierarchy,
6
+ IconLayout,
7
+ IconSettingsAutomation,
8
+ } from 'twenty-sdk/ui';
2
9
  import { useState } from 'react';
3
10
 
4
11
  import {
@@ -30,7 +37,7 @@ const CATEGORIES = [
30
37
  href: `${DOCS_BASE_URL}/logic/logic-functions`,
31
38
  },
32
39
  {
33
- label: 'SERVERLESS FUNCT.',
40
+ label: 'LOGIC FUNCTION',
34
41
  href: `${DOCS_BASE_URL}/logic/logic-functions`,
35
42
  },
36
43
  {
@@ -59,15 +66,6 @@ const CATEGORIES = [
59
66
  },
60
67
  ] as const;
61
68
 
62
- const ItemIcon = ({ color }: { color: string }) => (
63
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none">
64
- <rect x="2" y="2" width="5" height="5" rx="1" fill={color} />
65
- <rect x="9" y="2" width="5" height="5" rx="1" fill={color} opacity="0.6" />
66
- <rect x="2" y="9" width="5" height="5" rx="1" fill={color} opacity="0.6" />
67
- <rect x="9" y="9" width="5" height="5" rx="1" fill={color} opacity="0.3" />
68
- </svg>
69
- );
70
-
71
69
  const ArrowUpRight = ({ color = '#999' }: { color?: string }) => (
72
70
  <svg width="14" height="14" viewBox="0 0 14 14" fill="none">
73
71
  <path
@@ -93,6 +91,18 @@ const CategoryCard = ({
93
91
  }) => {
94
92
  const [hoveredItem, setHoveredItem] = useState<string | null>(null);
95
93
 
94
+ const CategoryIcon = () => {
95
+ if (title === 'Data model') {
96
+ return <IconHierarchy color={color} size={'20px'} />;
97
+ }
98
+ if (title === 'Logic') {
99
+ return <IconSettingsAutomation color={color} size={'20px'} />;
100
+ }
101
+ if (title === 'Layout') {
102
+ return <IconLayout color={color} size={'20px'} />;
103
+ }
104
+ };
105
+
96
106
  return (
97
107
  <div
98
108
  style={{
@@ -111,8 +121,12 @@ const CategoryCard = ({
111
121
  style={{
112
122
  padding: '16px 20px',
113
123
  background: `${color}22`,
124
+ display: 'flex',
125
+ alignItems: 'center',
126
+ gap: '12px',
114
127
  }}
115
128
  >
129
+ <CategoryIcon />
116
130
  <span
117
131
  style={{
118
132
  fontSize: '16px',
@@ -154,7 +168,7 @@ const CategoryCard = ({
154
168
  transition: 'background 0.15s',
155
169
  }}
156
170
  >
157
- <ItemIcon color={color} />
171
+ <IconBox color={color} size={'20px'} />
158
172
  <span
159
173
  style={{
160
174
  fontSize: '13px',
@@ -190,13 +204,11 @@ const MainPage = () => {
190
204
  padding: '40px',
191
205
  }}
192
206
  >
193
- {/*<Avatar
194
- avatarUrl={getPublicAssetUrl('logo.svg')}
207
+ <Avatar
195
208
  placeholder={APP_DISPLAY_NAME}
196
209
  placeholderColorSeed={APP_DISPLAY_NAME}
197
- type="squared"
198
210
  size="xl"
199
- />*/}
211
+ />
200
212
  <span
201
213
  style={{
202
214
  fontSize: '24px',
@@ -220,7 +232,7 @@ const MainPage = () => {
220
232
  You can now add content to your app.
221
233
  </span>
222
234
  <a
223
- href="/settings/applications"
235
+ href="/settings/applications#installed"
224
236
  style={{
225
237
  display: 'inline-flex',
226
238
  alignItems: 'center',
@@ -0,0 +1 @@
1
+ nodeLinker: node-modules
@@ -4,7 +4,7 @@ type CreateAppOptions = {
4
4
  name?: string;
5
5
  displayName?: string;
6
6
  description?: string;
7
- workspaceUrl?: string;
7
+ serverUrl?: string;
8
8
  authenticationMethod?: AuthenticationMethod;
9
9
  };
10
10
  export declare class CreateAppCommand {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-twenty-app",
3
- "version": "2.5.1",
3
+ "version": "2.7.0",
4
4
  "description": "Command-line interface to create Twenty application",
5
5
  "main": "dist/cli.cjs",
6
6
  "bin": "dist/cli.cjs",
@@ -35,7 +35,7 @@
35
35
  "lodash.camelcase": "^4.3.0",
36
36
  "lodash.kebabcase": "^4.1.1",
37
37
  "lodash.startcase": "^4.4.0",
38
- "twenty-sdk": "2.5.1",
38
+ "twenty-sdk": "2.7.0",
39
39
  "uuid": "^13.0.0"
40
40
  },
41
41
  "devDependencies": {
@@ -11,8 +11,8 @@ Run `yarn twenty help` to list all available commands.
11
11
  ## Useful Commands
12
12
 
13
13
  - `yarn twenty dev` - Start the development server and sync your app
14
- - `yarn twenty server status` - Check the local Twenty server status
15
- - `yarn twenty server start` - Start the local Twenty server
14
+ - `yarn twenty docker:status` - Check the local Twenty server status
15
+ - `yarn twenty docker:start` - Start the local Twenty server
16
16
  - `yarn test` - Run integration tests
17
17
 
18
18
  ## Learn More