-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #340 from cellajs/development
updates
- Loading branch information
Showing
20 changed files
with
120 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,19 @@ | ||
import { spawn } from 'node:child_process'; | ||
import chalk from 'chalk'; | ||
|
||
// Function to start Drizzle Studio | ||
export const startDrizzleStudio = () => { | ||
const startDrizzleStudioInBackground = () => { | ||
const studioProcess = spawn('npx', ['drizzle-kit', 'studio'], { | ||
stdio: 'inherit', | ||
shell: true, | ||
detached: true, // Detach the process | ||
stdio: 'ignore', // Ignore its output to let the parent process exit cleanly | ||
shell: true, // Use shell for compatibility | ||
}); | ||
|
||
studioProcess.on('close', (code) => { | ||
if (code === 0) { | ||
console.log('Drizzle Studio exited successfully.'); | ||
} else { | ||
console.error(`Drizzle Studio exited with code ${code}.`); | ||
} | ||
}); | ||
// Detach the child process from the parent | ||
studioProcess.unref(); | ||
|
||
studioProcess.on('error', (err) => { | ||
console.error('Failed to start Drizzle Studio:', err); | ||
}); | ||
console.log(' '); | ||
console.log(`${chalk.greenBright.bold('✔')} Drizzle Studio started in the background`); | ||
console.log(' '); | ||
}; | ||
|
||
startDrizzleStudioInBackground(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,7 +168,6 @@ export async function create({ | |
|
||
if (needsCd) { | ||
// Calculate the relative path between the original working directory and the target folder | ||
|
||
console.info('now go to your project using:'); | ||
console.info(colors.cyan(` cd ${relativePath}`)); // Adding './' to make it clear it's a relative path | ||
console.info(); | ||
|
@@ -184,6 +183,10 @@ export async function create({ | |
console.info(colors.cyan(` ${packageManager} seed`)); | ||
console.info(); | ||
|
||
console.info(`You can directly sign in using:`); | ||
console.info(`email: ${colors.greenBright('[email protected]')}`); | ||
console.info(`password: ${colors.greenBright('12345678')}`); | ||
console.info(); | ||
console.info(`For more info, check out: ${relativePath}/README.md`); | ||
console.info(`Enjoy building ${projectName} using cella! 🎉`); | ||
console.info(); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,30 @@ | ||
import { config } from 'config'; | ||
import { t } from 'i18next'; | ||
import { Info } from 'lucide-react'; | ||
import type { MainAlert } from '~/modules/common/main-alert'; | ||
|
||
// Here you can set app-specific global alerts | ||
export const alertsConfig: MainAlert[] = [ | ||
{ | ||
const alerts = []; | ||
|
||
// Explain how to sign in using test account | ||
if (config.mode === 'development') { | ||
alerts.push({ | ||
id: 'test-credentials', | ||
Icon: Info, | ||
className: 'rounded-none border-0 border-t z-10 fixed bottom-0 left-0 right-0', | ||
children: ( | ||
<> | ||
<strong className="mr-2">Testing credentials</strong> | ||
<p> | ||
Hi there! New developer? Welcome to Cella! Sign in using <strong>[email protected]</strong> and password <strong>12345678</strong>. | ||
</p> | ||
</> | ||
), | ||
}); | ||
} | ||
|
||
// In production mode, show a notice that the app is a pre-release version | ||
if (config.mode === 'production') { | ||
alerts.push({ | ||
id: 'prerelease', | ||
Icon: Info, | ||
className: 'rounded-none border-0 border-b', | ||
|
@@ -14,5 +34,8 @@ export const alertsConfig: MainAlert[] = [ | |
{t('common:experiment_notice.text')} | ||
</> | ||
), | ||
}, | ||
]; | ||
}); | ||
} | ||
|
||
// Here you can set app-specific global alerts | ||
export const alertsConfig: MainAlert[] = alerts; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.