Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/server api not started (#8645) #8646

Merged
merged 1 commit into from
Dec 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 18 additions & 1 deletion apps/desktop/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,23 @@
"@datorama/akita-ngdevtools": "^7.0.0",
"@datorama/akita": "^7.1.1",
"@electron/remote": "^2.0.8",
"@gauzy/config": "file:../../../dist/packages/config",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/plugin": "file:../../../dist/packages/plugin",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/plugin-changelog": "file:../../../dist/packages/plugins/changelog",
"@gauzy/plugin-integration-ai": "file:../../../dist/packages/plugins/integration-ai",
"@gauzy/plugin-integration-github": "file:../../../dist/packages/plugins/integration-github",
"@gauzy/plugin-integration-hubstaff": "file:../../../dist/packages/plugins/integration-hubstaff",
"@gauzy/plugin-job-proposal": "file:../../../dist/packages/plugins/job-proposal",
"@gauzy/plugin-integration-jira": "file:../../../dist/packages/plugins/integration-jira",
"@gauzy/plugin-integration-upwork": "file:../../../dist/packages/plugins/integration-upwork",
"@gauzy/plugin-jitsu-analytics": "file:../../../dist/packages/plugins/jitsu-analytics",
"@gauzy/plugin-job-search": "file:../../../dist/packages/plugins/job-search",
"@gauzy/plugin-knowledge-base": "file:../../../dist/packages/plugins/knowledge-base",
"@gauzy/plugin-product-reviews": "file:../../../dist/packages/plugins/product-reviews",
"@gauzy/plugin-sentry": "file:../../../dist/packages/plugins/sentry-tracing",
"@gauzy/plugin-videos": "file:../../../dist/packages/plugins/videos",
"@gauzy/contracts": "file:../../../dist/packages/contracts",
"@gauzy/desktop-lib": "file:../../../dist/packages/desktop-lib",
"@gauzy/desktop-window": "file:../../../dist/packages/desktop-window",
Expand All @@ -147,7 +164,7 @@
"htmlparser2": "^8.0.2",
"knex": "^3.1.0",
"libsql": "^0.3.16",
"locutus": "^2.0.30",
"locutus": "^2.0.30",
"moment": "^2.30.1",
"node-fetch": "^2.6.7",
"node-notifier": "^8.0.0",
Expand Down
10 changes: 5 additions & 5 deletions apps/server/src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,11 @@
"@datorama/akita-ngdevtools": "^7.0.0",
"@datorama/akita": "^7.1.1",
"@electron/remote": "^2.0.8",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/contracts": "file:../../../dist/packages/contracts",
"@gauzy/config": "file:../../../dist/packages/config",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/desktop-lib": "file:../../../dist/packages/desktop-lib",
"@gauzy/desktop-window": "file:../../../dist/packages/desktop-window",
"@gauzy/auth": "file:../../../dist/packages/auth",
"@gauzy/plugin": "file:../../../dist/packages/plugin",
"@gauzy/plugin-changelog": "file:../../../dist/packages/plugins/changelog",
"@gauzy/core": "file:../../../dist/packages/core",
"@gauzy/plugin-integration-ai": "file:../../../dist/packages/plugins/integration-ai",
"@gauzy/plugin-integration-github": "file:../../../dist/packages/plugins/integration-github",
"@gauzy/plugin-integration-hubstaff": "file:../../../dist/packages/plugins/integration-hubstaff",
Expand All @@ -151,6 +148,9 @@
"@gauzy/plugin-knowledge-base": "file:../../../dist/packages/plugins/knowledge-base",
"@gauzy/plugin-product-reviews": "file:../../../dist/packages/plugins/product-reviews",
"@gauzy/plugin-sentry": "file:../../../dist/packages/plugins/sentry-tracing",
"@gauzy/plugin-changelog": "file:../../../dist/packages/plugins/changelog",
"@gauzy/desktop-lib": "file:../../../dist/packages/desktop-lib",
"@gauzy/desktop-window": "file:../../../dist/packages/desktop-window",
"@gauzy/plugin-videos": "file:../../../dist/packages/plugins/videos",
"@gauzy/ui-config": "file:../../../dist/packages/ui-config",
"@gauzy/desktop-core": "^0.1.0",
Expand Down
5 changes: 3 additions & 2 deletions packages/core/src/lib/bootstrap/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export async function bootstrap(pluginConfig?: Partial<ApplicationPluginConfig>)
// Create the NestJS application
const app = await NestFactory.create<NestExpressApplication>(BootstrapModule, {
logger: ['log', 'error', 'warn', 'debug', 'verbose'], // Set logging levels
bufferLogs: true // Buffer logs to avoid loss during startup
bufferLogs: env.isElectron ? false : true // Buffer logs to avoid loss during startup // set to false when is electron
});

// Register custom entity fields for Mikro ORM
Expand Down Expand Up @@ -501,7 +501,8 @@ export function getMigrationsConfig() {
console.log('Migration __dirname: ->', __dirname);

// Base migrations directory
const migrationsDir = path.resolve(__dirname, './../database/migrations/*{.ts,.js}');
const includedFiles = env.isElectron ? ['.js'] : ['.ts','.js'];
const migrationsDir = path.resolve(__dirname, `./../database/migrations/*{${includedFiles.join(',')}}`);
console.log('Migration migrationsDir: ->', migrationsDir);

if (!fs.existsSync(path.dirname(migrationsDir))) {
Expand Down
Loading