Files
AFFiNE-Mirror/tools/cli/src/affine.ts
T
forehalo 8519f4474a chore: cli to create self signed ca to dev with domain (#12466)
<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **New Features**
  - Introduced a CLI command to manage local Certificate Authority (CA) and generate SSL certificates for development domains.
  - Added example and template files for Nginx and OpenSSL configurations to support local development with SSL.
  - Provided new DNS and Nginx configuration files for enhanced local development setup.

- **Documentation**
  - Added a README with step-by-step instructions for setting up development containers and managing certificates on MacOS with OrbStack.

- **Chores**
  - Updated ignore patterns to exclude additional development files and directories.
  - Enhanced example Docker Compose files with commented service configurations and new volume definitions.
  - Removed the Elasticsearch example Docker Compose file.

- **Refactor**
  - Extended utility and command classes with new methods to support file operations and command execution.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2025-05-23 05:19:13 +00:00

35 lines
928 B
TypeScript

import { Workspace } from '@affine-tools/utils/workspace';
import { Cli } from 'clipanion';
import { BuildCommand } from './build';
import { BundleCommand } from './bundle';
import { CertCommand } from './cert';
import { CleanCommand } from './clean';
import type { CliContext } from './context';
import { DevCommand } from './dev';
import { InitCommand } from './init';
import { RunCommand } from './run';
const cli = new Cli<CliContext>({
binaryName: 'affine',
binaryVersion: '0.0.0',
binaryLabel: 'AFFiNE Monorepo Tools',
enableColors: true,
enableCapture: true,
});
cli.register(RunCommand);
cli.register(InitCommand);
cli.register(CleanCommand);
cli.register(BuildCommand);
cli.register(DevCommand);
cli.register(BundleCommand);
cli.register(CertCommand);
await cli.runExit(process.argv.slice(2), {
workspace: new Workspace(),
stdin: process.stdin,
stdout: process.stdout,
stderr: process.stderr,
});