mirror of
https://github.com/icewind1991/mx-puppet-steam.git
synced 2026-06-03 09:34:13 +02:00
parent
be065e835a
commit
be3f277c2e
4 changed files with 11 additions and 11 deletions
2
package-lock.json
generated
2
package-lock.json
generated
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "mx-puppet-nextcloud",
|
||||
"name": "mx-puppet-steam",
|
||||
"version": "0.0.0",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "mx-puppet-nextcloud",
|
||||
"name": "mx-puppet-steam",
|
||||
"version": "0.0.0",
|
||||
"description": "Puppeting bridge for nextcloud talk",
|
||||
"description": "Puppeting bridge for steam chat",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"build": "tsc",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
export class NextcloudConfigWrap {
|
||||
public nextcloud: NextcloudConfig = new NextcloudConfig();
|
||||
export class SteamConfigWrap {
|
||||
public steam: SteamConfig = new SteamConfig();
|
||||
|
||||
public applyConfig(newConfig: { [key: string]: any }, configLayer: { [key: string]: any } = this) {
|
||||
Object.keys(newConfig).forEach((key) => {
|
||||
|
|
@ -12,5 +12,5 @@ export class NextcloudConfigWrap {
|
|||
}
|
||||
}
|
||||
|
||||
class NextcloudConfig {
|
||||
class SteamConfig {
|
||||
}
|
||||
|
|
|
|||
10
src/index.ts
10
src/index.ts
|
|
@ -8,13 +8,13 @@ import {
|
|||
import * as commandLineArgs from "command-line-args";
|
||||
import * as commandLineUsage from "command-line-usage";
|
||||
import {Steam} from "./steam";
|
||||
import {NextcloudConfigWrap} from "./config";
|
||||
import {SteamConfigWrap} from "./config";
|
||||
import * as fs from "fs";
|
||||
import * as yaml from "js-yaml";
|
||||
import {LoginDetails, LoginToken} from "./login";
|
||||
import * as SteamUser from "steam-user";
|
||||
|
||||
const log = new Log("NextcloudPuppet:index");
|
||||
const log = new Log("SteamPuppet:index");
|
||||
|
||||
const commandOptions = [
|
||||
{name: "register", alias: "r", type: Boolean},
|
||||
|
|
@ -69,14 +69,14 @@ if (options.register) {
|
|||
process.exit(0);
|
||||
}
|
||||
|
||||
let config: NextcloudConfigWrap = new NextcloudConfigWrap();
|
||||
let config: SteamConfigWrap = new SteamConfigWrap();
|
||||
|
||||
function readConfig() {
|
||||
config = new NextcloudConfigWrap();
|
||||
config = new SteamConfigWrap();
|
||||
config.applyConfig(yaml.safeLoad(fs.readFileSync(options.config)));
|
||||
}
|
||||
|
||||
export function Config(): NextcloudConfigWrap {
|
||||
export function Config(): SteamConfigWrap {
|
||||
return config;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue