odoo-forge 0.1.1 → 0.1.3

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,10 +1,10 @@
1
1
  {
2
2
  "name": "odoo-forge",
3
- "version": "0.1.1",
3
+ "version": "0.1.3",
4
4
  "description": "CLI installer and updater for Odoo Forge internal 1.0.",
5
5
  "type": "module",
6
6
  "dependencies": {
7
- "odoo-forge-bundle": "0.1.1"
7
+ "odoo-forge-bundle": "0.1.3"
8
8
  },
9
9
  "bin": {
10
10
  "odoo-forge": "bin/odoo-forge.js"
package/src/index.js CHANGED
@@ -12,6 +12,7 @@ import {
12
12
  getClaudeConfigPath,
13
13
  getCodexConfigPath,
14
14
  getInstalledSkillsPath,
15
+ getLegacyInstalledSkillsPath,
15
16
  } from "./paths.js";
16
17
 
17
18
  function printHelp() {
@@ -67,10 +68,18 @@ async function defaultSpawnProcess(command, args, options = {}) {
67
68
  function installSkills({ bundleRoot, homeDir }) {
68
69
  const sourceSkillsDir = path.join(bundleRoot, "skills");
69
70
  const targetSkillsDir = getInstalledSkillsPath({ homeDir });
71
+ const legacySkillsDir = getLegacyInstalledSkillsPath({ homeDir });
70
72
 
71
73
  fs.mkdirSync(getAgentsSkillsRoot({ homeDir }), { recursive: true });
72
- fs.rmSync(targetSkillsDir, { recursive: true, force: true });
73
- fs.cpSync(sourceSkillsDir, targetSkillsDir, { recursive: true });
74
+ fs.rmSync(legacySkillsDir, { recursive: true, force: true });
75
+
76
+ for (const entry of fs.readdirSync(sourceSkillsDir, { withFileTypes: true })) {
77
+ const sourceEntryPath = path.join(sourceSkillsDir, entry.name);
78
+ const targetEntryPath = path.join(targetSkillsDir, entry.name);
79
+
80
+ fs.rmSync(targetEntryPath, { recursive: true, force: true });
81
+ fs.cpSync(sourceEntryPath, targetEntryPath, { recursive: true });
82
+ }
74
83
 
75
84
  return targetSkillsDir;
76
85
  }
package/src/paths.js CHANGED
@@ -14,5 +14,9 @@ export function getAgentsSkillsRoot({ homeDir = os.homedir() } = {}) {
14
14
  }
15
15
 
16
16
  export function getInstalledSkillsPath({ homeDir = os.homedir() } = {}) {
17
+ return getAgentsSkillsRoot({ homeDir });
18
+ }
19
+
20
+ export function getLegacyInstalledSkillsPath({ homeDir = os.homedir() } = {}) {
17
21
  return path.join(homeDir, ".agents", "skills", "odoo-forge");
18
22
  }