Compare commits

...

53 Commits

Author SHA1 Message Date
b99827a84b Fix root server function, file name was wrong 2023-11-14 22:33:38 -04:00
62b1d6edfd Add remove files program 2023-11-13 14:27:28 -04:00
78d8153f8e Improve comments 2023-11-13 14:16:29 -04:00
461775a92f Add comments 2023-11-13 14:15:01 -04:00
70ec4d9463 Update state for first run 2023-11-13 14:13:14 -04:00
1d3ce073f6 Minor code refactoring 2023-11-13 14:11:46 -04:00
9bacf4f97f Add check for if new programs have begun to exist 2023-11-13 14:08:16 -04:00
9b4042af40 Move filtering to after logging 2023-11-13 13:38:39 -04:00
e6aca2e998 Improve logging 2023-11-13 13:36:25 -04:00
df2d550eb6 Filter instead of remove 2023-11-13 13:32:57 -04:00
c320b31ac3 Fix case where you jump too many levels at once 2023-11-13 13:31:52 -04:00
f0d4017711 Add potential guard clause 2023-11-13 13:26:43 -04:00
2ca91f574f Change filtering logic 2023-11-13 13:19:20 -04:00
7de44a3c2f Remove unneeded code and enable sorting on server list 2023-11-13 12:58:51 -04:00
afa44d0ea4 Don't sort recursive scan 2023-11-07 15:53:52 -04:00
83ba1af0cc Refactor hacknet logic 2023-11-06 20:20:36 -04:00
fad1c1a7c4 Fix number sort 2023-11-06 19:58:40 -04:00
ab6635d00e Sort arrays 2023-11-06 19:48:27 -04:00
116daf3781 Small fix for starting conditions 2023-11-06 17:39:47 -04:00
1af46c5d6f Fix hack all bug 2023-11-04 17:14:34 -03:00
f52af72140 Improve watcher slightly 2023-11-04 16:48:17 -03:00
12d9165162 Improve watcher 2023-11-03 22:55:07 -03:00
5febd7ed3b Fix logic error 2023-11-03 22:21:54 -03:00
8dff0b71d6 Fix wrong function call 2023-11-03 22:20:50 -03:00
f7fa595d71 Remove redundant check 2023-11-03 22:17:40 -03:00
6e1b576bcf Fix logic bugs 2023-11-03 22:17:05 -03:00
6c6f8b0b70 Formatting changes 2023-11-03 21:57:09 -03:00
90fef7e53a Move call outside the scope of watcher 2023-11-03 21:56:55 -03:00
92ad2da7b7 add program 2023-11-03 21:53:18 -03:00
a3bdb2ccd1 watcher improvements 2023-11-03 21:53:07 -03:00
677f23ea8d Add script that will contain user created programs 2023-11-03 21:38:19 -03:00
29d88170ab Fix logic bug 2023-11-03 21:38:00 -03:00
74aae19a82 Make scripts work better on fresh start 2023-11-03 20:17:24 -03:00
5d6063917b Servers had no money lol 2023-11-03 19:11:52 -03:00
22ddbbde5d Reformat files 2023-11-03 18:42:37 -03:00
683daff911 Add project coding guidelines 2023-11-03 18:41:51 -03:00
b40c4d07e8 Don't need to import NS anymore 2023-11-03 17:47:50 -03:00
4be46174b3 Update lockfile 2023-11-03 17:45:39 -03:00
d35d6cad42 Update based on latest version of template 2023-11-03 17:43:04 -03:00
3be118120f Upgrade bb plugin 2023-11-03 17:37:18 -03:00
d1f1d9b4bd Add some notes to hacknet file 2023-11-03 17:18:33 -03:00
f32ae59522 Add MPS calculation function 2023-11-03 17:01:47 -03:00
536eebed56 Remove test script 2023-11-03 16:52:15 -03:00
3c891b3522 Add autoexec 2023-11-03 16:49:43 -03:00
64045b0198 Add hacknet script 2023-11-03 16:49:35 -03:00
7466c20e11 Fix watcher 2023-11-03 16:49:26 -03:00
99c5d23c11 Change to smart scheduling 2023-11-03 15:31:57 -03:00
374f14ea65 Remove bad scripts 2023-11-03 15:22:38 -03:00
000e69a418 Add watcher and kill all scripts 2023-11-03 15:22:12 -03:00
f34a37a3fb Add hack all servers function 2023-11-03 15:07:07 -03:00
abdcc8d682 Change function signature 2023-11-03 14:54:10 -03:00
070a48f298 Test to see how ram cost is calculated 2023-11-03 14:41:47 -03:00
50117674e1 Add some more utility functions 2023-11-03 14:38:18 -03:00
25 changed files with 896 additions and 800 deletions

10
.editorconfig Normal file
View File

@ -0,0 +1,10 @@
# All files
[*]
end_of_line = lf
insert_final_newline = true
indent_style = tab
indent_size = 2
# Markup files
[*.{json,yml}]
indent_style = space

215
.gitattributes vendored Normal file
View File

@ -0,0 +1,215 @@
## GITATTRIBUTES FOR WEB PROJECTS
#
# These settings are for any web project.
#
# Details per file setting:
# text These files should be normalized (i.e. convert CRLF to LF).
# binary These files are binary and should be left untouched.
#
# Note that binary is a macro for -text -diff.
######################################################################
# Auto detect
## Handle line endings automatically for files detected as
## text and leave all files detected as binary untouched.
## This will handle all files NOT defined below.
* text=auto
# Source code
*.bash text eol=lf
*.bat text eol=crlf
*.cmd text eol=crlf
*.coffee text
*.css text diff=css
*.htm text diff=html
*.html text diff=html
*.inc text
*.ini text
*.js text
*.json text
*.jsx text
*.less text
*.ls text
*.map text -diff
*.od text
*.onlydata text
*.php text diff=php
*.pl text
*.ps1 text eol=crlf
*.py text diff=python
*.rb text diff=ruby
*.sass text
*.scm text
*.scss text diff=css
*.sh text eol=lf
.husky/* text eol=lf
*.sql text
*.styl text
*.tag text
*.ts text
*.tsx text
*.xml text
*.xhtml text diff=html
# Docker
Dockerfile text
# Documentation
*.ipynb text eol=lf
*.markdown text diff=markdown
*.md text diff=markdown
*.mdwn text diff=markdown
*.mdown text diff=markdown
*.mkd text diff=markdown
*.mkdn text diff=markdown
*.mdtxt text
*.mdtext text
*.txt text
AUTHORS text
CHANGELOG text
CHANGES text
CONTRIBUTING text
COPYING text
copyright text
*COPYRIGHT* text
INSTALL text
license text
LICENSE text
NEWS text
readme text
*README* text
TODO text
# Templates
*.dot text
*.ejs text
*.erb text
*.haml text
*.handlebars text
*.hbs text
*.hbt text
*.jade text
*.latte text
*.mustache text
*.njk text
*.phtml text
*.svelte text
*.tmpl text
*.tpl text
*.twig text
*.vue text
# Configs
*.cnf text
*.conf text
*.config text
.editorconfig text
.env text
.gitattributes text
.gitconfig text
.htaccess text
*.lock text -diff
package.json text eol=lf
package-lock.json text eol=lf -diff
pnpm-lock.yaml text eol=lf -diff
.prettierrc text
yarn.lock text -diff
*.toml text
*.yaml text
*.yml text
browserslist text
Makefile text
makefile text
# Fixes syntax highlighting on GitHub to allow comments
tsconfig.json linguist-language=JSON-with-Comments
# Heroku
Procfile text
# Graphics
*.ai binary
*.bmp binary
*.eps binary
*.gif binary
*.gifv binary
*.ico binary
*.jng binary
*.jp2 binary
*.jpg binary
*.jpeg binary
*.jpx binary
*.jxr binary
*.pdf binary
*.png binary
*.psb binary
*.psd binary
# SVG treated as an asset (binary) by default.
*.svg text
# If you want to treat it as binary,
# use the following line instead.
# *.svg binary
*.svgz binary
*.tif binary
*.tiff binary
*.wbmp binary
*.webp binary
# Audio
*.kar binary
*.m4a binary
*.mid binary
*.midi binary
*.mp3 binary
*.ogg binary
*.ra binary
# Video
*.3gpp binary
*.3gp binary
*.as binary
*.asf binary
*.asx binary
*.avi binary
*.fla binary
*.flv binary
*.m4v binary
*.mng binary
*.mov binary
*.mp4 binary
*.mpeg binary
*.mpg binary
*.ogv binary
*.swc binary
*.swf binary
*.webm binary
# Archives
*.7z binary
*.gz binary
*.jar binary
*.rar binary
*.tar binary
*.zip binary
# Fonts
*.ttf binary
*.eot binary
*.otf binary
*.woff binary
*.woff2 binary
# Executables
*.exe binary
*.pyc binary
# Prevents massive diffs caused by vendored, minified files
**/.yarn/releases/** binary
**/.yarn/plugins/** binary
# RC files (like .babelrc or .eslintrc)
*.*rc text
# Ignore files (like .npmignore or .gitignore)
*.*ignore text
# Prevents massive diffs from built files
dist/* binary

4
.gitignore vendored
View File

@ -131,3 +131,7 @@ dist
# Netscript Type Definitions. These are pulled from the game # Netscript Type Definitions. These are pulled from the game
NetscriptDefinitions.d.ts NetscriptDefinitions.d.ts
# Location of the files mirrored from the game
mirror/

5
.idea/codeStyles/codeStyleConfig.xml generated Normal file
View File

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View File

@ -13,7 +13,11 @@ const createContext = async () => await context({
plugins: [ plugins: [
BitburnerPlugin({ BitburnerPlugin({
port: 12525, port: 12525,
types: 'NetscriptDefinitions.d.ts' types: 'NetscriptDefinitions.d.ts',
// mirror: { //uncomment to enable file mirroring
// 'mirror/own': ['home'],
// 'mirror/other': ['n00dles']
// }
}) })
], ],
bundle: true, bundle: true,

5
global.d.ts vendored Normal file
View File

@ -0,0 +1,5 @@
import {NS as _NS} from 'NetscriptDefinitions';
declare global {
type NS = _NS;
}

757
package-lock.json generated
View File

@ -12,14 +12,13 @@
"@types/react": "^18.2.25", "@types/react": "^18.2.25",
"@types/react-dom": "^18.2.10", "@types/react-dom": "^18.2.10",
"esbuild": "^0.19.4", "esbuild": "^0.19.4",
"esbuild-bitburner-plugin": "^1.0.2", "esbuild-bitburner-plugin": "^1.1.0"
"glob": "^10.3.10"
} }
}, },
"node_modules/@esbuild/android-arm": { "node_modules/@esbuild/android-arm": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.19.5.tgz",
"integrity": "sha512-uBIbiYMeSsy2U0XQoOGVVcpIktjLMEKa7ryz2RLr7L/vTnANNEsPVAh4xOv7ondGz6ac1zVb0F8Jx20rQikffQ==", "integrity": "sha512-bhvbzWFF3CwMs5tbjf3ObfGqbl/17ict2/uwOSfr3wmxDE6VdS2GqY/FuzIPe0q0bdhj65zQsvqfArI9MY6+AA==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -32,9 +31,9 @@
} }
}, },
"node_modules/@esbuild/android-arm64": { "node_modules/@esbuild/android-arm64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.19.5.tgz",
"integrity": "sha512-mRsi2vJsk4Bx/AFsNBqOH2fqedxn5L/moT58xgg51DjX1la64Z3Npicut2VbhvDFO26qjWtPMsVxCd80YTFVeg==", "integrity": "sha512-5d1OkoJxnYQfmC+Zd8NBFjkhyCNYwM4n9ODrycTFY6Jk1IGiZ+tjVJDDSwDt77nK+tfpGP4T50iMtVi4dEGzhQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -47,9 +46,9 @@
} }
}, },
"node_modules/@esbuild/android-x64": { "node_modules/@esbuild/android-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.19.5.tgz",
"integrity": "sha512-4iPufZ1TMOD3oBlGFqHXBpa3KFT46aLl6Vy7gwed0ZSYgHaZ/mihbYb4t7Z9etjkC9Al3ZYIoOaHrU60gcMy7g==", "integrity": "sha512-9t+28jHGL7uBdkBjL90QFxe7DVA+KGqWlHCF8ChTKyaKO//VLuoBricQCgwhOjA1/qOczsw843Fy4cbs4H3DVA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -62,9 +61,9 @@
} }
}, },
"node_modules/@esbuild/darwin-arm64": { "node_modules/@esbuild/darwin-arm64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.19.5.tgz",
"integrity": "sha512-Lviw8EzxsVQKpbS+rSt6/6zjn9ashUZ7Tbuvc2YENgRl0yZTktGlachZ9KMJUsVjZEGFVu336kl5lBgDN6PmpA==", "integrity": "sha512-mvXGcKqqIqyKoxq26qEDPHJuBYUA5KizJncKOAf9eJQez+L9O+KfvNFu6nl7SCZ/gFb2QPaRqqmG0doSWlgkqw==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -77,9 +76,9 @@
} }
}, },
"node_modules/@esbuild/darwin-x64": { "node_modules/@esbuild/darwin-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.19.5.tgz",
"integrity": "sha512-YHbSFlLgDwglFn0lAO3Zsdrife9jcQXQhgRp77YiTDja23FrC2uwnhXMNkAucthsf+Psr7sTwYEryxz6FPAVqw==", "integrity": "sha512-Ly8cn6fGLNet19s0X4unjcniX24I0RqjPv+kurpXabZYSXGM4Pwpmf85WHJN3lAgB8GSth7s5A0r856S+4DyiA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -92,9 +91,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-arm64": { "node_modules/@esbuild/freebsd-arm64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.5.tgz",
"integrity": "sha512-vz59ijyrTG22Hshaj620e5yhs2dU1WJy723ofc+KUgxVCM6zxQESmWdMuVmUzxtGqtj5heHyB44PjV/HKsEmuQ==", "integrity": "sha512-GGDNnPWTmWE+DMchq1W8Sd0mUkL+APvJg3b11klSGUDvRXh70JqLAO56tubmq1s2cgpVCSKYywEiKBfju8JztQ==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -107,9 +106,9 @@
} }
}, },
"node_modules/@esbuild/freebsd-x64": { "node_modules/@esbuild/freebsd-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.19.5.tgz",
"integrity": "sha512-3sRbQ6W5kAiVQRBWREGJNd1YE7OgzS0AmOGjDmX/qZZecq8NFlQsQH0IfXjjmD0XtUYqr64e0EKNFjMUlPL3Cw==", "integrity": "sha512-1CCwDHnSSoA0HNwdfoNY0jLfJpd7ygaLAp5EHFos3VWJCRX9DMwWODf96s9TSse39Br7oOTLryRVmBoFwXbuuQ==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -122,9 +121,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm": { "node_modules/@esbuild/linux-arm": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.19.5.tgz",
"integrity": "sha512-z/4ArqOo9EImzTi4b6Vq+pthLnepFzJ92BnofU1jgNlcVb+UqynVFdoXMCFreTK7FdhqAzH0vmdwW5373Hm9pg==", "integrity": "sha512-lrWXLY/vJBzCPC51QN0HM71uWgIEpGSjSZZADQhq7DKhPcI6NH1IdzjfHkDQws2oNpJKpR13kv7/pFHBbDQDwQ==",
"cpu": [ "cpu": [
"arm" "arm"
], ],
@ -137,9 +136,9 @@
} }
}, },
"node_modules/@esbuild/linux-arm64": { "node_modules/@esbuild/linux-arm64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.5.tgz",
"integrity": "sha512-ZWmWORaPbsPwmyu7eIEATFlaqm0QGt+joRE9sKcnVUG3oBbr/KYdNE2TnkzdQwX6EDRdg/x8Q4EZQTXoClUqqA==", "integrity": "sha512-o3vYippBmSrjjQUCEEiTZ2l+4yC0pVJD/Dl57WfPwwlvFkrxoSO7rmBZFii6kQB3Wrn/6GwJUPLU5t52eq2meA==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -152,9 +151,9 @@
} }
}, },
"node_modules/@esbuild/linux-ia32": { "node_modules/@esbuild/linux-ia32": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.19.5.tgz",
"integrity": "sha512-EGc4vYM7i1GRUIMqRZNCTzJh25MHePYsnQfKDexD8uPTCm9mK56NIL04LUfX2aaJ+C9vyEp2fJ7jbqFEYgO9lQ==", "integrity": "sha512-MkjHXS03AXAkNp1KKkhSKPOCYztRtK+KXDNkBa6P78F8Bw0ynknCSClO/ztGszILZtyO/lVKpa7MolbBZ6oJtQ==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -167,9 +166,9 @@
} }
}, },
"node_modules/@esbuild/linux-loong64": { "node_modules/@esbuild/linux-loong64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.19.5.tgz",
"integrity": "sha512-WVhIKO26kmm8lPmNrUikxSpXcgd6HDog0cx12BUfA2PkmURHSgx9G6vA19lrlQOMw+UjMZ+l3PpbtzffCxFDRg==", "integrity": "sha512-42GwZMm5oYOD/JHqHska3Jg0r+XFb/fdZRX+WjADm3nLWLcIsN27YKtqxzQmGNJgu0AyXg4HtcSK9HuOk3v1Dw==",
"cpu": [ "cpu": [
"loong64" "loong64"
], ],
@ -182,9 +181,9 @@
} }
}, },
"node_modules/@esbuild/linux-mips64el": { "node_modules/@esbuild/linux-mips64el": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.19.5.tgz",
"integrity": "sha512-keYY+Hlj5w86hNp5JJPuZNbvW4jql7c1eXdBUHIJGTeN/+0QFutU3GrS+c27L+NTmzi73yhtojHk+lr2+502Mw==", "integrity": "sha512-kcjndCSMitUuPJobWCnwQ9lLjiLZUR3QLQmlgaBfMX23UEa7ZOrtufnRds+6WZtIS9HdTXqND4yH8NLoVVIkcg==",
"cpu": [ "cpu": [
"mips64el" "mips64el"
], ],
@ -197,9 +196,9 @@
} }
}, },
"node_modules/@esbuild/linux-ppc64": { "node_modules/@esbuild/linux-ppc64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.19.5.tgz",
"integrity": "sha512-tQ92n0WMXyEsCH4m32S21fND8VxNiVazUbU4IUGVXQpWiaAxOBvtOtbEt3cXIV3GEBydYsY8pyeRMJx9kn3rvw==", "integrity": "sha512-yJAxJfHVm0ZbsiljbtFFP1BQKLc8kUF6+17tjQ78QjqjAQDnhULWiTA6u0FCDmYT1oOKS9PzZ2z0aBI+Mcyj7Q==",
"cpu": [ "cpu": [
"ppc64" "ppc64"
], ],
@ -212,9 +211,9 @@
} }
}, },
"node_modules/@esbuild/linux-riscv64": { "node_modules/@esbuild/linux-riscv64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.19.5.tgz",
"integrity": "sha512-tRRBey6fG9tqGH6V75xH3lFPpj9E8BH+N+zjSUCnFOX93kEzqS0WdyJHkta/mmJHn7MBaa++9P4ARiU4ykjhig==", "integrity": "sha512-5u8cIR/t3gaD6ad3wNt1MNRstAZO+aNyBxu2We8X31bA8XUNyamTVQwLDA1SLoPCUehNCymhBhK3Qim1433Zag==",
"cpu": [ "cpu": [
"riscv64" "riscv64"
], ],
@ -227,9 +226,9 @@
} }
}, },
"node_modules/@esbuild/linux-s390x": { "node_modules/@esbuild/linux-s390x": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.19.5.tgz",
"integrity": "sha512-152aLpQqKZYhThiJ+uAM4PcuLCAOxDsCekIbnGzPKVBRUDlgaaAfaUl5NYkB1hgY6WN4sPkejxKlANgVcGl9Qg==", "integrity": "sha512-Z6JrMyEw/EmZBD/OFEFpb+gao9xJ59ATsoTNlj39jVBbXqoZm4Xntu6wVmGPB/OATi1uk/DB+yeDPv2E8PqZGw==",
"cpu": [ "cpu": [
"s390x" "s390x"
], ],
@ -242,9 +241,9 @@
} }
}, },
"node_modules/@esbuild/linux-x64": { "node_modules/@esbuild/linux-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.19.5.tgz",
"integrity": "sha512-Mi4aNA3rz1BNFtB7aGadMD0MavmzuuXNTaYL6/uiYIs08U7YMPETpgNn5oue3ICr+inKwItOwSsJDYkrE9ekVg==", "integrity": "sha512-psagl+2RlK1z8zWZOmVdImisMtrUxvwereIdyJTmtmHahJTKb64pAcqoPlx6CewPdvGvUKe2Jw+0Z/0qhSbG1A==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -257,9 +256,9 @@
} }
}, },
"node_modules/@esbuild/netbsd-x64": { "node_modules/@esbuild/netbsd-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.19.5.tgz",
"integrity": "sha512-9+Wxx1i5N/CYo505CTT7T+ix4lVzEdz0uCoYGxM5JDVlP2YdDC1Bdz+Khv6IbqmisT0Si928eAxbmGkcbiuM/A==", "integrity": "sha512-kL2l+xScnAy/E/3119OggX8SrWyBEcqAh8aOY1gr4gPvw76la2GlD4Ymf832UCVbmuWeTf2adkZDK+h0Z/fB4g==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -272,9 +271,9 @@
} }
}, },
"node_modules/@esbuild/openbsd-x64": { "node_modules/@esbuild/openbsd-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.19.5.tgz",
"integrity": "sha512-MFsHleM5/rWRW9EivFssop+OulYVUoVcqkyOkjiynKBCGBj9Lihl7kh9IzrreDyXa4sNkquei5/DTP4uCk25xw==", "integrity": "sha512-sPOfhtzFufQfTBgRnE1DIJjzsXukKSvZxloZbkJDG383q0awVAq600pc1nfqBcl0ice/WN9p4qLc39WhBShRTA==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -287,9 +286,9 @@
} }
}, },
"node_modules/@esbuild/sunos-x64": { "node_modules/@esbuild/sunos-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.19.5.tgz",
"integrity": "sha512-6Xq8SpK46yLvrGxjp6HftkDwPP49puU4OF0hEL4dTxqCbfx09LyrbUj/D7tmIRMj5D5FCUPksBbxyQhp8tmHzw==", "integrity": "sha512-dGZkBXaafuKLpDSjKcB0ax0FL36YXCvJNnztjKV+6CO82tTYVDSH2lifitJ29jxRMoUhgkg9a+VA/B03WK5lcg==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -302,9 +301,9 @@
} }
}, },
"node_modules/@esbuild/win32-arm64": { "node_modules/@esbuild/win32-arm64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.19.5.tgz",
"integrity": "sha512-PkIl7Jq4mP6ke7QKwyg4fD4Xvn8PXisagV/+HntWoDEdmerB2LTukRZg728Yd1Fj+LuEX75t/hKXE2Ppk8Hh1w==", "integrity": "sha512-dWVjD9y03ilhdRQ6Xig1NWNgfLtf2o/STKTS+eZuF90fI2BhbwD6WlaiCGKptlqXlURVB5AUOxUj09LuwKGDTg==",
"cpu": [ "cpu": [
"arm64" "arm64"
], ],
@ -317,9 +316,9 @@
} }
}, },
"node_modules/@esbuild/win32-ia32": { "node_modules/@esbuild/win32-ia32": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.19.5.tgz",
"integrity": "sha512-ga676Hnvw7/ycdKB53qPusvsKdwrWzEyJ+AtItHGoARszIqvjffTwaaW3b2L6l90i7MO9i+dlAW415INuRhSGg==", "integrity": "sha512-4liggWIA4oDgUxqpZwrDhmEfAH4d0iljanDOK7AnVU89T6CzHon/ony8C5LeOdfgx60x5cnQJFZwEydVlYx4iw==",
"cpu": [ "cpu": [
"ia32" "ia32"
], ],
@ -332,9 +331,9 @@
} }
}, },
"node_modules/@esbuild/win32-x64": { "node_modules/@esbuild/win32-x64": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.4.tgz", "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.19.5.tgz",
"integrity": "sha512-HP0GDNla1T3ZL8Ko/SHAS2GgtjOg+VmWnnYLhuTksr++EnduYB0f3Y2LzHsUwb2iQ13JGoY6G3R8h6Du/WG6uA==", "integrity": "sha512-czTrygUsB/jlM8qEW5MD8bgYU2Xg14lo6kBDXW6HdxKjh8M5PzETGiSHaz9MtbXBYDloHNUAUW2tMiKW4KM9Mw==",
"cpu": [ "cpu": [
"x64" "x64"
], ],
@ -346,40 +345,15 @@
"node": ">=12" "node": ">=12"
} }
}, },
"node_modules/@isaacs/cliui": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/@isaacs/cliui/-/cliui-8.0.2.tgz",
"integrity": "sha512-O8jcjabXaleOG9DQ0+ARXWZBTfnP4WNAqzuiJK7ll44AmxGKv/J2M4TPjxjY3znBCfvBXFzucm1twdyFybFqEA==",
"dependencies": {
"string-width": "^5.1.2",
"string-width-cjs": "npm:string-width@^4.2.0",
"strip-ansi": "^7.0.1",
"strip-ansi-cjs": "npm:strip-ansi@^6.0.1",
"wrap-ansi": "^8.1.0",
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0"
},
"engines": {
"node": ">=12"
}
},
"node_modules/@pkgjs/parseargs": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/@pkgjs/parseargs/-/parseargs-0.11.0.tgz",
"integrity": "sha512-+1VkjdD0QBLPodGrJUeqarH8VAIvQODIbwh9XpP5Syisf7YoQgsJKPNFoqqLQlu+VQ/tVSshMR6loPMn8U+dPg==",
"optional": true,
"engines": {
"node": ">=14"
}
},
"node_modules/@types/prop-types": { "node_modules/@types/prop-types": {
"version": "15.7.8", "version": "15.7.9",
"resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.8.tgz", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.9.tgz",
"integrity": "sha512-kMpQpfZKSCBqltAJwskgePRaYRFukDkm1oItcAbC3gNELR20XIBcN9VRgg4+m8DKsTfkWeA4m4Imp4DDuWy7FQ==" "integrity": "sha512-n1yyPsugYNSmHgxDFjicaI2+gCNjsBck8UX9kuofAKlc0h1bL+20oSF72KeNaW2DUlesbEVCFgyV2dPGTiY42g=="
}, },
"node_modules/@types/react": { "node_modules/@types/react": {
"version": "18.2.25", "version": "18.2.34",
"resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.25.tgz", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.2.34.tgz",
"integrity": "sha512-24xqse6+VByVLIr+xWaQ9muX1B4bXJKXBbjszbld/UEDslGLY53+ZucF44HCmLbMPejTzGG9XgR+3m2/Wqu1kw==", "integrity": "sha512-U6eW/alrRk37FU/MS2RYMjx0Va2JGIVXELTODaTIYgvWGCV4Y4TfTUzG8DdmpDNIT0Xpj/R7GfyHOJJrDttcvg==",
"dependencies": { "dependencies": {
"@types/prop-types": "*", "@types/prop-types": "*",
"@types/scheduler": "*", "@types/scheduler": "*",
@ -387,57 +361,53 @@
} }
}, },
"node_modules/@types/react-dom": { "node_modules/@types/react-dom": {
"version": "18.2.10", "version": "18.2.14",
"resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.10.tgz", "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.14.tgz",
"integrity": "sha512-5VEC5RgXIk1HHdyN1pHlg0cOqnxHzvPGpMMyGAP5qSaDRmyZNDaQ0kkVAkK6NYlDhP6YBID3llaXlmAS/mdgCA==", "integrity": "sha512-V835xgdSVmyQmI1KLV2BEIUgqEuinxp9O4G6g3FqO/SqLac049E53aysv0oEFD2kHfejeKU+ZqL2bcFWj9gLAQ==",
"dependencies": { "dependencies": {
"@types/react": "*" "@types/react": "*"
} }
}, },
"node_modules/@types/scheduler": { "node_modules/@types/scheduler": {
"version": "0.16.4", "version": "0.16.5",
"resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.4.tgz", "resolved": "https://registry.npmjs.org/@types/scheduler/-/scheduler-0.16.5.tgz",
"integrity": "sha512-2L9ifAGl7wmXwP4v3pN4p2FLhD0O1qsJpvKmNin5VA8+UvNVb447UDaAEV6UdrkA+m/Xs58U1RFps44x6TFsVQ==" "integrity": "sha512-s/FPdYRmZR8SjLWGMCuax7r3qCWQw9QKHzXVukAuuIJkXkDRwp+Pu5LMIVFi0Fxbav35WURicYr8u1QsoybnQw=="
}, },
"node_modules/ansi-regex": { "node_modules/anymatch": {
"version": "6.0.1", "version": "3.1.3",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
"integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-regex?sponsor=1"
}
},
"node_modules/ansi-styles": {
"version": "6.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz",
"integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==",
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/balanced-match": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
"integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw=="
},
"node_modules/brace-expansion": {
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",
"integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",
"dependencies": { "dependencies": {
"balanced-match": "^1.0.0" "normalize-path": "^3.0.0",
"picomatch": "^2.0.4"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/binary-extensions": {
"version": "2.2.0",
"resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz",
"integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==",
"engines": {
"node": ">=8"
}
},
"node_modules/braces": {
"version": "3.0.2",
"resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz",
"integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==",
"dependencies": {
"fill-range": "^7.0.1"
},
"engines": {
"node": ">=8"
} }
}, },
"node_modules/bufferutil": { "node_modules/bufferutil": {
"version": "4.0.7", "version": "4.0.8",
"resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.7.tgz", "resolved": "https://registry.npmjs.org/bufferutil/-/bufferutil-4.0.8.tgz",
"integrity": "sha512-kukuqc39WOHtdxtw4UScxF/WVnMFVSQVKhtx3AjZJzhd0RGZZldcrfSEbVsWWe6KNH253574cq5F+wpv0G9pJw==", "integrity": "sha512-4T53u4PdgsXqKaIctwF8ifXlRTTmEPJ8iEPWFdGZvcf7sbwYo6FKFEX9eNNAnzFZ7EzJAQ3CJeOtCRA4rDp7Pw==",
"hasInstallScript": true, "hasInstallScript": true,
"dependencies": { "dependencies": {
"node-gyp-build": "^4.3.0" "node-gyp-build": "^4.3.0"
@ -446,33 +416,30 @@
"node": ">=6.14.2" "node": ">=6.14.2"
} }
}, },
"node_modules/color-convert": { "node_modules/chokidar": {
"version": "2.0.1", "version": "3.5.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
"funding": [
{
"type": "individual",
"url": "https://paulmillr.com/funding/"
}
],
"dependencies": { "dependencies": {
"color-name": "~1.1.4" "anymatch": "~3.1.2",
"braces": "~3.0.2",
"glob-parent": "~5.1.2",
"is-binary-path": "~2.1.0",
"is-glob": "~4.0.1",
"normalize-path": "~3.0.0",
"readdirp": "~3.6.0"
}, },
"engines": { "engines": {
"node": ">=7.0.0" "node": ">= 8.10.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/cross-spawn": {
"version": "7.0.3",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
"integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
}, },
"engines": { "optionalDependencies": {
"node": ">= 8" "fsevents": "~2.3.2"
} }
}, },
"node_modules/csstype": { "node_modules/csstype": {
@ -497,16 +464,6 @@
"ms": "2.0.0" "ms": "2.0.0"
} }
}, },
"node_modules/eastasianwidth": {
"version": "0.2.0",
"resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz",
"integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA=="
},
"node_modules/emoji-regex": {
"version": "9.2.2",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz",
"integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg=="
},
"node_modules/es5-ext": { "node_modules/es5-ext": {
"version": "0.10.62", "version": "0.10.62",
"resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.62.tgz",
@ -541,9 +498,9 @@
} }
}, },
"node_modules/esbuild": { "node_modules/esbuild": {
"version": "0.19.4", "version": "0.19.5",
"resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.4.tgz", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.5.tgz",
"integrity": "sha512-x7jL0tbRRpv4QUyuDMjONtWFciygUxWaUM1kMX2zWxI0X2YWOt7MSA0g4UdeSiHM8fcYVzpQhKYOycZwxTdZkA==", "integrity": "sha512-bUxalY7b1g8vNhQKdB24QDmHeY4V4tw/s6Ak5z+jJX9laP5MoQseTOMemAr0gxssjNcH0MCViG8ONI2kksvfFQ==",
"hasInstallScript": true, "hasInstallScript": true,
"bin": { "bin": {
"esbuild": "bin/esbuild" "esbuild": "bin/esbuild"
@ -552,35 +509,36 @@
"node": ">=12" "node": ">=12"
}, },
"optionalDependencies": { "optionalDependencies": {
"@esbuild/android-arm": "0.19.4", "@esbuild/android-arm": "0.19.5",
"@esbuild/android-arm64": "0.19.4", "@esbuild/android-arm64": "0.19.5",
"@esbuild/android-x64": "0.19.4", "@esbuild/android-x64": "0.19.5",
"@esbuild/darwin-arm64": "0.19.4", "@esbuild/darwin-arm64": "0.19.5",
"@esbuild/darwin-x64": "0.19.4", "@esbuild/darwin-x64": "0.19.5",
"@esbuild/freebsd-arm64": "0.19.4", "@esbuild/freebsd-arm64": "0.19.5",
"@esbuild/freebsd-x64": "0.19.4", "@esbuild/freebsd-x64": "0.19.5",
"@esbuild/linux-arm": "0.19.4", "@esbuild/linux-arm": "0.19.5",
"@esbuild/linux-arm64": "0.19.4", "@esbuild/linux-arm64": "0.19.5",
"@esbuild/linux-ia32": "0.19.4", "@esbuild/linux-ia32": "0.19.5",
"@esbuild/linux-loong64": "0.19.4", "@esbuild/linux-loong64": "0.19.5",
"@esbuild/linux-mips64el": "0.19.4", "@esbuild/linux-mips64el": "0.19.5",
"@esbuild/linux-ppc64": "0.19.4", "@esbuild/linux-ppc64": "0.19.5",
"@esbuild/linux-riscv64": "0.19.4", "@esbuild/linux-riscv64": "0.19.5",
"@esbuild/linux-s390x": "0.19.4", "@esbuild/linux-s390x": "0.19.5",
"@esbuild/linux-x64": "0.19.4", "@esbuild/linux-x64": "0.19.5",
"@esbuild/netbsd-x64": "0.19.4", "@esbuild/netbsd-x64": "0.19.5",
"@esbuild/openbsd-x64": "0.19.4", "@esbuild/openbsd-x64": "0.19.5",
"@esbuild/sunos-x64": "0.19.4", "@esbuild/sunos-x64": "0.19.5",
"@esbuild/win32-arm64": "0.19.4", "@esbuild/win32-arm64": "0.19.5",
"@esbuild/win32-ia32": "0.19.4", "@esbuild/win32-ia32": "0.19.5",
"@esbuild/win32-x64": "0.19.4" "@esbuild/win32-x64": "0.19.5"
} }
}, },
"node_modules/esbuild-bitburner-plugin": { "node_modules/esbuild-bitburner-plugin": {
"version": "1.0.2", "version": "1.1.0",
"resolved": "https://registry.npmjs.org/esbuild-bitburner-plugin/-/esbuild-bitburner-plugin-1.0.2.tgz", "resolved": "https://registry.npmjs.org/esbuild-bitburner-plugin/-/esbuild-bitburner-plugin-1.1.0.tgz",
"integrity": "sha512-RtaNcz53L4TyavOMjGXrXkqbnYgUce9UK+vpywESMbmvr5TmrbxXjssnX726MpErX/8OwWI5OYIQzVspRCxUhA==", "integrity": "sha512-4hcBGNbWQnZK97h3fsAzHxotJdTYkmdpWosXqRKsminBplmS5+x69LxEO8beVUmqpCErbEsyaU2dUOsCOms/BA==",
"dependencies": { "dependencies": {
"chokidar": "^3.5.3",
"websocket": "^1.0.34" "websocket": "^1.0.34"
} }
}, },
@ -597,107 +555,84 @@
"resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz", "resolved": "https://registry.npmjs.org/type/-/type-2.7.2.tgz",
"integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw==" "integrity": "sha512-dzlvlNlt6AXU7EBSfpAscydQ7gXB+pPGsPnfJnZpiNJBDj7IaJzQlBZYGdEi4R9HmPdBv2XmWJ6YUtoTa7lmCw=="
}, },
"node_modules/foreground-child": { "node_modules/fill-range": {
"version": "3.1.1", "version": "7.0.1",
"resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.1.1.tgz", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz",
"integrity": "sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==",
"dependencies": { "dependencies": {
"cross-spawn": "^7.0.0", "to-regex-range": "^5.0.1"
"signal-exit": "^4.0.1"
}, },
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/glob": {
"version": "10.3.10",
"resolved": "https://registry.npmjs.org/glob/-/glob-10.3.10.tgz",
"integrity": "sha512-fa46+tv1Ak0UPK1TOy/pZrIybNNt4HCv7SDzwyfiOZkvZLEbjsZkJBPtDHVshZjbecAoAGSC20MjLDG/qr679g==",
"dependencies": {
"foreground-child": "^3.1.0",
"jackspeak": "^2.3.5",
"minimatch": "^9.0.1",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0",
"path-scurry": "^1.10.1"
},
"bin": {
"glob": "dist/esm/bin.mjs"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"engines": { "engines": {
"node": ">=8" "node": ">=8"
} }
}, },
"node_modules/fsevents": {
"version": "2.3.3",
"resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
"integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
"hasInstallScript": true,
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": "^8.16.0 || ^10.6.0 || >=11.0.0"
}
},
"node_modules/glob-parent": {
"version": "5.1.2",
"resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz",
"integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==",
"dependencies": {
"is-glob": "^4.0.1"
},
"engines": {
"node": ">= 6"
}
},
"node_modules/is-binary-path": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz",
"integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==",
"dependencies": {
"binary-extensions": "^2.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/is-extglob": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz",
"integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-glob": {
"version": "4.0.3",
"resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
"integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
"dependencies": {
"is-extglob": "^2.1.1"
},
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/is-number": {
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz",
"integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==",
"engines": {
"node": ">=0.12.0"
}
},
"node_modules/is-typedarray": { "node_modules/is-typedarray": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz",
"integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==" "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA=="
}, },
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw=="
},
"node_modules/jackspeak": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/jackspeak/-/jackspeak-2.3.6.tgz",
"integrity": "sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==",
"dependencies": {
"@isaacs/cliui": "^8.0.2"
},
"engines": {
"node": ">=14"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
},
"optionalDependencies": {
"@pkgjs/parseargs": "^0.11.0"
}
},
"node_modules/lru-cache": {
"version": "10.0.1",
"resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-10.0.1.tgz",
"integrity": "sha512-IJ4uwUTi2qCccrioU6g9g/5rvvVl13bsdczUUcqbciD9iLr095yj8DQKdObriEvuNSx325N1rV1O0sJFszx75g==",
"engines": {
"node": "14 || >=16.14"
}
},
"node_modules/minimatch": {
"version": "9.0.3",
"resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",
"integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",
"dependencies": {
"brace-expansion": "^2.0.1"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/minipass": {
"version": "7.0.4",
"resolved": "https://registry.npmjs.org/minipass/-/minipass-7.0.4.tgz",
"integrity": "sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==",
"engines": {
"node": ">=16 || 14 >=14.17"
}
},
"node_modules/ms": { "node_modules/ms": {
"version": "2.0.0", "version": "2.0.0",
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
@ -718,145 +653,45 @@
"node-gyp-build-test": "build-test.js" "node-gyp-build-test": "build-test.js"
} }
}, },
"node_modules/path-key": { "node_modules/normalize-path": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"engines": {
"node": ">=8"
}
},
"node_modules/path-scurry": {
"version": "1.10.1",
"resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.10.1.tgz",
"integrity": "sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==",
"dependencies": {
"lru-cache": "^9.1.1 || ^10.0.0",
"minipass": "^5.0.0 || ^6.0.2 || ^7.0.0"
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"funding": {
"url": "https://github.com/sponsors/isaacs"
}
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==",
"engines": { "engines": {
"node": ">=8" "node": ">=0.10.0"
} }
}, },
"node_modules/signal-exit": { "node_modules/picomatch": {
"version": "4.1.0", "version": "2.3.1",
"resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-4.1.0.tgz", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
"integrity": "sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==", "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
"engines": { "engines": {
"node": ">=14" "node": ">=8.6"
}, },
"funding": { "funding": {
"url": "https://github.com/sponsors/isaacs" "url": "https://github.com/sponsors/jonschlinkert"
} }
}, },
"node_modules/string-width": { "node_modules/readdirp": {
"version": "5.1.2", "version": "3.6.0",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz",
"integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==",
"dependencies": { "dependencies": {
"eastasianwidth": "^0.2.0", "picomatch": "^2.2.1"
"emoji-regex": "^9.2.2",
"strip-ansi": "^7.0.1"
}, },
"engines": { "engines": {
"node": ">=12" "node": ">=8.10.0"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
} }
}, },
"node_modules/string-width-cjs": { "node_modules/to-regex-range": {
"name": "string-width",
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/ansi-regex": {
"version": "5.0.1", "version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/string-width-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/string-width-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": { "dependencies": {
"ansi-regex": "^5.0.1" "is-number": "^7.0.0"
}, },
"engines": { "engines": {
"node": ">=8" "node": ">=8.0"
}
},
"node_modules/strip-ansi": {
"version": "7.1.0",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz",
"integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==",
"dependencies": {
"ansi-regex": "^6.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/strip-ansi?sponsor=1"
}
},
"node_modules/strip-ansi-cjs": {
"name": "strip-ansi",
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"engines": {
"node": ">=8"
} }
}, },
"node_modules/type": { "node_modules/type": {
@ -900,104 +735,6 @@
"node": ">=4.0.0" "node": ">=4.0.0"
} }
}, },
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/wrap-ansi": {
"version": "8.1.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-8.1.0.tgz",
"integrity": "sha512-si7QWI6zUMq56bESFvagtmzMdGOtoxfR+Sez11Mobfc7tm+VkUckk9bW2UeffTGVUbOksxmSw0AA2gs8g71NCQ==",
"dependencies": {
"ansi-styles": "^6.1.0",
"string-width": "^5.0.1",
"strip-ansi": "^7.0.1"
},
"engines": {
"node": ">=12"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs": {
"name": "wrap-ansi",
"version": "7.0.0",
"resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
"integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=10"
},
"funding": {
"url": "https://github.com/chalk/wrap-ansi?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs/node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
},
"funding": {
"url": "https://github.com/chalk/ansi-styles?sponsor=1"
}
},
"node_modules/wrap-ansi-cjs/node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/wrap-ansi-cjs/node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/wrap-ansi-cjs/node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yaeti": { "node_modules/yaeti": {
"version": "0.0.6", "version": "0.0.6",
"resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz", "resolved": "https://registry.npmjs.org/yaeti/-/yaeti-0.0.6.tgz",

View File

@ -20,7 +20,6 @@
"@types/react": "^18.2.25", "@types/react": "^18.2.25",
"@types/react-dom": "^18.2.10", "@types/react-dom": "^18.2.10",
"esbuild": "^0.19.4", "esbuild": "^0.19.4",
"esbuild-bitburner-plugin": "^1.0.2", "esbuild-bitburner-plugin": "^1.1.0"
"glob": "^10.3.10"
} }
} }

5
servers/home/autoexec.ts Normal file
View File

@ -0,0 +1,5 @@
export async function main(ns: NS) {
ns.run("hackallservers.js")
ns.run("watcher.js")
ns.run("hacknet.js")
}

14
servers/home/hack.ts Normal file
View File

@ -0,0 +1,14 @@
export async function main(ns: NS) {
const server: string = <string> ns.args[0]
while (true) {
// Guide https://darktechnomancer.github.io/#glossary-of-terms
if (ns.getServerSecurityLevel(server) > 5) {
await ns.weaken(server)
} else if (ns.getServerMoneyAvailable(server) < ns.getServerMaxMoney(server) * 0.95) {
await ns.grow(server)
} else {
await ns.hack(server)
}
}
}

View File

@ -0,0 +1,15 @@
import { executeScriptOnServerFromAnother, recursiveScan } from "./utils"
export async function main(ns: NS) {
let servers: string[] = recursiveScan(ns)
for (const server of servers) {
// Guard clause for story servers, but hacking xp is nice. Can probably be enabled when XP is easy to get
// if (ns.getServerMaxMoney(server) === 0) { continue }
let numThreads = ns.getServerMaxRam(server) / ns.getScriptRam("hack.js")
numThreads = Math.floor(numThreads)
numThreads = Math.max(numThreads, 1) // Make sure we have at least 1 thread
executeScriptOnServerFromAnother(ns, server, "hack.js", numThreads, [server])
}
}

103
servers/home/hacknet.ts Normal file
View File

@ -0,0 +1,103 @@
/*
* TODO:
* The current solution is not optimal, as it's preferable to buy new nodes, even if upgrading is cheaper.
* TODO:
* It may be helpful to calculate the money per second of each node on average, (total mps / total nodes) and compare
* it to the time it would take to purchase the next cheapest upgrade, and if the average mps is greater than the
* negative mps of the upgrade cost, then buy a new node.
* TODO:
* Potential Ideas:
* Find a way to calculate how much mps an individual upgrade would give, and compare it to the average mps of the node.
* ns.hacknet.getNodeStats(0).production
* If the upgrade mps is greater than the average mps, then buy the upgrade.
* If the upgrade mps is less than the average mps, then buy a new node.
*/
enum UpgradeType {
level = "level", ram = "ram", core = "code",
}
export async function main(ns: NS) {
let timeout: number = <number> ns.args[0]
let nodes = ns.hacknet.numNodes()
// If there are no nodes, buyUpgrade one
if (nodes === 0) {
ns.hacknet.purchaseNode()
nodes = 1
}
let costs: { type: UpgradeType, cost: number }[] = []
while (true) {
costs = []
// Go through each node and get the cheapest upgrade
for (let i = 0; i < nodes; i++) {
costs.push(getCheapestCost(ns, i))
}
// Get the cheapest upgrade object
let cheapest = costs.reduce((prev, curr) => prev.cost < curr.cost ? prev : curr)
// Nodes have a lot more value, so only need node price to be 1/10th the cost of the cheapest upgrade
if (ns.hacknet.getPurchaseNodeCost() / 10 < cheapest.cost) {
await buyNode(ns, ns.hacknet.getPurchaseNodeCost(), timeout)
} else {
await buyUpgrade(ns, cheapest.type, cheapest.cost, costs.indexOf(cheapest), timeout)
}
// Make sure that the number of nodes is up-to-date
nodes = ns.hacknet.numNodes()
}
}
/**
* Wait until the player has enough money to buyUpgrade something
* @param ns Global NS object
* @param money Amount of money to wait for
* @param timeout=-1 Number of seconds to wait before timing out.
* @throws Error if the timeout is reached
* @note This function will wait forever by default
*/
async function waitUntilMoney(ns: NS, money: number, timeout: number = -1) {
while (ns.getServerMoneyAvailable("home") < money) {
await ns.sleep(1000)
if (timeout == 0) {
throw new Error("Timed out waiting for money")
} else if (timeout > -1) {
timeout--
}
}
}
async function buyUpgrade(ns: NS, type: UpgradeType, cost: number, node: number, timeout: number) {
await waitUntilMoney(ns, cost, timeout)
switch (type) {
case UpgradeType.level:
ns.hacknet.upgradeLevel(node)
break
case UpgradeType.ram:
ns.hacknet.upgradeRam(node)
break
case UpgradeType.core:
ns.hacknet.upgradeCore(node)
break
}
}
async function buyNode(ns: NS, cost: number, timeout: number) {
await waitUntilMoney(ns, cost, timeout)
ns.hacknet.purchaseNode()
}
function getCheapestCost(ns: NS, node: number) {
let levelCost = ns.hacknet.getLevelUpgradeCost(node)
let ramCost = ns.hacknet.getRamUpgradeCost(node)
let coreCost = ns.hacknet.getCoreUpgradeCost(node)
let cheapest = Math.min(levelCost, ramCost, coreCost)
switch (cheapest) {
case levelCost:
return { type: UpgradeType.level, cost: levelCost }
case ramCost:
return { type: UpgradeType.ram, cost: ramCost }
case coreCost:
return { type: UpgradeType.core, cost: coreCost }
}
}

8
servers/home/killall.ts Normal file
View File

@ -0,0 +1,8 @@
import { recursiveScan } from "./utils"
export async function main(ns: NS) {
let servers: string[] = recursiveScan(ns)
for (const server of servers) {
ns.killall(server)
}
}

View File

@ -1,13 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let level = ns.getHackingLevel()
while (level < 999) {
let newLevel = ns.getHackingLevel()
if (newLevel !== level) {
ns.run("run.js")
}
level = newLevel
await ns.sleep(10 * 1000) // 10 seconds
}
}

View File

@ -1,4 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
ns.run("recursive-run.js", 1, "home", "hack-args.js")
}

View File

@ -1,15 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let hostname = ns.args[0]
let cost = ns.args[1]
let moneyThresh = ns.getServerMaxMoney(hostname) * 0.75;
let securityThresh = ns.getServerMinSecurityLevel(hostname) + 5;
let numThreads = ns.getServerMaxRam(hostname) / cost
numThreads = Math.floor(numThreads)
if (numThreads < 1 || numThreads == Infinity) {
numThreads = 1
}
ns.spawn("hack.js", numThreads, hostname, moneyThresh, securityThresh)
}

View File

@ -1,15 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
var target = ns.args[0]
var moneyThresh = ns.args[1]
var securityThresh = ns.args[2]
while (true) {
if (ns.getServerSecurityLevel(target) > securityThresh) {
await ns.weaken(target);
} else if (ns.getServerMoneyAvailable(target) < moneyThresh) {
await ns.grow(target);
} else {
await ns.hack(target);
}
}
}

View File

@ -1,33 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let parent
if (ns.args[0] == undefined) {
parent = "home"
} else {
parent = ns.args[0]
}
let files = [
"hack-args.js",
"hack.js",
"root.js",
"recursive-copy.js",
"recursive-kill.js",
"recursive-run.js"
]
let script = "recursive-copy.js"
let servers = ns.scan()
for (const server of servers) {
if (server == parent) {
continue
}
if (server == "home") {
continue
}
//ns.tprint("Copied to: :", server)
ns.scp(files, server, "home")
ns.exec(script, server, 1, ns.getHostname()) // script, dest, thread count, arg1
}
}

View File

@ -1,26 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let parent
if (ns.args[0] == undefined) {
parent = "home"
} else {
parent = ns.args[0]
}
let script = "recursive-kill.js"
let servers = ns.scan()
for (const server of servers) {
if (server == parent) {
continue
}
if (!ns.hasRootAccess(server)) {
ns.exec("root.js", ns.getHostname(), 1, server)
}
//ns.tprint("Killed all scripts on: ", server)
ns.killall(server, true)
ns.exec(script, server, 1, ns.getHostname())
}
}

View File

@ -1,30 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
let parent = ns.args[0]
let script = ns.args[1]
let selfScript = "recursive-run.js"
let servers = ns.scan()
//ns.tprint("INFO Scan of ", ns.getHostname(), ": ", servers)
for (const server of servers) {
if (server === parent) {
continue;
}
ns.exec(selfScript, server, 1, ns.getHostname(), script)
await ns.sleep(50)
let procs = ns.ps(server)
if (procs.length > 0) {
//ns.tprint("INFO Ram in use on ", server, ": ", ns.getServerUsedRam(server))
let ram = ns.getServerMaxRam(server) - ns.getServerUsedRam(server)
//ns.tprint("INFO Available ram on ", server, ": ", ram)
//ns.tprint("INFO Filename of running script: ", procs[0].filename)
}
if (ns.getServerRequiredHackingLevel(server) < ns.getHackingLevel()) {
// after thread args, first arg is the server it us running on, and then the cost of the hack script
ns.tprint("RUN Started hacking server: ", server)
ns.exec(script, server, 1, server, ns.getScriptRam("hack.js", server))
}
}
}

View File

@ -1,39 +0,0 @@
/** @param {NS} ns */
export async function main(ns) {
ns.run("recursive-kill.js")
await ns.sleep(1000)
ns.run("recursive-copy.js")
await ns.sleep(1000)
//home is first arg for root, hack-args is the script to run
ns.run("recursive-run.js", 1, "root-server", "hack-args.js")
//problem is that the scanning takes place on the same sever instead of the server that is the parent
//need last child of each node to spawn the process on parent, as spawning on on children always needs extra ram
//
//root scans nodes, saves to list
//the last execution of the exec on the last child passes in a flag to spawn on parent
//wait for the parent to finish using sleep (maybe find better way to syncronize)
//start hack-args function on parent
//
//each child becomes the "root" and repeats
// SCRATCH ALLAT
// its pretty much unsolveable, either way you go up or down the node tree, you end up with the problem
// not knowing if a server will have enough ram to run the hack args script, because the end node
// becomes circular. the only way to solve the problem would be to be able to have enough ram to call
// spawn after the for loop after recursive-run is called for all children in the for loop.
// so for now just will have to run a manual command for each sever with less than 8gb of ram
// a more elegant but more set in stone solution might be to just collect every unique hostname
// (print to console, but don't include parent, and exclude duplicates)
// and then just run an exec on each one in a for loop
//hack to get n00dles working, since it has low ram
await ns.sleep(1000)
ns.exec("hack-args.js", "n00dles", 1, "n00dles", 2.20)
// start auto upgrade if not running
if (!ns.isRunning("auto-upgrade.js")) {
ns.run("auto-upgrade.js")
}
}

32
servers/home/programs.ts Normal file
View File

@ -0,0 +1,32 @@
import { recursiveHackingRequired, recursiveScan, removeFilesOnAllServers } from "./utils"
export async function main(ns: NS) {
switch (ns.args[0]) {
case "getServers":
getServers(ns)
break
case "getHackingLevels":
getHackingLevels(ns)
break
case "removeFiles":
removeFilesOnAllServersFromArgs(ns)
break
default:
ns.tprint("Invalid program name")
break
}
}
function getServers(ns: NS) {
ns.tprint(recursiveScan(ns))
}
function getHackingLevels(ns: NS) {
ns.tprint(recursiveHackingRequired(ns))
}
function removeFilesOnAllServersFromArgs(ns: NS) {
let args = ns.args.slice(1)
let files = args.map((file) => file.toString())
removeFilesOnAllServers(ns, files)
}

View File

@ -1,111 +1,183 @@
// noinspection JSUnusedGlobalSymbols // noinspection JSUnusedGlobalSymbols
import {NS} from "NetscriptDefinitions"; /**
* Recursively scans all servers connected to the current server, excluding home
/** * @param ns global NS object
* Recursively scans all servers connected to the current server, excluding home * @returns A list of all servers connected to the current server
* @param ns global NS object */
* @returns A list of all servers connected to the current server export function recursiveScan(ns: NS) {
*/ // Starting case
export function recursiveScan(ns: NS) { let servers = ns.scan("home")
// Starting case // Add all servers to the list
let servers = ns.scan("home"); let allServers: string[] = []
// Add all servers to the list while (servers.length > 0) {
let allServers: string[] = []; let server = servers.pop()
while (servers.length > 0) { if (server) {
let server = servers.shift(); let newServers = ns.scan(server)
if(server) { for (const newServer of newServers) {
let newServers = ns.scan(server); if (!allServers.includes(newServer)) {
for (let newServer of newServers) { allServers.push(newServer)
if (!allServers.includes(newServer)) { servers.push(newServer)
allServers.push(newServer); }
servers.push(newServer); }
} }
} }
} // Remove the home server from the list
} return allServers.filter(server => server !== "home").sort()
// Remove the current server }
allServers.splice(allServers.indexOf("home"), 1);
// Print all servers /**
return allServers; * Recursively scans all servers connected to the current server for the set of all levels that hackable servers require
} * @param ns
* @returns A set of every hacking level required to hack a new server
/** */
* Removes files passed in from all servers export function recursiveHackingRequired(ns: NS) {
* @param ns Global NS object let servers = recursiveScan(ns)
* @param files The files to remove let levels: number[] = []
* @returns void for (let server of servers) {
* @example Removes all files from the folder "no-ports" from all servers. levels.push(ns.getServerRequiredHackingLevel(server))
* removeFilesOnAllServers(ns, ns.ls("home", "no-ports")); }
* @note ns.ls() returns the full path of every file, so if the file is not in the same place in every server, // Sort and remove duplicates, need custom sort because built-in sort only works alphabetically 💀
* you will need to modify each file path to match the server you are removing it from. return [...new Set(levels)].sort((a, b) => a - b)
*/ }
export function removeFilesOnAllServers(ns: NS, files: string[]) {
let hosts = recursiveScan(ns); /**
for(const host of hosts) { * Removes files passed in from all servers
for (const file of files) { * @param ns Global NS object
ns.rm(file, host) * @param files The files to remove
} * @returns void
} * @example Removes all files from the folder "no-ports" from all servers.
} * removeFilesOnAllServers(ns, ns.ls("home", "no-ports"));
* @note ns.ls() returns the full path of every file, so if the file is not in the same place in every server,
/** * you will need to modify each file path to match the server you are removing it from.
* Tries to gain root access to a server */
* @param ns Global NS object export function removeFilesOnAllServers(ns: NS, files: string[]) {
* @param server The server to gain root access to let hosts = recursiveScan(ns)
* @returns The number of programs used to gain root access for (const host of hosts) {
*/ for (const file of files) {
export function rootServer(ns: NS, server: string) { ns.rm(file, host)
let counter = 0; }
if (ns.fileExists("BruteSSH.exe", "home")) { }
ns.brutessh(server); }
counter++;
} /**
if (ns.fileExists("FTPCrack.exe", "home")) { * Tries to gain root access to a server
ns.ftpcrack(server); * @param ns Global NS object
counter++; * @param server The server to gain root access to
} * @returns The number of programs used to gain root access
if (ns.fileExists("SMTPCrack.exe", "home")) { */
ns.relaysmtp(server); export function rootServer(ns: NS, server: string) {
counter++; let counter = 0
} if (ns.fileExists("BruteSSH.exe", "home")) {
if (ns.fileExists("HTTPWorm.exe", "home")) { ns.brutessh(server)
ns.httpworm(server); counter++
counter++; }
} if (ns.fileExists("FTPCrack.exe", "home")) {
if (ns.fileExists("SQLInject.exe", "home")) { ns.ftpcrack(server)
ns.sqlinject(server); counter++
counter++; }
} if (ns.fileExists("relaySMTP.exe", "home")) {
ns.nuke(server) ns.relaysmtp(server)
return counter; counter++
} }
if (ns.fileExists("HTTPWorm.exe", "home")) {
/** ns.httpworm(server)
* Performs a function on a server if the player is capable of doing so, otherwise returns false counter++
* @param ns Global NS object }
* @param server The server to perform the function on if (ns.fileExists("SQLInject.exe", "home")) {
* @param func The function to perform ns.sqlinject(server)
* @param args The arguments to pass to the function counter++
* @returns The result of the function if it is performed or true if the function does not return anything, otherwise false }
*/ if (counter >= ns.getServerNumPortsRequired(server)) {
export function performFunctionIfCapable(ns: NS, server: string, func: CallableFunction, args: any[]) { ns.nuke(server)
if (ns.getHackingLevel() < ns.getServerRequiredHackingLevel(server)) { }
return false; return counter
} }
if (ns.getServerNumPortsRequired(server) < ns.getServer(server).openPortCount) {
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) { /**
return false; * Performs a function on a server if the player is capable of doing so, otherwise returns false
} * @param ns Global NS object
} * @param server The server to perform the function on
if (!ns.hasRootAccess(server)) { * @param func The function to perform
return false; * @param args The arguments to pass to the function
* @returns The result of the function if it is performed or true if the function does not return anything, otherwise false
} */
let result = func(...args); export function performFunctionIfCapable(ns: NS, server: string, func: CallableFunction, args: any[]) {
if (result === undefined) { ns.print(`Performing function on ${server}`)
return true; if (ns.getHackingLevel() < ns.getServerRequiredHackingLevel(server)) {
} else { ns.print(`Not enough hacking level to hack ${server}`)
return result; return false
} }
} if (ns.getServer(server).openPortCount <= ns.getServerNumPortsRequired(server)) {
ns.print(`Not enough ports, trying to root ${server}`)
if (rootServer(ns, server) < ns.getServerNumPortsRequired(server)) {
ns.print(`Failed to root ${server}`)
return false
}
}
let result = func(...args)
if (result === undefined) {
return true
} else {
return result
}
}
/**
* Executes a script on a server from another server
* @param ns Global NS object
* @param server The server to execute the script on
* @param script The file path of the script to execute
* @param threads The number of threads to use
* @param args The arguments to pass to the script
*/
export function executeScriptOnServerFromAnother(ns: NS, server: string, script: string, threads: number = 1, args: any[]) {
ns.scp(script, server)
performFunctionIfCapable(ns, server, ns.exec, [script, server, threads, ...args])
ns.atExit(() => {
// Remove the script from the server when the program exits
// ns.rm(script, server)
})
}
/**
* Calculates the money per second the player is making
* @param ns Global NS object
* @param time=5 The number of seconds to calculate the MPS over
*/
export async function calculateMPS(ns: NS, time: number = 5) {
let start = ns.getServerMoneyAvailable("home")
let data: number[] = []
for (let i = 0; i < time; i++) {
await ns.sleep(1000)
data.push(ns.getServerMoneyAvailable("home") - start)
}
return data.reduce((a, b) => a + b, 0) / time
}
/**
* Type that represents a program and whether it exists on the home server
*/
export type ProgramState = {
program: string
exists: boolean
}
/**
* Checks if any of the programs passed in now exist on the home server, and updates the exists property of the program
* @param ns Global NS object
* @param programs The programs to check
* @returns true if any of the programs now exist, otherwise false
*/
export function checkForNewPrograms(ns: NS, programs: ProgramState[]) {
let result = false
for (const program of programs) {
if (program.exists == false) {
program.exists = ns.fileExists(program.program)
if (program.exists) {
result = true
}
}
}
return result
}

42
servers/home/watcher.ts Normal file
View File

@ -0,0 +1,42 @@
import { checkForNewPrograms, ProgramState, recursiveHackingRequired } from "./utils"
export async function main(ns: NS) {
let levels = recursiveHackingRequired(ns)
let hackingLevel = ns.getHackingLevel()
let state: ProgramState[] = [
{ program: "BruteSSH.exe", exists: false },
{ program: "FTPCrack.exe", exists: false },
{ program: "relaySMTP.exe", exists: false },
{ program: "HTTPWorm.exe", exists: false },
{ program: "SQLInject.exe", exists: false },
]
// Update state with existing programs
checkForNewPrograms(ns, state)
// Remove levels that are already hacked
levels = levels.filter(level => level > hackingLevel)
do {
let restart = false
if (Math.min(...levels) <= hackingLevel) {
ns.tprint(`Hacking level increased to/past ${Math.min(...levels)}, is now ${hackingLevel}`)
ns.tprint(`Remaining levels to hack: ${levels}`)
// remove the level from the list, so we don't try to hack it again
levels = levels.filter(level => level > hackingLevel)
restart = true
}
if (checkForNewPrograms(ns, state)) {
ns.tprint(`New programs found: ${state.filter(program => program.exists).map(program => program.program)}`)
restart = true
}
if (restart) {
ns.run("killall.js")
await ns.sleep(1000) // 1 second
ns.run("hackallservers.js")
}
hackingLevel = ns.getHackingLevel()
// Wait 1 second before checking again
await ns.sleep(1000)
} while (hackingLevel <= Math.max(...levels))
}

View File

@ -10,6 +10,7 @@
"dom", "dom",
"dom.iterable" "dom.iterable"
], ],
"allowJs": true,
"baseUrl": "./", "baseUrl": "./",
"jsx": "react", "jsx": "react",
"paths": { "paths": {
@ -20,6 +21,6 @@
} }
}, },
"include": [ "include": [
"servers/**/*.ts*" "servers/**/*", "global.d.ts", "mirror/**/*"
] ]
} }