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.
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import { defineCommand, runMain } from 'citty';
3
3
 
4
- const version = "0.29.29";
4
+ const version = "0.29.30";
5
5
  const packageJson = {
6
6
  version: version};
7
7
 
@@ -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
- after.push(item.params?.length ? ` await ${item.name}(option, ${item.params.join(",")})` : ` await ${item.name}(option)`);
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
- before.push(item.params?.length ? ` await ${item.name}(option, ${item.params.join(",")})` : ` await ${item.name}(option)`);
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
  }
@@ -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;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "silgi",
3
3
  "type": "module",
4
- "version": "0.29.29",
4
+ "version": "0.29.30",
5
5
  "private": false,
6
6
  "sideEffects": false,
7
7
  "exports": {