@foss.global/codefeed 1.6.5 → 1.8.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.
@@ -1,3 +1,7 @@
1
+ import type { ICodefeedCommitResult } from '@foss.global/interfaces';
2
+
3
+ export type { ICodefeedCommitResult } from '@foss.global/interfaces';
4
+
1
5
  export interface IRepositoryOwner {
2
6
  login: string;
3
7
  }
@@ -22,6 +26,7 @@ export interface ICommit {
22
26
  }
23
27
 
24
28
  export interface ITag {
29
+ name?: string;
25
30
  commit?: {
26
31
  sha?: string;
27
32
  };
@@ -31,15 +36,32 @@ export interface IRepoSearchResponse {
31
36
  data: IRepository[];
32
37
  }
33
38
 
34
- export interface ICommitResult {
35
- baseUrl: string;
36
- org: string;
37
- repo: string;
38
- timestamp: string;
39
- hash: string;
40
- commitMessage: string;
41
- tagged: boolean;
42
- publishedOnNpm: boolean;
43
- prettyAgoTime: string;
44
- changelog: string | undefined;
39
+ export interface ICommitResult extends ICodefeedCommitResult {}
40
+
41
+ export interface ICodeFeedTagInfo {
42
+ shas: Set<string>;
43
+ map: Map<string, string>;
44
+ }
45
+
46
+ export interface ICodeFeedProvider {
47
+ listOrganizations(): Promise<string[]>;
48
+ listRepositoriesForOrg(org: string): Promise<IRepository[]>;
49
+ getLatestCommitForRepo(owner: string, repo: string): Promise<ICommit | undefined>;
50
+ listCommitsForRepo(owner: string, repo: string, sinceTimestamp?: string): Promise<ICommit[]>;
51
+ listTagsForRepo(owner: string, repo: string): Promise<ICodeFeedTagInfo>;
52
+ readChangelogForRepo(owner: string, repo: string): Promise<string>;
53
+ }
54
+
55
+ export interface ICodeFeedOptions {
56
+ enableCache?: boolean;
57
+ cacheWindowMs?: number;
58
+ enableNpmCheck?: boolean;
59
+ taggedOnly?: boolean;
60
+ orgAllowlist?: string[];
61
+ orgDenylist?: string[];
62
+ repoAllowlist?: string[];
63
+ repoDenylist?: string[];
64
+ untilTimestamp?: string;
65
+ verbose?: boolean;
66
+ provider?: ICodeFeedProvider;
45
67
  }
package/ts/plugins.ts ADDED
@@ -0,0 +1,19 @@
1
+ // module
2
+ import * as interfaces from './interfaces/index.js';
3
+
4
+ export {
5
+ interfaces,
6
+ }
7
+
8
+ // @push.rocks
9
+ import * as smarttime from '@push.rocks/smarttime';
10
+ import * as lik from '@push.rocks/lik';
11
+
12
+ export type TNpmRegistry = import('@push.rocks/smartnpm').NpmRegistry;
13
+
14
+ export const getSmartnpm = async () => import('@push.rocks/smartnpm');
15
+
16
+ export {
17
+ smarttime,
18
+ lik,
19
+ }
@@ -1,7 +0,0 @@
1
- import * as interfaces from './interfaces/index.js';
2
- export { interfaces, };
3
- import * as qenv from '@push.rocks/qenv';
4
- import * as smartnpm from '@push.rocks/smartnpm';
5
- import * as smartxml from '@push.rocks/smartxml';
6
- import * as smarttime from '@push.rocks/smarttime';
7
- export { qenv, smartnpm, smartxml, smarttime, };
@@ -1,10 +0,0 @@
1
- // module
2
- import * as interfaces from './interfaces/index.js';
3
- export { interfaces, };
4
- // @push.rocks
5
- import * as qenv from '@push.rocks/qenv';
6
- import * as smartnpm from '@push.rocks/smartnpm';
7
- import * as smartxml from '@push.rocks/smartxml';
8
- import * as smarttime from '@push.rocks/smarttime';
9
- export { qenv, smartnpm, smartxml, smarttime, };
10
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29kZWZlZWQucGx1Z2lucy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3RzL2NvZGVmZWVkLnBsdWdpbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsU0FBUztBQUNULE9BQU8sS0FBSyxVQUFVLE1BQU0sdUJBQXVCLENBQUM7QUFFcEQsT0FBTyxFQUNMLFVBQVUsR0FDWCxDQUFBO0FBRUQsY0FBYztBQUNkLE9BQU8sS0FBSyxJQUFJLE1BQU0sa0JBQWtCLENBQUM7QUFDekMsT0FBTyxLQUFLLFFBQVEsTUFBTSxzQkFBc0IsQ0FBQztBQUNqRCxPQUFPLEtBQUssUUFBUSxNQUFNLHNCQUFzQixDQUFDO0FBQ2pELE9BQU8sS0FBSyxTQUFTLE1BQU0sdUJBQXVCLENBQUM7QUFFbkQsT0FBTyxFQUNMLElBQUksRUFDSixRQUFRLEVBQ1IsUUFBUSxFQUNSLFNBQVMsR0FDVixDQUFBIn0=
@@ -1,19 +0,0 @@
1
- // module
2
- import * as interfaces from './interfaces/index.js';
3
-
4
- export {
5
- interfaces,
6
- }
7
-
8
- // @push.rocks
9
- import * as qenv from '@push.rocks/qenv';
10
- import * as smartnpm from '@push.rocks/smartnpm';
11
- import * as smartxml from '@push.rocks/smartxml';
12
- import * as smarttime from '@push.rocks/smarttime';
13
-
14
- export {
15
- qenv,
16
- smartnpm,
17
- smartxml,
18
- smarttime,
19
- }