From acb599e809d2341ee5d30bec6a032596e5788684 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 01:58:47 -0500 Subject: [PATCH 1/8] add dependencies and dependents columns to readmes --- src/generate_lockfile.js | 67 ++++++++++++++++++++++++++++++++++++++-- 1 file changed, 65 insertions(+), 2 deletions(-) diff --git a/src/generate_lockfile.js b/src/generate_lockfile.js index ddd7c1b..195c8b4 100644 --- a/src/generate_lockfile.js +++ b/src/generate_lockfile.js @@ -71,7 +71,7 @@ async function writeLockfile(lockfile, outputPath) { */ function generateCategoryReadme(category, entries, projectsMap, usersMap) { const categoryTitle = category.charAt(0).toUpperCase() + category.slice(1); - const lines = [`# ${categoryTitle}`, '', '| Name | Author | Version |', '|-|-|-|']; + const lines = [`# ${categoryTitle}`, '', '| Name | Author | Version | Dependencies | Dependants |', '|-|-|-|-|-|']; // Map category to Modrinth URL path segment const categoryPathMap = {}; @@ -80,11 +80,21 @@ function generateCategoryReadme(category, entries, projectsMap, usersMap) { } const categoryPath = categoryPathMap[category] || 'project'; + // Build a set of project_ids present in this category for filtering dependencies + const categoryProjectIds = new Set(); + for (const entry of entries) { + if (entry.version && entry.version.project_id) { + categoryProjectIds.add(entry.version.project_id); + } + } + for (const entry of entries) { const version = entry.version; let nameCell = ''; let authorCell = ''; let versionCell = ''; + let dependenciesCell = ''; + let dependantsCell = ''; if (version && version.project_id) { const project = projectsMap[version.project_id]; @@ -123,15 +133,68 @@ function generateCategoryReadme(category, entries, projectsMap, usersMap) { // Version column versionCell = version.version_number || 'Unknown'; + + // Dependencies column - only show dependencies that are present in this category + if (version.dependencies && Array.isArray(version.dependencies) && version.dependencies.length > 0) { + const dependencyLinks = []; + for (const dep of version.dependencies) { + if (dep.project_id && categoryProjectIds.has(dep.project_id)) { + const depProject = projectsMap[dep.project_id]; + if (depProject) { + const depProjectName = depProject.title || depProject.slug || 'Unknown'; + const depProjectSlug = depProject.slug || depProject.id; + const depUrl = `https://modrinth.com/${categoryPath}/${depProjectSlug}`; + if (depProject.icon_url) { + dependencyLinks.push(`${depProjectName}`); + } else { + dependencyLinks.push(`[${depProjectName}](${depUrl})`); + } + } + } + } + dependenciesCell = dependencyLinks.length > 0 ? dependencyLinks.join(' ') : '-'; + } else { + dependenciesCell = '-'; + } + + // Dependants column - find all entries in the same category that depend on this project + const dependants = []; + for (const catEntry of entries) { + // Skip if this is the same entry (same project_id) + if (catEntry.version && catEntry.version.project_id === version.project_id) { + continue; + } + if (catEntry.version && catEntry.version.dependencies && Array.isArray(catEntry.version.dependencies)) { + const hasDependency = catEntry.version.dependencies.some( + dep => dep.project_id === version.project_id + ); + if (hasDependency) { + const depProject = projectsMap[catEntry.version.project_id]; + if (depProject) { + const depProjectName = depProject.title || depProject.slug || 'Unknown'; + const depProjectSlug = depProject.slug || depProject.id; + const depUrl = `https://modrinth.com/${categoryPath}/${depProjectSlug}`; + if (depProject.icon_url) { + dependants.push(`${depProjectName}`); + } else { + dependants.push(`[${depProjectName}](${depUrl})`); + } + } + } + } + } + dependantsCell = dependants.length > 0 ? dependants.join(' ') : '-'; } else { // File not found on Modrinth const fileName = path.basename(entry.path); nameCell = fileName; authorCell = 'Unknown'; versionCell = '-'; + dependenciesCell = '-'; + dependantsCell = '-'; } - lines.push(`| ${nameCell} | ${authorCell} | ${versionCell} |`); + lines.push(`| ${nameCell} | ${authorCell} | ${versionCell} | ${dependenciesCell} | ${dependantsCell} |`); } return lines.join('\n') + '\n'; From 6f98a5adc80f8a921f3cdb2bedddc0f2ad3f95ff Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 02:12:12 -0500 Subject: [PATCH 2/8] add package author name to constants --- src/config/constants.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/config/constants.js b/src/config/constants.js index c0f9b1a..f22f517 100644 --- a/src/config/constants.js +++ b/src/config/constants.js @@ -1,5 +1,8 @@ import pkg from '../../package.json' with { type: 'json' }; +/** Author username */ +export const AUTHOR_USERNAME = 'nickesc'; + /** Lockfile format version -- increment on changes to the format */ export const LOCKFILE_VERSION = "1.0.1"; From ff8f7a127f0fc0beacbac77876944d0c8fd4c4d9 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 02:12:55 -0500 Subject: [PATCH 3/8] add user agent string to config --- src/config/api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/config/api.js b/src/config/api.js index 37cd301..9d17bfc 100644 --- a/src/config/api.js +++ b/src/config/api.js @@ -1,3 +1,6 @@ +import pkg from '../../package.json' with { type: 'json' }; +import * as constants from './constants.js'; + /** Modrinth API base URL */ export const MODRINTH_API_BASE = 'https://api.modrinth.com/v2'; @@ -16,6 +19,9 @@ export const MODRINTH_MINECRAFT_VERSIONS_ENDPOINT = `${MODRINTH_API_BASE}/tag/ga /** Modrinth Modloaders endpoint */ export const MODRINTH_MODLOADERS_ENDPOINT = `${MODRINTH_API_BASE}/tag/loader`; +/** User-Agent header for Modrinth API requests */ +export const MODRINTH_USER_AGENT = `${constants.AUTHOR_USERNAME}/${pkg.name}/${pkg.version}`; + /** Batch size for Modrinth API requests */ export const BATCH_SIZE = 100; From fe493550f69c924eaba640159222b3473f3779d5 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 02:13:24 -0500 Subject: [PATCH 4/8] implement user agent in modrinth requests --- src/modrinth_interactions.js | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/src/modrinth_interactions.js b/src/modrinth_interactions.js index 6f8db55..f73ab43 100644 --- a/src/modrinth_interactions.js +++ b/src/modrinth_interactions.js @@ -24,6 +24,7 @@ export async function getVersionsFromHashes(hashes) { method: 'POST', headers: { 'Content-Type': 'application/json', + 'User-Agent': config.MODRINTH_USER_AGENT, }, body: JSON.stringify({ hashes: hashes, @@ -57,7 +58,11 @@ export async function getProjects(projectIds) { for (const chunk of chunks) { try { const url = `${config.MODRINTH_PROJECTS_ENDPOINT}?ids=${encodeURIComponent(JSON.stringify(chunk))}`; - const response = await fetch(url); + const response = await fetch(url, { + headers: { + 'User-Agent': config.MODRINTH_USER_AGENT, + }, + }); if (!response.ok) { const errorText = await response.text(); @@ -89,7 +94,11 @@ export async function getUsers(userIds) { for (const chunk of chunks) { try { const url = `${config.MODRINTH_USERS_ENDPOINT}?ids=${encodeURIComponent(JSON.stringify(chunk))}`; - const response = await fetch(url); + const response = await fetch(url, { + headers: { + 'User-Agent': config.MODRINTH_USER_AGENT, + }, + }); if (!response.ok) { const errorText = await response.text(); @@ -114,7 +123,11 @@ export async function getUsers(userIds) { export async function getMinecraftVersions() { try { const url = config.MODRINTH_MINECRAFT_VERSIONS_ENDPOINT; - const response = await fetch(url); + const response = await fetch(url, { + headers: { + 'User-Agent': config.MODRINTH_USER_AGENT, + }, + }); if (!response.ok) { const errorText = await response.text(); throw new Error(`Modrinth API error (${response.status}): ${errorText}`); @@ -144,7 +157,11 @@ export async function getMinecraftVersions() { export async function getModloaders() { try { const url = config.MODRINTH_MODLOADERS_ENDPOINT; - const response = await fetch(url); + const response = await fetch(url, { + headers: { + 'User-Agent': config.MODRINTH_USER_AGENT, + }, + }); if (!response.ok) { const errorText = await response.text(); throw new Error(`Modrinth API error (${response.status}): ${errorText}`); From bb08fbfe08d25cd3d1d8701ed80510762a9f38a7 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 02:58:44 -0500 Subject: [PATCH 5/8] added github user agent and accepts fields --- package.json | 2 +- src/config/api.js | 9 ++++++--- src/github_interactions.js | 16 ++++++++++++++-- src/modrinth_interactions.js | 10 +++++----- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index c90f0a1..c9bb370 100644 --- a/package.json +++ b/package.json @@ -11,7 +11,7 @@ }, "homepage": "https://nickesc.github.io/modpack-lock", "license": "MIT", - "author": "N. Escobar (https://nickesc.github.io/)", + "author": "N. Escobar (https://nickesc.github.io/)", "type": "module", "main": "src/modpack-lock.js", "bin": { diff --git a/src/config/api.js b/src/config/api.js index 9d17bfc..b1a4da9 100644 --- a/src/config/api.js +++ b/src/config/api.js @@ -1,6 +1,9 @@ import pkg from '../../package.json' with { type: 'json' }; import * as constants from './constants.js'; +/** User-Agent header for Modrinth API requests */ +export const PACKAGE_USER_AGENT = `${constants.AUTHOR_USERNAME}/${pkg.name}/${pkg.version}`; + /** Modrinth API base URL */ export const MODRINTH_API_BASE = 'https://api.modrinth.com/v2'; @@ -19,9 +22,6 @@ export const MODRINTH_MINECRAFT_VERSIONS_ENDPOINT = `${MODRINTH_API_BASE}/tag/ga /** Modrinth Modloaders endpoint */ export const MODRINTH_MODLOADERS_ENDPOINT = `${MODRINTH_API_BASE}/tag/loader`; -/** User-Agent header for Modrinth API requests */ -export const MODRINTH_USER_AGENT = `${constants.AUTHOR_USERNAME}/${pkg.name}/${pkg.version}`; - /** Batch size for Modrinth API requests */ export const BATCH_SIZE = 100; @@ -36,3 +36,6 @@ export const GITHUB_FEATURED_LICENSES_ENDPOINT = `${GITHUB_LICENSES_ENDPOINT}?fe /** GitHub license endpoint */ export const GITHUB_LICENSE_ENDPOINT = (license) => `${GITHUB_API_BASE}/licenses/${license}`; + +/** GitHub Accept request header */ +export const GITHUB_ACCEPT_HEADER = 'application/vnd.github+json'; diff --git a/src/github_interactions.js b/src/github_interactions.js index c0eaef1..7d0220c 100644 --- a/src/github_interactions.js +++ b/src/github_interactions.js @@ -9,7 +9,14 @@ import * as config from './config/index.js'; export async function getLicenseList(featured = false) { try { const url = featured ? config.GITHUB_FEATURED_LICENSES_ENDPOINT : config.GITHUB_LICENSES_ENDPOINT; - const response = await fetch(url); + const response = await fetch(url, + { + headers: { + 'Accept': config.GITHUB_ACCEPT_HEADER, + 'User-Agent': config.PACKAGE_USER_AGENT + } + } + ); if (!response.ok) { const errorText = await response.text(); throw new Error(`GitHub API error (${response.status}): ${errorText}`); @@ -50,7 +57,12 @@ export async function getLicenseText(spdxId) { } try { const url = config.GITHUB_LICENSE_ENDPOINT(spdxId.toLowerCase()); - const response = await fetch(url); + const response = await fetch(url, { + headers: { + 'Accept': config.GITHUB_ACCEPT_HEADER, + 'User-Agent': config.PACKAGE_USER_AGENT + }, + }); if (!response.ok) { const errorText = await response.text(); throw new Error(`GitHub API error (${response.status}): ${errorText}`); diff --git a/src/modrinth_interactions.js b/src/modrinth_interactions.js index f73ab43..053dfc4 100644 --- a/src/modrinth_interactions.js +++ b/src/modrinth_interactions.js @@ -24,7 +24,7 @@ export async function getVersionsFromHashes(hashes) { method: 'POST', headers: { 'Content-Type': 'application/json', - 'User-Agent': config.MODRINTH_USER_AGENT, + 'User-Agent': config.PACKAGE_USER_AGENT, }, body: JSON.stringify({ hashes: hashes, @@ -60,7 +60,7 @@ export async function getProjects(projectIds) { const url = `${config.MODRINTH_PROJECTS_ENDPOINT}?ids=${encodeURIComponent(JSON.stringify(chunk))}`; const response = await fetch(url, { headers: { - 'User-Agent': config.MODRINTH_USER_AGENT, + 'User-Agent': config.PACKAGE_USER_AGENT, }, }); @@ -96,7 +96,7 @@ export async function getUsers(userIds) { const url = `${config.MODRINTH_USERS_ENDPOINT}?ids=${encodeURIComponent(JSON.stringify(chunk))}`; const response = await fetch(url, { headers: { - 'User-Agent': config.MODRINTH_USER_AGENT, + 'User-Agent': config.PACKAGE_USER_AGENT, }, }); @@ -125,7 +125,7 @@ export async function getMinecraftVersions() { const url = config.MODRINTH_MINECRAFT_VERSIONS_ENDPOINT; const response = await fetch(url, { headers: { - 'User-Agent': config.MODRINTH_USER_AGENT, + 'User-Agent': config.PACKAGE_USER_AGENT, }, }); if (!response.ok) { @@ -159,7 +159,7 @@ export async function getModloaders() { const url = config.MODRINTH_MODLOADERS_ENDPOINT; const response = await fetch(url, { headers: { - 'User-Agent': config.MODRINTH_USER_AGENT, + 'User-Agent': config.PACKAGE_USER_AGENT, }, }); if (!response.ok) { From 5390e4b2b92905635b34d315db8531ef707dab73 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 02:59:39 -0500 Subject: [PATCH 6/8] adds tests for user agents --- test/modpack-lock.test.js | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/test/modpack-lock.test.js b/test/modpack-lock.test.js index 02f23c2..c80928e 100644 --- a/test/modpack-lock.test.js +++ b/test/modpack-lock.test.js @@ -19,6 +19,8 @@ import { getModpackInfo, getLockfile, } from '../src/modpack-lock.js'; +import * as config from '../src/config/index.js'; +import pkg from '../package.json' with { type: 'json' }; const execFileAsync = promisify(execFile); @@ -197,6 +199,43 @@ describe('Package API', () => { expect(fetchSpy).toHaveBeenCalled(); }); + it('sends correct User-Agent header in Modrinth API requests', async () => { + vi.clearAllMocks(); + + const expectedUserAgent = config.PACKAGE_USER_AGENT; + expect(expectedUserAgent).toMatch(`${config.AUTHOR_USERNAME}/${pkg.name}/${pkg.version}`); + + // Mock fetch + const mockFetch = vi.spyOn(global, 'fetch').mockImplementation((url, options) => { + // Verify User-Agent header is present for all requests + expect(options?.headers).toBeDefined(); + expect(options?.headers['User-Agent']).toBe(expectedUserAgent); + + // Return empty responses + return Promise.resolve({ + ok: true, + json: async () => (url.includes('/projects') ? [] : {}) + }); + }); + + // Test user agent in real functions + await generateLockfile(workspaceDir); + + const modpackInfo = { + name: 'Test Modpack', + version: '1.0.0', + id: 'test-modpack', + author: 'Test Author', + modloader: 'fabric', + targetMinecraftVersion: '1.21.1', + }; + await generateJson(modpackInfo, lockfile, workspaceDir); + + await generateLicense(modpackInfo, workspaceDir); + + vi.restoreAllMocks(); + }); + it('returns valid version objects for files found on Modrinth', async () => { const allEntries = Object.values(lockfile.dependencies).flat(); From 3d922aa9f082593e4166e1c8dcd8c2149826dea4 Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sat, 24 Jan 2026 23:58:33 -0500 Subject: [PATCH 7/8] bumped version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c9bb370..5c74a3f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "modpack-lock", - "version": "0.5.0", + "version": "0.5.1", "description": "Creates a modpack lockfile for files hosted on Modrinth (mods, resource packs, shaders and datapacks)", "bugs": { "url": "https://github.com/nickesc/modpack-lock/issues" From 565dbd06f64ebd05904f9ed26f9f14775841e78b Mon Sep 17 00:00:00 2001 From: "N. Escobar" Date: Sun, 25 Jan 2026 00:04:56 -0500 Subject: [PATCH 8/8] updated docs --- docs/functions/generateGitignoreRules.html | 2 +- docs/functions/generateJson.html | 2 +- docs/functions/generateLicense.html | 2 +- docs/functions/generateLockfile.html | 2 +- docs/functions/generateModpackFiles.html | 2 +- docs/functions/generateReadmeFiles.html | 2 +- docs/functions/getLockfile.html | 2 +- docs/functions/getModpackInfo.html | 2 +- docs/functions/promptUserForInfo.html | 2 +- docs/index.html | 4 +-- docs/interfaces/InitOptions.html | 36 +++++++++++----------- docs/interfaces/Lockfile.html | 12 ++++---- docs/interfaces/ModpackInfo.html | 24 +++++++-------- docs/interfaces/Options.html | 12 ++++---- docs/sitemap.xml | 32 +++++++++---------- 15 files changed, 69 insertions(+), 69 deletions(-) diff --git a/docs/functions/generateGitignoreRules.html b/docs/functions/generateGitignoreRules.html index 3635ae9..c53094d 100644 --- a/docs/functions/generateGitignoreRules.html +++ b/docs/functions/generateGitignoreRules.html @@ -2,4 +2,4 @@

Parameters

  • lockfile: Lockfile

    The lockfile object

  • workingDir: string

    The working directory

  • options: Options | InitOptions = {}

    The options object

    -

Returns Promise<void>

+

Returns Promise<void>

diff --git a/docs/functions/generateJson.html b/docs/functions/generateJson.html index 9891f94..973fb53 100644 --- a/docs/functions/generateJson.html +++ b/docs/functions/generateJson.html @@ -4,4 +4,4 @@
  • outputDir: string

    The path to write the JSON object to

  • options: Options | InitOptions = {}

    The options object

  • Returns Promise<Lockfile>

    The JSON file's object

    -
    +
    diff --git a/docs/functions/generateLicense.html b/docs/functions/generateLicense.html index bf3de1b..1d50cdd 100644 --- a/docs/functions/generateLicense.html +++ b/docs/functions/generateLicense.html @@ -4,4 +4,4 @@
  • options: InitOptions = {}

    The initialization options object

  • licenseTextOverride: string = null

    The license text to override the default license text with

  • Returns Promise<string>

    The license text or null if the license text could not be generated

    -
    +
    diff --git a/docs/functions/generateLockfile.html b/docs/functions/generateLockfile.html index 4db1dc9..39870e6 100644 --- a/docs/functions/generateLockfile.html +++ b/docs/functions/generateLockfile.html @@ -2,4 +2,4 @@

    Parameters

    • workingDir: string

      The working directory

    • options: Options = {}

      The options object

    Returns Lockfile

    The lockfile object

    -
    +
    diff --git a/docs/functions/generateModpackFiles.html b/docs/functions/generateModpackFiles.html index cc53284..64a1419 100644 --- a/docs/functions/generateModpackFiles.html +++ b/docs/functions/generateModpackFiles.html @@ -3,4 +3,4 @@
  • directory: string

    The directory to generate the files in

  • options: Options | InitOptions = {}

    The options object

  • Returns Promise<Lockfile>

    The lockfile object

    -
    +
    diff --git a/docs/functions/generateReadmeFiles.html b/docs/functions/generateReadmeFiles.html index 7ff2107..4b2faa0 100644 --- a/docs/functions/generateReadmeFiles.html +++ b/docs/functions/generateReadmeFiles.html @@ -2,4 +2,4 @@

    Parameters

    • lockfile: Lockfile

      The lockfile object

    • workingDir: string

      The working directory

    • options: Options | InitOptions = {}

      The options object

      -

    Returns Promise<void>

    +

    Returns Promise<void>

    diff --git a/docs/functions/getLockfile.html b/docs/functions/getLockfile.html index 6824919..bdfc373 100644 --- a/docs/functions/getLockfile.html +++ b/docs/functions/getLockfile.html @@ -1,4 +1,4 @@ getLockfile | modpack-lock
    modpack-lock
      Preparing search index...

      Function getLockfile

      • Get the lockfile file if it exists

        Parameters

        • directoryPath: string

          The path to the directory to scan

        Returns Lockfile

        The JSON object if the file exists, otherwise null

        -
      +
      diff --git a/docs/functions/getModpackInfo.html b/docs/functions/getModpackInfo.html index 3940b46..ec21e5d 100644 --- a/docs/functions/getModpackInfo.html +++ b/docs/functions/getModpackInfo.html @@ -1,4 +1,4 @@ getModpackInfo | modpack-lock
      modpack-lock
        Preparing search index...

        Function getModpackInfo

        • Get the modpack info from the JSON file if it exists

          Parameters

          • directoryPath: string

            The path to the directory to scan

          Returns Promise<ModpackInfo>

          The modpack info JSON object if the file exists, otherwise null

          -
        +
        diff --git a/docs/functions/promptUserForInfo.html b/docs/functions/promptUserForInfo.html index a239a6c..7b2b8ef 100644 --- a/docs/functions/promptUserForInfo.html +++ b/docs/functions/promptUserForInfo.html @@ -1,4 +1,4 @@ promptUserForInfo | modpack-lock
        modpack-lock
          Preparing search index...

          Function promptUserForInfo

          +
          diff --git a/docs/index.html b/docs/index.html index 6912341..5d1bbd9 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1,6 +1,6 @@ modpack-lock
          modpack-lock
            Preparing search index...

            modpack-lock

            NPM: npmjs.com/package/modpack-lock -Source: Github -Tests: github.com/nickesc/modpack-lock/actions/workflows/generateLockfile-tests.yml

            +Source: github.com/nickesc/modpack-lock +Tests: github.com/nickesc/modpack-lock/actions/workflows/modpack-lock-tests.yml

            modpack-lock

            Creates a modpack lockfile for files hosted on Modrinth (mods, resource packs, shaders and datapacks).

            diff --git a/docs/interfaces/InitOptions.html b/docs/interfaces/InitOptions.html index 59f4477..2e3575d 100644 --- a/docs/interfaces/InitOptions.html +++ b/docs/interfaces/InitOptions.html @@ -1,5 +1,5 @@ InitOptions | modpack-lock
            modpack-lock
              Preparing search index...

              Interface InitOptions

              Contains options for the initialization of the modpack files.

              -
              interface InitOptions {
                  folder: string;
                  noninteractive: boolean;
                  addLicense: boolean;
                  gitignore: boolean;
                  readme: boolean;
                  name: string;
                  version: string;
                  id: string;
                  description: string;
                  author: string;
                  projectUrl: string;
                  sourceUrl: string;
                  license: string;
                  modloader: string;
                  targetModloaderVersion: string;
                  targetMinecraftVersion: string;
                  _init: boolean;
              }
              Index

              Properties

              interface InitOptions {
                  folder: string;
                  noninteractive: boolean;
                  addLicense: boolean;
                  gitignore: boolean;
                  readme: boolean;
                  name: string;
                  version: string;
                  id: string;
                  description: string;
                  author: string;
                  projectUrl: string;
                  sourceUrl: string;
                  license: string;
                  modloader: string;
                  targetModloaderVersion: string;
                  targetMinecraftVersion: string;
                  _init: boolean;
              }
              Index

              Properties

              folder: string

              The folder to generate the modpack files in

              -
              noninteractive: boolean

              Whether to run the interactive mode

              -
              addLicense: boolean

              Whether to add the license file to the modpack

              -
              gitignore: boolean

              Whether to generate .gitignore rules

              -
              readme: boolean

              Whether to generate README.md files

              -
              name: string

              The name of the modpack

              -
              version: string

              The version of the modpack

              -
              id: string

              The slug/ID of the modpack

              -
              description: string

              The description of the modpack

              -
              author: string

              The author of the modpack

              -
              projectUrl: string

              The modpack's project URL

              -
              sourceUrl: string

              The modpack's source code URL

              -
              license: string

              The modpack's license

              -
              modloader: string

              The modpack's modloader

              -
              targetModloaderVersion: string

              The target modloader version

              -
              targetMinecraftVersion: string

              The target Minecraft version

              -
              _init: boolean

              Internal boolean added to indicate options come from the init command.

              -
              +
              noninteractive: boolean

              Whether to run the interactive mode

              +
              addLicense: boolean

              Whether to add the license file to the modpack

              +
              gitignore: boolean

              Whether to generate .gitignore rules

              +
              readme: boolean

              Whether to generate README.md files

              +
              name: string

              The name of the modpack

              +
              version: string

              The version of the modpack

              +
              id: string

              The slug/ID of the modpack

              +
              description: string

              The description of the modpack

              +
              author: string

              The author of the modpack

              +
              projectUrl: string

              The modpack's project URL

              +
              sourceUrl: string

              The modpack's source code URL

              +
              license: string

              The modpack's license

              +
              modloader: string

              The modpack's modloader

              +
              targetModloaderVersion: string

              The target modloader version

              +
              targetMinecraftVersion: string

              The target Minecraft version

              +
              _init: boolean

              Internal boolean added to indicate options come from the init command.

              +
              diff --git a/docs/interfaces/Lockfile.html b/docs/interfaces/Lockfile.html index ae0af86..d979045 100644 --- a/docs/interfaces/Lockfile.html +++ b/docs/interfaces/Lockfile.html @@ -1,20 +1,20 @@ Lockfile | modpack-lock
              modpack-lock
                Preparing search index...

                Interface Lockfile

                Contains information about the modpack dependencies and their versions.

                -
                interface Lockfile {
                    version: string;
                    generated: string;
                    total: number;
                    counts: {
                        mods: number;
                        resourcepacks: number;
                        datapacks: number;
                        shaderpacks: number;
                    };
                    dependencies: {
                        mods: any[];
                        resourcepacks: any[];
                        datapacks: any[];
                        shaderpacks: any[];
                    };
                }
                Index

                Properties

                interface Lockfile {
                    version: string;
                    generated: string;
                    total: number;
                    counts: {
                        mods: number;
                        resourcepacks: number;
                        datapacks: number;
                        shaderpacks: number;
                    };
                    dependencies: {
                        mods: any[];
                        resourcepacks: any[];
                        datapacks: any[];
                        shaderpacks: any[];
                    };
                }
                Index

                Properties

                version: string

                The version of the modpack

                -
                generated: string

                The date and time the lockfile was generated

                -
                total: number

                The total number of files in the modpack

                -
                counts: {
                    mods: number;
                    resourcepacks: number;
                    datapacks: number;
                    shaderpacks: number;
                }

                The counts object

                +
                generated: string

                The date and time the lockfile was generated

                +
                total: number

                The total number of files in the modpack

                +
                counts: {
                    mods: number;
                    resourcepacks: number;
                    datapacks: number;
                    shaderpacks: number;
                }

                The counts object

                Type Declaration

                • mods: number

                  The mods count

                • resourcepacks: number

                  The resourcepacks count

                • datapacks: number

                  The datapacks count

                • shaderpacks: number

                  The shaderpacks count

                  -
                dependencies: {
                    mods: any[];
                    resourcepacks: any[];
                    datapacks: any[];
                    shaderpacks: any[];
                }

                The dependencies object

                +
                dependencies: {
                    mods: any[];
                    resourcepacks: any[];
                    datapacks: any[];
                    shaderpacks: any[];
                }

                The dependencies object

                Type Declaration

                • mods: any[]

                  The mods object

                • resourcepacks: any[]

                  The resourcepacks object

                • datapacks: any[]

                  The datapacks object

                • shaderpacks: any[]

                  The shaderpacks object

                  -
                +
                diff --git a/docs/interfaces/ModpackInfo.html b/docs/interfaces/ModpackInfo.html index 19a6cef..f4cb447 100644 --- a/docs/interfaces/ModpackInfo.html +++ b/docs/interfaces/ModpackInfo.html @@ -1,5 +1,5 @@ ModpackInfo | modpack-lock
                modpack-lock
                  Preparing search index...

                  Interface ModpackInfo

                  Contains information about the modpack that is not dependent on the lockfile.

                  -
                  interface ModpackInfo {
                      name: string;
                      version: string;
                      description: string;
                      id: string;
                      author: string;
                      projectUrl: string;
                      sourceUrl: string;
                      license: string;
                      modloader: string;
                      targetModloaderVersion: string;
                      targetMinecraftVersion: string;
                  }
                  Index

                  Properties

                  interface ModpackInfo {
                      name: string;
                      version: string;
                      description: string;
                      id: string;
                      author: string;
                      projectUrl: string;
                      sourceUrl: string;
                      license: string;
                      modloader: string;
                      targetModloaderVersion: string;
                      targetMinecraftVersion: string;
                  }
                  Index

                  Properties

                  name: string

                  The name of the modpack (Required)

                  -
                  version: string

                  The version of the modpack (Required)

                  -
                  description: string

                  The description of the modpack

                  -
                  id: string

                  The slug/ID of the modpack (Required)

                  -
                  author: string

                  The author of the modpack (Required)

                  -
                  projectUrl: string

                  The project URL of the modpack

                  -
                  sourceUrl: string

                  The source code URL of the modpack

                  -
                  license: string

                  The license of the modpack

                  -
                  modloader: string

                  The modloader of the modpack (Required)

                  -
                  targetModloaderVersion: string

                  The target modloader version of the modpack

                  -
                  targetMinecraftVersion: string

                  The target Minecraft version of the modpack (Required)

                  -
                  +
                  version: string

                  The version of the modpack (Required)

                  +
                  description: string

                  The description of the modpack

                  +
                  id: string

                  The slug/ID of the modpack (Required)

                  +
                  author: string

                  The author of the modpack (Required)

                  +
                  projectUrl: string

                  The project URL of the modpack

                  +
                  sourceUrl: string

                  The source code URL of the modpack

                  +
                  license: string

                  The license of the modpack

                  +
                  modloader: string

                  The modloader of the modpack (Required)

                  +
                  targetModloaderVersion: string

                  The target modloader version of the modpack

                  +
                  targetMinecraftVersion: string

                  The target Minecraft version of the modpack (Required)

                  +
                  diff --git a/docs/interfaces/Options.html b/docs/interfaces/Options.html index c3c4ef7..4db71c6 100644 --- a/docs/interfaces/Options.html +++ b/docs/interfaces/Options.html @@ -1,12 +1,12 @@ Options | modpack-lock
                  modpack-lock
                    Preparing search index...

                    Interface Options

                    Contains options for the generation of the modpack files.

                    -
                    interface Options {
                        dryRun: boolean;
                        quiet: boolean;
                        silent: boolean;
                        gitignore: boolean;
                        readme: boolean;
                    }
                    Index

                    Properties

                    interface Options {
                        dryRun: boolean;
                        quiet: boolean;
                        silent: boolean;
                        gitignore: boolean;
                        readme: boolean;
                    }
                    Index

                    Properties

                    dryRun: boolean

                    Whether to dry run the generation

                    -
                    quiet: boolean

                    Whether to quiet the console output

                    -
                    silent: boolean

                    Whether to silent the console output

                    -
                    gitignore: boolean

                    Whether to generate a .gitignore file

                    -
                    readme: boolean

                    Whether to generate README.md files

                    -
                    +
                    quiet: boolean

                    Whether to quiet the console output

                    +
                    silent: boolean

                    Whether to silent the console output

                    +
                    gitignore: boolean

                    Whether to generate a .gitignore file

                    +
                    readme: boolean

                    Whether to generate README.md files

                    +
                    diff --git a/docs/sitemap.xml b/docs/sitemap.xml index 36e4e01..afa1f22 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -2,66 +2,66 @@ https://nickesc.github.io/modpack-lock/index.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/modules.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/hierarchy.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/interfaces/ModpackInfo.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/interfaces/Lockfile.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/interfaces/Options.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/interfaces/InitOptions.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/getModpackInfo.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/getLockfile.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateJson.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateLicense.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateGitignoreRules.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateReadmeFiles.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateLockfile.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/generateModpackFiles.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z https://nickesc.github.io/modpack-lock/functions/promptUserForInfo.html - 2026-01-18T17:26:34.070Z + 2026-01-25T05:04:46.752Z