@foss.global/codefeed 1.9.0 → 1.10.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.
package/.smartconfig.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "githost": "code.foss.global",
6
6
  "gitscope": "foss.global",
7
7
  "gitrepo": "codefeed",
8
- "description": "The @foss.global/codefeed module is designed for generating feeds from Gitea repositories, enhancing development workflows by processing commit data and repository activities.",
8
+ "description": "The @foss.global/codefeed module generates commit/activity feeds from forge providers including Gitea and GitManager.",
9
9
  "npmPackagename": "@foss.global/codefeed",
10
10
  "license": "MIT",
11
11
  "projectDomain": "foss.global",
package/changelog.md ADDED
@@ -0,0 +1,168 @@
1
+ # Changelog
2
+
3
+ ## 2026-07-20 - 1.10.0
4
+
5
+ ### Features
6
+
7
+ - add a default-deny GitManager public read client (public-api)
8
+ - Map GitManager repositories, organizations, trees, files, commits, diffs, tags, releases, activity, and language summaries into the shared public request response models.
9
+ - Require an authoritative public-repository predicate unless all managed repositories are explicitly declared public.
10
+ - Bound query, commit, release, language scan, and concurrency work while validating repository, path, URL, and commit inputs.
11
+
12
+ ### Maintenance
13
+
14
+ - adopt `@foss.global/interfaces` 0.4 and `@foss.global/gitmanager` 0.4, publish the changelog, and update policy-eligible tooling versions (tooling)
15
+
16
+ ## 2026-06-23 - 1.9.0
17
+
18
+ ### Features
19
+
20
+ - add GitManager provider adapter (gitmanager-provider)
21
+ - Add CodeFeedGitManagerProvider for repositories, commits, tags, and changelog content from @foss.global/gitmanager.
22
+ - Export the provider options and completeness error for GitManager-backed feeds.
23
+ - Propagate provider completeness errors to avoid silently returning incomplete bounded listings.
24
+ - Document GitManager usage and add provider coverage tests.
25
+
26
+ ## 2026-06-23 - 1.8.0
27
+
28
+ ### Features
29
+
30
+ - add provider abstraction and shared interfaces integration
31
+ - Consume `@foss.global/interfaces` for the canonical codefeed commit result contract.
32
+ - Add `ICodeFeedProvider` for alternate read backends while preserving the default Gitea behavior.
33
+ - Lazy-load npm registry checks and migrate tests to deterministic `@git.zone/tstest` coverage.
34
+
35
+ ### Fixes
36
+
37
+ - migrate project metadata to smartconfig (tooling)
38
+ - migrate project metadata from npmextra.json to .smartconfig.json
39
+ - include .smartconfig.json in published package files instead of npmextra.json
40
+ - update development build tooling dependencies and Node.js type definitions
41
+ - remove unused TypeScript path configuration
42
+
43
+ ## 2025-09-14 - 1.7.2 - fix(core)
44
+ Stabilize pagination, tag mapping, changelog parsing, and HTTP retry/backoff; add tests and caching improvements
45
+
46
+ - Handle paginated orgs, repos, commits, and tags to avoid missing pages.
47
+ - Map tags to commit SHAs and extract version strings from tag names for changelog lookup and optional npm publish detection.
48
+ - Discover and parse repository CHANGELOG files from multiple candidate paths to extract per-version entries.
49
+ - Implement retries with exponential backoff for 429/5xx and network errors in fetchFunction.
50
+ - Add in-memory caching with window trimming, stable sorting, and optional tagged-only filtering.
51
+ - Include tests: mocked pagination & tag mapping test and integration test scaffolding using @push.rocks/tapbundle.
52
+
53
+ ## 2025-04-25 - 1.7.1 - fix(CodeFeed)
54
+ Improve commit fetching concurrency and add tagged-only commit filtering along with updated documentation and tests
55
+
56
+ - Updated readme examples to clarify default and options usage, including caching and tagged-only filtering
57
+ - Increased non-exclusive concurrency from 5 to 20 in fetchAllCommitsFromInstance
58
+ - Added tagged-only filtering logic for both cached and non-cached commit results
59
+ - Modified tests to enable tagged-only mode and require npm check
60
+
61
+ ## 2025-04-25 - 1.7.0 - feat(core)
62
+ Enhance commit fetching with caching, concurrency improvements, and dependency upgrades
63
+
64
+ - Updated development dependencies (@git.zone/tsbuild, @git.zone/tsbundle, @git.zone/tstest, @push.rocks/tapbundle, @types/node) and dependency versions
65
+ - Introduced optional caching options (enableCache, cacheWindowMs, enableNpmCheck) in the CodeFeed constructor to optimize commit retrieval
66
+ - Refactored commit fetching to use AsyncExecutionStack for controlled concurrency and improved performance
67
+ - Removed deprecated ts/codefeed.plugins.ts in favor of a consolidated plugins.ts module
68
+
69
+ ## 2024-12-16 - 1.6.5 - fix(CodeFeed)
70
+ Fixed timestamp initialization and commit fetching timeframe
71
+
72
+ - Updated the lastRunTimestamp initialization default period from 24 hours to 7 days in CodeFeed constructor.
73
+ - Modified commit fetching logic to consider commits from the last 7 days instead of 24 hours in fetchRecentCommitsForRepo.
74
+
75
+ ## 2024-12-14 - 1.6.4 - fix(core)
76
+ Refactor fetch logic to use a unified fetchFunction for API calls
77
+
78
+ - Consolidated API request logic in the CodeFeed class to use fetchFunction for improved maintainability.
79
+
80
+ ## 2024-12-14 - 1.6.3 - fix(codefeed)
81
+ Refactor and fix formatting issues in the CodeFeed module
82
+
83
+ - Refactored various method format and spacing.
84
+ - Fixed error handling formatting for readability.
85
+ - Improved consistency in JSON handling for API responses.
86
+
87
+ ## 2024-12-14 - 1.6.2 - fix(core)
88
+ Fix sorting order of tagged commits by timestamp
89
+
90
+ - Fixed the sorting order of commits to be by timestamp in descending order after filtering for tagged commits.
91
+
92
+ ## 2024-12-14 - 1.6.1 - fix(docs)
93
+ Updated project metadata and expanded documentation for installation and usage.
94
+
95
+ - Updated description and keywords in package.json and npmextra.json.
96
+ - Significant expansion of the README.md with detailed installation, usage, and feature instructions.
97
+
98
+ ## 2024-12-14 - 1.6.0 - feat(core)
99
+ Add changelog fetching and parsing functionality
100
+
101
+ - Implemented loadChangelogFromRepo to directly load the changelog from a Gitea repository.
102
+ - Introduced parsing functionality to extract specific version details from the loaded changelog.
103
+ - Updated CodeFeed class to utilize the changelog for version verification and commit processing.
104
+
105
+ ## 2024-12-14 - 1.5.3 - fix(core)
106
+ Fix filtering logic for returning only tagged commits
107
+
108
+ - Ensure `allCommits` is filtered to only include commits with 'tagged' status before returning.
109
+
110
+ ## 2024-12-14 - 1.5.2 - fix(core)
111
+ Ensure stability of core functionalities.
112
+
113
+
114
+ ## 2024-12-14 - 1.5.1 - fix(core)
115
+ Refine logging format in CodeFeed class
116
+
117
+ - Modified console log format in fetchAllCommitsFromInstance method for better readability.
118
+
119
+ ## 2024-12-14 - 1.5.0 - feat(core)
120
+ Refactor TypeScript interfaces and improve module exports
121
+
122
+ - Moved TypeScript interfaces to a dedicated file (ts/interfaces/index.ts).
123
+ - Updated import/export structure to improve code readability and maintainability.
124
+ - Enhanced the package.json to utilize a module exports field for better resolution.
125
+
126
+ ## 2024-12-13 - 1.4.1 - fix(core)
127
+ Corrected log formatting for commit information output in CodeFeed
128
+
129
+ - Fixed formatting issue in commit log output within the CodeFeed class to ensure proper display of timestamps.
130
+
131
+ ## 2024-12-13 - 1.4.0 - feat(CodeFeed)
132
+ Enhance commit results with human-readable time
133
+
134
+ - Integrated smarttime plugin to calculate and format timestamps into human-readable time.
135
+ - Updated dependencies in package.json to include smarttime and adjusted versions for existing packages.
136
+ - Improved fetchAllCommitsFromInstance method to display formatted time ago information for each commit.
137
+
138
+ ## 2024-12-13 - 1.3.0 - feat(core)
139
+ Export CommitResult interface for external use.
140
+
141
+ - Changed CommitResult from a local interface to an exported interface, allowing for external usage and integration.
142
+
143
+ ## 2024-12-13 - 1.2.1 - fix(core)
144
+ No changes detected
145
+
146
+
147
+ ## 2024-12-13 - 1.2.0 - feat(core)
148
+ Add organization-level activity fetching and RSS parsing
149
+
150
+ - Integrated smartxml package for XML parsing.
151
+ - Implemented fetching of all organizations within a Gitea instance.
152
+ - Added functionality to check new activities in organization RSS feeds.
153
+ - Enhanced fetching logic to include repository commits and tags.
154
+
155
+ ## 2024-12-13 - 1.1.0 - feat(core)
156
+ Add tracking of commits published on npm
157
+
158
+ - Introduced a check for published commits on npm using smartnpm.
159
+ - Enhanced fetchAllCommitsFromInstance to include 'publishedOnNpm' status in results.
160
+
161
+ ## 2024-12-13 - 1.0.2 - fix(core)
162
+ Improve error handling in fetchRecentCommitsForRepo method
163
+
164
+ - Refined the console error message for better clarity.
165
+ - Updated the fetchRecentCommitsForRepo method to stop fetching when encountering a commit older than 24 hours.
166
+
167
+ ## 2024-12-13 - 1.0.1 - initial release
168
+ Initial release of the project
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@foss.global/codefeed',
6
- version: '1.9.0',
6
+ version: '1.10.0',
7
7
  description: 'The @foss.global/codefeed module generates commit/activity feeds from forge providers including Gitea and GitManager.'
8
8
  };
9
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx1QkFBdUI7SUFDN0IsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVIQUF1SDtDQUNySSxDQUFBIn0=
9
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx1QkFBdUI7SUFDN0IsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVIQUF1SDtDQUNySSxDQUFBIn0=
@@ -0,0 +1,62 @@
1
+ import * as plugins from './plugins.js';
2
+ export interface IGitManagerPublicReadClientOptions {
3
+ gitManager: plugins.TGitManager;
4
+ publicBaseUrl?: string;
5
+ smartHttpBaseUrl?: string;
6
+ sshBaseUrl?: string;
7
+ allowAllRepositories?: boolean;
8
+ isRepositoryPublic?: (repositoryArg: plugins.TGitManagerRepositoryInfo) => Promise<boolean>;
9
+ organizationMetadata?: (orgArg: string) => Promise<Partial<plugins.fossInterfaces.IPublicOrg> | undefined>;
10
+ repositoryMetadata?: (repositoryArg: plugins.TGitManagerRepositoryInfo) => Promise<Partial<plugins.fossInterfaces.IPublicRepo> | undefined>;
11
+ newsProvider?: (limitArg: number) => Promise<plugins.fossInterfaces.IPublicNewsItem[]>;
12
+ maxCommits?: number;
13
+ maxReleases?: number;
14
+ maxLanguageFiles?: number;
15
+ maxConcurrency?: number;
16
+ }
17
+ export declare class GitManagerPublicReadClient {
18
+ private readonly gitManager;
19
+ private readonly publicBaseUrl;
20
+ private readonly smartHttpBaseUrl;
21
+ private readonly sshBaseUrl;
22
+ private readonly allowAllRepositories;
23
+ private readonly isRepositoryPublic?;
24
+ private readonly organizationMetadata?;
25
+ private readonly repositoryMetadata?;
26
+ private readonly newsProvider?;
27
+ private readonly maxCommits;
28
+ private readonly maxReleases;
29
+ private readonly maxLanguageFiles;
30
+ private readonly maxConcurrency;
31
+ constructor(optionsArg: IGitManagerPublicReadClientOptions);
32
+ getOverview(queryArg?: string): Promise<plugins.fossInterfaces.IReq_PublicOverview['response']>;
33
+ getOrg(orgArg: string): Promise<plugins.fossInterfaces.IReq_PublicOrg['response']>;
34
+ getRepo(orgArg: string, repoArg: string, pathArg?: string, _issueNumberArg?: number): Promise<plugins.fossInterfaces.IReq_PublicRepo['response']>;
35
+ getFile(orgArg: string, repoArg: string, pathArg: string): Promise<plugins.fossInterfaces.IReq_PublicFile['response']>;
36
+ getCommits(orgArg: string, repoArg: string, shaArg?: string): Promise<plugins.fossInterfaces.IReq_PublicCommits['response']>;
37
+ private listVisibleRepositories;
38
+ private findVisibleRepository;
39
+ private mapOrganizations;
40
+ private mapRepository;
41
+ private getCommitFeed;
42
+ private mapCommit;
43
+ private getCommitDetail;
44
+ private mapContent;
45
+ private mapRelease;
46
+ private mapActivity;
47
+ private readReadme;
48
+ private scanLanguages;
49
+ private getStats;
50
+ private getPrimaryLanguage;
51
+ private languageForPath;
52
+ private getActivityKind;
53
+ private mapDiffStatus;
54
+ private repoPathUrl;
55
+ private stableId;
56
+ private normalizeBaseUrl;
57
+ private validateSlug;
58
+ private validatePath;
59
+ private validateLimit;
60
+ private withFallback;
61
+ private mapWithConcurrency;
62
+ }