@lizardbyte/contribkit 2025.716.3440 → 2025.819.235650
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.
|
|
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.ClXJiRzt.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.d.mts
CHANGED
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.
|
|
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.ClXJiRzt.mjs';
|
|
2
2
|
import 'unconfig';
|
|
3
3
|
import 'node:process';
|
|
4
4
|
import 'dotenv';
|
|
@@ -171,7 +171,7 @@ function loadEnv() {
|
|
|
171
171
|
afdian: {
|
|
172
172
|
userId: process.env.CONTRIBKIT_AFDIAN_USER_ID || process.env.AFDIAN_USER_ID,
|
|
173
173
|
token: process.env.CONTRIBKIT_AFDIAN_TOKEN || process.env.AFDIAN_TOKEN,
|
|
174
|
-
|
|
174
|
+
exchangeRate: Number.parseFloat(process.env.CONTRIBKIT_AFDIAN_EXCHANGE_RATE || process.env.AFDIAN_EXCHANGE_RATE || "0") || void 0
|
|
175
175
|
},
|
|
176
176
|
polar: {
|
|
177
177
|
token: process.env.CONTRIBKIT_POLAR_TOKEN || process.env.POLAR_TOKEN,
|
|
@@ -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.819.235650";
|
|
205
205
|
|
|
206
206
|
async function fetchImage(url) {
|
|
207
207
|
const arrayBuffer = await $fetch(url, {
|
|
@@ -440,7 +440,7 @@ async function fetchAfdianSponsors(options = {}) {
|
|
|
440
440
|
const {
|
|
441
441
|
userId,
|
|
442
442
|
token,
|
|
443
|
-
|
|
443
|
+
exchangeRate = 6.5,
|
|
444
444
|
includePurchases = true,
|
|
445
445
|
purchaseEffectivity = 30
|
|
446
446
|
} = options;
|
|
@@ -508,7 +508,7 @@ async function fetchAfdianSponsors(options = {}) {
|
|
|
508
508
|
linkUrl: `https://afdian.com/u/${raw.user.user_id}`
|
|
509
509
|
},
|
|
510
510
|
// all_sum_amount is based on cny
|
|
511
|
-
monthlyDollars: isExpired ? -1 : Number.parseFloat(raw.
|
|
511
|
+
monthlyDollars: isExpired ? -1 : Number.parseFloat(raw.current_plan.show_price) / exchangeRate,
|
|
512
512
|
privacyLevel: "PUBLIC",
|
|
513
513
|
tierName: "Afdian",
|
|
514
514
|
createdAt: new Date(raw.first_pay_time * 1e3).toISOString(),
|
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.819.235650",
|
|
9
9
|
"description": "Toolkit for generating contributor images",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"funding": "https://app.lizardbyte.dev",
|