@initx-plugin/core 0.0.11 → 0.0.13

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
- <h1 align="center">init 🛠</h1>
1
+ <h1 align="center">initx ⚙️</h1>
2
2
 
3
- <p align="center"><code>initx</code> More convenient initialization tool</p>
3
+ <p align="center"><code>initx</code> A more convenient scripting engine</p>
4
4
 
5
5
  <pre align="center">npx <b>initx &lt;something&gt;</b></pre>
6
6
 
package/dist/index.d.mts CHANGED
@@ -15,7 +15,7 @@ interface HandlerInfo {
15
15
  handler: () => MaybePromise<void>;
16
16
  description: string;
17
17
  }
18
- interface InitxOptions {
18
+ interface InitxCtx {
19
19
  /**
20
20
  * Matching string
21
21
  *
@@ -38,8 +38,8 @@ interface InitxOptions {
38
38
  }
39
39
  declare abstract class InitxHandler {
40
40
  abstract matchers: Matchers;
41
- abstract handle(options: InitxOptions, ...others: string[]): MaybePromise<void>;
42
- run(options: InitxOptions, ...others: string[]): HandlerInfo[];
41
+ abstract handle(options: InitxCtx, ...others: string[]): MaybePromise<void>;
42
+ run(options: InitxCtx, ...others: string[]): HandlerInfo[];
43
43
  private matchBaseMatchers;
44
44
  private matchArrayBaseMatchers;
45
45
  private matchTypeMatchers;
@@ -49,4 +49,17 @@ declare abstract class InitxHandler {
49
49
  private isPassed;
50
50
  }
51
51
 
52
- export { type HandlerInfo, InitxHandler, type InitxOptions };
52
+ interface PackageInfo {
53
+ name: string;
54
+ version: string;
55
+ description: string;
56
+ author: string;
57
+ homepage?: string;
58
+ }
59
+ interface InitxPlugin {
60
+ packageInfo: PackageInfo;
61
+ handler: InitxHandler;
62
+ }
63
+ declare function loadPlugins(): Promise<InitxPlugin[]>;
64
+
65
+ export { type HandlerInfo, type InitxCtx, InitxHandler, type InitxPlugin, type PackageInfo, loadPlugins };
package/dist/index.d.ts CHANGED
@@ -15,7 +15,7 @@ interface HandlerInfo {
15
15
  handler: () => MaybePromise<void>;
16
16
  description: string;
17
17
  }
18
- interface InitxOptions {
18
+ interface InitxCtx {
19
19
  /**
20
20
  * Matching string
21
21
  *
@@ -38,8 +38,8 @@ interface InitxOptions {
38
38
  }
39
39
  declare abstract class InitxHandler {
40
40
  abstract matchers: Matchers;
41
- abstract handle(options: InitxOptions, ...others: string[]): MaybePromise<void>;
42
- run(options: InitxOptions, ...others: string[]): HandlerInfo[];
41
+ abstract handle(options: InitxCtx, ...others: string[]): MaybePromise<void>;
42
+ run(options: InitxCtx, ...others: string[]): HandlerInfo[];
43
43
  private matchBaseMatchers;
44
44
  private matchArrayBaseMatchers;
45
45
  private matchTypeMatchers;
@@ -49,4 +49,17 @@ declare abstract class InitxHandler {
49
49
  private isPassed;
50
50
  }
51
51
 
52
- export { type HandlerInfo, InitxHandler, type InitxOptions };
52
+ interface PackageInfo {
53
+ name: string;
54
+ version: string;
55
+ description: string;
56
+ author: string;
57
+ homepage?: string;
58
+ }
59
+ interface InitxPlugin {
60
+ packageInfo: PackageInfo;
61
+ handler: InitxHandler;
62
+ }
63
+ declare function loadPlugins(): Promise<InitxPlugin[]>;
64
+
65
+ export { type HandlerInfo, type InitxCtx, InitxHandler, type InitxPlugin, type PackageInfo, loadPlugins };