Got rid of settings.ts

dependabot/npm_and_yarn/BuildServer/eslint-7.2.0
Inga 🏳‍🌈 7 years ago
parent 3b7acb1b25
commit edc52ebffd
  1. 2
      BuildServer/.gitignore
  2. 56
      BuildServer/app.ts.example
  3. 1
      BuildServer/lib/index.ts
  4. 57
      BuildServer/settings.ts.example

@ -18,6 +18,6 @@ data
*.crt
*.js
*.js.map
settings.ts
app.ts
iisnode

@ -0,0 +1,56 @@
"use strict";
import * as GitHubApi from "github";
import { join } from "path";
import run from "./lib";
import { Settings } from "./lib/types";
const createGithub = () => new GitHubApi({
debug: false,
headers: { "user-agent": "micro-build-server" },
host: "github.enterprise.host",
pathPrefix: "/api/v3",
protocol: "https",
timeout: 5000,
});
const settings: Settings = {
builderExecutable: "../DotNetBuilder/bin/Debug/MicroBuildServer.DotNetBuilder.exe",
createGithub: (repoOwner) => {
const github = createGithub();
github.authenticate({
password: "password",
type: "basic",
username: "username",
});
return github;
},
eslintBrowserConfig: join(__dirname, "settings-eslint-browser.json"),
faviconpath: join(__dirname, "public/images/favicon.png"),
gitpath: "M:/g",
ignoreCodeAnalysisByDefault: true,
isCodeAnalysisUnsupported: false,
nugetApiKey: "NUGET-API-KEY",
nugetHost: "https://nuget.host/",
port: 3000,
// port: process.env["PORT"],
releasepath: "M:/r",
siteRoot: "https://mbs.host/",
skipCodeSigning: true,
smtp: {
auth: {
pass: "password",
user: "username",
},
host: "smtp.host",
receiver: "receiver@your.domain",
sender: "sender@your.domain",
},
staticcontentpath: join(__dirname, "public"),
tmpcodepath: "M:/c",
viewspath: join(__dirname, "views"),
};
run(settings);

@ -15,7 +15,6 @@ import { join } from "path";
import * as serveFavicon from "serve-favicon";
import * as serveStatic from "serve-static";
import settings from "../settings";
import * as routes from "./routes";
import { setSettings } from "./settings-wrapper";
import { Settings } from "./types";

@ -1,57 +0,0 @@
"use strict";
import GitHubApi = require("github");
const createGithub = () => new GitHubApi({
"debug": false,
"headers": { "user-agent": "micro-build-server (mbs.pos)" },
"host": "pos-github.payonline.ru",
"pathPrefix": "/api/v3",
"protocol": "https",
"timeout": 5000
});
export default {
"builderExecutable": "../DotNetBuilder/bin/Debug/MicroBuildServer.DotNetBuilder.exe",
"codeSigningKeyFile": null,
"codeSigningPublicKey": null,
"createGithub": (repoOwner) => {
const github = createGithub();
github.authenticate({
"password": "*** OWNER APPLICATION PASSWORD ***",
"type": "basic",
"username": repoOwner
});
/* Or, alternatively:
github.authenticate({
"password": "*** MBS APPLICATION PASSWORD ***",
"type": "basic",
"username": "*** MBS USER ***"
});
*/
return github;
},
"eslintBrowserConfig": "settings-eslint-browser.json",
"gitpath": "M:/g",
"ignoreCodeAnalysisByDefault": true,
"isCodeAnalysisUnsupported": false,
"nugetApiKey": "*** NUGET API KEY ***",
"nugetHost": "https://*** NUGET HOST ***/",
"port": 3000,
"releasepath": "M:/r",
"siteRoot": "https://mbs.your.domain/",
"skipCodeSigning": true,
"smtp": {
"auth": {
"pass": "*** SMTP PASSWORD ***",
"user": "*** SMTP USERNAME ***"
},
"host": "smtp.host",
"receiver": "receiver@your.domain",
"sender": "sender@your.domain"
},
"tmpcodepath": "M:/c"
};
Loading…
Cancel
Save