File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44// ============================================================================
55
66import nodeProcess from 'node:process'
7- import { CAC } from 'cac '
7+ import { CLI } from '@stacksjs/clapp '
88import { version } from '../package.json'
99import {
1010 registerLocalCommands ,
@@ -16,7 +16,7 @@ import {
1616 registerUtilityCommands ,
1717} from '../src/cli/commands'
1818
19- const cli = new CAC ( 'dbtooling' )
19+ const cli = new CLI ( 'dbtooling' )
2020
2121// Register all command modules
2222registerTableCommands ( cli )
Original file line number Diff line number Diff line change 5757 },
5858 "devDependencies" : {
5959 "@stacksjs/cli" : " ^0.70.23" ,
60+ "@stacksjs/clapp" : " 0.2.0" ,
6061 "@stacksjs/logging" : " ^0.70.23" ,
6162 "@stacksjs/storage" : " ^0.70.23" ,
6263 "@types/tar" : " ^7.0.87" ,
7374 },
7475 "autoRestage" : true
7576 },
76- "commit-msg" : " bunx gitlint --edit .git/COMMIT_EDITMSG"
77+ "commit-msg" : " bunx --bun @stacksjs/ gitlint --edit .git/COMMIT_EDITMSG"
7778 }
7879}
Original file line number Diff line number Diff line change 22// CLI Commands Index
33// ============================================================================
44
5- import type { CAC } from 'cac '
5+ import type { CLI } from '@stacksjs/clapp '
66import { registerLocalCommands } from './local'
77import { registerMigrateCommands } from './migrate'
88import { registerModelsCommands } from './models'
@@ -24,7 +24,7 @@ export { registerUtilityCommands } from './utility'
2424/**
2525 * Register all CLI commands
2626 */
27- export function registerAllCommands ( cli : CAC ) : void {
27+ export function registerAllCommands ( cli : CLI ) : void {
2828 registerTableCommands ( cli )
2929 registerMigrateCommands ( cli )
3030 registerQueryCommands ( cli )
Original file line number Diff line number Diff line change 22// Local DynamoDB Development Commands
33// ============================================================================
44
5- import type { CAC } from 'cac '
5+ import type { CLI } from '@stacksjs/clapp '
66import { getConfig } from '../../config'
77import { dynamoDb , runningProcesses } from '../../dynamodb'
88import { handleError } from '../utils'
99
1010/**
1111 * Register local development commands
1212 */
13- export function registerLocalCommands ( cli : CAC ) : void {
13+ export function registerLocalCommands ( cli : CLI ) : void {
1414 // start - Start local DynamoDB
1515 cli
1616 . command ( 'start' , 'Start DynamoDB Local' )
Original file line number Diff line number Diff line change 22// Migration CLI Commands
33// ============================================================================
44
5- import type { CAC } from 'cac '
5+ import type { CLI } from '@stacksjs/clapp '
66import { getConfig } from '../../config'
77import {
88 formatSchemaSummary ,
@@ -30,7 +30,7 @@ import {
3030/**
3131 * Register migration commands
3232 */
33- export function registerMigrateCommands ( cli : CAC ) : void {
33+ export function registerMigrateCommands ( cli : CLI ) : void {
3434 // migrate - Run migrations
3535 cli
3636 . command ( 'migrate' , 'Run database migrations based on your Stacks models' )
Original file line number Diff line number Diff line change 33// ============================================================================
44// View and explore Stacks model definitions
55
6- import type { CAC } from 'cac '
6+ import type { CLI } from '@stacksjs/clapp '
77import type { TreeNode } from '../ui'
88import { getConfig } from '../../config'
99import { handleCommandError } from '../error-formatter'
@@ -55,7 +55,7 @@ interface ParsedModel {
5555/**
5656 * Register models viewer commands
5757 */
58- export function registerModelsCommands ( cli : CAC ) : void {
58+ export function registerModelsCommands ( cli : CLI ) : void {
5959 // models - List all models
6060 cli
6161 . command ( 'models' , 'List all Stacks models' )
Original file line number Diff line number Diff line change 22// Query CLI Commands
33// ============================================================================
44
5- import type { CAC } from 'cac '
5+ import type { CLI } from '@stacksjs/clapp '
66import { getConfig } from '../../config'
77import { handleError } from '../utils'
88
99/**
1010 * Register query commands
1111 */
12- export function registerQueryCommands ( cli : CAC ) : void {
12+ export function registerQueryCommands ( cli : CLI ) : void {
1313 // query - Interactive query
1414 cli
1515 . command ( 'query [table]' , 'Query a DynamoDB table' )
Original file line number Diff line number Diff line change 33// ============================================================================
44// Interactive schema visualization and exploration
55
6- import type { CAC } from 'cac '
6+ import type { CLI } from '@stacksjs/clapp '
77import type { TreeNode } from '../ui'
88import { getConfig } from '../../config'
99import {
@@ -30,7 +30,7 @@ import {
3030/**
3131 * Register schema viewer commands
3232 */
33- export function registerSchemaCommands ( cli : CAC ) : void {
33+ export function registerSchemaCommands ( cli : CLI ) : void {
3434 // schema - Show schema overview
3535 cli
3636 . command ( 'schema' , 'Display table schema overview' )
Original file line number Diff line number Diff line change 22// Seeder CLI Commands
33// ============================================================================
44
5- import type { CAC } from 'cac '
5+ import type { CLI } from '@stacksjs/clapp '
66import { getConfig } from '../../config'
77import { handleError } from '../utils'
88
99/**
1010 * Register seeder commands
1111 */
12- export function registerSeedCommands ( cli : CAC ) : void {
12+ export function registerSeedCommands ( cli : CLI ) : void {
1313 // seed - Run seeders
1414 cli
1515 . command ( 'seed' , 'Run database seeders' )
You can’t perform that action at this time.
0 commit comments