@stats-forge/github-stats-forge-cli 0.2.0 → 0.3.1

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/build/cards.d.ts CHANGED
@@ -32,6 +32,8 @@ export interface CardKind {
32
32
  /** @returns The rendered card, or the rendered error. */
33
33
  render: (query: Record<string, string>, config: CardConfig) => Promise<ApiResult>;
34
34
  }
35
+ /** Colors and the theme, which every card accepts. */
36
+ export declare const COMMON_OPTIONS: ReadonlyArray<CardOption>;
35
37
  /** Every card, with the options every card shares appended to its own. */
36
38
  export declare const cards: ReadonlyArray<CardKind>;
37
39
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"cards.d.ts","sourceRoot":"","sources":["../src/cards.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,0CAA0C,CAAC;AAEtF;;;;;GAKG;AAEH,iFAAiF;AACjF,KAAK,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,CAAC;AAEpE,6BAA6B;AAC7B,MAAM,WAAW,UAAU;IACzB,4CAA4C;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,4BAA4B;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,UAAU,CAAC;IACjB,wFAAwF;IACxF,OAAO,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;IAChC,iEAAiE;IACjE,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,gEAAgE;AAChE,MAAM,WAAW,QAAQ;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,UAAU,EAAE,OAAO,CAAC;IACpB,0DAA0D;IAC1D,QAAQ,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACpC,+CAA+C;IAC/C,OAAO,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC;IACnC,yD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AK,OAAO,CAAC,SAAS,CAAC,CAAC;CACnF;AAID,sDAAsD;AACtD,eAAO,MAAM,cAAc,EAAE,aAAa,CAAC,UAAU,CA8BpD,CAAC;AA8VF,0EAA0E;AAC1E,eAAO,MAAM,KAAK,EAAE,aAAa,CAAC,QAAQ,CAGvC,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,QAAQ,OAAQ,MAAM,KAAG,QAAQ,GAAG,SAAiD,CAAC"}
package/build/cards.js CHANGED
@@ -1,7 +1,7 @@
1
- import { contributedTo, gist, pin, stats, themes, topLangs, wakatime, } from '@stats-forge/github-stats-forge-core/api';
1
+ import { contributedTo, gist, org, pin, stats, themes, topLangs, wakatime, } from '@stats-forge/github-stats-forge-core/api';
2
2
  const THEME_NAMES = Object.keys(themes);
3
3
  /** Colors and the theme, which every card accepts. */
4
- const COMMON_OPTIONS = [
4
+ export const COMMON_OPTIONS = [
5
5
  {
6
6
  name: 'theme',
7
7
  label: 'Theme',
@@ -235,6 +235,50 @@ const CARDS = [
235
235
  ],
236
236
  render: pin,
237
237
  },
238
+ {
239
+ id: 'org',
240
+ label: 'Organization — an organization and the totals of its public repositories',
241
+ needsToken: true,
242
+ required: [{ name: 'org', label: 'GitHub organization', kind: 'text' }],
243
+ options: [
244
+ {
245
+ name: 'show',
246
+ label: 'Extra stats to show',
247
+ kind: 'list',
248
+ choices: org.OPTIONS.show,
249
+ },
250
+ {
251
+ name: 'hide',
252
+ label: 'Stats to hide',
253
+ kind: 'list',
254
+ choices: org.OPTIONS.hide,
255
+ },
256
+ { name: 'show_icons', label: 'Show the stat icons', kind: 'boolean' },
257
+ {
258
+ name: 'hide_description',
259
+ label: "Hide the organization's description",
260
+ kind: 'boolean',
261
+ },
262
+ { name: 'custom_title', label: 'Card title', kind: 'text' },
263
+ { name: 'hide_title', label: 'Hide the title', kind: 'boolean' },
264
+ { name: 'card_width', label: 'Card width', kind: 'number' },
265
+ { name: 'line_height', label: 'Line height', kind: 'number' },
266
+ { name: 'text_bold', label: 'Bold stat values', kind: 'boolean' },
267
+ {
268
+ name: 'number_format',
269
+ label: 'Number format',
270
+ kind: 'choice',
271
+ choices: org.OPTIONS.number_format,
272
+ },
273
+ {
274
+ name: 'disable_animations',
275
+ label: 'Disable the animations',
276
+ kind: 'boolean',
277
+ },
278
+ LOCALE_OPTION,
279
+ ],
280
+ render: org,
281
+ },
238
282
  {
239
283
  id: 'contributed-to',
240
284
  label: 'Contributed to — repositories you work on, ranked',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stats-forge/github-stats-forge-cli",
3
- "version": "0.2.0",
3
+ "version": "0.3.1",
4
4
  "description": "Render a GitHub stats card to a local SVG file, one prompt at a time",
5
5
  "keywords": [
6
6
  "cli",
@@ -34,6 +34,10 @@
34
34
  ".": {
35
35
  "@stats/source": "./src/index.ts",
36
36
  "default": "./build/index.js"
37
+ },
38
+ "./cards": {
39
+ "@stats/source": "./src/cards.ts",
40
+ "default": "./build/cards.js"
37
41
  }
38
42
  },
39
43
  "publishConfig": {
@@ -41,7 +45,7 @@
41
45
  },
42
46
  "dependencies": {
43
47
  "@inquirer/prompts": "8.7.0",
44
- "@stats-forge/github-stats-forge-core": "^0.2.0"
48
+ "@stats-forge/github-stats-forge-core": "^0.4.0"
45
49
  },
46
50
  "devDependencies": {
47
51
  "vitest": "4.1.11"
package/src/cards.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  contributedTo,
3
3
  gist,
4
+ org,
4
5
  pin,
5
6
  stats,
6
7
  themes,
@@ -49,7 +50,7 @@ export interface CardKind {
49
50
  const THEME_NAMES = Object.keys(themes);
50
51
 
51
52
  /** Colors and the theme, which every card accepts. */
52
- const COMMON_OPTIONS: ReadonlyArray<CardOption> = [
53
+ export const COMMON_OPTIONS: ReadonlyArray<CardOption> = [
53
54
  {
54
55
  name: 'theme',
55
56
  label: 'Theme',
@@ -286,6 +287,50 @@ const CARDS: ReadonlyArray<CardKind> = [
286
287
  ],
287
288
  render: pin,
288
289
  },
290
+ {
291
+ id: 'org',
292
+ label: 'Organization — an organization and the totals of its public repositories',
293
+ needsToken: true,
294
+ required: [{ name: 'org', label: 'GitHub organization', kind: 'text' }],
295
+ options: [
296
+ {
297
+ name: 'show',
298
+ label: 'Extra stats to show',
299
+ kind: 'list',
300
+ choices: org.OPTIONS.show,
301
+ },
302
+ {
303
+ name: 'hide',
304
+ label: 'Stats to hide',
305
+ kind: 'list',
306
+ choices: org.OPTIONS.hide,
307
+ },
308
+ { name: 'show_icons', label: 'Show the stat icons', kind: 'boolean' },
309
+ {
310
+ name: 'hide_description',
311
+ label: "Hide the organization's description",
312
+ kind: 'boolean',
313
+ },
314
+ { name: 'custom_title', label: 'Card title', kind: 'text' },
315
+ { name: 'hide_title', label: 'Hide the title', kind: 'boolean' },
316
+ { name: 'card_width', label: 'Card width', kind: 'number' },
317
+ { name: 'line_height', label: 'Line height', kind: 'number' },
318
+ { name: 'text_bold', label: 'Bold stat values', kind: 'boolean' },
319
+ {
320
+ name: 'number_format',
321
+ label: 'Number format',
322
+ kind: 'choice',
323
+ choices: org.OPTIONS.number_format,
324
+ },
325
+ {
326
+ name: 'disable_animations',
327
+ label: 'Disable the animations',
328
+ kind: 'boolean',
329
+ },
330
+ LOCALE_OPTION,
331
+ ],
332
+ render: org,
333
+ },
289
334
  {
290
335
  id: 'contributed-to',
291
336
  label: 'Contributed to — repositories you work on, ranked',