@salesforce/core 3.20.3 → 3.21.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/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ## [3.21.0](https://github.com/forcedotcom/sfdx-core/compare/v3.20.3...v3.21.0) (2022-06-15)
6
+
7
+ ### Features
8
+
9
+ - add getConnection method to MockTestOrgData ([#600](https://github.com/forcedotcom/sfdx-core/issues/600)) ([a642f28](https://github.com/forcedotcom/sfdx-core/commit/a642f28dc1179552ba5c646c96d2d55f5b6f3f61))
10
+
5
11
  ### [3.20.3](https://github.com/forcedotcom/sfdx-core/compare/v3.20.2...v3.20.3) (2022-06-15)
6
12
 
7
13
  ### Bug Fixes
@@ -3,6 +3,7 @@ import { EventEmitter } from 'events';
3
3
  import * as sinonType from 'sinon';
4
4
  import { AnyJson, JsonMap, Optional } from '@salesforce/ts-types';
5
5
  import { ConfigContents } from './config/configStore';
6
+ import { Connection } from './org/connection';
6
7
  import { Logger } from './logger';
7
8
  import { SfError } from './sfError';
8
9
  import { CometClient, CometSubscription, Message, StreamingExtension } from './status/streamingClient';
@@ -414,6 +415,7 @@ export declare class MockTestOrgData {
414
415
  createUser(user: string): MockTestOrgData;
415
416
  getMockUserInfo(): JsonMap;
416
417
  getConfig(): Promise<AuthFields>;
418
+ getConnection(): Promise<Connection>;
417
419
  }
418
420
  export declare class MockTestSandboxData {
419
421
  id: string;
package/lib/testSetup.js CHANGED
@@ -25,6 +25,7 @@ const sfError_1 = require("./sfError");
25
25
  const sfProject_1 = require("./sfProject");
26
26
  const streamingClient_1 = require("./status/streamingClient");
27
27
  const stateAggregator_1 = require("./stateAggregator");
28
+ const org_1 = require("./org");
28
29
  const sandboxAccessor_1 = require("./stateAggregator/accessors/sandboxAccessor");
29
30
  const aliasesConfig_1 = require("./config/aliasesConfig");
30
31
  const global_1 = require("./global");
@@ -600,6 +601,9 @@ class MockTestOrgData {
600
601
  config.isDevHub = this.isDevHub;
601
602
  return config;
602
603
  }
604
+ async getConnection() {
605
+ return (await org_1.Org.create({ aliasOrUsername: this.username })).getConnection();
606
+ }
603
607
  }
604
608
  exports.MockTestOrgData = MockTestOrgData;
605
609
  class MockTestSandboxData {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforce/core",
3
- "version": "3.20.3",
3
+ "version": "3.21.0",
4
4
  "description": "Core libraries to interact with SFDX projects, orgs, and APIs.",
5
5
  "main": "lib/exported",
6
6
  "types": "lib/exported.d.ts",