@memberjunction/cli 1.1.1 → 1.1.3
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 +2 -2
- package/dist/commands/install/index.js +18 -9
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -12,7 +12,7 @@ $ npm install -g @memberjunction/cli
|
|
|
12
12
|
$ mj COMMAND
|
|
13
13
|
running command...
|
|
14
14
|
$ mj (--version)
|
|
15
|
-
@memberjunction/cli/1.1.
|
|
15
|
+
@memberjunction/cli/1.1.3 linux-x64 node-v20.12.2
|
|
16
16
|
$ mj --help [COMMAND]
|
|
17
17
|
USAGE
|
|
18
18
|
$ mj COMMAND
|
|
@@ -63,7 +63,7 @@ EXAMPLES
|
|
|
63
63
|
$ mj install
|
|
64
64
|
```
|
|
65
65
|
|
|
66
|
-
_See code: [src/commands/install/index.ts](https://github.com/MemberJunction/MJ/blob/v1.1.
|
|
66
|
+
_See code: [src/commands/install/index.ts](https://github.com/MemberJunction/MJ/blob/v1.1.3/src/commands/install/index.ts)_
|
|
67
67
|
|
|
68
68
|
## `mj version`
|
|
69
69
|
|
|
@@ -42,10 +42,10 @@ const MJ_BASE_DIR = 'MJ_BASE';
|
|
|
42
42
|
const MJAPI_DIR = 'MJAPI';
|
|
43
43
|
const MJEXPLORER_DIR = 'MJExplorer';
|
|
44
44
|
const configSchema = zod_1.z.object({
|
|
45
|
-
dbUrl: zod_1.z.string().
|
|
45
|
+
dbUrl: zod_1.z.string().min(1),
|
|
46
46
|
dbInstance: zod_1.z.string(),
|
|
47
47
|
dbTrustServerCertificate: zod_1.z.enum(['Y', 'N']),
|
|
48
|
-
dbDatabase: zod_1.z.string(),
|
|
48
|
+
dbDatabase: zod_1.z.string().min(1),
|
|
49
49
|
dbPort: zod_1.z.number({ coerce: true }).int().positive(),
|
|
50
50
|
codeGenLogin: zod_1.z.string(),
|
|
51
51
|
codeGenPwD: zod_1.z.string(),
|
|
@@ -123,9 +123,9 @@ MJ_CORE_SCHEMA='__mj'
|
|
|
123
123
|
|
|
124
124
|
# If using Advanced Generation, populate this with the API key for the AI vendor you are using
|
|
125
125
|
# Also, you need to configure the settings under advancedGeneration in the config.json file, including choosing the vendor.
|
|
126
|
-
AI_VENDOR_API_KEY__OpenAILLM='${this.userConfig.openAIAPIKey}'
|
|
127
|
-
AI_VENDOR_API_KEY__MistralLLM='${this.userConfig.mistralAPIKey}'
|
|
128
|
-
AI_VENDOR_API_KEY__AnthropicLLM='${this.userConfig.anthropicAPIKey}'
|
|
126
|
+
AI_VENDOR_API_KEY__OpenAILLM='${this.userConfig.openAIAPIKey}'
|
|
127
|
+
AI_VENDOR_API_KEY__MistralLLM='${this.userConfig.mistralAPIKey}'
|
|
128
|
+
AI_VENDOR_API_KEY__AnthropicLLM='${this.userConfig.anthropicAPIKey}'
|
|
129
129
|
|
|
130
130
|
#CONFIG_FILE is the name of the file that has the configuration parameters for CodeGen
|
|
131
131
|
CONFIG_FILE='config.json'
|
|
@@ -155,7 +155,7 @@ UPDATE_USER_CACHE_WHEN_NOT_FOUND=1
|
|
|
155
155
|
UPDATE_USER_CACHE_WHEN_NOT_FOUND_DELAY=5000
|
|
156
156
|
|
|
157
157
|
# AUTHENTICATION SECTION - you can use MSAL or Auth0 or both for authentication services for MJAPI
|
|
158
|
-
# MSAL Section
|
|
158
|
+
# MSAL Section
|
|
159
159
|
WEB_CLIENT_ID=${this.userConfig.msalWebClientId}
|
|
160
160
|
TENANT_ID=${this.userConfig.msalTenantId}
|
|
161
161
|
|
|
@@ -196,7 +196,7 @@ CONFIG_FILE='config.json'
|
|
|
196
196
|
AUTH0_DOMAIN: this.userConfig.auth0Domain,
|
|
197
197
|
AUTH0_CLIENTID: this.userConfig.auth0ClientId,
|
|
198
198
|
};
|
|
199
|
-
await this.updateEnvironmentFiles(MJEXPLORER_DIR, config);
|
|
199
|
+
await this.updateEnvironmentFiles(node_path_1.default.join(MJEXPLORER_DIR, 'src', 'environments'), config);
|
|
200
200
|
// keep on going with MJ Explorer - do the rest of the stuff
|
|
201
201
|
this.log(' Running npm link for GeneratedEntities...');
|
|
202
202
|
(0, node_child_process_1.execSync)('npm link ../GeneratedEntities', { stdio: 'inherit', cwd: MJEXPLORER_DIR });
|
|
@@ -221,7 +221,10 @@ CONFIG_FILE='config.json'
|
|
|
221
221
|
}
|
|
222
222
|
if (!userConfig) {
|
|
223
223
|
this.log('\n>>> Please answer the following questions to setup the .env files for CodeGen. After this process you can manually edit the .env file in CodeGen as desired.');
|
|
224
|
-
const dbUrl = await (0, prompts_1.input)({
|
|
224
|
+
const dbUrl = await (0, prompts_1.input)({
|
|
225
|
+
message: 'Enter the database server hostname:',
|
|
226
|
+
validate: (v) => configSchema.shape.dbDatabase.safeParse(v).success,
|
|
227
|
+
});
|
|
225
228
|
const dbInstance = await (0, prompts_1.input)({
|
|
226
229
|
message: 'If you are using a named instance on that server, if so, enter the name here, if not leave blank:',
|
|
227
230
|
});
|
|
@@ -230,7 +233,10 @@ CONFIG_FILE='config.json'
|
|
|
230
233
|
}))
|
|
231
234
|
? 'Y'
|
|
232
235
|
: 'N';
|
|
233
|
-
const dbDatabase = await (0, prompts_1.input)({
|
|
236
|
+
const dbDatabase = await (0, prompts_1.input)({
|
|
237
|
+
message: 'Enter the database name on that server:',
|
|
238
|
+
validate: (v) => configSchema.shape.dbDatabase.safeParse(v).success,
|
|
239
|
+
});
|
|
234
240
|
const dbPort = await (0, prompts_1.input)({
|
|
235
241
|
message: 'Enter the port the database server listens on',
|
|
236
242
|
validate: (v) => configSchema.shape.dbPort.safeParse(v).success,
|
|
@@ -377,6 +383,9 @@ CONFIG_FILE='config.json'
|
|
|
377
383
|
const envFiles = files.filter((file) => envFilePattern.test(file));
|
|
378
384
|
// Update each environment file.
|
|
379
385
|
for (const file of envFiles) {
|
|
386
|
+
if (this.flags.verbose) {
|
|
387
|
+
this.log(`Updating ${file}`);
|
|
388
|
+
}
|
|
380
389
|
const filePath = node_path_1.default.join(dirPath, file);
|
|
381
390
|
const data = await fs.readFile(filePath, 'utf8');
|
|
382
391
|
// Replace the values in the file.
|
package/oclif.manifest.json
CHANGED