fix naming

fixes #10
This commit is contained in:
Robin Appelman 2020-12-05 16:54:09 +01:00
commit be3f277c2e
4 changed files with 11 additions and 11 deletions

2
package-lock.json generated
View file

@ -1,5 +1,5 @@
{ {
"name": "mx-puppet-nextcloud", "name": "mx-puppet-steam",
"version": "0.0.0", "version": "0.0.0",
"lockfileVersion": 1, "lockfileVersion": 1,
"requires": true, "requires": true,

View file

@ -1,7 +1,7 @@
{ {
"name": "mx-puppet-nextcloud", "name": "mx-puppet-steam",
"version": "0.0.0", "version": "0.0.0",
"description": "Puppeting bridge for nextcloud talk", "description": "Puppeting bridge for steam chat",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "tsc", "build": "tsc",

View file

@ -1,5 +1,5 @@
export class NextcloudConfigWrap { export class SteamConfigWrap {
public nextcloud: NextcloudConfig = new NextcloudConfig(); public steam: SteamConfig = new SteamConfig();
public applyConfig(newConfig: { [key: string]: any }, configLayer: { [key: string]: any } = this) { public applyConfig(newConfig: { [key: string]: any }, configLayer: { [key: string]: any } = this) {
Object.keys(newConfig).forEach((key) => { Object.keys(newConfig).forEach((key) => {
@ -12,5 +12,5 @@ export class NextcloudConfigWrap {
} }
} }
class NextcloudConfig { class SteamConfig {
} }

View file

@ -8,13 +8,13 @@ import {
import * as commandLineArgs from "command-line-args"; import * as commandLineArgs from "command-line-args";
import * as commandLineUsage from "command-line-usage"; import * as commandLineUsage from "command-line-usage";
import {Steam} from "./steam"; import {Steam} from "./steam";
import {NextcloudConfigWrap} from "./config"; import {SteamConfigWrap} from "./config";
import * as fs from "fs"; import * as fs from "fs";
import * as yaml from "js-yaml"; import * as yaml from "js-yaml";
import {LoginDetails, LoginToken} from "./login"; import {LoginDetails, LoginToken} from "./login";
import * as SteamUser from "steam-user"; import * as SteamUser from "steam-user";
const log = new Log("NextcloudPuppet:index"); const log = new Log("SteamPuppet:index");
const commandOptions = [ const commandOptions = [
{name: "register", alias: "r", type: Boolean}, {name: "register", alias: "r", type: Boolean},
@ -69,14 +69,14 @@ if (options.register) {
process.exit(0); process.exit(0);
} }
let config: NextcloudConfigWrap = new NextcloudConfigWrap(); let config: SteamConfigWrap = new SteamConfigWrap();
function readConfig() { function readConfig() {
config = new NextcloudConfigWrap(); config = new SteamConfigWrap();
config.applyConfig(yaml.safeLoad(fs.readFileSync(options.config))); config.applyConfig(yaml.safeLoad(fs.readFileSync(options.config)));
} }
export function Config(): NextcloudConfigWrap { export function Config(): SteamConfigWrap {
return config; return config;
} }