@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 +2 -2
- package/dist/index.d.mts +17 -4
- package/dist/index.d.ts +17 -4
- package/dist/index.mjs +2480 -1
- package/package.json +5 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
<h1 align="center">
|
|
1
|
+
<h1 align="center">initx ⚙️</h1>
|
|
2
2
|
|
|
3
|
-
<p align="center"><code>initx</code>
|
|
3
|
+
<p align="center"><code>initx</code> A more convenient scripting engine</p>
|
|
4
4
|
|
|
5
5
|
<pre align="center">npx <b>initx <something></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
|
|
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:
|
|
42
|
-
run(options:
|
|
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
|
-
|
|
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
|
|
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:
|
|
42
|
-
run(options:
|
|
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
|
-
|
|
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 };
|