@memberjunction/cli 2.116.0 ā 2.118.0
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/README.md +308 -57
- package/dist/commands/dbdoc/analyze.d.ts +3 -3
- package/dist/commands/dbdoc/analyze.js +25 -48
- package/dist/commands/dbdoc/export.d.ts +11 -4
- package/dist/commands/dbdoc/export.js +72 -75
- package/dist/commands/dbdoc/init.d.ts +1 -4
- package/dist/commands/dbdoc/init.js +7 -118
- package/dist/commands/dbdoc/reset.d.ts +9 -0
- package/dist/commands/dbdoc/reset.js +53 -0
- package/dist/commands/dbdoc/status.d.ts +9 -0
- package/dist/commands/dbdoc/status.js +52 -0
- package/dist/commands/sync/push.d.ts +2 -0
- package/dist/commands/sync/push.js +18 -1
- package/dist/commands/sync/status.d.ts +2 -0
- package/dist/commands/sync/status.js +14 -1
- package/dist/commands/test/compare.d.ts +18 -0
- package/dist/commands/test/compare.js +73 -0
- package/dist/commands/test/history.d.ts +15 -0
- package/dist/commands/test/history.js +66 -0
- package/dist/commands/test/index.d.ts +6 -0
- package/dist/commands/test/index.js +31 -0
- package/dist/commands/test/list.d.ts +16 -0
- package/dist/commands/test/list.js +73 -0
- package/dist/commands/test/run.d.ts +17 -0
- package/dist/commands/test/run.js +69 -0
- package/dist/commands/test/suite.d.ts +15 -0
- package/dist/commands/test/suite.js +58 -0
- package/dist/commands/test/validate.d.ts +17 -0
- package/dist/commands/test/validate.js +70 -0
- package/oclif.manifest.json +726 -88
- package/package.json +12 -9
- package/dist/commands/dbdoc/review.d.ts +0 -10
- package/dist/commands/dbdoc/review.js +0 -81
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.118.0",
|
|
4
4
|
"description": "MemberJunction command line tools",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"oclif"
|
|
@@ -51,16 +51,20 @@
|
|
|
51
51
|
},
|
|
52
52
|
"dependencies": {
|
|
53
53
|
"@inquirer/prompts": "^5.0.1",
|
|
54
|
-
"@memberjunction/ai-cli": "2.
|
|
55
|
-
"@memberjunction/codegen-lib": "2.
|
|
56
|
-
"@memberjunction/core": "2.
|
|
57
|
-
"@memberjunction/db-auto-doc": "2.
|
|
58
|
-
"@memberjunction/metadata-sync": "2.
|
|
59
|
-
"@memberjunction/sqlserver-dataprovider": "2.
|
|
54
|
+
"@memberjunction/ai-cli": "2.118.0",
|
|
55
|
+
"@memberjunction/codegen-lib": "2.118.0",
|
|
56
|
+
"@memberjunction/core": "2.118.0",
|
|
57
|
+
"@memberjunction/db-auto-doc": "2.118.0",
|
|
58
|
+
"@memberjunction/metadata-sync": "2.118.0",
|
|
59
|
+
"@memberjunction/sqlserver-dataprovider": "2.118.0",
|
|
60
|
+
"@memberjunction/testing-cli": "2.118.0",
|
|
60
61
|
"@oclif/core": "^3",
|
|
61
62
|
"@oclif/plugin-help": "^6",
|
|
62
63
|
"@oclif/plugin-version": "^2.0.17",
|
|
63
64
|
"@oclif/plugin-warn-if-update-available": "^3.0.16",
|
|
65
|
+
"ajv": "^8.12.0",
|
|
66
|
+
"ajv-formats": "^2.1.1",
|
|
67
|
+
"chalk": "^4.1.2",
|
|
64
68
|
"cosmiconfig": "9.0.0",
|
|
65
69
|
"dotenv": "16.4.5",
|
|
66
70
|
"fast-glob": "^3.3.2",
|
|
@@ -70,8 +74,7 @@
|
|
|
70
74
|
"ora-classic": "^5.4.2",
|
|
71
75
|
"recast": "^0.23.9",
|
|
72
76
|
"simple-git": "^3.27.0",
|
|
73
|
-
"zod": "^3.23.4"
|
|
74
|
-
"chalk": "^4.1.2"
|
|
77
|
+
"zod": "^3.23.4"
|
|
75
78
|
},
|
|
76
79
|
"devDependencies": {
|
|
77
80
|
"@oclif/prettier-config": "^0.2.1",
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { Command } from '@oclif/core';
|
|
2
|
-
export default class Review extends Command {
|
|
3
|
-
static description: string;
|
|
4
|
-
static examples: string[];
|
|
5
|
-
static flags: {
|
|
6
|
-
schema: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
7
|
-
'unapproved-only': import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
8
|
-
};
|
|
9
|
-
run(): Promise<void>;
|
|
10
|
-
}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const core_1 = require("@oclif/core");
|
|
7
|
-
const prompts_1 = require("@inquirer/prompts");
|
|
8
|
-
const chalk_1 = __importDefault(require("chalk"));
|
|
9
|
-
const db_auto_doc_1 = require("@memberjunction/db-auto-doc");
|
|
10
|
-
class Review extends core_1.Command {
|
|
11
|
-
static description = 'Review and approve AI-generated documentation';
|
|
12
|
-
static examples = [
|
|
13
|
-
'<%= config.bin %> <%= command.id %>',
|
|
14
|
-
'<%= config.bin %> <%= command.id %> --schema dbo',
|
|
15
|
-
'<%= config.bin %> <%= command.id %> --unapproved-only',
|
|
16
|
-
];
|
|
17
|
-
static flags = {
|
|
18
|
-
schema: core_1.Flags.string({
|
|
19
|
-
description: 'Review specific schema',
|
|
20
|
-
}),
|
|
21
|
-
'unapproved-only': core_1.Flags.boolean({
|
|
22
|
-
description: 'Only show unapproved items',
|
|
23
|
-
default: false,
|
|
24
|
-
}),
|
|
25
|
-
};
|
|
26
|
-
async run() {
|
|
27
|
-
const { flags } = await this.parse(Review);
|
|
28
|
-
this.log(chalk_1.default.blue.bold('\nš Review Documentation\n'));
|
|
29
|
-
try {
|
|
30
|
-
const stateManager = new db_auto_doc_1.StateManager();
|
|
31
|
-
const state = await stateManager.load();
|
|
32
|
-
const unapproved = stateManager.getUnapprovedTables(flags.schema);
|
|
33
|
-
if (unapproved.length === 0) {
|
|
34
|
-
this.log(chalk_1.default.green('ā
All tables approved!'));
|
|
35
|
-
return;
|
|
36
|
-
}
|
|
37
|
-
this.log(`Found ${unapproved.length} unapproved tables\n`);
|
|
38
|
-
for (const { schema, table } of unapproved) {
|
|
39
|
-
const schemaState = state.schemas[schema];
|
|
40
|
-
const tableState = schemaState.tables[table];
|
|
41
|
-
this.log(chalk_1.default.cyan.bold(`\n${schema}.${table}`));
|
|
42
|
-
this.log('ā'.repeat(50));
|
|
43
|
-
if (tableState.aiGenerated) {
|
|
44
|
-
this.log(chalk_1.default.white('Description:'));
|
|
45
|
-
this.log(tableState.aiGenerated.description);
|
|
46
|
-
this.log('');
|
|
47
|
-
this.log(chalk_1.default.gray(`Confidence: ${(tableState.aiGenerated.confidence * 100).toFixed(0)}%`));
|
|
48
|
-
}
|
|
49
|
-
const action = await (0, prompts_1.select)({
|
|
50
|
-
message: 'Action:',
|
|
51
|
-
choices: [
|
|
52
|
-
{ name: 'Approve', value: 'approve' },
|
|
53
|
-
{ name: 'Add notes', value: 'notes' },
|
|
54
|
-
{ name: 'Skip', value: 'skip' },
|
|
55
|
-
{ name: 'Exit review', value: 'exit' },
|
|
56
|
-
],
|
|
57
|
-
});
|
|
58
|
-
if (action === 'exit') {
|
|
59
|
-
break;
|
|
60
|
-
}
|
|
61
|
-
if (action === 'approve') {
|
|
62
|
-
stateManager.approveTable(schema, table);
|
|
63
|
-
this.log(chalk_1.default.green('ā Approved'));
|
|
64
|
-
}
|
|
65
|
-
if (action === 'notes') {
|
|
66
|
-
const notes = await (0, prompts_1.input)({
|
|
67
|
-
message: 'Enter notes:',
|
|
68
|
-
});
|
|
69
|
-
stateManager.addTableNotes(schema, table, notes);
|
|
70
|
-
this.log(chalk_1.default.green('ā Notes added'));
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
await stateManager.save();
|
|
74
|
-
this.log(chalk_1.default.green('\nā
Review complete!'));
|
|
75
|
-
}
|
|
76
|
-
catch (error) {
|
|
77
|
-
this.error(error.message);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
exports.default = Review;
|