@memberjunction/cli 1.6.0 → 1.7.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
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.
|
|
15
|
+
@memberjunction/cli/1.7.0 linux-x64 node-v20.14.0
|
|
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.
|
|
66
|
+
_See code: [src/commands/install/index.ts](https://github.com/MemberJunction/MJ/blob/v1.7.0/src/commands/install/index.ts)_
|
|
67
67
|
|
|
68
68
|
## `mj version`
|
|
69
69
|
|
|
@@ -130,7 +130,7 @@ export default class Install extends Command {
|
|
|
130
130
|
* @param {string} dirPath - The path to the directory containing environment files.
|
|
131
131
|
* @param {object} config - The configuration object with values to update.
|
|
132
132
|
*/
|
|
133
|
-
updateEnvironmentFiles(dirPath: string, config: Record<string,
|
|
133
|
+
updateEnvironmentFiles(dirPath: string, config: Record<string, string | undefined>): Promise<void>;
|
|
134
134
|
renameFolderToMJ_BASE(dbDatabase: string): void;
|
|
135
135
|
/**
|
|
136
136
|
* Updates newUserSetup in the config.json file.
|
|
@@ -193,6 +193,7 @@ CONFIG_FILE='config.json'
|
|
|
193
193
|
CLIENT_ID: this.userConfig.msalWebClientId,
|
|
194
194
|
TENANT_ID: this.userConfig.msalTenantId,
|
|
195
195
|
CLIENT_AUTHORITY: this.userConfig.msalTenantId ? `https://login.microsoftonline.com/${this.userConfig.msalTenantId}` : '',
|
|
196
|
+
AUTH_TYPE: this.userConfig.authType,
|
|
196
197
|
AUTH0_DOMAIN: this.userConfig.auth0Domain,
|
|
197
198
|
AUTH0_CLIENTID: this.userConfig.auth0ClientId,
|
|
198
199
|
};
|
|
@@ -390,9 +391,10 @@ CONFIG_FILE='config.json'
|
|
|
390
391
|
const data = await fs.readFile(filePath, 'utf8');
|
|
391
392
|
// Replace the values in the file.
|
|
392
393
|
let updatedData = data;
|
|
393
|
-
Object.
|
|
394
|
-
const regex = new RegExp(
|
|
395
|
-
|
|
394
|
+
Object.entries(config).forEach(([key, value = '']) => {
|
|
395
|
+
const regex = new RegExp(`(["\']?${key}["\']?:\\s*["\'])([^"\']*)(["\'])`, 'g');
|
|
396
|
+
const escapedValue = value.replaceAll('$', () => '$$');
|
|
397
|
+
updatedData = updatedData.replace(regex, `$1${escapedValue}$3`);
|
|
396
398
|
});
|
|
397
399
|
// Write the updated data back to the file.
|
|
398
400
|
await fs.writeFile(filePath, updatedData, 'utf8');
|
package/oclif.manifest.json
CHANGED