mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-21 07:07:39 +00:00
fix(developer): load Keyman Developer options in Server before use
Fixes: #13420
This commit is contained in:
parent
1ad15d4c57
commit
d2b457b2e4
2 changed files with 19 additions and 14 deletions
|
|
@ -1,6 +1,6 @@
|
|||
import * as os from 'os';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import * as os from 'node:os';
|
||||
import * as fs from 'node:fs';
|
||||
import * as path from 'node:path';
|
||||
|
||||
export interface KeymanDeveloperOptions {
|
||||
"use tab char"?: boolean;
|
||||
|
|
|
|||
|
|
@ -1,16 +1,16 @@
|
|||
import { environment } from './environment.js';
|
||||
import { KeymanSentry } from '@keymanapp/developer-utils';
|
||||
import express from 'express';
|
||||
import * as ws from 'ws';
|
||||
import * as os from 'os';
|
||||
import multer from 'multer';
|
||||
import * as fs from 'fs';
|
||||
import * as path from 'path';
|
||||
import setupRoutes from './routes.js';
|
||||
import { configuration } from './config.js';
|
||||
import { initTray } from './tray.js';
|
||||
import * as fs from 'node:fs';
|
||||
import * as os from 'node:os';
|
||||
import * as path from 'node:path';
|
||||
import chalk from 'chalk';
|
||||
import express from 'express';
|
||||
import multer from 'multer';
|
||||
import * as ws from 'ws';
|
||||
import { KeymanSentry, loadOptions } from '@keymanapp/developer-utils';
|
||||
import { configuration } from './config.js';
|
||||
import { environment } from './environment.js';
|
||||
import setupRoutes from './routes.js';
|
||||
import { shutdown } from './shutdown.js';
|
||||
import { initTray } from './tray.js';
|
||||
|
||||
const options = {
|
||||
ngrokLog: false, // Set this to true if you need to see ngrok logs in the console
|
||||
|
|
@ -20,6 +20,11 @@ const options = {
|
|||
|
||||
console.log(`Starting Keyman Developer Server ${environment.versionWithTag}, listening on port ${configuration.port}.`);
|
||||
|
||||
// We need to load the Keyman Developer options before attempting to initialize
|
||||
// Sentry. `loadOptions` silently suppresses exceptions and returns a default
|
||||
// set of options if an error occurs.
|
||||
await loadOptions();
|
||||
|
||||
KeymanSentry.init();
|
||||
try {
|
||||
await run();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue