This commit is contained in:
cswimr 2025-02-09 10:00:02 -06:00
parent eab42ee1b8
commit f0b3e81c0a
Signed by: cswimr
GPG key ID: 0EC431A8DA8F8087
27 changed files with 1377 additions and 1 deletions

View file

@ -7,6 +7,8 @@
"@types/semver": "^7.5.8",
"semver": "^7.7.1",
"toml": "^3.0.0",
"typedoc": "^0.27.6",
"typedoc-plugin-markdown": "^4.4.1",
},
"devDependencies": {
"@types/bun": "latest",
@ -35,6 +37,8 @@
"@eslint/plugin-kit": ["@eslint/plugin-kit@0.2.5", "", { "dependencies": { "@eslint/core": "^0.10.0", "levn": "^0.4.1" } }, "sha512-lB05FkqEdUg2AA0xEbUz0SnkXT1LcCTa438W4IWTUh4hdOnVbQyOJ81OrDXsJk/LSiJHubgGEFoR5EHq1NsH1A=="],
"@gerrit0/mini-shiki": ["@gerrit0/mini-shiki@1.27.2", "", { "dependencies": { "@shikijs/engine-oniguruma": "^1.27.2", "@shikijs/types": "^1.27.2", "@shikijs/vscode-textmate": "^10.0.1" } }, "sha512-GeWyHz8ao2gBiUW4OJnQDxXQnFgZQwwQk05t/CVVgNBN7/rK8XZ7xY6YhLVv9tH3VppWWmr9DCl3MwemB/i+Og=="],
"@humanfs/core": ["@humanfs/core@0.19.1", "", {}, "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA=="],
"@humanfs/node": ["@humanfs/node@0.16.6", "", { "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" } }, "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw=="],
@ -45,10 +49,18 @@
"@rtsao/scc": ["@rtsao/scc@1.1.0", "", {}, "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g=="],
"@shikijs/engine-oniguruma": ["@shikijs/engine-oniguruma@1.29.2", "", { "dependencies": { "@shikijs/types": "1.29.2", "@shikijs/vscode-textmate": "^10.0.1" } }, "sha512-7iiOx3SG8+g1MnlzZVDYiaeHe7Ez2Kf2HrJzdmGwkRisT7r4rak0e655AcM/tF9JG/kg5fMNYlLLKglbN7gBqA=="],
"@shikijs/types": ["@shikijs/types@1.29.2", "", { "dependencies": { "@shikijs/vscode-textmate": "^10.0.1", "@types/hast": "^3.0.4" } }, "sha512-VJjK0eIijTZf0QSTODEXCqinjBn0joAHQ+aPSBzrv4O2d/QSbsMw+ZeSRx03kV34Hy7NzUvV/7NqfYGRLrASmw=="],
"@shikijs/vscode-textmate": ["@shikijs/vscode-textmate@10.0.1", "", {}, "sha512-fTIQwLF+Qhuws31iw7Ncl1R3HUDtGwIipiJ9iU+UsDUwMhegFcQKQHd51nZjb7CArq0MvON8rbgCGQYWHUKAdg=="],
"@types/bun": ["@types/bun@1.2.2", "", { "dependencies": { "bun-types": "1.2.2" } }, "sha512-tr74gdku+AEDN5ergNiBnplr7hpDp3V1h7fqI2GcR/rsUaM39jpSeKH0TFibRvU0KwniRx5POgaYnaXbk0hU+w=="],
"@types/estree": ["@types/estree@1.0.6", "", {}, "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw=="],
"@types/hast": ["@types/hast@3.0.4", "", { "dependencies": { "@types/unist": "*" } }, "sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ=="],
"@types/json-schema": ["@types/json-schema@7.0.15", "", {}, "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="],
"@types/json5": ["@types/json5@0.0.29", "", {}, "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ=="],
@ -57,6 +69,8 @@
"@types/semver": ["@types/semver@7.5.8", "", {}, "sha512-I8EUhyrgfLrcTkzV3TSsGyl1tSuPrEDzr0yd5m90UgNxQkyDXULk3b6MlQqTCpZpNtWe1K0hzclnZkTcLBe2UQ=="],
"@types/unist": ["@types/unist@3.0.3", "", {}, "sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q=="],
"@types/ws": ["@types/ws@8.5.14", "", { "dependencies": { "@types/node": "*" } }, "sha512-bd/YFLW+URhBzMXurx7lWByOu+xzU9+kb3RboOteXYDfW+tr+JZa99OyNmPINEGB/ahzKrEuc8rcv4gnpJmxTw=="],
"acorn": ["acorn@8.14.0", "", { "bin": { "acorn": "bin/acorn" } }, "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA=="],
@ -131,6 +145,8 @@
"dunder-proto": ["dunder-proto@1.0.1", "", { "dependencies": { "call-bind-apply-helpers": "^1.0.1", "es-errors": "^1.3.0", "gopd": "^1.2.0" } }, "sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A=="],
"entities": ["entities@4.5.0", "", {}, "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw=="],
"es-abstract": ["es-abstract@1.23.9", "", { "dependencies": { "array-buffer-byte-length": "^1.0.2", "arraybuffer.prototype.slice": "^1.0.4", "available-typed-arrays": "^1.0.7", "call-bind": "^1.0.8", "call-bound": "^1.0.3", "data-view-buffer": "^1.0.2", "data-view-byte-length": "^1.0.2", "data-view-byte-offset": "^1.0.1", "es-define-property": "^1.0.1", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "es-set-tostringtag": "^2.1.0", "es-to-primitive": "^1.3.0", "function.prototype.name": "^1.1.8", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.0", "get-symbol-description": "^1.1.0", "globalthis": "^1.0.4", "gopd": "^1.2.0", "has-property-descriptors": "^1.0.2", "has-proto": "^1.2.0", "has-symbols": "^1.1.0", "hasown": "^2.0.2", "internal-slot": "^1.1.0", "is-array-buffer": "^3.0.5", "is-callable": "^1.2.7", "is-data-view": "^1.0.2", "is-regex": "^1.2.1", "is-shared-array-buffer": "^1.0.4", "is-string": "^1.1.1", "is-typed-array": "^1.1.15", "is-weakref": "^1.1.0", "math-intrinsics": "^1.1.0", "object-inspect": "^1.13.3", "object-keys": "^1.1.1", "object.assign": "^4.1.7", "own-keys": "^1.0.1", "regexp.prototype.flags": "^1.5.3", "safe-array-concat": "^1.1.3", "safe-push-apply": "^1.0.0", "safe-regex-test": "^1.1.0", "set-proto": "^1.0.0", "string.prototype.trim": "^1.2.10", "string.prototype.trimend": "^1.0.9", "string.prototype.trimstart": "^1.0.8", "typed-array-buffer": "^1.0.3", "typed-array-byte-length": "^1.0.3", "typed-array-byte-offset": "^1.0.4", "typed-array-length": "^1.0.7", "unbox-primitive": "^1.1.0", "which-typed-array": "^1.1.18" } }, "sha512-py07lI0wjxAC/DcfK1S6G7iANonniZwTISvdPzk9hzeH0IZIshbuuFxLIU96OyF89Yb9hiqWn8M/bY83KY5vzA=="],
"es-define-property": ["es-define-property@1.0.1", "", {}, "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g=="],
@ -305,12 +321,20 @@
"levn": ["levn@0.4.1", "", { "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" } }, "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ=="],
"linkify-it": ["linkify-it@5.0.0", "", { "dependencies": { "uc.micro": "^2.0.0" } }, "sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ=="],
"locate-path": ["locate-path@6.0.0", "", { "dependencies": { "p-locate": "^5.0.0" } }, "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw=="],
"lodash.merge": ["lodash.merge@4.6.2", "", {}, "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ=="],
"lunr": ["lunr@2.3.9", "", {}, "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow=="],
"markdown-it": ["markdown-it@14.1.0", "", { "dependencies": { "argparse": "^2.0.1", "entities": "^4.4.0", "linkify-it": "^5.0.0", "mdurl": "^2.0.0", "punycode.js": "^2.3.1", "uc.micro": "^2.1.0" }, "bin": { "markdown-it": "bin/markdown-it.mjs" } }, "sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg=="],
"math-intrinsics": ["math-intrinsics@1.1.0", "", {}, "sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g=="],
"mdurl": ["mdurl@2.0.0", "", {}, "sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w=="],
"minimatch": ["minimatch@3.1.2", "", { "dependencies": { "brace-expansion": "^1.1.7" } }, "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw=="],
"minimist": ["minimist@1.2.8", "", {}, "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA=="],
@ -353,6 +377,8 @@
"punycode": ["punycode@2.3.1", "", {}, "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg=="],
"punycode.js": ["punycode.js@2.3.1", "", {}, "sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA=="],
"reflect.getprototypeof": ["reflect.getprototypeof@1.0.10", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-abstract": "^1.23.9", "es-errors": "^1.3.0", "es-object-atoms": "^1.0.0", "get-intrinsic": "^1.2.7", "get-proto": "^1.0.1", "which-builtin-type": "^1.2.1" } }, "sha512-00o4I+DVrefhv+nX0ulyi3biSHCPDe+yLv5o/p6d/UVlirijB8E16FtfwSAi4g3tcqrQ4lRAqQSoFEZJehYEcw=="],
"regexp.prototype.flags": ["regexp.prototype.flags@1.5.4", "", { "dependencies": { "call-bind": "^1.0.8", "define-properties": "^1.2.1", "es-errors": "^1.3.0", "get-proto": "^1.0.1", "gopd": "^1.2.0", "set-function-name": "^2.0.2" } }, "sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA=="],
@ -419,8 +445,14 @@
"typed-array-length": ["typed-array-length@1.0.7", "", { "dependencies": { "call-bind": "^1.0.7", "for-each": "^0.3.3", "gopd": "^1.0.1", "is-typed-array": "^1.1.13", "possible-typed-array-names": "^1.0.0", "reflect.getprototypeof": "^1.0.6" } }, "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg=="],
"typedoc": ["typedoc@0.27.6", "", { "dependencies": { "@gerrit0/mini-shiki": "^1.24.0", "lunr": "^2.3.9", "markdown-it": "^14.1.0", "minimatch": "^9.0.5", "yaml": "^2.6.1" }, "peerDependencies": { "typescript": "5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x" }, "bin": { "typedoc": "bin/typedoc" } }, "sha512-oBFRoh2Px6jFx366db0lLlihcalq/JzyCVp7Vaq1yphL/tbgx2e+bkpkCgJPunaPvPwoTOXSwasfklWHm7GfAw=="],
"typedoc-plugin-markdown": ["typedoc-plugin-markdown@4.4.1", "", { "peerDependencies": { "typedoc": "0.27.x" } }, "sha512-fx23nSCvewI9IR8lzIYtzDphETcgTDuxKcmHKGD4lo36oexC+B1k4NaCOY58Snqb4OlE8OXDAGVcQXYYuLRCNw=="],
"typescript": ["typescript@5.7.3", "", { "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" } }, "sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw=="],
"uc.micro": ["uc.micro@2.1.0", "", {}, "sha512-ARDJmphmdvUk6Glw7y9DQ2bFkKBHwQHLi2lsaH6PPmz/Ka9sFOBsBluozhDltWmnv9u/cF6Rt87znRTPV+yp/A=="],
"unbox-primitive": ["unbox-primitive@1.1.0", "", { "dependencies": { "call-bound": "^1.0.3", "has-bigints": "^1.0.2", "has-symbols": "^1.1.0", "which-boxed-primitive": "^1.1.1" } }, "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw=="],
"undici-types": ["undici-types@6.20.0", "", {}, "sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg=="],
@ -439,6 +471,8 @@
"word-wrap": ["word-wrap@1.2.5", "", {}, "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA=="],
"yaml": ["yaml@2.7.0", "", { "bin": { "yaml": "bin.mjs" } }, "sha512-+hSoy/QHluxmC9kCIJyL/uyFmLmc+e5CFR5Wa+bpIhIj85LVb9ZH2nVnqrHoSvKogwODv0ClqZkmiSSaIH5LTA=="],
"yocto-queue": ["yocto-queue@0.1.0", "", {}, "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q=="],
"@eslint-community/eslint-utils/eslint-visitor-keys": ["eslint-visitor-keys@3.4.3", "", {}, "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag=="],
@ -456,5 +490,9 @@
"eslint-plugin-import/semver": ["semver@6.3.1", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA=="],
"eslint-plugin-n/globals": ["globals@13.24.0", "", { "dependencies": { "type-fest": "^0.20.2" } }, "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ=="],
"typedoc/minimatch": ["minimatch@9.0.5", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow=="],
"typedoc/minimatch/brace-expansion": ["brace-expansion@2.0.1", "", { "dependencies": { "balanced-match": "^1.0.0" } }, "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA=="],
}
}

7
docs/README.md Normal file
View file

@ -0,0 +1,7 @@
**packwizjs**
***
# PackwizJS
A simple JavaScript module to parse the contents of Packwiz index files.

View file

@ -0,0 +1,15 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / enums/hash-format
# enums/hash-format
## Enumerations
- [HashFormat](enumerations/HashFormat.md)
## Functions
- [isValidHashFormat](functions/isValidHashFormat.md)

View file

@ -0,0 +1,49 @@
[**packwizjs**](../../../README.md)
***
[packwizjs](../../../modules.md) / [enums/hash-format](../README.md) / HashFormat
# Enumeration: HashFormat
Defined in: enums/hash-format.ts:1
## Enumeration Members
### md5
> **md5**: `"md5"`
Defined in: enums/hash-format.ts:5
***
### murmur2
> **murmur2**: `"murmur2"`
Defined in: enums/hash-format.ts:6
***
### sha1
> **sha1**: `"sha1"`
Defined in: enums/hash-format.ts:4
***
### sha256
> **sha256**: `"sha256"`
Defined in: enums/hash-format.ts:2
***
### sha512
> **sha512**: `"sha512"`
Defined in: enums/hash-format.ts:3

View file

@ -0,0 +1,21 @@
[**packwizjs**](../../../README.md)
***
[packwizjs](../../../modules.md) / [enums/hash-format](../README.md) / isValidHashFormat
# Function: isValidHashFormat()
> **isValidHashFormat**(`hashFormat`): [`HashFormat`](../enumerations/HashFormat.md)
Defined in: enums/hash-format.ts:9
## Parameters
### hashFormat
`string`
## Returns
[`HashFormat`](../enumerations/HashFormat.md)

15
docs/enums/side/README.md Normal file
View file

@ -0,0 +1,15 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / enums/side
# enums/side
## Enumerations
- [Side](enumerations/Side.md)
## Functions
- [isValidSide](functions/isValidSide.md)

View file

@ -0,0 +1,33 @@
[**packwizjs**](../../../README.md)
***
[packwizjs](../../../modules.md) / [enums/side](../README.md) / Side
# Enumeration: Side
Defined in: enums/side.ts:1
## Enumeration Members
### Both
> **Both**: `"both"`
Defined in: enums/side.ts:2
***
### Client
> **Client**: `"client"`
Defined in: enums/side.ts:3
***
### Server
> **Server**: `"server"`
Defined in: enums/side.ts:4

View file

@ -0,0 +1,21 @@
[**packwizjs**](../../../README.md)
***
[packwizjs](../../../modules.md) / [enums/side](../README.md) / isValidSide
# Function: isValidSide()
> **isValidSide**(`side`): [`Side`](../enumerations/Side.md)
Defined in: enums/side.ts:7
## Parameters
### side
`undefined` | `string`
## Returns
[`Side`](../enumerations/Side.md)

7
docs/index/README.md Normal file
View file

@ -0,0 +1,7 @@
[**packwizjs**](../README.md)
***
[packwizjs](../modules.md) / index
# index

14
docs/modules.md Normal file
View file

@ -0,0 +1,14 @@
[**packwizjs**](README.md)
***
# packwizjs
## Modules
- [enums/hash-format](enums/hash-format/README.md)
- [enums/side](enums/side/README.md)
- [index](index/README.md)
- [parser](parser/README.md)
- [provider](provider/README.md)
- [resource](resource/README.md)

23
docs/parser/README.md Normal file
View file

@ -0,0 +1,23 @@
[**packwizjs**](../README.md)
***
[packwizjs](../modules.md) / parser
# parser
## Classes
- [IndexFileEntry](classes/IndexFileEntry.md)
- [Packwiz](classes/Packwiz.md)
## Interfaces
- [Metafile](interfaces/Metafile.md)
- [Option](interfaces/Option.md)
- [PackwizIndex](interfaces/PackwizIndex.md)
- [PackwizVersions](interfaces/PackwizVersions.md)
## Functions
- [parsePackwiz](functions/parsePackwiz.md)

View file

@ -0,0 +1,109 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / IndexFileEntry
# Class: IndexFileEntry
Defined in: parser.ts:30
Represents a file entry in the Packwiz index.
## Constructors
### new IndexFileEntry()
> **new IndexFileEntry**(`file`, `hash`, `hashFormat`, `alias`?, `metafile`?, `preserve`?): [`IndexFileEntry`](IndexFileEntry.md)
Defined in: parser.ts:31
#### Parameters
##### file
[`Resource`](../../resource/classes/Resource.md)
##### hash
`string`
##### hashFormat
[`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
##### alias?
`string`
##### metafile?
`boolean` = `false`
##### preserve?
`boolean` = `false`
#### Returns
[`IndexFileEntry`](IndexFileEntry.md)
## Properties
### alias?
> `readonly` `optional` **alias**: `string`
Defined in: parser.ts:35
***
### file
> `readonly` **file**: [`Resource`](../../resource/classes/Resource.md)
Defined in: parser.ts:32
***
### hash
> `readonly` **hash**: `string`
Defined in: parser.ts:33
***
### hashFormat
> `readonly` **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: parser.ts:34
***
### metafile
> `readonly` **metafile**: `boolean` = `false`
Defined in: parser.ts:36
***
### preserve
> `readonly` **preserve**: `boolean` = `false`
Defined in: parser.ts:37
## Methods
### parse()
> **parse**(): `Promise`\<[`Metafile`](../interfaces/Metafile.md)\>
Defined in: parser.ts:47
#### Returns
`Promise`\<[`Metafile`](../interfaces/Metafile.md)\>

View file

@ -0,0 +1,119 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / Packwiz
# Class: Packwiz
Defined in: parser.ts:130
## Constructors
### new Packwiz()
> **new Packwiz**(`location`, `index`, `name`, `packFormat`, `authors`, `description`, `version`, `versions`): [`Packwiz`](Packwiz.md)
Defined in: parser.ts:131
#### Parameters
##### location
[`Resource`](../../resource/classes/Resource.md)
##### index
[`PackwizIndex`](../interfaces/PackwizIndex.md)
##### name
`string`
##### packFormat
`string` = `"packwiz:1.0.0"`
##### authors
`string`[]
##### description
`string`
##### version
`string`
##### versions
[`PackwizVersions`](../interfaces/PackwizVersions.md)
#### Returns
[`Packwiz`](Packwiz.md)
## Properties
### authors
> `readonly` **authors**: `string`[]
Defined in: parser.ts:136
***
### description
> `readonly` **description**: `string`
Defined in: parser.ts:137
***
### index
> `readonly` **index**: [`PackwizIndex`](../interfaces/PackwizIndex.md)
Defined in: parser.ts:133
***
### location
> `readonly` **location**: [`Resource`](../../resource/classes/Resource.md)
Defined in: parser.ts:132
***
### name
> `readonly` **name**: `string`
Defined in: parser.ts:134
***
### packFormat
> `readonly` **packFormat**: `string` = `"packwiz:1.0.0"`
Defined in: parser.ts:135
***
### version
> `readonly` **version**: `string`
Defined in: parser.ts:138
***
### versions
> `readonly` **versions**: [`PackwizVersions`](../interfaces/PackwizVersions.md)
Defined in: parser.ts:139

View file

@ -0,0 +1,27 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / parsePackwiz
# Function: parsePackwiz()
> **parsePackwiz**(`filePath`): `Promise`\<[`Packwiz`](../classes/Packwiz.md)\>
Defined in: parser.ts:161
Parses a packwiz.toml file and returns its contents.
## Parameters
### filePath
`string`
The path of the TOML file.
## Returns
`Promise`\<[`Packwiz`](../classes/Packwiz.md)\>
The parsed file as a structured class.

View file

@ -0,0 +1,49 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / Metafile
# Interface: Metafile
Defined in: parser.ts:13
## Properties
### filename
> **filename**: `string`
Defined in: parser.ts:15
***
### name
> **name**: `string`
Defined in: parser.ts:14
***
### option
> **option**: [`Option`](Option.md)
Defined in: parser.ts:18
***
### provider
> **provider**: [`UrlProvider`](../../provider/classes/UrlProvider.md)
Defined in: parser.ts:17
***
### side
> **side**: [`Side`](../../enums/side/enumerations/Side.md)
Defined in: parser.ts:16

View file

@ -0,0 +1,33 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / Option
# Interface: Option
Defined in: parser.ts:21
## Properties
### default?
> `optional` **default**: `boolean`
Defined in: parser.ts:23
***
### description?
> `optional` **description**: `string`
Defined in: parser.ts:24
***
### optional
> **optional**: `boolean`
Defined in: parser.ts:22

View file

@ -0,0 +1,43 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / PackwizIndex
# Interface: PackwizIndex
Defined in: parser.ts:114
Represents the structure of a Packwiz index file, as well as providing its location.
## Properties
### files
> **files**: [`IndexFileEntry`](../classes/IndexFileEntry.md)[]
Defined in: parser.ts:118
***
### hash
> **hash**: `string`
Defined in: parser.ts:116
***
### hashFormat
> **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: parser.ts:117
***
### location
> **location**: [`Resource`](../../resource/classes/Resource.md)
Defined in: parser.ts:115

View file

@ -0,0 +1,57 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [parser](../README.md) / PackwizVersions
# Interface: PackwizVersions
Defined in: parser.ts:121
## Properties
### fabric?
> `optional` **fabric**: `string`
Defined in: parser.ts:123
***
### forge?
> `optional` **forge**: `string`
Defined in: parser.ts:124
***
### liteloader?
> `optional` **liteloader**: `string`
Defined in: parser.ts:127
***
### minecraft
> **minecraft**: `string`
Defined in: parser.ts:122
***
### neoforge?
> `optional` **neoforge**: `string`
Defined in: parser.ts:125
***
### quilt?
> `optional` **quilt**: `string`
Defined in: parser.ts:126

14
docs/provider/README.md Normal file
View file

@ -0,0 +1,14 @@
[**packwizjs**](../README.md)
***
[packwizjs](../modules.md) / provider
# provider
## Classes
- [CurseForgeProvider](classes/CurseForgeProvider.md)
- [GitHubProvider](classes/GitHubProvider.md)
- [ModrinthProvider](classes/ModrinthProvider.md)
- [UrlProvider](classes/UrlProvider.md)

View file

@ -0,0 +1,138 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [provider](../README.md) / CurseForgeProvider
# Class: CurseForgeProvider
Defined in: provider.ts:77
URL provider for handling CurseForge-related URLs.
Extends the UrlProvider with CurseForge-specific properties.
## Extends
- [`UrlProvider`](UrlProvider.md)
## Constructors
### new CurseForgeProvider()
> **new CurseForgeProvider**(`hash`, `hashFormat`, `mode`, `fileId`, `projectId`): [`CurseForgeProvider`](CurseForgeProvider.md)
Defined in: provider.ts:86
Creates a new CurseForgeProvider instance.
#### Parameters
##### hash
`string`
A hash string used for identification or verification.
##### hashFormat
[`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
The format of the provided hash.
##### mode
`string`
The mode indicating how the CurseForge file should be accessed.
##### fileId
`number`
The identifier for the file on CurseForge.
##### projectId
`number`
The identifier for the project on CurseForge.
#### Returns
[`CurseForgeProvider`](CurseForgeProvider.md)
#### Overrides
[`UrlProvider`](UrlProvider.md).[`constructor`](UrlProvider.md#constructors)
## Properties
### fileId
> **fileId**: `number`
Defined in: provider.ts:90
The identifier for the file on CurseForge.
***
### hash
> **hash**: `string`
Defined in: provider.ts:15
A hash string used for identifying or verifying the resource.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hash`](UrlProvider.md#hash-1)
***
### hashFormat
> **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: provider.ts:16
The format of the provided hash.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hashFormat`](UrlProvider.md#hashformat-1)
***
### mode
> **mode**: `string`
Defined in: provider.ts:89
The mode indicating how the CurseForge file should be accessed.
***
### projectId
> **projectId**: `number`
Defined in: provider.ts:91
The identifier for the project on CurseForge.
***
### url
> **url**: [`Resource`](../../resource/classes/Resource.md)
Defined in: provider.ts:17
A Resource instance representing the URL.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`url`](UrlProvider.md#url-1)

View file

@ -0,0 +1,160 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [provider](../README.md) / GitHubProvider
# Class: GitHubProvider
Defined in: provider.ts:49
URL provider for handling GitHub-related URLs.
Extends the UrlProvider with GitHub-specific properties.
## Extends
- [`UrlProvider`](UrlProvider.md)
## Constructors
### new GitHubProvider()
> **new GitHubProvider**(`hash`, `hashFormat`, `url`, `branch`, `regex`, `slug`, `tag`): [`GitHubProvider`](GitHubProvider.md)
Defined in: provider.ts:60
Creates a new GitHubProvider instance.
#### Parameters
##### hash
`string`
A hash string used for identification or verification.
##### hashFormat
[`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
The format of the hash.
##### url
[`Resource`](../../resource/classes/Resource.md)
A Resource instance representing the URL.
##### branch
`string`
The branch name within the GitHub repository.
##### regex
`string`
A regular expression for matching specific patterns in the GitHub URL.
##### slug
`string`
A URL slug used for identifying the repository.
##### tag
`string`
The tag associated with the GitHub resource.
#### Returns
[`GitHubProvider`](GitHubProvider.md)
#### Overrides
[`UrlProvider`](UrlProvider.md).[`constructor`](UrlProvider.md#constructors)
## Properties
### branch
> **branch**: `string`
Defined in: provider.ts:64
The branch name within the GitHub repository.
***
### hash
> **hash**: `string`
Defined in: provider.ts:15
A hash string used for identifying or verifying the resource.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hash`](UrlProvider.md#hash-1)
***
### hashFormat
> **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: provider.ts:16
The format of the provided hash.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hashFormat`](UrlProvider.md#hashformat-1)
***
### regex
> **regex**: `string`
Defined in: provider.ts:65
A regular expression for matching specific patterns in the GitHub URL.
***
### slug
> **slug**: `string`
Defined in: provider.ts:66
A URL slug used for identifying the repository.
***
### tag
> **tag**: `string`
Defined in: provider.ts:67
The tag associated with the GitHub resource.
***
### url
> **url**: [`Resource`](../../resource/classes/Resource.md)
Defined in: provider.ts:17
A Resource instance representing the URL.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`url`](UrlProvider.md#url-1)

View file

@ -0,0 +1,128 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [provider](../README.md) / ModrinthProvider
# Class: ModrinthProvider
Defined in: provider.ts:25
URL provider for handling Modrinth-related URLs.
Extends the UrlProvider with Modrinth-specific properties.
## Extends
- [`UrlProvider`](UrlProvider.md)
## Constructors
### new ModrinthProvider()
> **new ModrinthProvider**(`hash`, `hashFormat`, `url`, `modId`, `versionId`): [`ModrinthProvider`](ModrinthProvider.md)
Defined in: provider.ts:34
Creates a new ModrinthProvider instance.
#### Parameters
##### hash
`string`
A hash string used for identification or verification.
##### hashFormat
[`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
The format of the provided hash.
##### url
[`Resource`](../../resource/classes/Resource.md)
A Resource instance representing the URL.
##### modId
`string`
The identifier for the Modrinth mod.
##### versionId
`string`
The version identifier for the mod.
#### Returns
[`ModrinthProvider`](ModrinthProvider.md)
#### Overrides
[`UrlProvider`](UrlProvider.md).[`constructor`](UrlProvider.md#constructors)
## Properties
### hash
> **hash**: `string`
Defined in: provider.ts:15
A hash string used for identifying or verifying the resource.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hash`](UrlProvider.md#hash-1)
***
### hashFormat
> **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: provider.ts:16
The format of the provided hash.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`hashFormat`](UrlProvider.md#hashformat-1)
***
### modId
> **modId**: `string`
Defined in: provider.ts:38
The identifier for the Modrinth mod.
***
### url
> **url**: [`Resource`](../../resource/classes/Resource.md)
Defined in: provider.ts:17
A Resource instance representing the URL.
#### Inherited from
[`UrlProvider`](UrlProvider.md).[`url`](UrlProvider.md#url-1)
***
### versionId
> **versionId**: `string`
Defined in: provider.ts:39
The version identifier for the mod.

View file

@ -0,0 +1,81 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [provider](../README.md) / UrlProvider
# Class: UrlProvider
Defined in: provider.ts:7
Provides a base class for URL-based providers.
## Extended by
- [`ModrinthProvider`](ModrinthProvider.md)
- [`GitHubProvider`](GitHubProvider.md)
- [`CurseForgeProvider`](CurseForgeProvider.md)
## Constructors
### new UrlProvider()
> **new UrlProvider**(`hash`, `hashFormat`, `url`): [`UrlProvider`](UrlProvider.md)
Defined in: provider.ts:14
Creates a new UrlProvider instance.
#### Parameters
##### hash
`string`
A hash string used for identifying or verifying the resource.
##### hashFormat
[`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
The format of the provided hash.
##### url
[`Resource`](../../resource/classes/Resource.md)
A Resource instance representing the URL.
#### Returns
[`UrlProvider`](UrlProvider.md)
## Properties
### hash
> **hash**: `string`
Defined in: provider.ts:15
A hash string used for identifying or verifying the resource.
***
### hashFormat
> **hashFormat**: [`HashFormat`](../../enums/hash-format/enumerations/HashFormat.md)
Defined in: provider.ts:16
The format of the provided hash.
***
### url
> **url**: [`Resource`](../../resource/classes/Resource.md)
Defined in: provider.ts:17
A Resource instance representing the URL.

11
docs/resource/README.md Normal file
View file

@ -0,0 +1,11 @@
[**packwizjs**](../README.md)
***
[packwizjs](../modules.md) / resource
# resource
## Classes
- [Resource](classes/Resource.md)

View file

@ -0,0 +1,145 @@
[**packwizjs**](../../README.md)
***
[packwizjs](../../modules.md) / [resource](../README.md) / Resource
# Class: Resource
Defined in: resource.ts:5
## Constructors
### new Resource()
> **new Resource**(`path`): [`Resource`](Resource.md)
Defined in: resource.ts:6
#### Parameters
##### path
`string`
#### Returns
[`Resource`](Resource.md)
## Properties
### path
> `readonly` **path**: `string`
Defined in: resource.ts:6
## Accessors
### ext
#### Get Signature
> **get** **ext**(): `string`
Defined in: resource.ts:36
##### Returns
`string`
***
### isUrl
#### Get Signature
> **get** **isUrl**(): `boolean`
Defined in: resource.ts:12
##### Returns
`boolean`
***
### name
#### Get Signature
> **get** **name**(): `string`
Defined in: resource.ts:21
##### Returns
`string`
***
### parent
#### Get Signature
> **get** **parent**(): [`Resource`](Resource.md)
Defined in: resource.ts:27
##### Returns
[`Resource`](Resource.md)
## Methods
### exists()
> **exists**(): `Promise`\<`boolean`\>
Defined in: resource.ts:42
#### Returns
`Promise`\<`boolean`\>
***
### fetchContents()
> **fetchContents**(): `Promise`\<`string`\>
Defined in: resource.ts:52
#### Returns
`Promise`\<`string`\>
***
### join()
> **join**(...`segments`): [`Resource`](Resource.md)
Defined in: resource.ts:62
#### Parameters
##### segments
...`string`[]
#### Returns
[`Resource`](Resource.md)
***
### toString()
> **toString**(): `string`
Defined in: resource.ts:8
#### Returns
`string`

View file

@ -2,10 +2,15 @@
"name": "packwizjs",
"module": "src/index.ts",
"type": "module",
"scripts": {
"docs": "typedoc --options typedoc.json"
},
"devDependencies": {
"@types/bun": "latest",
"eslint": "9.20.0",
"eslint-config-standard": "17.1.0"
"eslint-config-standard": "17.1.0",
"typedoc": "^0.27.6",
"typedoc-plugin-markdown": "^4.4.1"
},
"peerDependencies": {
"typescript": "^5.0.0"

14
typedoc.json Normal file
View file

@ -0,0 +1,14 @@
{
"entryPoints": [
"src/**/*.ts"
],
"out": "docs",
"exclude": [
"**/*+(test|spec).ts"
],
"theme": "default",
"plugin": [
"typedoc-plugin-markdown"
],
"categorizeByGroup": true
}