ocx 0.1.1 → 1.0.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.
@@ -1,64 +0,0 @@
1
- import { describe, it, expect, beforeEach, afterEach } from "bun:test"
2
- import { createTempDir, cleanupTempDir, runCLI } from "./helpers"
3
- import { startMockRegistry, type MockRegistry } from "./mock-registry"
4
-
5
- describe("ocx search", () => {
6
- let testDir: string
7
- let registry: MockRegistry
8
-
9
- beforeEach(async () => {
10
- testDir = await createTempDir("search-test")
11
- registry = startMockRegistry()
12
- await runCLI(["init", "--yes"], testDir)
13
- const addResult = await runCLI(["registry", "add", registry.url, "--name", "test-reg"], testDir)
14
- if (addResult.exitCode !== 0) {
15
- console.log("Failed to add registry in search test:", addResult.output)
16
- }
17
- })
18
-
19
- afterEach(async () => {
20
- registry.stop()
21
- await cleanupTempDir(testDir)
22
- })
23
-
24
- it("should find components across registries", async () => {
25
- const { exitCode, output } = await runCLI(["search", "test", "--verbose"], testDir)
26
-
27
- if (exitCode !== 0 || !output.includes("kdco-test-agent")) {
28
- console.log(output)
29
- }
30
- expect(exitCode).toBe(0)
31
- expect(output).toContain("kdco-test-agent")
32
- expect(output).toContain("kdco-test-skill")
33
- expect(output).toContain("kdco-test-plugin")
34
- })
35
-
36
- it("should filter by query", async () => {
37
- const { exitCode, output } = await runCLI(["search", "agent"], testDir)
38
-
39
- expect(exitCode).toBe(0)
40
- expect(output).toContain("kdco-test-agent")
41
- expect(output).not.toContain("kdco-test-skill")
42
- })
43
-
44
- it("should list installed components with --installed", async () => {
45
- // Install one component
46
- await runCLI(["add", "kdco-test-plugin", "--yes"], testDir)
47
-
48
- const { exitCode, output } = await runCLI(["search", "--installed"], testDir)
49
-
50
- expect(exitCode).toBe(0)
51
- expect(output).toContain("kdco-test-plugin")
52
- expect(output).not.toContain("kdco-test-agent")
53
- })
54
-
55
- it("should output JSON when requested", async () => {
56
- const { exitCode, output } = await runCLI(["search", "test", "--json"], testDir)
57
-
58
- expect(exitCode).toBe(0)
59
- const json = JSON.parse(output)
60
- expect(json.success).toBe(true)
61
- expect(json.data.components).toBeDefined()
62
- expect(json.data.components.length).toBeGreaterThan(0)
63
- })
64
- })
package/tsconfig.json DELETED
@@ -1,15 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ESNext",
4
- "module": "ESNext",
5
- "moduleResolution": "bundler",
6
- "esModuleInterop": true,
7
- "strict": true,
8
- "skipLibCheck": true,
9
- "outDir": "./dist",
10
- "rootDir": "./src",
11
- "types": ["bun"]
12
- },
13
- "include": ["src/**/*", "scripts/**/*"],
14
- "exclude": ["node_modules", "dist"]
15
- }