@bonvoy/plugin-git 0.0.0 → 0.1.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/dist/index.d.mts CHANGED
@@ -1,5 +1,23 @@
1
1
  import { BonvoyPlugin } from "@bonvoy/core";
2
2
 
3
+ //#region src/operations.d.ts
4
+ interface GitOperations {
5
+ add(files: string, cwd: string): Promise<void>;
6
+ commit(message: string, cwd: string): Promise<void>;
7
+ tag(name: string, cwd: string): Promise<void>;
8
+ push(cwd: string): Promise<void>;
9
+ pushTags(tags: string[], cwd: string): Promise<void>;
10
+ getCommitsSinceTag(tag: string | null, cwd: string): Promise<Array<{
11
+ hash: string;
12
+ message: string;
13
+ author: string;
14
+ date: string;
15
+ files: string[];
16
+ }>>;
17
+ getLastTag(cwd: string): Promise<string | null>;
18
+ }
19
+ declare const defaultGitOperations: GitOperations;
20
+ //#endregion
3
21
  //#region src/git.d.ts
4
22
  interface GitPluginConfig {
5
23
  commitMessage?: string;
@@ -9,11 +27,11 @@ interface GitPluginConfig {
9
27
  declare class GitPlugin implements BonvoyPlugin {
10
28
  name: string;
11
29
  private config;
12
- constructor(config?: GitPluginConfig);
30
+ private ops;
31
+ constructor(config?: GitPluginConfig, ops?: GitOperations);
13
32
  apply(bonvoy: {
14
33
  hooks: {
15
34
  beforePublish: any;
16
- afterPublish: any;
17
35
  };
18
36
  }): void;
19
37
  private commitChanges;
@@ -21,5 +39,5 @@ declare class GitPlugin implements BonvoyPlugin {
21
39
  private pushChanges;
22
40
  }
23
41
  //#endregion
24
- export { type GitPluginConfig, GitPlugin as default };
42
+ export { type GitOperations, type GitPluginConfig, GitPlugin as default, defaultGitOperations };
25
43
  //# sourceMappingURL=index.d.mts.map