@memnexus-ai/cli 0.1.0 → 0.1.2
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 +9 -2
- package/.env.example +0 -13
- package/.eslintrc.js +0 -24
- package/.github/ISSUE_TEMPLATE/phase-1-foundation.md +0 -1078
- package/.github/workflows/publish.yml +0 -277
- package/.github/workflows/test-app-token.yml +0 -54
- package/.npmrc.backup +0 -3
- package/.npmrc.example +0 -6
- package/.prettierignore +0 -4
- package/.prettierrc +0 -8
- package/PLATFORM_TESTING.md +0 -243
- package/RELEASE.md +0 -428
- package/RELEASE_READINESS.md +0 -253
- package/docs/README.md +0 -219
- package/docs/code-generation-strategy.md +0 -560
- package/docs/prd.md +0 -748
- package/docs/sync-strategy.md +0 -533
- package/jest.config.js +0 -30
- package/scripts/install-deps.sh +0 -38
- package/src/commands/apikeys.ts +0 -144
- package/src/commands/artifacts.ts +0 -296
- package/src/commands/auth.ts +0 -122
- package/src/commands/communities.ts +0 -153
- package/src/commands/config.ts +0 -144
- package/src/commands/conversations.ts +0 -176
- package/src/commands/facts.ts +0 -320
- package/src/commands/graphrag.ts +0 -149
- package/src/commands/memories.ts +0 -332
- package/src/commands/patterns.ts +0 -251
- package/src/commands/system.ts +0 -102
- package/src/commands/topics.ts +0 -354
- package/src/index.ts +0 -43
- package/src/lib/api-client.ts +0 -68
- package/src/lib/auth.ts +0 -42
- package/src/lib/config.ts +0 -68
- package/src/lib/errors.ts +0 -143
- package/src/lib/formatters.ts +0 -123
- package/src/lib/spinner.ts +0 -113
- package/src/lib/validators.ts +0 -302
- package/src/types/index.ts +0 -17
- package/tests/__mocks__/chalk.ts +0 -16
- package/tests/__mocks__/cli-table3.ts +0 -37
- package/tests/__mocks__/configstore.ts +0 -38
- package/tests/commands/apikeys.test.ts +0 -179
- package/tests/commands/artifacts.test.ts +0 -194
- package/tests/commands/auth.test.ts +0 -120
- package/tests/commands/communities.test.ts +0 -154
- package/tests/commands/config.test.ts +0 -154
- package/tests/commands/conversations.test.ts +0 -136
- package/tests/commands/facts.test.ts +0 -210
- package/tests/commands/graphrag.test.ts +0 -194
- package/tests/commands/memories.test.ts +0 -215
- package/tests/commands/patterns.test.ts +0 -201
- package/tests/commands/system.test.ts +0 -172
- package/tests/commands/topics.test.ts +0 -274
- package/tests/lib/auth.test.ts +0 -77
- package/tests/lib/config.test.ts +0 -50
- package/tests/lib/errors.test.ts +0 -126
- package/tests/lib/formatters.test.ts +0 -87
- package/tsconfig.json +0 -20
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
import { formatJson, formatYaml, formatTable, formatOutput } from '../../src/lib/formatters';
|
|
2
|
-
|
|
3
|
-
describe('Output Formatters', () => {
|
|
4
|
-
const testData = { id: '123', name: 'Test', active: true };
|
|
5
|
-
const testArray = [
|
|
6
|
-
{ id: '1', name: 'First' },
|
|
7
|
-
{ id: '2', name: 'Second' },
|
|
8
|
-
];
|
|
9
|
-
|
|
10
|
-
describe('formatJson', () => {
|
|
11
|
-
it('should format as JSON', () => {
|
|
12
|
-
const output = formatJson(testData);
|
|
13
|
-
expect(output).toContain('"id"');
|
|
14
|
-
expect(output).toContain('"123"');
|
|
15
|
-
expect(output).toContain('"name"');
|
|
16
|
-
expect(output).toContain('"Test"');
|
|
17
|
-
});
|
|
18
|
-
|
|
19
|
-
it('should pretty print JSON', () => {
|
|
20
|
-
const output = formatJson(testData);
|
|
21
|
-
expect(output.split('\n').length).toBeGreaterThan(1);
|
|
22
|
-
});
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
describe('formatYaml', () => {
|
|
26
|
-
it('should format as YAML', () => {
|
|
27
|
-
const output = formatYaml(testData);
|
|
28
|
-
expect(output).toContain('id: ');
|
|
29
|
-
expect(output).toContain('name: Test');
|
|
30
|
-
expect(output).toContain('active: true');
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
|
|
34
|
-
describe('formatTable', () => {
|
|
35
|
-
it('should format object as table', () => {
|
|
36
|
-
const output = formatTable(testData);
|
|
37
|
-
expect(output).toContain('Property');
|
|
38
|
-
expect(output).toContain('Value');
|
|
39
|
-
expect(output).toContain('id');
|
|
40
|
-
expect(output).toContain('123');
|
|
41
|
-
});
|
|
42
|
-
|
|
43
|
-
it('should format array as table', () => {
|
|
44
|
-
const output = formatTable(testArray);
|
|
45
|
-
expect(output).toContain('id');
|
|
46
|
-
expect(output).toContain('name');
|
|
47
|
-
expect(output).toContain('First');
|
|
48
|
-
expect(output).toContain('Second');
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
it('should handle empty array', () => {
|
|
52
|
-
const output = formatTable([]);
|
|
53
|
-
expect(output).toBe('No results');
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
it('should handle null data', () => {
|
|
57
|
-
const output = formatTable(null);
|
|
58
|
-
expect(output).toBe('No data');
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
it('should format primitive value', () => {
|
|
62
|
-
const output = formatTable('simple string');
|
|
63
|
-
expect(output).toBe('simple string');
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
it('should format array of primitives', () => {
|
|
67
|
-
const output = formatTable(['one', 'two', 'three']);
|
|
68
|
-
expect(output).toContain('Value');
|
|
69
|
-
expect(output).toContain('one');
|
|
70
|
-
});
|
|
71
|
-
});
|
|
72
|
-
|
|
73
|
-
describe('formatOutput', () => {
|
|
74
|
-
it('should format with specified format', () => {
|
|
75
|
-
const jsonOutput = formatOutput(testData, 'json');
|
|
76
|
-
expect(jsonOutput).toContain('"id"');
|
|
77
|
-
|
|
78
|
-
const yamlOutput = formatOutput(testData, 'yaml');
|
|
79
|
-
expect(yamlOutput).toContain('id: ');
|
|
80
|
-
});
|
|
81
|
-
|
|
82
|
-
it('should use default format from config', () => {
|
|
83
|
-
const output = formatOutput(testData);
|
|
84
|
-
expect(output).toBeDefined();
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
});
|
package/tsconfig.json
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ES2022",
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"lib": ["ES2022"],
|
|
6
|
-
"outDir": "./dist",
|
|
7
|
-
"rootDir": "./src",
|
|
8
|
-
"strict": true,
|
|
9
|
-
"esModuleInterop": true,
|
|
10
|
-
"skipLibCheck": true,
|
|
11
|
-
"forceConsistentCasingInFileNames": true,
|
|
12
|
-
"resolveJsonModule": true,
|
|
13
|
-
"declaration": true,
|
|
14
|
-
"declarationMap": true,
|
|
15
|
-
"sourceMap": true,
|
|
16
|
-
"moduleResolution": "node"
|
|
17
|
-
},
|
|
18
|
-
"include": ["src/**/*"],
|
|
19
|
-
"exclude": ["node_modules", "dist", "tests"]
|
|
20
|
-
}
|