-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support get and delete, starting from the next bitburner version
- Loading branch information
Nezrahm
committed
Mar 1, 2022
1 parent
7abc713
commit 5cb157c
Showing
11 changed files
with
406 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,25 @@ | ||
#!/usr/bin/env node | ||
|
||
import { getArgs } from '../src/config.js'; | ||
import { sync, watch } from '../src/index.js'; | ||
import { get, sync, watch } from '../src/index.js'; | ||
import { log } from '../src/log.js'; | ||
|
||
const main = () => { | ||
const { doWatch, isDryRun, opts } = getArgs(); | ||
const main = async () => { | ||
const { doWatch, doGet, isDryRun, config } = getArgs(); | ||
|
||
if (doWatch) | ||
watch(opts); | ||
watch(config); | ||
else if (doGet) | ||
await get(config, isDryRun); | ||
else | ||
sync(opts, isDryRun); | ||
await sync(config, isDryRun); | ||
}; | ||
|
||
try { | ||
main(); | ||
await main(); | ||
} catch (e) { | ||
const msg = e && e.message ? e.message : e; | ||
log.error(msg); | ||
|
||
if (msg !== undefined) | ||
log.error(msg); | ||
} |
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,4 +1,5 @@ | ||
{ | ||
"scriptRoot": "", | ||
"authToken": "" | ||
"authToken": "", | ||
"allowDelete": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Oops, something went wrong.