wp-typia 0.15.0 → 0.15.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "wp-typia",
3
- "version": "0.15.0",
3
+ "version": "0.15.1",
4
4
  "description": "Canonical CLI package for wp-typia scaffolding and project workflows",
5
5
  "packageManager": "bun@1.3.11",
6
6
  "type": "module",
@@ -64,7 +64,7 @@
64
64
  "@bunli/runtime": "0.3.1",
65
65
  "@bunli/tui": "0.6.0",
66
66
  "@bunli/utils": "0.6.0",
67
- "@wp-typia/project-tools": "0.15.0",
67
+ "@wp-typia/project-tools": "0.15.1",
68
68
  "better-result": "^2.7.0",
69
69
  "react": "19.2.0",
70
70
  "react-dom": "19.2.0",
@@ -9,19 +9,23 @@ export const templatesCommand = defineCommand({
9
9
  handler: async (args) => {
10
10
  const subcommand = (args.positional[0] ?? "list") as string;
11
11
  const id = args.positional[1] ?? (args.flags.id as string | undefined);
12
+ const effectiveSubcommand =
13
+ subcommand === "list" && typeof id === "string" && id.length > 0
14
+ ? "inspect"
15
+ : subcommand;
12
16
  const prefersStructuredOutput =
13
17
  (args.formatExplicit && args.format !== "toon") ||
14
18
  args.agent ||
15
19
  Boolean(args.context?.store?.isAIAgent);
16
20
 
17
21
  if (prefersStructuredOutput) {
18
- if (subcommand === "list") {
22
+ if (effectiveSubcommand === "list") {
19
23
  args.output({ templates: listTemplates() });
20
24
  return;
21
25
  }
22
- if (subcommand === "inspect" && id) {
26
+ if (effectiveSubcommand === "inspect" && id) {
23
27
  await executeTemplatesCommand({
24
- flags: { id, subcommand },
28
+ flags: { id, subcommand: effectiveSubcommand },
25
29
  }, () => {});
26
30
  const template = listTemplates().find((entry) => entry.id === id);
27
31
  args.output({ template });
@@ -30,7 +34,7 @@ export const templatesCommand = defineCommand({
30
34
  }
31
35
 
32
36
  await executeTemplatesCommand({
33
- flags: { id, subcommand },
37
+ flags: { id, subcommand: effectiveSubcommand },
34
38
  });
35
39
  },
36
40
  name: "templates",