@adonisjs/content 1.5.0 → 1.6.0

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.
@@ -11,15 +11,16 @@ import { dirname } from "path";
11
11
  async function fetchAllSponsors({
12
12
  login,
13
13
  isOrg,
14
- ghToken
14
+ ghToken,
15
+ includeInactive
15
16
  }) {
16
17
  let hasNext = true;
17
18
  let cursor = null;
18
19
  const allSponsors = [];
19
20
  const query = `
20
- query($login: String!, $cursor: String) {
21
+ query($login: String!, $cursor: String, $activeOnly: Boolean) {
21
22
  ${isOrg ? `organization(login: $login)` : `user(login: $login)`} {
22
- sponsorshipsAsMaintainer(first: 100, after: $cursor) {
23
+ sponsorshipsAsMaintainer(first: 100, after: $cursor, activeOnly: $activeOnly) {
23
24
  nodes {
24
25
  id
25
26
  createdAt
@@ -60,7 +61,8 @@ async function fetchAllSponsors({
60
61
  authorization: `token ${ghToken}`
61
62
  },
62
63
  login,
63
- cursor
64
+ cursor,
65
+ activeOnly: includeInactive === true ? false : true
64
66
  });
65
67
  const root = isOrg ? data.organization : data.user;
66
68
  if (!root) {
@@ -75,6 +77,7 @@ async function fetchAllSponsors({
75
77
  allSponsors.push({
76
78
  id: node.id,
77
79
  createdAt: node.createdAt,
80
+ isActive: node.isActive,
78
81
  privacyLevel: node.privacyLevel,
79
82
  tierName: node.tier?.name ?? null,
80
83
  tierMonthlyPriceInCents: node.tier?.monthlyPriceInCents ?? null,
package/build/index.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-Q6QIMTOW.js";
4
4
  import {
5
5
  createCache
6
- } from "./chunk-WO5VTK7D.js";
6
+ } from "./chunk-7MAXCXCX.js";
7
7
  import "./chunk-LB6JFRVG.js";
8
8
 
9
9
  // configure.ts
@@ -6,7 +6,7 @@ import {
6
6
  fetchContributorsForOrg,
7
7
  fetchReleases,
8
8
  mergeArrays
9
- } from "../../chunk-WO5VTK7D.js";
9
+ } from "../../chunk-7MAXCXCX.js";
10
10
  import {
11
11
  debug_default
12
12
  } from "../../chunk-LB6JFRVG.js";
@@ -137,6 +137,7 @@ export type GithubReleasesOptions = {
137
137
  export type GithubSponsor = {
138
138
  /** Unique identifier for the sponsorship */
139
139
  id: string;
140
+ isActive: boolean;
140
141
  /** ISO 8601 timestamp when the sponsorship was created */
141
142
  createdAt: string;
142
143
  /** Privacy level of the sponsorship (PUBLIC, PRIVATE, etc.) */
@@ -173,6 +174,7 @@ export type GithubSponsor = {
173
174
  export type GithubSponsorsOptions = {
174
175
  /** GitHub username or organization name */
175
176
  login: string;
177
+ includeInactive?: boolean;
176
178
  /** Whether the login is an organization (true) or user (false) */
177
179
  isOrg: boolean;
178
180
  /** GitHub personal access token for authentication */
@@ -14,7 +14,7 @@ import { type GithubSponsor, type GithubReleasesOptions, type GithubReleaseWithR
14
14
  * })
15
15
  * ```
16
16
  */
17
- export declare function fetchAllSponsors({ login, isOrg, ghToken, }: GithubSponsorsOptions): Promise<GithubSponsor[]>;
17
+ export declare function fetchAllSponsors({ login, isOrg, ghToken, includeInactive, }: GithubSponsorsOptions): Promise<GithubSponsor[]>;
18
18
  /**
19
19
  * Fetches all releases from public repositories of a GitHub organization.
20
20
  * Handles pagination and supports filtering releases by name patterns.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@adonisjs/content",
3
3
  "description": "Content management for AdonisJS with schema validation, GitHub loaders, and custom queries",
4
- "version": "1.5.0",
4
+ "version": "1.6.0",
5
5
  "engines": {
6
6
  "node": ">=24.0.0"
7
7
  },