diff --git a/bun.lock b/bun.lock index aca5cdd..91a6bde 100644 --- a/bun.lock +++ b/bun.lock @@ -3,11 +3,6 @@ "workspaces": { "": { "name": "packwizjs", - "dependencies": { - "@types/semver": "^7.5.8", - "semver": "^7.7.1", - "toml": "^3.0.0", - }, "devDependencies": { "@getmeli/cli": "1.2.0", "@types/bun": "latest", @@ -20,6 +15,15 @@ "typedoc-plugin-coverage": "3.4.1", "typedoc-plugin-markdown": "4.4.2", }, + }, + "packages/parser": { + "name": "@packwizjs/parser", + "version": "1.0.2", + "dependencies": { + "@types/semver": "^7.5.8", + "semver": "^7.7.1", + "toml": "^3.0.0", + }, "peerDependencies": { "typescript": "^5.0.0", }, @@ -58,6 +62,8 @@ "@humanwhocodes/retry": ["@humanwhocodes/retry@0.4.1", "", {}, "sha512-c7hNEllBlenFTHBky65mhq8WD2kbN9Q6gk0bTk8lSBvc554jpXSkST1iePudpt7+A/AQvuHs9EMqjHDXMY1lrA=="], + "@packwizjs/parser": ["@packwizjs/parser@workspace:packages/parser"], + "@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=="], diff --git a/package.json b/package.json index fa230f8..7b0ff13 100644 --- a/package.json +++ b/package.json @@ -1,28 +1,13 @@ { "name": "packwizjs", - "module": "src/parser.ts", - "version": "1.0.1", - "type": "module", - "description": "A simple library for parsing Packwiz TOML files", + "version": "1.0.0", + "workspaces": [ + "packages/*" + ], "author": { "name": "cswimr", "email": "seaswimmerthefsh@gmail.com" }, - "repository": { - "url": "https://c.csw.im/GalacticFactory/PackwizJS", - "type": "git", - "directory": "src" - }, - "license": "MIT", - "files": [ - "src" - ], - "readme": "README.md", - "homepage": "https://packwizjs.csw.im", - "keywords": [ - "packwiz", - "minecraft" - ], "scripts": { "docs": "typedoc --options typedoc.json", "format": "bun prettier --write '**/*.{ts,json,md}'" @@ -38,13 +23,5 @@ "typedoc": "0.27.7", "typedoc-plugin-coverage": "3.4.1", "typedoc-plugin-markdown": "4.4.2" - }, - "peerDependencies": { - "typescript": "^5.0.0" - }, - "dependencies": { - "@types/semver": "^7.5.8", - "semver": "^7.7.1", - "toml": "^3.0.0" } } diff --git a/packages/parser/LICENSE.md b/packages/parser/LICENSE.md new file mode 100644 index 0000000..438d411 --- /dev/null +++ b/packages/parser/LICENSE.md @@ -0,0 +1,9 @@ +# MIT License + +Copyright (c) 2025 GalacticFactory + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/packages/parser/package.json b/packages/parser/package.json new file mode 100644 index 0000000..acf9183 --- /dev/null +++ b/packages/parser/package.json @@ -0,0 +1,34 @@ +{ + "name": "@packwizjs/parser", + "module": "src/parser.ts", + "version": "1.0.2", + "type": "module", + "description": "A simple library for parsing Packwiz TOML files", + "author": { + "name": "cswimr", + "email": "seaswimmerthefsh@gmail.com" + }, + "repository": { + "url": "https://c.csw.im/GalacticFactory/PackwizJS", + "type": "git" + }, + "license": "MIT", + "files": [ + "src" + ], + "readme": "../../README.md", + "homepage": "https://packwizjs.csw.im", + "keywords": [ + "packwiz", + "minecraft" + ], + "scripts": {}, + "peerDependencies": { + "typescript": "^5.0.0" + }, + "dependencies": { + "@types/semver": "^7.5.8", + "semver": "^7.7.1", + "toml": "^3.0.0" + } +} diff --git a/src/enums/hash-format.ts b/packages/parser/src/enums/hash-format.ts similarity index 100% rename from src/enums/hash-format.ts rename to packages/parser/src/enums/hash-format.ts diff --git a/src/enums/side.ts b/packages/parser/src/enums/side.ts similarity index 100% rename from src/enums/side.ts rename to packages/parser/src/enums/side.ts diff --git a/src/parser.ts b/packages/parser/src/index.ts similarity index 100% rename from src/parser.ts rename to packages/parser/src/index.ts diff --git a/src/provider.ts b/packages/parser/src/provider.ts similarity index 100% rename from src/provider.ts rename to packages/parser/src/provider.ts diff --git a/src/resource.ts b/packages/parser/src/resource.ts similarity index 100% rename from src/resource.ts rename to packages/parser/src/resource.ts diff --git a/packages/parser/tsconfig.json b/packages/parser/tsconfig.json new file mode 100644 index 0000000..9e4e31b --- /dev/null +++ b/packages/parser/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "outDir": "dist", + }, + "include": [ + "src/**/*.ts" + ], +} diff --git a/tsconfig.json b/tsconfig.base.json similarity index 100% rename from tsconfig.json rename to tsconfig.base.json diff --git a/typedoc.json b/typedoc.json index d82073c..152774c 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,5 +1,11 @@ { - "entryPoints": ["src/**/*.ts"], + "entryPoints": ["packages/*"], + "entryPointStrategy": "packages", + "name": "PackwizJS", + "packageOptions": { + "includeVersion": true, + "entryPoints": ["src/**/*.ts"] + }, "outputs": [ { "name": "html",