A simple JavaScript module to parse the contents of Packwiz index files.
https://packwizjs.csw.im/
Renovate
6c09979cf9
All checks were successful
Actions / Build and Push Documentation (push) Successful in 15s
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [@typhonjs-typedoc/ts-lib-docs](https://github.com/typhonjs-typedoc/ts-lib-docs) | devDependencies | pin | [`^2024.12.25` -> `2024.12.25`](https://renovatebot.com/diffs/npm/@typhonjs-typedoc%2fts-lib-docs/2024.12.25/2024.12.25) | | [prettier](https://prettier.io) ([source](https://github.com/prettier/prettier)) | devDependencies | pin | [`^3.5.0` -> `3.5.0`](https://renovatebot.com/diffs/npm/prettier/3.5.0/3.5.0) | Add the preset `:preserveSemverRanges` to your config if you don't want to pin your dependencies. --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xNjMuMCIsInVwZGF0ZWRJblZlciI6IjM5LjE2My4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119--> Reviewed-on: #8 Co-authored-by: Renovate <renovate@csw.im> Co-committed-by: Renovate <renovate@csw.im> |
||
---|---|---|
.forgejo/workflows | ||
packwiz | ||
src | ||
.editorconfig | ||
.envrc | ||
.gitignore | ||
.neoconf.json | ||
bun.lock | ||
eslint.config.js | ||
flake.lock | ||
flake.nix | ||
LICENSE | ||
package.json | ||
README.md | ||
renovate.json | ||
tsconfig.json | ||
typedoc.json |
PackwizJS
A simple JavaScript module to parse the contents of Packwiz index files.
Installation
You can install PackwizJS with your package manager of choice.
npm
npm install --save packwizjs
pnpm
pnpm add packwizjs
yarn
yarn add packwizjs
bun
bun add packwizjs
Usage
See the documentation for more information.
Basic Example
> import { parsePackwiz } from "packwizjs";
> const packwizFile = await parsePackwiz("./packwiz/pack.toml")
Packwiz {
location: Resource { path: 'packwiz/pack.toml' },
index: { // The index file is automatically parsed alongside the pack.toml file
location: Resource { path: 'packwiz/index.toml' },
hash: '6ce48b376540c840b9c2c1eaedbdf64f3b0e1203888ea644fc5d8fff66377c18',
hashFormat: 'sha256',
files: [
[IndexFileEntry],
[IndexFileEntry],
[IndexFileEntry],
[IndexFileEntry]
]
},
name: 'PackwizJS Testing Pack',
packFormat: 'packwiz:1.1.0',
authors: [ 'cswimr', 'GalacticFactory' ],
description: 'PackwizJS Testing Pack',
version: '1.0.0',
versions: {
minecraft: '1.21.4',
fabric: '0.16.10',
forge: undefined,
neoforge: undefined,
quilt: undefined,
liteloader: undefined
}
}
> await packwizFile.index.files[2].parse()
{
name: 'Fabric API',
filename: 'fabric-api-0.115.1+1.21.4.jar',
side: 'both',
provider: ModrinthProvider {
hash: 'd5e9f87679b5edc9786e651fc481f8861a9cf53ed381890a1cb5e129222d6c5fa99f06045007f8e1fba02da686cdb6db2d99b334a1d23881cb56dfa199932eea',
hashFormat: 'sha512',
url: Resource {
path: 'https://cdn.modrinth.com/data/P7dR8mSH/versions/UnrycCWP/fabric-api-0.115.1%2B1.21.4.jar'
},
modId: 'P7dR8mSH',
versionId: 'UnrycCWP'
},
isOptional: false,
isDefault: true,
description: undefined
}