create-adonisjs 2.3.0 → 2.4.1
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 +4 -6
- package/build/commands/main.d.ts +0 -5
- package/build/commands/main.js +6 -28
- package/build/src/databases.d.ts +2 -1
- package/build/src/inertia_adapters.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -112,12 +112,10 @@ npm init adonisjs -- --kit="web" --db="mysql"
|
|
|
112
112
|
|
|
113
113
|
### Other options
|
|
114
114
|
|
|
115
|
-
| Option
|
|
116
|
-
|
|
|
117
|
-
| `--
|
|
118
|
-
| `--
|
|
119
|
-
| `--no-install` | Explicitly opt out from installing dependencies and skip the prompt |
|
|
120
|
-
| `--verbose` | Enable verbose mode to display all logs |
|
|
115
|
+
| Option | Description |
|
|
116
|
+
| ------------ | --------------------------------------- |
|
|
117
|
+
| `--git-init` | Initialize git repository. |
|
|
118
|
+
| `--verbose` | Enable verbose mode to display all logs |
|
|
121
119
|
|
|
122
120
|
## Debugging errors
|
|
123
121
|
|
package/build/commands/main.d.ts
CHANGED
|
@@ -23,11 +23,6 @@ export declare class CreateNewApp extends BaseCommand {
|
|
|
23
23
|
* Authentication token to download private templates
|
|
24
24
|
*/
|
|
25
25
|
token?: string;
|
|
26
|
-
/**
|
|
27
|
-
* Auto install packages after creating the project. Display prompt
|
|
28
|
-
* when flag is not mentioned.
|
|
29
|
-
*/
|
|
30
|
-
install?: boolean;
|
|
31
26
|
/**
|
|
32
27
|
* Init git repository. Do not init when flag is not mentioned.
|
|
33
28
|
*/
|
package/build/commands/main.js
CHANGED
|
@@ -148,16 +148,6 @@ export class CreateNewApp extends BaseCommand {
|
|
|
148
148
|
this.ssr = await this.prompt.confirm('Do you want to setup server-side rendering with Inertia');
|
|
149
149
|
}
|
|
150
150
|
}
|
|
151
|
-
/**
|
|
152
|
-
* Prompt to check if we should install dependencies?
|
|
153
|
-
*/
|
|
154
|
-
async #promptForInstallingDeps() {
|
|
155
|
-
if (this.install === undefined) {
|
|
156
|
-
this.install = await this.prompt.confirm(`Do you want to install dependencies using "${this.packageManager}"`, {
|
|
157
|
-
default: true,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
151
|
/**
|
|
162
152
|
* Replace the package.json name with the destination directory name.
|
|
163
153
|
* Errors are ignored.
|
|
@@ -198,9 +188,6 @@ export class CreateNewApp extends BaseCommand {
|
|
|
198
188
|
* Generate a fresh app key. Errors are ignored
|
|
199
189
|
*/
|
|
200
190
|
async #generateFreshAppKey() {
|
|
201
|
-
if (this.install === false) {
|
|
202
|
-
return;
|
|
203
|
-
}
|
|
204
191
|
await this.#runBashCommand('node', ['ace', 'generate:key']);
|
|
205
192
|
}
|
|
206
193
|
/**
|
|
@@ -217,7 +204,7 @@ export class CreateNewApp extends BaseCommand {
|
|
|
217
204
|
* Configures the session package
|
|
218
205
|
*/
|
|
219
206
|
async #configureSession() {
|
|
220
|
-
await installPackage(['@adonisjs/session@
|
|
207
|
+
await installPackage(['@adonisjs/session@7.7.1'], {
|
|
221
208
|
cwd: this.destination,
|
|
222
209
|
packageManager: this.packageManager,
|
|
223
210
|
silent: !this.verbose,
|
|
@@ -260,7 +247,7 @@ export class CreateNewApp extends BaseCommand {
|
|
|
260
247
|
'--adapter',
|
|
261
248
|
this.adapter,
|
|
262
249
|
this.ssr ? '--ssr' : '--no-ssr',
|
|
263
|
-
|
|
250
|
+
'--install',
|
|
264
251
|
];
|
|
265
252
|
if (this.verbose) {
|
|
266
253
|
argv.push('--verbose');
|
|
@@ -291,7 +278,6 @@ export class CreateNewApp extends BaseCommand {
|
|
|
291
278
|
await this.#promptForInertiaAdapter();
|
|
292
279
|
await this.#promptForInertiaSsr();
|
|
293
280
|
}
|
|
294
|
-
await this.#promptForInstallingDeps();
|
|
295
281
|
/**
|
|
296
282
|
* Create tasks instance for displaying
|
|
297
283
|
* actions as tasks
|
|
@@ -302,19 +288,17 @@ export class CreateNewApp extends BaseCommand {
|
|
|
302
288
|
* and installing dependencies
|
|
303
289
|
*/
|
|
304
290
|
const configureLucid = [WEB_STARTER_KIT, API_STARTER_KIT, INERTIA_STARTER_KIT].includes(this.kit || '') &&
|
|
305
|
-
this.db !== 'skip'
|
|
306
|
-
this.install !== false;
|
|
291
|
+
this.db !== 'skip';
|
|
307
292
|
/**
|
|
308
293
|
* Configure auth when using our own starter kits
|
|
309
294
|
* and installing dependencies
|
|
310
295
|
*/
|
|
311
296
|
const configureAuth = [WEB_STARTER_KIT, API_STARTER_KIT, INERTIA_STARTER_KIT].includes(this.kit || '') &&
|
|
312
|
-
this.authGuard !== 'skip'
|
|
313
|
-
this.install !== false;
|
|
297
|
+
this.authGuard !== 'skip';
|
|
314
298
|
/**
|
|
315
299
|
* Configure inertia when using our inertia starter kit
|
|
316
300
|
*/
|
|
317
|
-
const configureInertia = this.kit === INERTIA_STARTER_KIT && this.adapter !== 'skip'
|
|
301
|
+
const configureInertia = this.kit === INERTIA_STARTER_KIT && this.adapter !== 'skip';
|
|
318
302
|
tasks
|
|
319
303
|
.add('Download starter kit', async (task) => {
|
|
320
304
|
task.update(`Downloading "${this.kit}"`);
|
|
@@ -330,7 +314,7 @@ export class CreateNewApp extends BaseCommand {
|
|
|
330
314
|
await this.#runBashCommand('git', ['init']);
|
|
331
315
|
return 'Initialized git repository';
|
|
332
316
|
})
|
|
333
|
-
.
|
|
317
|
+
.add('Install packages', async (task) => {
|
|
334
318
|
const spinner = this.logger.await('installing dependencies', {
|
|
335
319
|
silent: this.verbose,
|
|
336
320
|
});
|
|
@@ -440,12 +424,6 @@ __decorate([
|
|
|
440
424
|
alias: 't',
|
|
441
425
|
})
|
|
442
426
|
], CreateNewApp.prototype, "token", void 0);
|
|
443
|
-
__decorate([
|
|
444
|
-
flags.boolean({
|
|
445
|
-
description: 'Force install or skip dependencies installation',
|
|
446
|
-
showNegatedVariantInHelp: true,
|
|
447
|
-
})
|
|
448
|
-
], CreateNewApp.prototype, "install", void 0);
|
|
449
427
|
__decorate([
|
|
450
428
|
flags.boolean({
|
|
451
429
|
description: 'Init git repository',
|
package/build/src/databases.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { DIALECTS } from '@adonisjs/presets/lucid';
|
|
1
2
|
/**
|
|
2
3
|
* List of known databases that can be used with Lucid
|
|
3
4
|
*/
|
|
4
5
|
export declare const databases: ({
|
|
5
|
-
name:
|
|
6
|
+
name: keyof typeof DIALECTS;
|
|
6
7
|
message: string;
|
|
7
8
|
} | {
|
|
8
9
|
name: string;
|