@salesforce/cli 2.45.6 → 2.46.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.
@@ -4,7 +4,6 @@
4
4
  * Licensed under the BSD 3-Clause license.
5
5
  * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
6
  */
7
- import { ux } from '@oclif/core';
8
7
  // eslint-disable-next-line @typescript-eslint/require-await
9
8
  const hook = async function ({ Command, config }) {
10
9
  if (process.argv.includes('--json'))
@@ -20,6 +19,7 @@ const hook = async function ({ Command, config }) {
20
19
  if (!specifiedVersion)
21
20
  return;
22
21
  if (plugin.version !== specifiedVersion) {
22
+ const { ux } = await import('@oclif/core/ux');
23
23
  ux.warn(`Plugin ${plugin.name} (${plugin.version}) differs from the version specified by ${config.bin} (${specifiedVersion})`);
24
24
  }
25
25
  };
package/dist/logger.js ADDED
@@ -0,0 +1,23 @@
1
+ /*
2
+ * Copyright (c) 2023, salesforce.com, inc.
3
+ * All rights reserved.
4
+ * Licensed under the BSD 3-Clause license.
5
+ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause
6
+ */
7
+ import { format } from 'node:util';
8
+ import { Logger } from '@salesforce/core/logger';
9
+ const customLogger = (namespace) => {
10
+ const sfLogger = new Logger(namespace);
11
+ return {
12
+ child: (ns, delimiter) => customLogger(`${namespace}${delimiter ?? ':'}${ns}`),
13
+ debug: (formatter, ...args) => sfLogger.debug(format(formatter, ...args)),
14
+ error: (formatter, ...args) => sfLogger.error(format(formatter, ...args)),
15
+ info: (formatter, ...args) => sfLogger.info(format(formatter, ...args)),
16
+ trace: (formatter, ...args) => sfLogger.trace(format(formatter, ...args)),
17
+ warn: (formatter, ...args) => sfLogger.warn(format(formatter, ...args)),
18
+ namespace,
19
+ };
20
+ };
21
+ export const logger = customLogger('sf:oclif');
22
+ export const sfStartupLogger = customLogger('sf-startup');
23
+ //# sourceMappingURL=logger.js.map
package/dist/util/env.js CHANGED
@@ -31,12 +31,6 @@ export class Env extends EnvVars {
31
31
  isInstaller() {
32
32
  return this.getBoolean(Env.SF_INSTALLER);
33
33
  }
34
- getNpmRegistryOverride() {
35
- return this.getString(Env.SF_NPM_REGISTRY);
36
- }
37
- setNpmRegistryOverride(value) {
38
- return this.setString(Env.SF_NPM_REGISTRY, value);
39
- }
40
34
  normalizeAutoupdateDisabled() {
41
35
  // Ensure that the legacy envar always causes the oclif counterpart to be set
42
36
  // see https://github.com/oclif/plugin-update/blob/3946fb296a0a95544ab6364b36a1f7422c8aeddf/src/hooks/init.ts#L22