create-twenty-app 0.1.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/README.md +91 -0
- package/dist/cli.cjs +83 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.mjs +5421 -0
- package/dist/constants/base-application/.nvmrc +1 -0
- package/dist/constants/base-application/.yarn/install-state.gz +0 -0
- package/dist/constants/base-application/.yarn/releases/yarn-4.9.2.cjs +942 -0
- package/dist/constants/base-application/.yarnrc.yml +3 -0
- package/dist/constants/base-application/README.md +35 -0
- package/dist/constants/base-application/eslint.config.mjs +137 -0
- package/dist/constants/base-application/tsconfig.json +26 -0
- package/dist/create-app.command.d.ts +7 -0
- package/dist/utils/app-template.d.ts +6 -0
- package/dist/utils/convert-to-label.d.ts +1 -0
- package/dist/utils/install.d.ts +1 -0
- package/dist/utils/try-git-init.d.ts +1 -0
- package/package.json +54 -0
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
This is a [Twenty](https://twenty.com) application project bootstrapped with [`create-twenty-app`](https://www.npmjs.com/package/create-twenty-app).
|
|
2
|
+
|
|
3
|
+
## Getting Started
|
|
4
|
+
|
|
5
|
+
First, authenticate to your workspace:
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
yarn auth
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Then, run the development server:
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
yarn dev
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Open your Twenty instance and go to `/settings/applications` section to see the result.
|
|
18
|
+
|
|
19
|
+
You can start adding twenty entities by running
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
yarn create-entity
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
The application auto-updates as you edit the file.
|
|
26
|
+
|
|
27
|
+
## Learn More
|
|
28
|
+
|
|
29
|
+
To learn more about Twenty applications, take a look at the following resources:
|
|
30
|
+
|
|
31
|
+
- [twenty-sdk](https://www.npmjs.com/package/twenty-sdk) - learn about `twenty-sdk` tool.
|
|
32
|
+
- [Twenty doc](https://docs.twenty.com/) - Twenty's documentation.
|
|
33
|
+
- Join our [Discord](https://discord.gg/cx5n4Jzs57)
|
|
34
|
+
|
|
35
|
+
You can check out [the Twenty GitHub repository](https://github.com/twentyhq/twenty) - your feedback and contributions are welcome!
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import js from '@eslint/js';
|
|
2
|
+
import typescriptEslint from '@typescript-eslint/eslint-plugin';
|
|
3
|
+
import typescriptParser from '@typescript-eslint/parser';
|
|
4
|
+
import importPlugin from 'eslint-plugin-import';
|
|
5
|
+
import preferArrowPlugin from 'eslint-plugin-prefer-arrow';
|
|
6
|
+
import prettierPlugin from 'eslint-plugin-prettier';
|
|
7
|
+
import unusedImportsPlugin from 'eslint-plugin-unused-imports';
|
|
8
|
+
|
|
9
|
+
export default [
|
|
10
|
+
// Base JS rules
|
|
11
|
+
js.configs.recommended,
|
|
12
|
+
|
|
13
|
+
// Global ignores
|
|
14
|
+
{
|
|
15
|
+
ignores: ['**/node_modules/**', '**/dist/**', '**/coverage/**'],
|
|
16
|
+
},
|
|
17
|
+
|
|
18
|
+
// Base config for TS/JS files
|
|
19
|
+
{
|
|
20
|
+
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
21
|
+
languageOptions: {
|
|
22
|
+
ecmaVersion: 'latest',
|
|
23
|
+
sourceType: 'module',
|
|
24
|
+
},
|
|
25
|
+
plugins: {
|
|
26
|
+
prettier: prettierPlugin,
|
|
27
|
+
import: importPlugin,
|
|
28
|
+
'prefer-arrow': preferArrowPlugin,
|
|
29
|
+
'unused-imports': unusedImportsPlugin,
|
|
30
|
+
},
|
|
31
|
+
rules: {
|
|
32
|
+
// General rules (aligned with main project)
|
|
33
|
+
'func-style': ['error', 'declaration', { allowArrowFunctions: true }],
|
|
34
|
+
'no-console': [
|
|
35
|
+
'warn',
|
|
36
|
+
{ allow: ['group', 'groupCollapsed', 'groupEnd'] },
|
|
37
|
+
],
|
|
38
|
+
'no-control-regex': 0,
|
|
39
|
+
'no-debugger': 'error',
|
|
40
|
+
'no-duplicate-imports': 'error',
|
|
41
|
+
'no-undef': 'off',
|
|
42
|
+
'no-unused-vars': 'off',
|
|
43
|
+
|
|
44
|
+
// Import rules
|
|
45
|
+
'import/no-relative-packages': 'error',
|
|
46
|
+
'import/no-useless-path-segments': 'error',
|
|
47
|
+
'import/no-duplicates': ['error', { considerQueryString: true }],
|
|
48
|
+
|
|
49
|
+
// Prefer arrow functions
|
|
50
|
+
'prefer-arrow/prefer-arrow-functions': [
|
|
51
|
+
'error',
|
|
52
|
+
{
|
|
53
|
+
disallowPrototype: true,
|
|
54
|
+
singleReturnOnly: false,
|
|
55
|
+
classPropertiesAllowed: false,
|
|
56
|
+
},
|
|
57
|
+
],
|
|
58
|
+
|
|
59
|
+
// Unused imports
|
|
60
|
+
'unused-imports/no-unused-imports': 'warn',
|
|
61
|
+
'unused-imports/no-unused-vars': [
|
|
62
|
+
'warn',
|
|
63
|
+
{
|
|
64
|
+
vars: 'all',
|
|
65
|
+
varsIgnorePattern: '^_',
|
|
66
|
+
args: 'after-used',
|
|
67
|
+
argsIgnorePattern: '^_',
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
|
|
71
|
+
// Prettier (formatting as lint errors if you want)
|
|
72
|
+
'prettier/prettier': 'error',
|
|
73
|
+
},
|
|
74
|
+
},
|
|
75
|
+
|
|
76
|
+
// TypeScript-specific configuration
|
|
77
|
+
{
|
|
78
|
+
files: ['**/*.{ts,tsx}'],
|
|
79
|
+
languageOptions: {
|
|
80
|
+
parser: typescriptParser,
|
|
81
|
+
parserOptions: {
|
|
82
|
+
ecmaFeatures: {
|
|
83
|
+
jsx: true,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
},
|
|
87
|
+
plugins: {
|
|
88
|
+
'@typescript-eslint': typescriptEslint,
|
|
89
|
+
},
|
|
90
|
+
rules: {
|
|
91
|
+
// Turn off base rule and use TS-aware versions
|
|
92
|
+
'no-redeclare': 'off',
|
|
93
|
+
'@typescript-eslint/no-redeclare': 'error',
|
|
94
|
+
|
|
95
|
+
'@typescript-eslint/ban-ts-comment': 'error',
|
|
96
|
+
'@typescript-eslint/consistent-type-imports': [
|
|
97
|
+
'error',
|
|
98
|
+
{
|
|
99
|
+
prefer: 'type-imports',
|
|
100
|
+
fixStyle: 'inline-type-imports',
|
|
101
|
+
},
|
|
102
|
+
],
|
|
103
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
104
|
+
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
105
|
+
'@typescript-eslint/interface-name-prefix': 'off',
|
|
106
|
+
'@typescript-eslint/no-empty-interface': [
|
|
107
|
+
'error',
|
|
108
|
+
{
|
|
109
|
+
allowSingleExtends: true,
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
'@typescript-eslint/no-explicit-any': 'off',
|
|
113
|
+
'@typescript-eslint/no-empty-function': 'off',
|
|
114
|
+
'@typescript-eslint/no-unused-vars': 'off',
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
// Test files (Jest)
|
|
119
|
+
{
|
|
120
|
+
files: ['**/*.spec.@(ts|tsx|js|jsx)', '**/*.test.@(ts|tsx|js|jsx)'],
|
|
121
|
+
languageOptions: {
|
|
122
|
+
globals: {
|
|
123
|
+
jest: true,
|
|
124
|
+
describe: true,
|
|
125
|
+
it: true,
|
|
126
|
+
expect: true,
|
|
127
|
+
beforeEach: true,
|
|
128
|
+
afterEach: true,
|
|
129
|
+
beforeAll: true,
|
|
130
|
+
afterAll: true,
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
rules: {
|
|
134
|
+
'@typescript-eslint/no-non-null-assertion': 'off',
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
];
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compileOnSave": false,
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"sourceMap": true,
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"outDir": "./dist",
|
|
7
|
+
"rootDir": ".",
|
|
8
|
+
"moduleResolution": "node",
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"emitDecoratorMetadata": true,
|
|
11
|
+
"experimentalDecorators": true,
|
|
12
|
+
"importHelpers": true,
|
|
13
|
+
"allowUnreachableCode": false,
|
|
14
|
+
"strict": true,
|
|
15
|
+
"alwaysStrict": true,
|
|
16
|
+
"noImplicitAny": true,
|
|
17
|
+
"strictBindCallApply": false,
|
|
18
|
+
"target": "es2018",
|
|
19
|
+
"module": "esnext",
|
|
20
|
+
"lib": ["es2020", "dom"],
|
|
21
|
+
"skipLibCheck": true,
|
|
22
|
+
"skipDefaultLibCheck": true,
|
|
23
|
+
"resolveJsonModule": true,
|
|
24
|
+
},
|
|
25
|
+
"exclude": ["node_modules", "dist", "**/*.test.ts", "**/*.spec.ts"]
|
|
26
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const convertToLabel: (str: string) => string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const install: (root: string) => Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const tryGitInit: (root: string) => Promise<boolean>;
|
package/package.json
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "create-twenty-app",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Command-line interface to create Twenty application",
|
|
5
|
+
"main": "dist/cli.cjs",
|
|
6
|
+
"bin": "dist/cli.cjs",
|
|
7
|
+
"files": [
|
|
8
|
+
"dist/**/*"
|
|
9
|
+
],
|
|
10
|
+
"scripts": {
|
|
11
|
+
"build": "npx rimraf dist && npx vite build"
|
|
12
|
+
},
|
|
13
|
+
"keywords": [
|
|
14
|
+
"twenty",
|
|
15
|
+
"cli",
|
|
16
|
+
"crm",
|
|
17
|
+
"application",
|
|
18
|
+
"development"
|
|
19
|
+
],
|
|
20
|
+
"exports": {
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./dist/cli.d.ts",
|
|
23
|
+
"import": "./dist/cli.mjs",
|
|
24
|
+
"require": "./dist/cli.cjs"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"license": "AGPL-3.0",
|
|
28
|
+
"dependencies": {
|
|
29
|
+
"@genql/cli": "^3.0.3",
|
|
30
|
+
"chalk": "^5.3.0",
|
|
31
|
+
"commander": "^12.0.0",
|
|
32
|
+
"fs-extra": "^11.2.0",
|
|
33
|
+
"inquirer": "^10.0.0",
|
|
34
|
+
"lodash.camelcase": "^4.3.0",
|
|
35
|
+
"lodash.kebabcase": "^4.1.1",
|
|
36
|
+
"lodash.startcase": "^4.4.0",
|
|
37
|
+
"uuid": "^13.0.0"
|
|
38
|
+
},
|
|
39
|
+
"devDependencies": {
|
|
40
|
+
"@types/fs-extra": "^11.0.0",
|
|
41
|
+
"@types/inquirer": "^9.0.0",
|
|
42
|
+
"@types/lodash.camelcase": "^4.3.7",
|
|
43
|
+
"@types/lodash.kebabcase": "^4.1.7",
|
|
44
|
+
"@types/lodash.startcase": "^4",
|
|
45
|
+
"@types/node": "^20.0.0",
|
|
46
|
+
"vite": "^7.0.0",
|
|
47
|
+
"vite-plugin-dts": "^4.5.4",
|
|
48
|
+
"vite-tsconfig-paths": "^4.2.1"
|
|
49
|
+
},
|
|
50
|
+
"engines": {
|
|
51
|
+
"node": "^24.5.0",
|
|
52
|
+
"yarn": "^4.0.2"
|
|
53
|
+
}
|
|
54
|
+
}
|