create-absolutejs 0.6.0 → 0.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.
Files changed (67) hide show
  1. package/LICENSE +24 -24
  2. package/README.md +179 -179
  3. package/dist/commands/formatProject.js +3 -2
  4. package/dist/commands/initializeGit.js +1 -1
  5. package/dist/commands/installDependencies.js +4 -3
  6. package/dist/data.js +22 -21
  7. package/dist/generators/configurations/generateDrizzleConfig.js +15 -15
  8. package/dist/generators/configurations/generatePackageJson.js +25 -23
  9. package/dist/generators/configurations/generatePrettierrc.js +9 -9
  10. package/dist/generators/db/dockerInitTemplates.js +79 -79
  11. package/dist/generators/db/generateDatabaseTypes.js +6 -6
  12. package/dist/generators/db/generateDockerContainer.js +14 -14
  13. package/dist/generators/db/generateDrizzleSchema.js +17 -17
  14. package/dist/generators/db/generateSqliteSchema.js +8 -8
  15. package/dist/generators/db/handlerTemplates.js +259 -259
  16. package/dist/generators/db/scaffoldDocker.js +1 -1
  17. package/dist/generators/html/generateHTMLPage.js +60 -60
  18. package/dist/generators/htmx/generateHTMXPage.js +86 -86
  19. package/dist/generators/project/generateAbsoluteAuthConfig.d.ts +1 -1
  20. package/dist/generators/project/generateAbsoluteAuthConfig.js +100 -89
  21. package/dist/generators/project/generateDBBlock.js +9 -9
  22. package/dist/generators/project/generateMarkupCSS.js +145 -145
  23. package/dist/generators/project/generateRoutesBlock.d.ts +3 -2
  24. package/dist/generators/project/generateRoutesBlock.js +37 -36
  25. package/dist/generators/project/generateServer.js +22 -18
  26. package/dist/generators/project/scaffoldBackend.js +2 -1
  27. package/dist/generators/project/scaffoldFrontends.d.ts +2 -2
  28. package/dist/generators/project/scaffoldFrontends.js +5 -2
  29. package/dist/generators/react/generateReactComponents.js +95 -95
  30. package/dist/generators/svelte/generateSveltePage.js +210 -210
  31. package/dist/generators/vue/generateVuePage.js +261 -261
  32. package/dist/messages.js +43 -43
  33. package/dist/questions/projectName.js +1 -1
  34. package/dist/scaffold.js +2 -1
  35. package/dist/templates/README.md +35 -35
  36. package/dist/templates/assets/svg/google-logo.svg +7 -7
  37. package/dist/templates/assets/svg/htmx-logo-black.svg +9 -9
  38. package/dist/templates/assets/svg/htmx-logo-white.svg +9 -9
  39. package/dist/templates/assets/svg/vue-logo.svg +4 -4
  40. package/dist/templates/configurations/.prettierignore +3 -3
  41. package/dist/templates/configurations/.prettierrc.json +9 -9
  42. package/dist/templates/configurations/drizzle.config.ts +13 -13
  43. package/dist/templates/configurations/eslint.config.mjs +243 -243
  44. package/dist/templates/configurations/tsconfig.example.json +98 -98
  45. package/dist/templates/constants.ts +2 -2
  46. package/dist/templates/db/docker-compose.db.yml +15 -15
  47. package/dist/templates/git/gitignore +51 -51
  48. package/dist/templates/html/scripts/typescript-example.ts +21 -21
  49. package/dist/templates/react/components/App.tsx +52 -52
  50. package/dist/templates/react/components/Head.tsx +34 -34
  51. package/dist/templates/react/components/OAuthLink.tsx +39 -39
  52. package/dist/templates/react/components/ProfilePicture.tsx +56 -56
  53. package/dist/templates/styles/colors.ts +11 -11
  54. package/dist/templates/styles/reset.css +84 -84
  55. package/dist/templates/svelte/components/Counter.svelte +19 -19
  56. package/dist/templates/svelte/composables/counter.svelte.ts +14 -14
  57. package/dist/templates/tailwind/postcss.config.ts +8 -8
  58. package/dist/templates/tailwind/tailwind.config.ts +7 -7
  59. package/dist/templates/tailwind/tailwind.css +1 -1
  60. package/dist/templates/vue/components/CountButton.vue +39 -39
  61. package/dist/templates/vue/composables/useCount.ts +14 -14
  62. package/dist/utils/commandMaps.d.ts +1 -1
  63. package/dist/utils/commandMaps.js +4 -4
  64. package/dist/versions.d.ts +49 -0
  65. package/dist/versions.js +61 -0
  66. package/package.json +21 -20
  67. package/dist/templates/styles/tailwind.css +0 -1
package/LICENSE CHANGED
@@ -1,24 +1,24 @@
1
- ```
2
- # Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
3
-
4
- By using this project, you agree to the following terms under the Creative Commons Attribution-NonCommercial 4.0 International License.
5
-
6
- ## License Summary
7
- This license allows you to:
8
- - **Share**: Copy and redistribute the material in any medium or format.
9
- - **Adapt**: Remix, transform, and build upon the material.
10
-
11
- **Under the following conditions**:
12
- - **Attribution**: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
13
- - **Non-Commercial**: You may not use the material for commercial purposes.
14
-
15
- ## Full License Text
16
- The full license text can be found at: https://creativecommons.org/licenses/by-nc/4.0/legalcode
17
-
18
- ## Contact Information for Commercial Use
19
- For commercial use, licensing inquiries, or additional permissions, please contact:
20
- Alex Kahn
21
- alexkahndev@gmail.com
22
- alexkahndev.github.io
23
- ```
24
-
1
+ ```
2
+ # Creative Commons Attribution-NonCommercial 4.0 International License (CC BY-NC 4.0)
3
+
4
+ By using this project, you agree to the following terms under the Creative Commons Attribution-NonCommercial 4.0 International License.
5
+
6
+ ## License Summary
7
+ This license allows you to:
8
+ - **Share**: Copy and redistribute the material in any medium or format.
9
+ - **Adapt**: Remix, transform, and build upon the material.
10
+
11
+ **Under the following conditions**:
12
+ - **Attribution**: You must give appropriate credit, provide a link to the license, and indicate if changes were made. You may do so in any reasonable manner, but not in any way that suggests the licensor endorses you or your use.
13
+ - **Non-Commercial**: You may not use the material for commercial purposes.
14
+
15
+ ## Full License Text
16
+ The full license text can be found at: https://creativecommons.org/licenses/by-nc/4.0/legalcode
17
+
18
+ ## Contact Information for Commercial Use
19
+ For commercial use, licensing inquiries, or additional permissions, please contact:
20
+ Alex Kahn
21
+ alexkahndev@gmail.com
22
+ alexkahndev.github.io
23
+ ```
24
+
package/README.md CHANGED
@@ -1,179 +1,179 @@
1
- # create-absolutejs
2
-
3
- A CLI tool to scaffold new AbsoluteJS projects quickly and effortlessly.
4
-
5
- ## Usage
6
-
7
- Scaffold a new project called `<project-name>`:
8
-
9
- ```bash
10
- bun create absolutejs my-app
11
- ```
12
-
13
- Alternatively, using npm, Yarn, or pnpm:
14
-
15
- ```bash
16
- npm create absolutejs my-app
17
- yarn create absolutejs my-app
18
- pnpm create absolutejs my-app
19
- ```
20
-
21
- By default, the CLI will interactively prompt you for any missing configuration values. You can also supply flags to skip those prompts:
22
-
23
- - To skip **all** optional prompts and use `none` for every optional configuration:
24
- ```bash
25
- bun create absolutejs my-app --skip
26
- ```
27
- - To skip **one** optional prompt without providing a real value, pass `none` to that flag:
28
- ```bash
29
- bun create absolutejs my-app --auth none --engine none
30
- ```
31
-
32
- ## Options
33
-
34
- ```text
35
- Usage: create-absolute [project-name] [options]
36
- ```
37
-
38
- ### Arguments
39
-
40
- - `project-name`
41
- Name of the application to create. If omitted, you'll be prompted to enter one.
42
-
43
- ### Options
44
-
45
- - `--help`, `-h`
46
- Show this help message and exit.
47
-
48
- - `--debug`, `-d`
49
- Display a summary of the project configuration after creation.
50
-
51
- - `--angular`
52
- Include an Angular frontend.
53
-
54
- - `--angular-dir <directory>`
55
- Specify the directory for and use the Angular frontend.
56
-
57
- - `--assets <directory>`
58
- Directory name for your static assets.
59
-
60
- - `--auth <plugin|none>`
61
- Pre-configured auth plugin (currently only `absolute-auth`) or `none`.
62
-
63
- - `--biome`
64
- Use Biome for code quality and formatting.
65
-
66
- - `--build <direrctory>`
67
- Output directory for build artifacts.
68
-
69
- - `--db <engine|none>`
70
- Database engine (`postgresql` | `mysql` | `sqlite` | `mongodb` | `redis` | `singlestore` | `cockroachdb` | `mssql`) or `none`.
71
-
72
- - `--db-dir <directory>`
73
- Directory name for your database files.
74
-
75
- - `--db-host <provider|none>`
76
- Database host provider (`neon` | `planetscale` | `supabase` | `turso` | `vercel` | `upstash` | `atlas`) or `none`.
77
-
78
- - `--directory <default|custom>`
79
- Directory-naming strategy: `default` or `custom`.
80
-
81
- - `--eslint+prettier`
82
- Use ESLint + Prettier for code quality and formatting.
83
-
84
- - `--git`
85
- Initialize a Git repository.
86
-
87
- - `--html`
88
- Include a plain HTML frontend.
89
-
90
- - `--html-dir <directory>`
91
- Specify the directory for and use the HTML frontend.
92
-
93
- - `--html-scripts`
94
- Enable HTML scripting with TypeScript.
95
-
96
- - `--htmx`
97
- Include an HTMX frontend.
98
-
99
- - `--htmx-dir <directory>`
100
- Specify the directory for and use the HTMX frontend.
101
-
102
- - `--install`
103
- Use the same package manager to install dependencies.
104
-
105
- - `--lts`
106
- Use LTS versions of required packages.
107
-
108
- - `--orm <drizzle|prisma|none>`
109
- ORM to configure: `drizzle` | `prisma` | `none`.
110
-
111
- - `--plugin <plugin>`
112
- Elysia plugin(s) to include (repeatable); `none` skips plugin setup.
113
-
114
- - `--react`
115
- Include a React frontend.
116
-
117
- - `--react-dir <directory>`
118
- Specify the directory for and use the React frontend.
119
-
120
- - `--skip`
121
- Skip non-required prompts; uses `none` for all optional configs.
122
-
123
- - `--svelte`
124
- Include a Svelte frontend.
125
-
126
- - `--svelte-dir <directory>`
127
- Specify the directory for and use the Svelte frontend.
128
-
129
- - `--tailwind`
130
- Include Tailwind CSS setup.
131
-
132
- - `--tailwind-input <file>`
133
- Path to your Tailwind CSS entry file.
134
-
135
- - `--tailwind-output <file>`
136
- Path for the generated Tailwind CSS bundle.
137
-
138
- - `--vue`
139
- Include a Vue frontend.
140
-
141
- - `--vue-dir <directory>`
142
- Specify the directory for and use the Vue frontend.
143
-
144
- ## Directory Configuration
145
-
146
- Choose between the **default** layout (pre-configured folder names) or **custom**, which prompts you to specify each directory name yourself:
147
-
148
- ```bash
149
- bun create absolutejs my-app --directory custom
150
- ```
151
-
152
- ## Debug & LTS Flags
153
-
154
- - `--debug`, `-d`
155
- After scaffolding, prints a detailed summary of your configuration (language, frontends, directories, etc.).
156
- - `--lts`
157
- Instructs the CLI to fetch and pin the latest published versions of your dependencies instead of its default pinned versions.
158
-
159
- ## Getting Started
160
-
161
- Once the scaffold completes, you’re ready to go:
162
-
163
- ```bash
164
- cd my-app
165
- # (If you skipped automated install)
166
- bun install
167
- # Then start the dev server
168
- bun run dev
169
- ```
170
-
171
- If you downloaded this repository to test or make changes you can use `bun run test` to start the created dev server without having to change directories back and forth.
172
-
173
- ## Contributing
174
-
175
- Contributions are welcome! Feel free to open issues or submit pull requests to improve the CLI.
176
-
177
- ## License
178
-
179
- Licensed under CC BY-NC 4.0.
1
+ # create-absolutejs
2
+
3
+ A CLI tool to scaffold new AbsoluteJS projects quickly and effortlessly.
4
+
5
+ ## Usage
6
+
7
+ Scaffold a new project called `<project-name>`:
8
+
9
+ ```bash
10
+ bun create absolutejs my-app
11
+ ```
12
+
13
+ Alternatively, using npm, Yarn, or pnpm:
14
+
15
+ ```bash
16
+ npm create absolutejs my-app
17
+ yarn create absolutejs my-app
18
+ pnpm create absolutejs my-app
19
+ ```
20
+
21
+ By default, the CLI will interactively prompt you for any missing configuration values. You can also supply flags to skip those prompts:
22
+
23
+ - To skip **all** optional prompts and use `none` for every optional configuration:
24
+ ```bash
25
+ bun create absolutejs my-app --skip
26
+ ```
27
+ - To skip **one** optional prompt without providing a real value, pass `none` to that flag:
28
+ ```bash
29
+ bun create absolutejs my-app --auth none --engine none
30
+ ```
31
+
32
+ ## Options
33
+
34
+ ```text
35
+ Usage: create-absolute [project-name] [options]
36
+ ```
37
+
38
+ ### Arguments
39
+
40
+ - `project-name`
41
+ Name of the application to create. If omitted, you'll be prompted to enter one.
42
+
43
+ ### Options
44
+
45
+ - `--help`, `-h`
46
+ Show this help message and exit.
47
+
48
+ - `--debug`, `-d`
49
+ Display a summary of the project configuration after creation.
50
+
51
+ - `--angular`
52
+ Include an Angular frontend.
53
+
54
+ - `--angular-dir <directory>`
55
+ Specify the directory for and use the Angular frontend.
56
+
57
+ - `--assets <directory>`
58
+ Directory name for your static assets.
59
+
60
+ - `--auth <plugin|none>`
61
+ Pre-configured auth plugin (currently only `absolute-auth`) or `none`.
62
+
63
+ - `--biome`
64
+ Use Biome for code quality and formatting.
65
+
66
+ - `--build <direrctory>`
67
+ Output directory for build artifacts.
68
+
69
+ - `--db <engine|none>`
70
+ Database engine (`postgresql` | `mysql` | `sqlite` | `mongodb` | `redis` | `singlestore` | `cockroachdb` | `mssql`) or `none`.
71
+
72
+ - `--db-dir <directory>`
73
+ Directory name for your database files.
74
+
75
+ - `--db-host <provider|none>`
76
+ Database host provider (`neon` | `planetscale` | `supabase` | `turso` | `vercel` | `upstash` | `atlas`) or `none`.
77
+
78
+ - `--directory <default|custom>`
79
+ Directory-naming strategy: `default` or `custom`.
80
+
81
+ - `--eslint+prettier`
82
+ Use ESLint + Prettier for code quality and formatting.
83
+
84
+ - `--git`
85
+ Initialize a Git repository.
86
+
87
+ - `--html`
88
+ Include a plain HTML frontend.
89
+
90
+ - `--html-dir <directory>`
91
+ Specify the directory for and use the HTML frontend.
92
+
93
+ - `--html-scripts`
94
+ Enable HTML scripting with TypeScript.
95
+
96
+ - `--htmx`
97
+ Include an HTMX frontend.
98
+
99
+ - `--htmx-dir <directory>`
100
+ Specify the directory for and use the HTMX frontend.
101
+
102
+ - `--install`
103
+ Use the same package manager to install dependencies.
104
+
105
+ - `--lts`
106
+ Use LTS versions of required packages.
107
+
108
+ - `--orm <drizzle|prisma|none>`
109
+ ORM to configure: `drizzle` | `prisma` | `none`.
110
+
111
+ - `--plugin <plugin>`
112
+ Elysia plugin(s) to include (repeatable); `none` skips plugin setup.
113
+
114
+ - `--react`
115
+ Include a React frontend.
116
+
117
+ - `--react-dir <directory>`
118
+ Specify the directory for and use the React frontend.
119
+
120
+ - `--skip`
121
+ Skip non-required prompts; uses `none` for all optional configs.
122
+
123
+ - `--svelte`
124
+ Include a Svelte frontend.
125
+
126
+ - `--svelte-dir <directory>`
127
+ Specify the directory for and use the Svelte frontend.
128
+
129
+ - `--tailwind`
130
+ Include Tailwind CSS setup.
131
+
132
+ - `--tailwind-input <file>`
133
+ Path to your Tailwind CSS entry file.
134
+
135
+ - `--tailwind-output <file>`
136
+ Path for the generated Tailwind CSS bundle.
137
+
138
+ - `--vue`
139
+ Include a Vue frontend.
140
+
141
+ - `--vue-dir <directory>`
142
+ Specify the directory for and use the Vue frontend.
143
+
144
+ ## Directory Configuration
145
+
146
+ Choose between the **default** layout (pre-configured folder names) or **custom**, which prompts you to specify each directory name yourself:
147
+
148
+ ```bash
149
+ bun create absolutejs my-app --directory custom
150
+ ```
151
+
152
+ ## Debug & LTS Flags
153
+
154
+ - `--debug`, `-d`
155
+ After scaffolding, prints a detailed summary of your configuration (language, frontends, directories, etc.).
156
+ - `--lts`
157
+ Instructs the CLI to fetch and pin the latest published versions of your dependencies instead of its default pinned versions.
158
+
159
+ ## Getting Started
160
+
161
+ Once the scaffold completes, you’re ready to go:
162
+
163
+ ```bash
164
+ cd my-app
165
+ # (If you skipped automated install)
166
+ bun install
167
+ # Then start the dev server
168
+ bun run dev
169
+ ```
170
+
171
+ If you downloaded this repository to test or make changes you can use `bun run test` to start the created dev server without having to change directories back and forth.
172
+
173
+ ## Contributing
174
+
175
+ Contributions are welcome! Feel free to open issues or submit pull requests to improve the CLI.
176
+
177
+ ## License
178
+
179
+ Licensed under CC BY-NC 4.0.
@@ -10,11 +10,12 @@ export const formatProject = async ({ projectName, packageManager, installDepend
10
10
  ? formatCommands[packageManager]
11
11
  : formatNoInstallCommands[packageManager];
12
12
  spin.start('Formatting files…');
13
- await $ `sh -c ${fmt}`.cwd(projectName).quiet();
13
+ const [bin, ...args] = fmt.split(' ');
14
+ await $ `${bin} ${args}`.cwd(projectName).quiet();
14
15
  spin.stop(green('Files formatted'));
15
16
  }
16
17
  catch (err) {
17
- spin.stop(red('Failed to format files'), 1);
18
+ spin.cancel(red('Failed to format files'));
18
19
  console.error('Error formatting:', err);
19
20
  exit(1);
20
21
  }
@@ -11,7 +11,7 @@ export const initializeGit = async (projectName) => {
11
11
  spin.stop(green('Git repo initialized'));
12
12
  }
13
13
  catch (err) {
14
- spin.stop(red('Failed to initialize git'), 1);
14
+ spin.cancel(red('Failed to initialize git'));
15
15
  throw err;
16
16
  }
17
17
  };
@@ -7,12 +7,13 @@ export const installDependencies = async (packageManager, projectName) => {
7
7
  const spin = spinner();
8
8
  const cmd = installCommands[packageManager];
9
9
  try {
10
- spin.start('Installing dependencies');
11
- await $ `sh -c ${cmd}`.cwd(projectName).quiet();
10
+ spin.start('Installing dependencies');
11
+ const [bin, ...args] = cmd.split(' ');
12
+ await $ `${bin} ${args}`.cwd(projectName).quiet();
12
13
  spin.stop(green('Dependencies installed'));
13
14
  }
14
15
  catch (err) {
15
- spin.stop(red('Installation failed'), 1);
16
+ spin.cancel(red('Installation failed'));
16
17
  console.error('Error installing dependencies:', err);
17
18
  exit(1);
18
19
  }
package/dist/data.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { cyan, green, magenta } from 'picocolors';
2
+ import { versions } from './versions';
2
3
  export const availableFrontends = [
3
4
  'react',
4
5
  'html',
@@ -60,19 +61,19 @@ export const availablePlugins = [
60
61
  {
61
62
  imports: [{ config: null, isPlugin: true, packageName: 'cors' }],
62
63
  label: cyan('⚙️ @elysiajs/cors'),
63
- latestVersion: '1.3.3',
64
+ latestVersion: versions['@elysiajs/cors'],
64
65
  value: '@elysiajs/cors'
65
66
  },
66
67
  {
67
68
  imports: [{ config: null, isPlugin: true, packageName: 'swagger' }],
68
69
  label: cyan('📑 @elysiajs/swagger'),
69
- latestVersion: '1.3.0',
70
+ latestVersion: versions['@elysiajs/swagger'],
70
71
  value: '@elysiajs/swagger'
71
72
  },
72
73
  {
73
74
  imports: [{ config: null, isPlugin: true, packageName: 'rateLimit' }],
74
75
  label: green('🛠️ elysia-rate-limit'),
75
- latestVersion: '4.3.0',
76
+ latestVersion: versions['elysia-rate-limit'],
76
77
  value: 'elysia-rate-limit'
77
78
  }
78
79
  ];
@@ -86,7 +87,7 @@ export const absoluteAuthPlugin = {
86
87
  packageName: 'absoluteAuth'
87
88
  }
88
89
  ],
89
- latestVersion: '0.21.1',
90
+ latestVersion: versions['@absolutejs/auth'],
90
91
  value: '@absolutejs/auth'
91
92
  };
92
93
  export const scopedStatePlugin = {
@@ -97,69 +98,69 @@ export const scopedStatePlugin = {
97
98
  packageName: 'scopedState'
98
99
  }
99
100
  ],
100
- latestVersion: '0.1.1',
101
+ latestVersion: versions['elysia-scoped-state'],
101
102
  value: 'elysia-scoped-state'
102
103
  };
103
104
  export const eslintAndPrettierDependencies = [
104
105
  {
105
- latestVersion: '9.27.0',
106
+ latestVersion: versions['eslint'],
106
107
  value: 'eslint'
107
108
  },
108
109
  {
109
- latestVersion: '3.5.3',
110
+ latestVersion: versions['prettier'],
110
111
  value: 'prettier'
111
112
  },
112
113
  {
113
- latestVersion: '4.4.1',
114
+ latestVersion: versions['@stylistic/eslint-plugin-ts'],
114
115
  value: '@stylistic/eslint-plugin-ts'
115
116
  },
116
117
  {
117
- latestVersion: '8.47.0',
118
+ latestVersion: versions['@typescript-eslint/parser'],
118
119
  value: '@typescript-eslint/parser'
119
120
  },
120
121
  {
121
- latestVersion: '0.1.6',
122
+ latestVersion: versions['eslint-plugin-absolute'],
122
123
  value: 'eslint-plugin-absolute'
123
124
  },
124
125
  {
125
- latestVersion: '2.32.0',
126
+ latestVersion: versions['eslint-plugin-import'],
126
127
  value: 'eslint-plugin-import'
127
128
  },
128
129
  {
129
- latestVersion: '7.2.1',
130
+ latestVersion: versions['eslint-plugin-promise'],
130
131
  value: 'eslint-plugin-promise'
131
132
  },
132
133
  {
133
- latestVersion: '3.0.1',
134
+ latestVersion: versions['eslint-plugin-security'],
134
135
  value: 'eslint-plugin-security'
135
136
  },
136
137
  {
137
- latestVersion: '8.47.0',
138
+ latestVersion: versions['typescript-eslint'],
138
139
  value: 'typescript-eslint'
139
140
  }
140
141
  ];
141
142
  export const eslintReactDependencies = [
142
143
  {
143
- latestVersion: '6.10.2',
144
+ latestVersion: versions['eslint-plugin-jsx-a11y'],
144
145
  value: 'eslint-plugin-jsx-a11y'
145
146
  },
146
147
  {
147
- latestVersion: '7.37.5',
148
+ latestVersion: versions['eslint-plugin-react'],
148
149
  value: 'eslint-plugin-react'
149
150
  },
150
151
  {
151
- latestVersion: '19.1.0-rc.2',
152
+ latestVersion: versions['eslint-plugin-react-compiler'],
152
153
  value: 'eslint-plugin-react-compiler'
153
154
  },
154
155
  {
155
- latestVersion: '7.0.0',
156
+ latestVersion: versions['eslint-plugin-react-hooks'],
156
157
  value: 'eslint-plugin-react-hooks'
157
158
  }
158
159
  ];
159
160
  export const defaultDependencies = [
160
161
  {
161
162
  imports: [{ isPlugin: false, packageName: 'Elysia' }],
162
- latestVersion: '1.4.9',
163
+ latestVersion: versions['elysia'],
163
164
  value: 'elysia'
164
165
  }
165
166
  ];
@@ -170,7 +171,7 @@ export const defaultPlugins = [
170
171
  { isPlugin: false, packageName: 'build' },
171
172
  { isPlugin: true, packageName: 'networking' }
172
173
  ],
173
- latestVersion: '0.12.3',
174
+ latestVersion: versions['@absolutejs/absolute'],
174
175
  value: '@absolutejs/absolute'
175
176
  },
176
177
  {
@@ -181,7 +182,7 @@ export const defaultPlugins = [
181
182
  packageName: 'staticPlugin'
182
183
  }
183
184
  ],
184
- latestVersion: '1.4.0',
185
+ latestVersion: versions['@elysiajs/static'],
185
186
  value: '@elysiajs/static'
186
187
  }
187
188
  ];
@@ -1,21 +1,21 @@
1
1
  import { writeFileSync } from 'fs';
2
2
  import { join } from 'path';
3
3
  export const createDrizzleConfig = ({ projectName, databaseDirectory, databaseEngine }) => {
4
- const drizzleConfig = `import { defineConfig } from "drizzle-kit";
5
- import { env } from 'process';
6
-
7
- if (!env.DATABASE_URL) {
8
- throw new Error('DATABASE_URL must be set in the environment variables');
9
- }
10
-
11
- export default defineConfig({
12
- dbCredentials: {
13
- url: env.DATABASE_URL
14
- },
15
- dialect: '${databaseEngine}',
16
- out: '${databaseDirectory}/migrations',
17
- schema: '${databaseDirectory}/schema.ts'
18
- });
4
+ const drizzleConfig = `import { defineConfig } from "drizzle-kit";
5
+ import { env } from 'process';
6
+
7
+ if (!env.DATABASE_URL) {
8
+ throw new Error('DATABASE_URL must be set in the environment variables');
9
+ }
10
+
11
+ export default defineConfig({
12
+ dbCredentials: {
13
+ url: env.DATABASE_URL
14
+ },
15
+ dialect: '${databaseEngine}',
16
+ out: '${databaseDirectory}/migrations',
17
+ schema: '${databaseDirectory}/schema.ts'
18
+ });
19
19
  `;
20
20
  writeFileSync(join(projectName, 'drizzle.config.ts'), drizzleConfig);
21
21
  };