@lizardbyte/contribkit 2025.316.4339 → 2025.327.11019
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/chunks/index.mjs
CHANGED
package/dist/cli.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
|
|
2
|
-
export {
|
|
2
|
+
export { };
|
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.
|
|
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.ClLqkpuL.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';
|
|
@@ -9,9 +9,9 @@ import { consola } from 'consola';
|
|
|
9
9
|
import { Buffer } from 'node:buffer';
|
|
10
10
|
import 'unconfig';
|
|
11
11
|
import 'dotenv';
|
|
12
|
+
import 'node:crypto';
|
|
12
13
|
import 'ofetch';
|
|
13
14
|
import 'sharp';
|
|
14
|
-
import 'node:crypto';
|
|
15
15
|
import '@crowdin/crowdin-api-client';
|
|
16
16
|
|
|
17
17
|
function notNullish(v) {
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Buffer as Buffer$1 } from 'node:buffer';
|
|
2
|
-
import
|
|
2
|
+
import { consola } from 'consola';
|
|
3
3
|
|
|
4
4
|
declare function genSvgImage(x: number, y: number, size: number, radius: number, base64Image: string, imageFormat: ImageFormat): string;
|
|
5
5
|
declare function generateBadge(x: number, y: number, sponsor: Sponsor, preset: BadgePreset, radius: number, imageFormat: ImageFormat): Promise<string>;
|
|
@@ -564,4 +564,5 @@ declare function guessProviders(config: ContribkitConfig): ProviderName[];
|
|
|
564
564
|
declare function resolveProviders(names: (ProviderName | Provider)[]): Provider[];
|
|
565
565
|
declare function fetchSponsors(config: ContribkitConfig): Promise<Sponsorship[]>;
|
|
566
566
|
|
|
567
|
-
export {
|
|
567
|
+
export { FALLBACK_AVATAR, GitHubProvider, ProvidersMap, SvgComposer, defaultConfig, defaultInlineCSS, defaultTiers, defineConfig, fetchGitHubSponsors, fetchSponsors, genSvgImage, generateBadge, guessProviders, loadConfig, makeQuery, outputFormats, partitionTiers, presets, resizeImage, resolveAvatars, resolveProviders, svgToPng, svgToWebp, tierPresets };
|
|
568
|
+
export type { BadgePreset, CircleRenderOptions, ContribkitConfig, ContribkitMainConfig, ContribkitRenderOptions, ContribkitRenderer, GitHubAccountType, ImageFormat, OutputFormat, Provider, ProviderName, ProvidersConfig, Sponsor, SponsorMatcher, Sponsorship, Tier, TierPartition };
|
package/dist/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
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.
|
|
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.ClLqkpuL.mjs';
|
|
2
2
|
import 'unconfig';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'dotenv';
|
|
5
|
+
import 'node:crypto';
|
|
5
6
|
import 'node:buffer';
|
|
6
7
|
import 'consola';
|
|
7
8
|
import 'ofetch';
|
|
8
9
|
import 'sharp';
|
|
9
|
-
import 'node:crypto';
|
|
10
10
|
import '@crowdin/crowdin-api-client';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { loadConfig as loadConfig$1 } from 'unconfig';
|
|
2
2
|
import process from 'node:process';
|
|
3
3
|
import dotenv from 'dotenv';
|
|
4
|
+
import crypto, { createHash } from 'node:crypto';
|
|
4
5
|
import { Buffer } from 'node:buffer';
|
|
5
6
|
import { consola } from 'consola';
|
|
6
7
|
import { $fetch, ofetch } from 'ofetch';
|
|
7
8
|
import sharp from 'sharp';
|
|
8
|
-
import { createHash } from 'node:crypto';
|
|
9
9
|
import { ProjectsGroups, Reports } from '@crowdin/crowdin-api-client';
|
|
10
10
|
|
|
11
11
|
const none = {
|
|
@@ -201,7 +201,7 @@ function loadEnv() {
|
|
|
201
201
|
return JSON.parse(JSON.stringify(config));
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
-
const version = "2025.
|
|
204
|
+
const version = "2025.327.11019";
|
|
205
205
|
|
|
206
206
|
async function fetchImage(url) {
|
|
207
207
|
const arrayBuffer = await $fetch(url, {
|
|
@@ -344,9 +344,8 @@ function partitionTiers(sponsors, tiers, includePastSponsors) {
|
|
|
344
344
|
return tierMappings;
|
|
345
345
|
}
|
|
346
346
|
|
|
347
|
-
let id = 0;
|
|
348
347
|
function genSvgImage(x, y, size, radius, base64Image, imageFormat) {
|
|
349
|
-
const cropId = `c${
|
|
348
|
+
const cropId = `c${crypto.createHash("md5").update(base64Image).digest("hex").slice(0, 6)}`;
|
|
350
349
|
return `
|
|
351
350
|
<clipPath id="${cropId}">
|
|
352
351
|
<rect x="${x}" y="${y}" width="${size}" height="${size}" rx="${size * radius}" ry="${size * radius}" />
|
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.
|
|
8
|
+
"version": "2025.327.11019",
|
|
9
9
|
"description": "Toolkit for generating contributor images",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"funding": "https://app.lizardbyte.dev",
|