create-twenty-app 2.19.0 → 2.21.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/dist/cli.mjs CHANGED
@@ -30,7 +30,7 @@ var b = Object.create, x = Object.defineProperty, S = Object.getOwnPropertyDescr
30
30
  enumerable: !0
31
31
  }) : n, e)), re = {
32
32
  name: "create-twenty-app",
33
- version: "2.19.0",
33
+ version: "2.21.0",
34
34
  description: "Command-line interface to create Twenty application",
35
35
  main: "dist/cli.cjs",
36
36
  bin: "dist/cli.cjs",
@@ -12836,7 +12836,7 @@ function cp(e) {
12836
12836
  return e != null;
12837
12837
  }
12838
12838
  //#endregion
12839
- //#region ../twenty-shared/dist/types-BxTnCKVO.mjs
12839
+ //#region ../twenty-shared/dist/types-qzUQuYDF.mjs
12840
12840
  var lp = /* @__PURE__ */ function(e) {
12841
12841
  return e.EMAIL = "EMAIL", e.CALENDAR = "CALENDAR", e.WORKFLOW = "WORKFLOW", e.AGENT = "AGENT", e.API = "API", e.IMPORT = "IMPORT", e.MANUAL = "MANUAL", e.SYSTEM = "SYSTEM", e.WEBHOOK = "WEBHOOK", e.APPLICATION = "APPLICATION", e;
12842
12842
  }({}), up = {
@@ -13272,6 +13272,7 @@ var vp = /* @__PURE__ */ function(e) {
13272
13272
  DEVELOPERS_EXTEND_APPS_DATA_OBJECTS: "/developers/extend/apps/data/objects",
13273
13273
  DEVELOPERS_EXTEND_APPS_DATA_OVERVIEW: "/developers/extend/apps/data/overview",
13274
13274
  DEVELOPERS_EXTEND_APPS_DATA_RELATIONS: "/developers/extend/apps/data/relations",
13275
+ DEVELOPERS_EXTEND_APPS_DATA_SYSTEM_FIELDS: "/developers/extend/apps/data/system-fields",
13275
13276
  DEVELOPERS_EXTEND_APPS_GETTING_STARTED_CONCEPTS: "/developers/extend/apps/getting-started/concepts",
13276
13277
  DEVELOPERS_EXTEND_APPS_GETTING_STARTED_LOCAL_SERVER: "/developers/extend/apps/getting-started/local-server",
13277
13278
  DEVELOPERS_EXTEND_APPS_GETTING_STARTED_PROJECT_STRUCTURE: "/developers/extend/apps/getting-started/project-structure",
@@ -13438,7 +13439,7 @@ var vp = /* @__PURE__ */ function(e) {
13438
13439
  A.RAW_JSON
13439
13440
  ]), yp.DAY, yp.WEEK, yp.MONTH, yp.QUARTER, yp.YEAR, A.TEXT, A.FULL_NAME, A.UUID;
13440
13441
  //#endregion
13441
- //#region ../twenty-shared/dist/constants-CgZPEaPK.mjs
13442
+ //#region ../twenty-shared/dist/constants-1-j2XgX3.mjs
13442
13443
  var wp = [
13443
13444
  "RATING_1",
13444
13445
  "RATING_2",
@@ -60656,7 +60657,7 @@ function kk() {
60656
60657
  return ak(Tk, arguments);
60657
60658
  }
60658
60659
  //#endregion
60659
- //#region ../twenty-shared/dist/utils-DWWohKg8.mjs
60660
+ //#region ../twenty-shared/dist/utils-B4kn7oaR.mjs
60660
60661
  var Ak = /* @__PURE__ */ ne(aO(), 1);
60661
60662
  oO(), QO(), rk(), A.TEXT, A.FULL_NAME, A.EMAILS, A.ADDRESS, A.LINKS, A.PHONES, A.RICH_TEXT, A.UUID;
60662
60663
  var jk = (e) => /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e);
@@ -63015,7 +63016,7 @@ var oM = (e) => {
63015
63016
  let t = e.trim();
63016
63017
  return t === "" ? t : oM(iM(t));
63017
63018
  };
63018
- nu({ pattern: wn });
63019
+ nu({ pattern: wn }).max(255);
63019
63020
  var cM = (e) => /^{{[^{}]+}}$/.test(e), lM = /* @__PURE__ */ new Map();
63020
63021
  for (let e of Ok()) {
63021
63022
  let t = kk(e), n = lM.get(t);
@@ -63267,7 +63268,7 @@ var uM = (e) => typeof e == "string", dM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
63267
63268
  let i = a(t);
63268
63269
  console.log(e.green("\n✔ Application created successfully!\n")), console.log(e.white(" Next steps:\n"));
63269
63270
  let o = 1;
63270
- console.log(e.white(` ${o}. Navigate to your project`)), console.log(e.cyan(` cd ${i}\n`)), o++, r || (console.log(e.white(` ${o}. Connect to a Twenty instance`)), console.log(e.cyan(" yarn twenty remote:add --url <your-instance-url>\n")), o++), console.log(e.white(` ${o}. Start developing`)), console.log(e.cyan(" yarn twenty dev\n")), o++, console.log(e.white(` ${o}. Open your twenty instance`)), console.log(e.cyan(` ${n}\n`)), console.log(e.gray(" Documentation: https://docs.twenty.com/developers/extend/capabilities/apps"));
63271
+ console.log(e.white(` ${o}. Navigate to your project`)), console.log(e.cyan(` cd ${i}\n`)), o++, r || (console.log(e.white(` ${o}. Connect to a Twenty instance`)), console.log(e.cyan(" yarn twenty remote:add --url <your-instance-url>\n")), o++), console.log(e.white(` ${o}. Start developing`)), console.log(e.cyan(" yarn twenty dev\n")), o++, console.log(e.white(` ${o}. Open your twenty instance`)), console.log(e.cyan(` ${n}\n`)), console.log(e.gray(" Documentation: https://docs.twenty.com/developers/extend/apps/getting-started/quick-start"));
63271
63272
  }
63272
63273
  }, SM = new t(re.name).description("CLI tool to initialize a new Twenty application").version(re.version, "-v, --version", "Output the current version of create-twenty-app.").argument("[directory]").option("-n, --name <name>", "Application name").option("-d, --display-name <displayName>", "Application display name").option("--description <description>", "Application description").option("--url <url>", "Twenty server URL (default: http://localhost:2020)").option("--api-url <apiUrl>", "[deprecated: use --url]").option("--authentication-method <method>", "Authentication method: oauth or apiKey (default: apiKey for local, oauth for remote)").helpOption("-h, --help", "Display this help message.").action(async (t, n) => {
63273
63274
  t && !/^[a-z0-9-]+$/.test(t) && (console.error(e.red(`Invalid directory "${t}". Must contain only lowercase letters, numbers, and hyphens`)), process.exit(1)), n?.name !== void 0 && n.name.trim().length === 0 && (console.error(e.red("Error: --name cannot be empty.")), process.exit(1)), n?.authenticationMethod && !["oauth", "apiKey"].includes(n.authenticationMethod) && (console.error(e.red("Error: --authentication-method must be \"oauth\" or \"apiKey\".")), process.exit(1)), n?.apiUrl && console.warn(e.yellow("Warning: --api-url is deprecated. Use --url instead."));
@@ -63,5 +63,9 @@ It's highly recommended to create new app entities using `yarn twenty dev:add`.
63
63
  | View | `yarn twenty dev:add view` | `src/views/<name>.ts` |
64
64
  | Navigation menu item | `yarn twenty dev:add navigationMenuItem` | `src/navigation-menu-items/<name>.ts` |
65
65
  | Page layout | `yarn twenty dev:add pageLayout` | `src/page-layouts/<name>.ts` |
66
+ | Page layout tab | `yarn twenty dev:add pageLayoutTab` | `src/page-layout-tabs/<name>.ts` |
67
+ | Command menu item | `yarn twenty dev:add commandMenuItem` | `src/command-menu-items/<name>.ts` |
68
+ | View field | `yarn twenty dev:add viewField` | `src/view-fields/<name>.ts` |
69
+ | Connection provider | `yarn twenty dev:add connectionProvider` | `src/connection-providers/<name>.ts` |
66
70
 
67
71
  This helps automatically generate required IDs etc.
@@ -0,0 +1,7 @@
1
+ # Changelog
2
+
3
+ All notable changes to this application are documented in this file.
4
+
5
+ ## 0.1.0
6
+
7
+ - Initial application scaffolded with [`create-twenty-app`](https://www.npmjs.com/package/create-twenty-app)
@@ -1,24 +1,24 @@
1
- This is a [Twenty](https://twenty.com) application bootstrapped with [`create-twenty-app`](https://www.npmjs.com/package/create-twenty-app).
1
+ # My Twenty App
2
2
 
3
- ## Getting Started
3
+ Describe your app in one or two sentences.
4
4
 
5
- This app was scaffolded with a local Twenty server running at [http://localhost:2020](http://localhost:2020).
5
+ ## Features
6
6
 
7
- Login with the default development credentials: `tim@apple.dev` / `tim@apple.dev`.
7
+ List the top things your app does, for example:
8
8
 
9
- Run `yarn twenty help` to list all available commands.
9
+ - Feature one
10
+ - Feature two
11
+ - Feature three
10
12
 
11
- ## Useful Commands
13
+ ## Getting started
12
14
 
13
- - `yarn twenty dev` - Start the development server and sync your app
14
- - `yarn twenty docker:status` - Check the local Twenty server status
15
- - `yarn twenty docker:start` - Start the local Twenty server
16
- - `yarn lint` - Lint the project with oxlint
17
- - `yarn typecheck` - Type-check the project
18
- - `yarn test:unit` - Run unit tests
19
- - `yarn test` - Run integration tests
15
+ Setup instructions live in [SETUP.md](SETUP.md).
20
16
 
21
- ## Learn More
17
+ ## Changelog
18
+
19
+ Notable changes are documented in [CHANGELOG.md](CHANGELOG.md).
20
+
21
+ ## Learn more
22
22
 
23
23
  - [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)
24
24
  - [twenty-sdk CLI reference](https://www.npmjs.com/package/twenty-sdk)
@@ -0,0 +1,44 @@
1
+ # Setup
2
+
3
+ Follow these steps to get your app running locally.
4
+
5
+ ## Prerequisites
6
+
7
+ - Node.js (version specified in `.nvmrc`)
8
+ - Yarn 4
9
+ - Docker (to run the local Twenty server)
10
+
11
+ ## Steps
12
+
13
+ 1. Install dependencies:
14
+
15
+ ```bash
16
+ yarn install
17
+ ```
18
+
19
+ 2. Start the local Twenty server:
20
+
21
+ ```bash
22
+ yarn twenty docker:start
23
+ ```
24
+
25
+ Check the server status at any time with `yarn twenty docker:status`.
26
+
27
+ 3. Start the development server and sync your app:
28
+
29
+ ```bash
30
+ yarn twenty dev
31
+ ```
32
+
33
+ 4. Open [http://localhost:2020](http://localhost:2020) and log in with the default development credentials: `tim@apple.dev` / `tim@apple.dev`.
34
+
35
+ ## Verifying your setup
36
+
37
+ - `yarn lint` - Lint the project with oxlint
38
+ - `yarn typecheck` - Type-check the project
39
+ - `yarn test:unit` - Run unit tests
40
+ - `yarn test` - Run integration tests
41
+
42
+ ## Troubleshooting
43
+
44
+ See the [troubleshooting guide](https://docs.twenty.com/developers/extend/apps/getting-started/troubleshooting) or ask on [Discord](https://discord.gg/cx5n4Jzs57).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-twenty-app",
3
- "version": "2.19.0",
3
+ "version": "2.21.0",
4
4
  "description": "Command-line interface to create Twenty application",
5
5
  "main": "dist/cli.cjs",
6
6
  "bin": "dist/cli.cjs",
@@ -34,7 +34,7 @@
34
34
  "lodash.camelcase": "^4.3.0",
35
35
  "lodash.kebabcase": "^4.1.1",
36
36
  "lodash.startcase": "^4.4.0",
37
- "twenty-sdk": "2.19.0",
37
+ "twenty-sdk": "2.21.0",
38
38
  "uuid": "^13.0.2"
39
39
  },
40
40
  "devDependencies": {
@@ -1,24 +1,24 @@
1
- This is a [Twenty](https://twenty.com) application bootstrapped with [`create-twenty-app`](https://www.npmjs.com/package/create-twenty-app).
1
+ # My Twenty App
2
2
 
3
- ## Getting Started
3
+ Describe your app in one or two sentences.
4
4
 
5
- This app was scaffolded with a local Twenty server running at [http://localhost:2020](http://localhost:2020).
5
+ ## Features
6
6
 
7
- Login with the default development credentials: `tim@apple.dev` / `tim@apple.dev`.
7
+ List the top things your app does, for example:
8
8
 
9
- Run `yarn twenty help` to list all available commands.
9
+ - Feature one
10
+ - Feature two
11
+ - Feature three
10
12
 
11
- ## Useful Commands
13
+ ## Getting started
12
14
 
13
- - `yarn twenty dev` - Start the development server and sync your app
14
- - `yarn twenty docker:status` - Check the local Twenty server status
15
- - `yarn twenty docker:start` - Start the local Twenty server
16
- - `yarn lint` - Lint the project with oxlint
17
- - `yarn typecheck` - Type-check the project
18
- - `yarn test:unit` - Run unit tests
19
- - `yarn test` - Run integration tests
15
+ Setup instructions live in [SETUP.md](SETUP.md).
20
16
 
21
- ## Learn More
17
+ ## Changelog
18
+
19
+ Notable changes are documented in [CHANGELOG.md](CHANGELOG.md).
20
+
21
+ ## Learn more
22
22
 
23
23
  - [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)
24
24
  - [twenty-sdk CLI reference](https://www.npmjs.com/package/twenty-sdk)