create-twenty-app 2.19.0-alpha.1 → 2.20.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.cjs +4 -4
- package/dist/cli.mjs +13 -6
- package/dist/constants/template/AGENTS.md +4 -0
- package/dist/constants/template/CHANGELOG.md +7 -0
- package/dist/constants/template/README.md +14 -14
- package/dist/constants/template/SETUP.md +44 -0
- package/package.json +2 -2
- package/src/constants/template/README.md +14 -14
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.
|
|
33
|
+
version: "2.20.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-
|
|
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 = {
|
|
@@ -13295,6 +13295,13 @@ var vp = /* @__PURE__ */ function(e) {
|
|
|
13295
13295
|
DEVELOPERS_EXTEND_APPS_OPERATIONS_SYNC_AND_RECOVERY: "/developers/extend/apps/operations/sync-and-recovery",
|
|
13296
13296
|
DEVELOPERS_EXTEND_APPS_OPERATIONS_TESTING: "/developers/extend/apps/operations/testing",
|
|
13297
13297
|
DEVELOPERS_EXTEND_APPS_TRANSLATIONS_OVERVIEW: "/developers/extend/apps/translations/overview",
|
|
13298
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_AI_AGENT: "/developers/extend/apps/tutorials/document-generator/ai-agent",
|
|
13299
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_BUILDING_THE_UI: "/developers/extend/apps/tutorials/document-generator/building-the-ui",
|
|
13300
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_DATA_MODEL: "/developers/extend/apps/tutorials/document-generator/data-model",
|
|
13301
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_GENERATING_DOCUMENTS: "/developers/extend/apps/tutorials/document-generator/generating-documents",
|
|
13302
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_HTTP_ROUTES: "/developers/extend/apps/tutorials/document-generator/http-routes",
|
|
13303
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_OVERVIEW: "/developers/extend/apps/tutorials/document-generator/overview",
|
|
13304
|
+
DEVELOPERS_EXTEND_APPS_TUTORIALS_DOCUMENT_GENERATOR_PUBLISHING: "/developers/extend/apps/tutorials/document-generator/publishing",
|
|
13298
13305
|
DEVELOPERS_EXTEND_OAUTH: "/developers/extend/oauth",
|
|
13299
13306
|
DEVELOPERS_EXTEND_WEBHOOKS: "/developers/extend/webhooks",
|
|
13300
13307
|
DEVELOPERS_INTRODUCTION: "/developers/introduction",
|
|
@@ -13431,7 +13438,7 @@ var vp = /* @__PURE__ */ function(e) {
|
|
|
13431
13438
|
A.RAW_JSON
|
|
13432
13439
|
]), yp.DAY, yp.WEEK, yp.MONTH, yp.QUARTER, yp.YEAR, A.TEXT, A.FULL_NAME, A.UUID;
|
|
13433
13440
|
//#endregion
|
|
13434
|
-
//#region ../twenty-shared/dist/constants-
|
|
13441
|
+
//#region ../twenty-shared/dist/constants-D2kCMNsz.mjs
|
|
13435
13442
|
var wp = [
|
|
13436
13443
|
"RATING_1",
|
|
13437
13444
|
"RATING_2",
|
|
@@ -60649,7 +60656,7 @@ function kk() {
|
|
|
60649
60656
|
return ak(Tk, arguments);
|
|
60650
60657
|
}
|
|
60651
60658
|
//#endregion
|
|
60652
|
-
//#region ../twenty-shared/dist/utils-
|
|
60659
|
+
//#region ../twenty-shared/dist/utils-5DYZTZxt.mjs
|
|
60653
60660
|
var Ak = /* @__PURE__ */ ne(aO(), 1);
|
|
60654
60661
|
oO(), QO(), rk(), A.TEXT, A.FULL_NAME, A.EMAILS, A.ADDRESS, A.LINKS, A.PHONES, A.RICH_TEXT, A.UUID;
|
|
60655
60662
|
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);
|
|
@@ -63008,7 +63015,7 @@ var oM = (e) => {
|
|
|
63008
63015
|
let t = e.trim();
|
|
63009
63016
|
return t === "" ? t : oM(iM(t));
|
|
63010
63017
|
};
|
|
63011
|
-
nu({ pattern: wn });
|
|
63018
|
+
nu({ pattern: wn }).max(255);
|
|
63012
63019
|
var cM = (e) => /^{{[^{}]+}}$/.test(e), lM = /* @__PURE__ */ new Map();
|
|
63013
63020
|
for (let e of Ok()) {
|
|
63014
63021
|
let t = kk(e), n = lM.get(t);
|
|
@@ -63260,7 +63267,7 @@ var uM = (e) => typeof e == "string", dM = RegExp("\\{\\{([^{}]+)\\}\\}", "g"),
|
|
|
63260
63267
|
let i = a(t);
|
|
63261
63268
|
console.log(e.green("\n✔ Application created successfully!\n")), console.log(e.white(" Next steps:\n"));
|
|
63262
63269
|
let o = 1;
|
|
63263
|
-
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/
|
|
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/apps/getting-started/quick-start"));
|
|
63264
63271
|
}
|
|
63265
63272
|
}, 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) => {
|
|
63266
63273
|
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.
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
# My Twenty App
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describe your app in one or two sentences.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
List the top things your app does, for example:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Feature one
|
|
10
|
+
- Feature two
|
|
11
|
+
- Feature three
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Getting started
|
|
12
14
|
|
|
13
|
-
|
|
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
|
-
##
|
|
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.
|
|
3
|
+
"version": "2.20.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.
|
|
37
|
+
"twenty-sdk": "2.20.0",
|
|
38
38
|
"uuid": "^13.0.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
# My Twenty App
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Describe your app in one or two sentences.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Features
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
List the top things your app does, for example:
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
- Feature one
|
|
10
|
+
- Feature two
|
|
11
|
+
- Feature three
|
|
10
12
|
|
|
11
|
-
##
|
|
13
|
+
## Getting started
|
|
12
14
|
|
|
13
|
-
|
|
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
|
-
##
|
|
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)
|