@avelonjs/cli 0.1.0 → 0.3.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@avelonjs/cli",
3
- "version": "0.1.0",
3
+ "version": "0.3.0",
4
4
  "private": false,
5
5
  "description": "reeve CLI and TUI for generating and administering Avelon applications.",
6
6
  "license": "MIT",
package/src/commands.ts CHANGED
@@ -293,7 +293,10 @@ export async function runCommand(
293
293
  io,
294
294
  `Avelon reeve · ${bits.app} · ${bits.database} · ${bits.adapter} · ${bits.environment}`,
295
295
  )
296
- writeln(io, 'Packages: @avelonjs/cli @avelonjs/next @avelonjs/bailiff @avelonjs/assay @avelonjs/core')
296
+ writeln(
297
+ io,
298
+ 'Packages: @avelonjs/cli @avelonjs/next @avelonjs/bailiff @avelonjs/assay @avelonjs/core',
299
+ )
297
300
  return 0
298
301
  }
299
302
  case 'errand:work': {
@@ -340,10 +343,15 @@ export async function runCommand(
340
343
  }
341
344
  }
342
345
 
346
+ function confirmation(argv: readonly string[], io: ReeveIO): string | undefined {
347
+ const prefix = '--confirm='
348
+ return argv.find((arg) => arg.startsWith(prefix))?.slice(prefix.length) ?? io.confirm
349
+ }
350
+
343
351
  async function runMigrate(command: string, argv: readonly string[], io: ReeveIO): Promise<number> {
344
352
  const env = headerBits(io).environment
345
- if (command === 'migrate:fresh' && env !== 'local' && io.confirm !== env) {
346
- writeln(io, `Refusing migrate:fresh on ${env}. Pass the environment name as confirmation.`)
353
+ if (command === 'migrate:fresh' && env !== 'local' && confirmation(argv, io) !== env) {
354
+ writeln(io, `Refusing migrate:fresh on ${env}. Pass --confirm=${env} to proceed.`)
347
355
  return 1
348
356
  }
349
357
  try {
@@ -69,6 +69,7 @@ const CONTRACTS: Record<string, DriverContractSpec> = {
69
69
  oauth: false,
70
70
  organizations: false,
71
71
  mfa: [] as const,
72
+ emailVerification: false,
72
73
  }`,
73
74
  methods: ` async user(): Promise<{ readonly id: string } | null> {
74
75
  unimplemented('user')