@omnidev-ai/cli 0.1.0 → 0.1.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": "@omnidev-ai/cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@inquirer/prompts": "^8.1.0",
|
|
31
|
-
"@omnidev-ai/core": "
|
|
31
|
+
"@omnidev-ai/core": "^0.1.1",
|
|
32
32
|
"@stricli/core": "^1.2.5"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
2
2
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
3
3
|
import { join } from "node:path";
|
|
4
|
+
import { tmpdir } from "@omnidev-ai/core/test-utils";
|
|
4
5
|
import { runCapabilityDisable, runCapabilityEnable, runCapabilityList } from "./capability";
|
|
5
6
|
|
|
6
7
|
describe("capability list command", () => {
|
|
@@ -11,8 +12,7 @@ describe("capability list command", () => {
|
|
|
11
12
|
|
|
12
13
|
beforeEach(() => {
|
|
13
14
|
originalCwd = process.cwd();
|
|
14
|
-
testDir =
|
|
15
|
-
mkdirSync(testDir, { recursive: true });
|
|
15
|
+
testDir = tmpdir("capability-test-");
|
|
16
16
|
process.chdir(testDir);
|
|
17
17
|
|
|
18
18
|
// Mock process.exit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
2
2
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { tmpdir } from "@omnidev-ai/core/test-utils";
|
|
4
4
|
import { runDoctor } from "./doctor";
|
|
5
5
|
|
|
6
6
|
describe("doctor command", () => {
|
|
@@ -41,16 +41,9 @@ sandbox/
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
beforeEach(() => {
|
|
44
|
-
// Create
|
|
45
|
-
testDir = join(
|
|
46
|
-
process.cwd(),
|
|
47
|
-
".test-tmp",
|
|
48
|
-
`doctor-test-${Date.now()}-${Math.random().toString(36).slice(2, 9)}`,
|
|
49
|
-
);
|
|
50
|
-
mkdirSync(testDir, { recursive: true });
|
|
51
|
-
|
|
52
|
-
// Change to test directory
|
|
44
|
+
// Create test directory in /tmp
|
|
53
45
|
originalCwd = process.cwd();
|
|
46
|
+
testDir = tmpdir("doctor-test-");
|
|
54
47
|
process.chdir(testDir);
|
|
55
48
|
|
|
56
49
|
// Mock process.exit
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
2
2
|
import { existsSync, mkdirSync, readFileSync, rmSync } from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { tmpdir } from "@omnidev-ai/core/test-utils";
|
|
4
4
|
import { runInit } from "./init";
|
|
5
5
|
|
|
6
6
|
describe("init command", () => {
|
|
@@ -9,8 +9,7 @@ describe("init command", () => {
|
|
|
9
9
|
|
|
10
10
|
beforeEach(() => {
|
|
11
11
|
originalCwd = process.cwd();
|
|
12
|
-
testDir =
|
|
13
|
-
mkdirSync(testDir, { recursive: true });
|
|
12
|
+
testDir = tmpdir("init-test-");
|
|
14
13
|
process.chdir(testDir);
|
|
15
14
|
});
|
|
16
15
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, test } from "bun:test";
|
|
2
2
|
import { existsSync, mkdirSync, rmSync } from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { tmpdir } from "@omnidev-ai/core/test-utils";
|
|
4
4
|
import { runProfileList, runProfileSet } from "./profile";
|
|
5
5
|
|
|
6
6
|
describe("profile commands", () => {
|
|
@@ -12,10 +12,9 @@ describe("profile commands", () => {
|
|
|
12
12
|
let consoleErrors: string[];
|
|
13
13
|
|
|
14
14
|
beforeEach(() => {
|
|
15
|
-
// Create
|
|
16
|
-
testDir = join(import.meta.dir, "..", "..", "..", "test-temp", `profile-test-${Date.now()}`);
|
|
17
|
-
mkdirSync(testDir, { recursive: true });
|
|
15
|
+
// Create test directory in /tmp
|
|
18
16
|
originalCwd = process.cwd();
|
|
17
|
+
testDir = tmpdir("profile-test-");
|
|
19
18
|
process.chdir(testDir);
|
|
20
19
|
|
|
21
20
|
// Mock process.exit
|
|
@@ -1,23 +1,20 @@
|
|
|
1
1
|
import { afterEach, beforeEach, describe, expect, mock, test } from "bun:test";
|
|
2
2
|
import { existsSync, mkdirSync, rmSync, writeFileSync } from "node:fs";
|
|
3
|
-
import {
|
|
3
|
+
import { tmpdir } from "@omnidev-ai/core/test-utils";
|
|
4
4
|
import { runServe } from "./serve";
|
|
5
5
|
|
|
6
|
-
|
|
7
|
-
const
|
|
6
|
+
let testDir: string;
|
|
7
|
+
const originalCwd = process.cwd();
|
|
8
8
|
|
|
9
9
|
beforeEach(() => {
|
|
10
|
-
//
|
|
11
|
-
|
|
12
|
-
rmSync(testDir, { recursive: true, force: true });
|
|
13
|
-
}
|
|
14
|
-
mkdirSync(testDir, { recursive: true });
|
|
10
|
+
// Create test directory in /tmp
|
|
11
|
+
testDir = tmpdir("serve-test-");
|
|
15
12
|
process.chdir(testDir);
|
|
16
13
|
});
|
|
17
14
|
|
|
18
15
|
afterEach(() => {
|
|
19
16
|
// Return to original directory and clean up
|
|
20
|
-
process.chdir(
|
|
17
|
+
process.chdir(originalCwd);
|
|
21
18
|
if (existsSync(testDir)) {
|
|
22
19
|
rmSync(testDir, { recursive: true, force: true });
|
|
23
20
|
}
|