silgi 0.29.29 → 0.29.30
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/cli/index.mjs +1 -1
- package/dist/cli/silgi.mjs +12 -3
- package/dist/types/index.d.mts +2 -0
- package/package.json +1 -1
package/dist/cli/index.mjs
CHANGED
package/dist/cli/silgi.mjs
CHANGED
|
@@ -227,7 +227,8 @@ async function prepareCommands(silgi = useSilgiCLI()) {
|
|
|
227
227
|
...Object.fromEntries(Array.from(allTags.values()).map((tag) => [tag, "string"]))
|
|
228
228
|
}
|
|
229
229
|
}),
|
|
230
|
-
""
|
|
230
|
+
"",
|
|
231
|
+
"export {}"
|
|
231
232
|
];
|
|
232
233
|
addTemplate({
|
|
233
234
|
filename: "types/commands.d.ts",
|
|
@@ -364,10 +365,18 @@ async function prepareCoreFile(silgi) {
|
|
|
364
365
|
addBuildFunction: (data) => {
|
|
365
366
|
for (const item of toArray(data)) {
|
|
366
367
|
if (item.where === "after") {
|
|
367
|
-
|
|
368
|
+
if (item.custom) {
|
|
369
|
+
after.push(item.custom);
|
|
370
|
+
} else {
|
|
371
|
+
after.push(item.params?.length ? ` await ${item.name}(option, ${item.params.join(",")})` : ` await ${item.name}(option)`);
|
|
372
|
+
}
|
|
368
373
|
}
|
|
369
374
|
if (item.where === "before") {
|
|
370
|
-
|
|
375
|
+
if (item.custom) {
|
|
376
|
+
before.push(item.custom);
|
|
377
|
+
} else {
|
|
378
|
+
before.push(item.params?.length ? ` await ${item.name}(option, ${item.params.join(",")})` : ` await ${item.name}(option)`);
|
|
379
|
+
}
|
|
371
380
|
}
|
|
372
381
|
}
|
|
373
382
|
}
|
package/dist/types/index.d.mts
CHANGED
|
@@ -192,10 +192,12 @@ interface SilgiCLIHooks extends SilgiHooks {
|
|
|
192
192
|
addBuildFunction: (data: {
|
|
193
193
|
name: string;
|
|
194
194
|
params?: string[];
|
|
195
|
+
custom?: string;
|
|
195
196
|
where: 'before' | 'after';
|
|
196
197
|
}[] | {
|
|
197
198
|
name: string;
|
|
198
199
|
params?: string[];
|
|
200
|
+
custom?: string;
|
|
199
201
|
where: 'before' | 'after';
|
|
200
202
|
}) => void;
|
|
201
203
|
}) => HookResult;
|