Skip to content

Commit

Permalink
Merge pull request #4 from rustymotors/deepsource-transform-e58ada66
Browse files Browse the repository at this point in the history
style: format code with Prettier
  • Loading branch information
drazisil authored May 24, 2024
2 parents a0707d6 + 4b1106a commit b08bcc9
Show file tree
Hide file tree
Showing 73 changed files with 4,143 additions and 2,862 deletions.
93 changes: 46 additions & 47 deletions apps/main/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,67 +21,66 @@ import { getGatewayServer } from "rm-gateway";
import { verifyLegacyCipherSupport } from "rm-shared";

const coreLogger = getServerLogger({
level: "info",
level: "info",
});

try {
verifyLegacyCipherSupport();
verifyLegacyCipherSupport();
} catch (err) {
coreLogger.fatal(`Error in core server: ${String(err)}`);
throw err;
coreLogger.fatal(`Error in core server: ${String(err)}`);
throw err;
}

Sentry.init({
dsn: "https://f4c0126e2fc35876c860dd72fc056db9@o1413557.ingest.sentry.io/4506787875061760",
dsn: "https://f4c0126e2fc35876c860dd72fc056db9@o1413557.ingest.sentry.io/4506787875061760",

// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate
integrations: [nodeProfilingIntegration()],
// We recommend adjusting this value in production, or using tracesSampler
// for finer control
tracesSampleRate: 1.0,
profilesSampleRate: 1.0, // Profiling sample rate is relative to tracesSampleRate
integrations: [nodeProfilingIntegration()],
});

try {
if (typeof process.env["EXTERNAL_HOST"] === "undefined") {
console.error("Please set EXTERNAL_HOST");
process.exit(1);
}
if (typeof process.env["CERTIFICATE_FILE"] === "undefined") {
console.error("Please set CERTIFICATE_FILE");
process.exit(1);
}
if (typeof process.env["PRIVATE_KEY_FILE"] === "undefined") {
console.error("Please set PRIVATE_KEY_FILE");
process.exit(1);
}
if (typeof process.env["PUBLIC_KEY_FILE"] === "undefined") {
console.error("Please set PUBLIC_KEY_FILE");
process.exit(1);
}
const config = getServerConfiguration({
host: process.env["EXTERNAL_HOST"],
certificateFile: process.env["CERTIFICATE_FILE"],
privateKeyFile: process.env["PRIVATE_KEY_FILE"],
publicKeyFile: process.env["PUBLIC_KEY_FILE"],
});
if (typeof process.env["EXTERNAL_HOST"] === "undefined") {
console.error("Please set EXTERNAL_HOST");
process.exit(1);
}
if (typeof process.env["CERTIFICATE_FILE"] === "undefined") {
console.error("Please set CERTIFICATE_FILE");
process.exit(1);
}
if (typeof process.env["PRIVATE_KEY_FILE"] === "undefined") {
console.error("Please set PRIVATE_KEY_FILE");
process.exit(1);
}
if (typeof process.env["PUBLIC_KEY_FILE"] === "undefined") {
console.error("Please set PUBLIC_KEY_FILE");
process.exit(1);
}
const config = getServerConfiguration({
host: process.env["EXTERNAL_HOST"],
certificateFile: process.env["CERTIFICATE_FILE"],
privateKeyFile: process.env["PRIVATE_KEY_FILE"],
publicKeyFile: process.env["PUBLIC_KEY_FILE"],
});

const appLog = getServerLogger();
const appLog = getServerLogger();

const listeningPortList: number[] = [
6660, 7003, 8228, 8226, 8227, 9000, 9001, 9002, 9003, 9004, 9005, 9006,
9007, 9008, 9009, 9010, 9011, 9012, 9013, 9014, 43200, 43300, 43400,
53303,
];
const listeningPortList: number[] = [
6660, 7003, 8228, 8226, 8227, 9000, 9001, 9002, 9003, 9004, 9005, 9006,
9007, 9008, 9009, 9010, 9011, 9012, 9013, 9014, 43200, 43300, 43400, 53303,
];

const gatewayServer = getGatewayServer({
config,
log: appLog,
listeningPortList,
});
const gatewayServer = getGatewayServer({
config,
log: appLog,
listeningPortList,
});

gatewayServer.start();
gatewayServer.start();
} catch (err) {
Sentry.captureException(err);
coreLogger.fatal(`Error in core server: ${String(err)}`);
throw err;
Sentry.captureException(err);
coreLogger.fatal(`Error in core server: ${String(err)}`);
throw err;
}
22 changes: 11 additions & 11 deletions apps/main/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { defineConfig } from "vitest/config";

const x=process.env.PWD ?? __dirname;
const y = x.split('/');
const moduleName = `rm-${y[y.length-1]}`;
const x = process.env.PWD ?? __dirname;
const y = x.split("/");
const moduleName = `rm-${y[y.length - 1]}`;

export default defineConfig({
test: {
coverage: {
enabled: true,
all: true,
reporter: ["lcov", "text", "cobertura"],
},
reporters: ["junit", "default", "hanging-process"],
outputFile: `${moduleName}-test-results.xml`,
test: {
coverage: {
enabled: true,
all: true,
reporter: ["lcov", "text", "cobertura"],
},
reporters: ["junit", "default", "hanging-process"],
outputFile: `${moduleName}-test-results.xml`,
},
});
Loading

0 comments on commit b08bcc9

Please sign in to comment.