mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-21 12:06:35 +08:00
chore: bump deps (#14777)
<!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Migration and config commands now feature interactive prompts for required inputs. * **Bug Fixes** * Enhanced error handling in CLI operations. * **Chores** * Updated GraphQL Code Generator toolchain to v6. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -1,29 +1,25 @@
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
|
||||
import { Logger } from '@nestjs/common';
|
||||
import { Command, CommandRunner } from 'nest-commander';
|
||||
import { Injectable, Logger } from '@nestjs/common';
|
||||
|
||||
import { ConfigFactory, InvalidAppConfigInput } from '../../base';
|
||||
import { Models } from '../../models';
|
||||
|
||||
@Command({
|
||||
name: 'import-config',
|
||||
arguments: '[name]',
|
||||
description: 'import config from a file',
|
||||
})
|
||||
export class ImportConfigCommand extends CommandRunner {
|
||||
@Injectable()
|
||||
export class ImportConfigCommand {
|
||||
logger = new Logger(ImportConfigCommand.name);
|
||||
|
||||
constructor(
|
||||
private readonly models: Models,
|
||||
private readonly configFactory: ConfigFactory
|
||||
) {
|
||||
super();
|
||||
}
|
||||
) {}
|
||||
|
||||
async execute(path?: string): Promise<void> {
|
||||
if (!path) {
|
||||
throw new Error('A config file path is required');
|
||||
}
|
||||
|
||||
override async run(inputs: string[]): Promise<void> {
|
||||
let path = inputs[0];
|
||||
path = resolve(process.cwd(), path);
|
||||
|
||||
const overrides: Record<string, Record<string, any>> = JSON.parse(
|
||||
|
||||
Reference in New Issue
Block a user