@aventara/cli 1.0.0-rc.12 → 1.0.0-rc.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.
@@ -14,13 +14,22 @@ export const AGENTS_SECTION = [
14
14
  "Refresh these files after upgrading Aventara: `npx @aventara/cli@<your @aventara/core version> skill`.",
15
15
  AGENTS_SECTION_END,
16
16
  ].join("\n");
17
+ const COMMANDS = {
18
+ npm: { RUN: "npm run", EXEC: "npx", DLX: "npx" },
19
+ pnpm: { RUN: "pnpm run", EXEC: "pnpm exec", DLX: "pnpm dlx" },
20
+ };
17
21
  export function agentSkillFiles(input) {
22
+ const commands = COMMANDS[input.packageManager ?? "npm"];
18
23
  return {
19
24
  ...Object.fromEntries(Object.entries(AGENT_SKILL_GUIDANCE).map(([file, text]) => [
20
25
  file,
21
- text.replaceAll("{{CORE_VERSION}}", input.coreVersion),
26
+ text
27
+ .replaceAll("{{CORE_VERSION}}", input.coreVersion)
28
+ .replaceAll("{{RUN}}", commands.RUN)
29
+ .replaceAll("{{EXEC}}", commands.EXEC)
30
+ .replaceAll("{{DLX}}", commands.DLX),
22
31
  ])),
23
- "reference/errors.md": input.errors ?? AGENT_SKILL_ERRORS,
32
+ "reference/errors.md": (input.errors ?? AGENT_SKILL_ERRORS).replaceAll("`npm run ", `\`${commands.RUN} `),
24
33
  };
25
34
  }
26
35
  const sha256 = (text) => createHash("sha256").update(text).digest("hex");
@@ -67,6 +76,9 @@ export function planAgentSkill(input) {
67
76
  const files = agentSkillFiles({
68
77
  coreVersion: input.coreVersion,
69
78
  ...(input.errors === undefined ? {} : { errors: input.errors }),
79
+ ...(input.packageManager === undefined
80
+ ? {}
81
+ : { packageManager: input.packageManager }),
70
82
  });
71
83
  for (const [file, content] of Object.entries(files)) {
72
84
  const target = `${SKILL_DIRECTORY}/${file}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aventara/cli",
3
- "version": "1.0.0-rc.12",
3
+ "version": "1.0.0-rc.13",
4
4
  "license": "SEE LICENSE IN LICENSE",
5
5
  "description": "Scaffolds an Aventara server: `aventara new` for a new NestJS project, `aventara init` for an existing one.",
6
6
  "type": "module",