@bonvoy/plugin-npm 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,12 @@
1
1
  import { BonvoyPlugin } from "@bonvoy/core";
2
2
 
3
+ //#region src/operations.d.ts
4
+ interface NpmOperations {
5
+ publish(args: string[], cwd: string): Promise<void>;
6
+ view(pkg: string, version: string): Promise<string | null>;
7
+ }
8
+ declare const defaultNpmOperations: NpmOperations;
9
+ //#endregion
3
10
  //#region src/npm.d.ts
4
11
  interface NpmPluginConfig {
5
12
  registry?: string;
@@ -11,7 +18,8 @@ interface NpmPluginConfig {
11
18
  declare class NpmPlugin implements BonvoyPlugin {
12
19
  name: string;
13
20
  private config;
14
- constructor(config?: NpmPluginConfig);
21
+ private ops;
22
+ constructor(config?: NpmPluginConfig, ops?: NpmOperations);
15
23
  apply(bonvoy: {
16
24
  hooks: {
17
25
  publish: any;
@@ -22,5 +30,5 @@ declare class NpmPlugin implements BonvoyPlugin {
22
30
  private isAlreadyPublished;
23
31
  }
24
32
  //#endregion
25
- export { type NpmPluginConfig, NpmPlugin as default };
33
+ export { type NpmOperations, type NpmPluginConfig, NpmPlugin as default, defaultNpmOperations };
26
34
  //# sourceMappingURL=index.d.mts.map