@opendirectory.dev/skills 0.1.10 → 0.1.12

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/e2e.test.js CHANGED
@@ -53,8 +53,10 @@ const os = __importStar(require("node:os"));
53
53
  });
54
54
  (0, vitest_1.it)('should install a skill for opencode locally', () => {
55
55
  const skillName = 'claude-md-generator';
56
- (0, node_child_process_1.execSync)(`node "${cliPath}" install ${skillName} --target opencode`, { cwd: tempDir });
57
- const expectedPath = path.join(tempDir, '.opencode', 'skills', skillName, 'SKILL.md');
56
+ // Set HOME and USERPROFILE to tempDir so that ~ resolves to tempDir
57
+ const env = { ...process.env, HOME: tempDir, USERPROFILE: tempDir };
58
+ (0, node_child_process_1.execSync)(`node "${cliPath}" install ${skillName} --target opencode`, { cwd: tempDir, env });
59
+ const expectedPath = path.join(tempDir, '.config', 'opencode', 'skills', skillName, 'SKILL.md');
58
60
  (0, vitest_1.expect)(fs.existsSync(expectedPath)).toBe(true);
59
61
  const content = fs.readFileSync(expectedPath, 'utf-8');
60
62
  (0, vitest_1.expect)(content.length).toBeGreaterThan(0);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendirectory.dev/skills",
3
- "version": "0.1.10",
3
+ "version": "0.1.12",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "bin": {
package/src/e2e.test.ts CHANGED
@@ -24,9 +24,12 @@ describe('CLI End-to-End Tests', () => {
24
24
  it('should install a skill for opencode locally', () => {
25
25
  const skillName = 'claude-md-generator';
26
26
 
27
- execSync(`node "${cliPath}" install ${skillName} --target opencode`, { cwd: tempDir });
27
+ // Set HOME and USERPROFILE to tempDir so that ~ resolves to tempDir
28
+ const env = { ...process.env, HOME: tempDir, USERPROFILE: tempDir };
28
29
 
29
- const expectedPath = path.join(tempDir, '.opencode', 'skills', skillName, 'SKILL.md');
30
+ execSync(`node "${cliPath}" install ${skillName} --target opencode`, { cwd: tempDir, env });
31
+
32
+ const expectedPath = path.join(tempDir, '.config', 'opencode', 'skills', skillName, 'SKILL.md');
30
33
  expect(fs.existsSync(expectedPath)).toBe(true);
31
34
 
32
35
  const content = fs.readFileSync(expectedPath, 'utf-8');