@memberjunction/cli 4.3.0 → 4.3.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/bin/run.js +3 -2
- package/dist/commands/ai/actions/list.d.ts.map +1 -1
- package/dist/commands/ai/actions/list.js +1 -1
- package/dist/commands/ai/actions/list.js.map +1 -1
- package/dist/commands/ai/actions/run.d.ts.map +1 -1
- package/dist/commands/ai/actions/run.js +1 -1
- package/dist/commands/ai/actions/run.js.map +1 -1
- package/dist/commands/ai/agents/list.d.ts.map +1 -1
- package/dist/commands/ai/agents/list.js +1 -1
- package/dist/commands/ai/agents/list.js.map +1 -1
- package/dist/commands/ai/agents/run.d.ts.map +1 -1
- package/dist/commands/ai/agents/run.js +1 -1
- package/dist/commands/ai/agents/run.js.map +1 -1
- package/dist/commands/ai/audit/agent-run.d.ts.map +1 -1
- package/dist/commands/ai/audit/agent-run.js +1 -1
- package/dist/commands/ai/audit/agent-run.js.map +1 -1
- package/dist/commands/ai/prompts/list.d.ts.map +1 -1
- package/dist/commands/ai/prompts/list.js +1 -1
- package/dist/commands/ai/prompts/list.js.map +1 -1
- package/dist/commands/ai/prompts/run.d.ts.map +1 -1
- package/dist/commands/ai/prompts/run.js +1 -1
- package/dist/commands/ai/prompts/run.js.map +1 -1
- package/dist/commands/codegen/index.d.ts.map +1 -1
- package/dist/commands/codegen/index.js +1 -1
- package/dist/commands/codegen/index.js.map +1 -1
- package/dist/commands/codegen/manifest.d.ts.map +1 -1
- package/dist/commands/codegen/manifest.js +1 -1
- package/dist/commands/codegen/manifest.js.map +1 -1
- package/dist/commands/migrate/index.d.ts.map +1 -1
- package/dist/commands/migrate/index.js +19 -5
- package/dist/commands/migrate/index.js.map +1 -1
- package/dist/commands/querygen/export.d.ts.map +1 -1
- package/dist/commands/querygen/export.js +2 -2
- package/dist/commands/querygen/export.js.map +1 -1
- package/dist/commands/querygen/generate.d.ts.map +1 -1
- package/dist/commands/querygen/generate.js +3 -3
- package/dist/commands/querygen/generate.js.map +1 -1
- package/dist/commands/querygen/validate.d.ts.map +1 -1
- package/dist/commands/querygen/validate.js +2 -2
- package/dist/commands/querygen/validate.js.map +1 -1
- package/dist/commands/sync/file-reset.d.ts.map +1 -1
- package/dist/commands/sync/file-reset.js +1 -1
- package/dist/commands/sync/file-reset.js.map +1 -1
- package/dist/commands/sync/init.d.ts.map +1 -1
- package/dist/commands/sync/init.js +1 -1
- package/dist/commands/sync/init.js.map +1 -1
- package/dist/commands/sync/pull.d.ts.map +1 -1
- package/dist/commands/sync/pull.js +6 -6
- package/dist/commands/sync/pull.js.map +1 -1
- package/dist/commands/sync/push.d.ts.map +1 -1
- package/dist/commands/sync/push.js +1 -1
- package/dist/commands/sync/push.js.map +1 -1
- package/dist/commands/sync/status.d.ts.map +1 -1
- package/dist/commands/sync/status.js +1 -1
- package/dist/commands/sync/status.js.map +1 -1
- package/dist/commands/sync/validate.d.ts.map +1 -1
- package/dist/commands/sync/validate.js +1 -1
- package/dist/commands/sync/validate.js.map +1 -1
- package/dist/commands/sync/watch.d.ts.map +1 -1
- package/dist/commands/sync/watch.js +2 -1
- package/dist/commands/sync/watch.js.map +1 -1
- package/dist/commands/test/compare.d.ts.map +1 -1
- package/dist/commands/test/compare.js +1 -1
- package/dist/commands/test/compare.js.map +1 -1
- package/dist/commands/test/history.d.ts.map +1 -1
- package/dist/commands/test/history.js +1 -1
- package/dist/commands/test/history.js.map +1 -1
- package/dist/commands/test/list.d.ts.map +1 -1
- package/dist/commands/test/list.js +1 -1
- package/dist/commands/test/list.js.map +1 -1
- package/dist/commands/test/run.d.ts.map +1 -1
- package/dist/commands/test/run.js +1 -1
- package/dist/commands/test/run.js.map +1 -1
- package/dist/commands/test/suite.d.ts.map +1 -1
- package/dist/commands/test/suite.js +1 -1
- package/dist/commands/test/suite.js.map +1 -1
- package/dist/commands/test/validate.d.ts.map +1 -1
- package/dist/commands/test/validate.js +1 -1
- package/dist/commands/test/validate.js.map +1 -1
- package/dist/hooks/prerun.d.ts.map +1 -1
- package/dist/hooks/prerun.js +8 -0
- package/dist/hooks/prerun.js.map +1 -1
- package/dist/light-commands.d.ts +17 -0
- package/dist/light-commands.d.ts.map +1 -0
- package/dist/light-commands.js +41 -0
- package/dist/light-commands.js.map +1 -0
- package/oclif.manifest.json +33 -33
- package/package.json +13 -13
package/dist/hooks/prerun.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import figlet from 'figlet';
|
|
2
|
+
import { LIGHT_COMMANDS } from '../light-commands.js';
|
|
2
3
|
const hook = async function (options) {
|
|
3
4
|
// Skip banners if --quiet flag is present (or appears to be present)
|
|
4
5
|
if (options.argv?.some((arg) => arg === '--quiet' || (/^-[^-]+/.test(arg) && arg.includes('q')))) {
|
|
@@ -16,6 +17,13 @@ const hook = async function (options) {
|
|
|
16
17
|
if (options.Command.id !== 'version') {
|
|
17
18
|
options.context.log(options.config.userAgent + '\n');
|
|
18
19
|
}
|
|
20
|
+
// Conditionally load MJ bootstrap for heavy commands.
|
|
21
|
+
// Light commands (version, help, bump, migrate, clean, install, dbdoc/*)
|
|
22
|
+
// skip the ~1,400 class registrations for instant startup.
|
|
23
|
+
const commandId = options.Command.id ?? '';
|
|
24
|
+
if (!LIGHT_COMMANDS.has(commandId)) {
|
|
25
|
+
await import('@memberjunction/server-bootstrap-lite/mj-class-registrations');
|
|
26
|
+
}
|
|
19
27
|
};
|
|
20
28
|
export default hook;
|
|
21
29
|
//# sourceMappingURL=prerun.js.map
|
package/dist/hooks/prerun.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"prerun.js","sourceRoot":"","sources":["../../src/hooks/prerun.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAEtD,MAAM,IAAI,GAAmB,KAAK,WAAW,OAAO;IAClD,qEAAqE;IACrE,IAAI,OAAO,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,KAAK,SAAS,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,GAAG,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC;QACjG,OAAO;IACT,CAAC;IAED,OAAO,CAAC,OAAO,CAAC,GAAG,CACjB,OAAO,CAAC,MAAM,CAAC,OAAO,IAAI,EAAE;QAC1B,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,gBAAgB,EAAE;YAChC,IAAI,EAAE,UAAU;YAChB,gBAAgB,EAAE,SAAS;YAC3B,cAAc,EAAE,SAAS;YACzB,KAAK,EAAE,GAAG;YACV,eAAe,EAAE,IAAI;SACtB,CAAC;QACJ,CAAC,CAAC,iCAAiC,CACtC,CAAC;IAEF,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACrC,OAAO,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,CAAC;IACvD,CAAC;IAED,sDAAsD;IACtD,yEAAyE;IACzE,2DAA2D;IAC3D,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC;IAC3C,IAAI,CAAC,cAAc,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;QACnC,MAAM,MAAM,CAAC,8DAA8D,CAAC,CAAC;IAC/E,CAAC;AACH,CAAC,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands that do NOT require @memberjunction/server-bootstrap-lite.
|
|
3
|
+
* These commands use only lightweight dependencies (zod, cosmiconfig, node-flyway,
|
|
4
|
+
* fast-glob, fs-extra, etc.) and can start instantly without loading ~1,400 class
|
|
5
|
+
* registrations.
|
|
6
|
+
*
|
|
7
|
+
* Any command NOT listed here will trigger dynamic loading of the MJ bootstrap
|
|
8
|
+
* in the prerun hook before execution.
|
|
9
|
+
*
|
|
10
|
+
* When adding new commands:
|
|
11
|
+
* - If the command imports from @memberjunction/* packages that depend on
|
|
12
|
+
* server-bootstrap-lite, do NOT add it here.
|
|
13
|
+
* - If the command uses only standard npm packages or light @memberjunction
|
|
14
|
+
* packages (like @memberjunction/config), add its oclif command ID here.
|
|
15
|
+
*/
|
|
16
|
+
export declare const LIGHT_COMMANDS: ReadonlySet<string>;
|
|
17
|
+
//# sourceMappingURL=light-commands.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-commands.d.ts","sourceRoot":"","sources":["../src/light-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,cAAc,EAAE,WAAW,CAAC,MAAM,CA6B7C,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Commands that do NOT require @memberjunction/server-bootstrap-lite.
|
|
3
|
+
* These commands use only lightweight dependencies (zod, cosmiconfig, node-flyway,
|
|
4
|
+
* fast-glob, fs-extra, etc.) and can start instantly without loading ~1,400 class
|
|
5
|
+
* registrations.
|
|
6
|
+
*
|
|
7
|
+
* Any command NOT listed here will trigger dynamic loading of the MJ bootstrap
|
|
8
|
+
* in the prerun hook before execution.
|
|
9
|
+
*
|
|
10
|
+
* When adding new commands:
|
|
11
|
+
* - If the command imports from @memberjunction/* packages that depend on
|
|
12
|
+
* server-bootstrap-lite, do NOT add it here.
|
|
13
|
+
* - If the command uses only standard npm packages or light @memberjunction
|
|
14
|
+
* packages (like @memberjunction/config), add its oclif command ID here.
|
|
15
|
+
*/
|
|
16
|
+
export const LIGHT_COMMANDS = new Set([
|
|
17
|
+
// Built-in oclif plugins
|
|
18
|
+
'version',
|
|
19
|
+
'help',
|
|
20
|
+
// Bump - uses zod, fast-glob, fs only
|
|
21
|
+
'bump',
|
|
22
|
+
// Database commands - use node-flyway + config only
|
|
23
|
+
'clean',
|
|
24
|
+
'migrate',
|
|
25
|
+
// Install wizard - uses zod, recast, fs-extra only
|
|
26
|
+
'install',
|
|
27
|
+
// Topic index commands (just display help text, no heavy imports)
|
|
28
|
+
'ai',
|
|
29
|
+
'ai audit',
|
|
30
|
+
'test',
|
|
31
|
+
'dbdoc',
|
|
32
|
+
// DBDoc commands - already use dynamic imports internally
|
|
33
|
+
'dbdoc init',
|
|
34
|
+
'dbdoc analyze',
|
|
35
|
+
'dbdoc export',
|
|
36
|
+
'dbdoc export-sample-queries',
|
|
37
|
+
'dbdoc generate-queries',
|
|
38
|
+
'dbdoc reset',
|
|
39
|
+
'dbdoc status',
|
|
40
|
+
]);
|
|
41
|
+
//# sourceMappingURL=light-commands.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"light-commands.js","sourceRoot":"","sources":["../src/light-commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,cAAc,GAAwB,IAAI,GAAG,CAAC;IACzD,yBAAyB;IACzB,SAAS;IACT,MAAM;IAEN,sCAAsC;IACtC,MAAM;IAEN,oDAAoD;IACpD,OAAO;IACP,SAAS;IAET,mDAAmD;IACnD,SAAS;IAET,kEAAkE;IAClE,IAAI;IACJ,UAAU;IACV,MAAM;IACN,OAAO;IAEP,0DAA0D;IAC1D,YAAY;IACZ,eAAe;IACf,cAAc;IACd,6BAA6B;IAC7B,wBAAwB;IACxB,aAAa;IACb,cAAc;CACf,CAAC,CAAC"}
|
package/oclif.manifest.json
CHANGED
|
@@ -94,6 +94,38 @@
|
|
|
94
94
|
"index.js"
|
|
95
95
|
]
|
|
96
96
|
},
|
|
97
|
+
"clean": {
|
|
98
|
+
"aliases": [],
|
|
99
|
+
"args": {},
|
|
100
|
+
"description": "Resets the MemberJunction database to a pre-installation state",
|
|
101
|
+
"examples": [
|
|
102
|
+
"<%= config.bin %> <%= command.id %>\n"
|
|
103
|
+
],
|
|
104
|
+
"flags": {
|
|
105
|
+
"verbose": {
|
|
106
|
+
"char": "v",
|
|
107
|
+
"description": "Enable additional logging",
|
|
108
|
+
"name": "verbose",
|
|
109
|
+
"allowNo": false,
|
|
110
|
+
"type": "boolean"
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"hasDynamicHelp": false,
|
|
114
|
+
"hiddenAliases": [],
|
|
115
|
+
"id": "clean",
|
|
116
|
+
"pluginAlias": "@memberjunction/cli",
|
|
117
|
+
"pluginName": "@memberjunction/cli",
|
|
118
|
+
"pluginType": "core",
|
|
119
|
+
"strict": true,
|
|
120
|
+
"enableJsonFlag": false,
|
|
121
|
+
"isESM": true,
|
|
122
|
+
"relativePath": [
|
|
123
|
+
"dist",
|
|
124
|
+
"commands",
|
|
125
|
+
"clean",
|
|
126
|
+
"index.js"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
97
129
|
"codegen": {
|
|
98
130
|
"aliases": [],
|
|
99
131
|
"args": {},
|
|
@@ -200,38 +232,6 @@
|
|
|
200
232
|
"manifest.js"
|
|
201
233
|
]
|
|
202
234
|
},
|
|
203
|
-
"clean": {
|
|
204
|
-
"aliases": [],
|
|
205
|
-
"args": {},
|
|
206
|
-
"description": "Resets the MemberJunction database to a pre-installation state",
|
|
207
|
-
"examples": [
|
|
208
|
-
"<%= config.bin %> <%= command.id %>\n"
|
|
209
|
-
],
|
|
210
|
-
"flags": {
|
|
211
|
-
"verbose": {
|
|
212
|
-
"char": "v",
|
|
213
|
-
"description": "Enable additional logging",
|
|
214
|
-
"name": "verbose",
|
|
215
|
-
"allowNo": false,
|
|
216
|
-
"type": "boolean"
|
|
217
|
-
}
|
|
218
|
-
},
|
|
219
|
-
"hasDynamicHelp": false,
|
|
220
|
-
"hiddenAliases": [],
|
|
221
|
-
"id": "clean",
|
|
222
|
-
"pluginAlias": "@memberjunction/cli",
|
|
223
|
-
"pluginName": "@memberjunction/cli",
|
|
224
|
-
"pluginType": "core",
|
|
225
|
-
"strict": true,
|
|
226
|
-
"enableJsonFlag": false,
|
|
227
|
-
"isESM": true,
|
|
228
|
-
"relativePath": [
|
|
229
|
-
"dist",
|
|
230
|
-
"commands",
|
|
231
|
-
"clean",
|
|
232
|
-
"index.js"
|
|
233
|
-
]
|
|
234
|
-
},
|
|
235
235
|
"dbdoc:analyze": {
|
|
236
236
|
"aliases": [],
|
|
237
237
|
"args": {},
|
|
@@ -2598,5 +2598,5 @@
|
|
|
2598
2598
|
]
|
|
2599
2599
|
}
|
|
2600
2600
|
},
|
|
2601
|
-
"version": "4.3.
|
|
2601
|
+
"version": "4.3.1"
|
|
2602
2602
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@memberjunction/cli",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.3.
|
|
4
|
+
"version": "4.3.1",
|
|
5
5
|
"description": "MemberJunction command line tools",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"oclif"
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"/oclif.manifest.json"
|
|
28
28
|
],
|
|
29
29
|
"scripts": {
|
|
30
|
-
"build": "tsc && tsc-alias -f",
|
|
31
|
-
"prepack": "npm run build && oclif
|
|
30
|
+
"build": "tsc && tsc-alias -f && oclif manifest",
|
|
31
|
+
"prepack": "npm run build && oclif readme",
|
|
32
32
|
"postpack": "rimraf oclif.manifest.json",
|
|
33
33
|
"version": "oclif readme && git add README.md",
|
|
34
34
|
"test": "vitest run"
|
|
@@ -53,16 +53,16 @@
|
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
55
|
"@inquirer/prompts": "^8.2.0",
|
|
56
|
-
"@memberjunction/ai-cli": "4.3.
|
|
57
|
-
"@memberjunction/codegen-lib": "4.3.
|
|
58
|
-
"@memberjunction/config": "4.3.
|
|
59
|
-
"@memberjunction/core": "4.3.
|
|
60
|
-
"@memberjunction/db-auto-doc": "4.3.
|
|
61
|
-
"@memberjunction/metadata-sync": "4.3.
|
|
62
|
-
"@memberjunction/query-gen": "4.3.
|
|
63
|
-
"@memberjunction/server-bootstrap-lite": "4.3.
|
|
64
|
-
"@memberjunction/sqlserver-dataprovider": "4.3.
|
|
65
|
-
"@memberjunction/testing-cli": "4.3.
|
|
56
|
+
"@memberjunction/ai-cli": "4.3.1",
|
|
57
|
+
"@memberjunction/codegen-lib": "4.3.1",
|
|
58
|
+
"@memberjunction/config": "4.3.1",
|
|
59
|
+
"@memberjunction/core": "4.3.1",
|
|
60
|
+
"@memberjunction/db-auto-doc": "4.3.1",
|
|
61
|
+
"@memberjunction/metadata-sync": "4.3.1",
|
|
62
|
+
"@memberjunction/query-gen": "4.3.1",
|
|
63
|
+
"@memberjunction/server-bootstrap-lite": "4.3.1",
|
|
64
|
+
"@memberjunction/sqlserver-dataprovider": "4.3.1",
|
|
65
|
+
"@memberjunction/testing-cli": "4.3.1",
|
|
66
66
|
"@oclif/core": "^3.27.0",
|
|
67
67
|
"@oclif/plugin-help": "^6.2.37",
|
|
68
68
|
"@oclif/plugin-version": "^2.2.36",
|