-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
149 additions
and
275 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"url": "[email protected]:cables-gl/cables_electron.git" | ||
}, | ||
"license": "MIT", | ||
"main": "src/main/index.js", | ||
"main": "src/electron/main.js", | ||
"type": "module", | ||
"engines": { | ||
"node": "18.14.2" | ||
|
@@ -56,32 +56,13 @@ | |
"electronLanguages": "en" | ||
}, | ||
"dependencies": { | ||
"@elastic/elasticsearch": "7.17.0", | ||
"basename": "0.1.2", | ||
"cables-shared": "file:../shared", | ||
"discord-webhook-node": "1.1.8", | ||
"eslint": "7.32.0", | ||
"eslint-config-airbnb-base": "15.0.0", | ||
"eslint-plugin-import": "2.27.5", | ||
"ffmpeg": "^0.0.4", | ||
"fs-extra": "11.1.0", | ||
"geoip-lite": "1.4.7", | ||
"http-server": "^14.1.1", | ||
"jsonfile": "6.1.0", | ||
"marked": "1.2.9", | ||
"mkdirp": "2.1.3", | ||
"moment": "2.29.4", | ||
"node-osc": "^9.1.0", | ||
"pako": "2.1.0", | ||
"path-browserify": "^1.0.1", | ||
"pmx": "1.6.7", | ||
"sanitize-filename": "1.6.3", | ||
"source-map-support": "^0.5.16", | ||
"uuid-v4": "0.1.0", | ||
"xml-writer": "1.7.0" | ||
"marked": "1.2.9", | ||
"jsonfile": "6.1.0", | ||
"cables-shared": "file:../shared", | ||
"electron": "29.0.0" | ||
}, | ||
"devDependencies": { | ||
"electron": "29.0.0", | ||
"electron-builder": "24.12.0", | ||
"git-repo-info": "2.1.1", | ||
"gulp": "4.0.2", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,51 @@ | ||
// hallo1234 | ||
import { Cables } from "cables-shared"; | ||
import { utilProvider, Cables } from "cables-shared"; | ||
import { app } from "electron"; | ||
import electronUtilProvider from "./utils/electron_util_provider.js"; | ||
import logger from "./utils/electron_logger.js"; | ||
import path from "path"; | ||
import fs from "fs"; | ||
import mkdirp from "mkdirp"; | ||
import logger from "./utils/logger.js"; | ||
import store from "./electron/electron_store.js"; | ||
|
||
logger.info("starting up cables"); | ||
|
||
class CablesStandalone extends Cables | ||
{ | ||
get utilName() | ||
getGenPath() | ||
{ | ||
if (!store.getCurrentPatchDir()) return path.join(this._writeableDirName, "caches/"); | ||
return path.join(store.getCurrentPatchDir(), "caches/"); | ||
} | ||
|
||
getOpDocsCachePath() | ||
{ | ||
const cachePath = path.join(this.getGenPath(), "opdocs_collections/"); | ||
if (!fs.existsSync(cachePath)) mkdirp.sync(cachePath); | ||
return cachePath; | ||
} | ||
|
||
getUserOpsPath() | ||
{ | ||
if (!store.getCurrentPatchDir()) return path.join(this.getOpsPath(), "/users/"); | ||
return path.join(store.getCurrentPatchDir(), "/ops/users/"); | ||
} | ||
|
||
getTeamOpsPath() | ||
{ | ||
if (!store.getCurrentPatchDir()) return path.join(this.getOpsPath(), "/teams/"); | ||
return path.join(store.getCurrentPatchDir(), "/ops/teams/"); | ||
} | ||
|
||
getExtensionOpsPath() | ||
{ | ||
if (!store.getCurrentPatchDir()) return path.join(this.getOpsPath(), "/extensions/"); | ||
return path.join(store.getCurrentPatchDir(), "/ops/extensions/"); | ||
} | ||
|
||
getPatchOpsPath() | ||
{ | ||
return electronUtilProvider.CABLES_NAME; | ||
if (!store.getCurrentPatchDir()) return path.join(this.getOpsPath(), "/patches/"); | ||
return path.join(store.getCurrentPatchDir(), "/ops/patches/"); | ||
} | ||
} | ||
export default new CablesStandalone(electronUtilProvider, decodeURIComponent(new URL(".", import.meta.url).pathname), app.getPath("userData")); | ||
export default new CablesStandalone(utilProvider, decodeURIComponent(new URL(".", import.meta.url).pathname), app.getPath("userData")); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.