mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 06:37:18 +01:00
Build cli using rollup.
This commit is contained in:
parent
533ffbda13
commit
0f0b1e39e7
10 changed files with 175 additions and 23 deletions
|
|
@ -1,8 +1,6 @@
|
|||
const { PrismaClient } = require('@prisma/client');
|
||||
import { prisma } from '../lib/db';
|
||||
|
||||
const prisma = new PrismaClient();
|
||||
|
||||
module.exports = async () => {
|
||||
export default async () => {
|
||||
const account = await prisma.account.findOne({
|
||||
where: {
|
||||
username: 'admin',
|
||||
|
|
|
|||
14
cli/index.js
14
cli/index.js
|
|
@ -1,9 +1,9 @@
|
|||
#!/usr/bin/env node
|
||||
|
||||
require('dotenv').config();
|
||||
const yargs = require('yargs');
|
||||
const chalk = require('chalk');
|
||||
const createAccount = require('./create-account');
|
||||
import 'dotenv/config';
|
||||
import yargs from 'yargs';
|
||||
import chalk from 'chalk';
|
||||
import createAccount from './create-account';
|
||||
|
||||
const cmd = yargs.usage('Usage: umami <command> [arguments]').help('h').alias('h', 'help');
|
||||
|
||||
|
|
@ -19,7 +19,9 @@ const exec = async () => {
|
|||
cmd.showHelp();
|
||||
}
|
||||
|
||||
process.exit(0);
|
||||
console.log(chalk.green('Finished.'));
|
||||
};
|
||||
|
||||
exec();
|
||||
exec().then(() => {
|
||||
process.exit(0);
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue