@lizardbyte/contribkit 2025.821.193159 → 2025.922.2626

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import cac from 'cac';
2
- import { S as SvgComposer, i as generateBadge, p as partitionTiers, t as tierPresets, v as version, l as loadConfig, k as resolveProviders, j as guessProviders, r as resolveAvatars, q as outputFormats, s as svgToPng, g as svgToWebp } from './shared/contribkit.C8dVxxYO.mjs';
2
+ import { S as SvgComposer, i as generateBadge, p as partitionTiers, t as tierPresets, v as version, l as loadConfig, k as resolveProviders, j as guessProviders, r as resolveAvatars, q as outputFormats, s as svgToPng, g as svgToWebp } from './shared/contribkit.DAlakhwL.mjs';
3
3
  import fs from 'node:fs';
4
4
  import fsp from 'node:fs/promises';
5
5
  import { resolve, dirname, relative, join } from 'node:path';
package/dist/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- export { F as FALLBACK_AVATAR, G as GitHubProvider, P as ProvidersMap, S as SvgComposer, c as defaultConfig, b as defaultInlineCSS, a as defaultTiers, d as defineConfig, n as fetchGitHubSponsors, m as fetchSponsors, h as genSvgImage, i as generateBadge, j as guessProviders, l as loadConfig, o as makeQuery, q as outputFormats, p as partitionTiers, e as presets, f as resizeImage, r as resolveAvatars, k as resolveProviders, s as svgToPng, g as svgToWebp, t as tierPresets } from './shared/contribkit.C8dVxxYO.mjs';
1
+ export { F as FALLBACK_AVATAR, G as GitHubProvider, P as ProvidersMap, S as SvgComposer, c as defaultConfig, b as defaultInlineCSS, a as defaultTiers, d as defineConfig, n as fetchGitHubSponsors, m as fetchSponsors, h as genSvgImage, i as generateBadge, j as guessProviders, l as loadConfig, o as makeQuery, q as outputFormats, p as partitionTiers, e as presets, f as resizeImage, r as resolveAvatars, k as resolveProviders, s as svgToPng, g as svgToWebp, t as tierPresets } from './shared/contribkit.DAlakhwL.mjs';
2
2
  import 'unconfig';
3
3
  import 'node:process';
4
4
  import 'dotenv';
@@ -201,7 +201,7 @@ function loadEnv() {
201
201
  return JSON.parse(JSON.stringify(config));
202
202
  }
203
203
 
204
- const version = "2025.821.193159";
204
+ const version = "2025.922.2626";
205
205
 
206
206
  async function fetchImage(url) {
207
207
  const arrayBuffer = await $fetch(url, {
@@ -675,6 +675,8 @@ function normalizeUrl$1(urlString, options) {
675
675
  removeDirectoryIndex: false,
676
676
  removeExplicitPort: false,
677
677
  sortQueryParameters: true,
678
+ removePath: false,
679
+ transformPath: false,
678
680
  ...options,
679
681
  };
680
682
 
@@ -786,6 +788,18 @@ function normalizeUrl$1(urlString, options) {
786
788
  }
787
789
  }
788
790
 
791
+ // Remove path
792
+ if (options.removePath) {
793
+ urlObject.pathname = '/';
794
+ }
795
+
796
+ // Transform path components
797
+ if (options.transformPath && typeof options.transformPath === 'function') {
798
+ const pathComponents = urlObject.pathname.split('/').filter(Boolean);
799
+ const newComponents = options.transformPath(pathComponents);
800
+ urlObject.pathname = newComponents?.length > 0 ? `/${newComponents.join('/')}` : '/';
801
+ }
802
+
789
803
  if (urlObject.hostname) {
790
804
  // Remove trailing dot
791
805
  urlObject.hostname = urlObject.hostname.replace(/\.$/, '');
@@ -826,12 +840,21 @@ function normalizeUrl$1(urlString, options) {
826
840
 
827
841
  // Sort query parameters
828
842
  if (options.sortQueryParameters) {
843
+ const originalSearch = urlObject.search;
829
844
  urlObject.searchParams.sort();
830
845
 
831
846
  // Calling `.sort()` encodes the search parameters, so we need to decode them again.
832
847
  try {
833
848
  urlObject.search = decodeURIComponent(urlObject.search);
834
849
  } catch {}
850
+
851
+ // Fix parameters that originally had no equals sign but got one added by URLSearchParams
852
+ const partsWithoutEquals = originalSearch.slice(1).split('&').filter(p => p && !p.includes('='));
853
+ for (const part of partsWithoutEquals) {
854
+ const decoded = decodeURIComponent(part);
855
+ // Only replace at word boundaries to avoid partial matches
856
+ urlObject.search = urlObject.search.replace(`?${decoded}=`, `?${decoded}`).replace(`&${decoded}=`, `&${decoded}`);
857
+ }
835
858
  }
836
859
 
837
860
  if (options.removeTrailingSlash) {
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/LizardByte/contribkit.git"
7
7
  },
8
- "version": "2025.821.193159",
8
+ "version": "2025.922.2626",
9
9
  "description": "Toolkit for generating contributor images",
10
10
  "license": "MIT",
11
11
  "funding": "https://app.lizardbyte.dev",