Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@salesforce/apex-node

Package Overview
Dependencies
Maintainers
48
Versions
115
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@salesforce/apex-node - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

lib/src/utils/authUtil.d.ts

2

lib/src/execute/executeService.d.ts
import { Connection } from '@salesforce/core';
import { JsonCollection } from '@salesforce/ts-types';
import { ExecuteAnonymousResponse, ApexExecuteOptions, SoapResponse, RequestData } from './types';

@@ -14,3 +13,2 @@ export declare class ExecuteService {

connectionRequest(requestData: RequestData): Promise<SoapResponse>;
refreshAuth(connection: Connection): Promise<JsonCollection>;
}

@@ -15,3 +15,4 @@ "use strict";

const i18n_1 = require("../i18n");
const utils_1 = require("./utils");
const utils_1 = require("../utils");
const utils_2 = require("./utils");
const readline = require("readline");

@@ -36,3 +37,3 @@ class ExecuteService {

e.message.includes('INVALID_SESSION_ID')) {
yield this.refreshAuth(this.connection);
yield utils_1.refreshAuth(this.connection);
count += 1;

@@ -95,3 +96,3 @@ }

buildExecRequest(data) {
const body = utils_1.encodeBody(this.connection.accessToken, data);
const body = utils_2.encodeBody(this.connection.accessToken, data);
const postEndpoint = `${this.connection.instanceUrl}/services/Soap/s/${this.connection.version}/${this.connection.accessToken.split('!')[0]}`;

@@ -136,3 +137,2 @@ const requestHeaders = {

}
// TODO: make these general utils accessible to other classes
connectionRequest(requestData) {

@@ -143,10 +143,4 @@ return __awaiter(this, void 0, void 0, function* () {

}
refreshAuth(connection) {
return __awaiter(this, void 0, void 0, function* () {
const requestInfo = { url: connection.baseUrl(), method: 'GET' };
return yield connection.request(requestInfo);
});
}
}
exports.ExecuteService = ExecuteService;
//# sourceMappingURL=executeService.js.map
export { ExecuteService, ExecuteAnonymousResponse, ApexExecuteOptions } from './execute';
export { LogService, ApexLogGetOptions, LogRecord } from './logs';
export { JUnitReporter, TapReporter, HumanReporter } from './reporters';
export { ApexTestResultData, ApexTestResultOutcome, AsyncTestArrayConfiguration, AsyncTestConfiguration, CodeCoverageResult, SyncTestConfiguration, TestItem, TestResult, TestService } from './tests';
export { ApexTestResultData, ApexTestResultOutcome, AsyncTestArrayConfiguration, AsyncTestConfiguration, CodeCoverageResult, SyncTestConfiguration, TestItem, TestLevel, TestResult, TestService } from './tests';
export { Row, Table } from './utils';

@@ -19,2 +19,3 @@ "use strict";

exports.ApexTestResultOutcome = tests_1.ApexTestResultOutcome;
exports.TestLevel = tests_1.TestLevel;
exports.TestService = tests_1.TestService;

@@ -21,0 +22,0 @@ var utils_1 = require("./utils");

import { Connection } from '@salesforce/core';
import { TestResultMessage } from './types';
import { ApexTestQueueItem } from '../tests/types';
import { TestResultMessage } from './types';
export interface AsyncTestRun {

@@ -5,0 +5,0 @@ runId: string;

@@ -19,4 +19,4 @@ "use strict";

const faye_1 = require("faye");
const core_1 = require("@salesforce/core");
const i18n_1 = require("../i18n");
const utils_1 = require("../utils");
const TEST_RESULT_CHANNEL = '/systemTopic/TestResult';

@@ -63,7 +63,7 @@ const DEFAULT_STREAMING_TIMEOUT_MS = 14400;

}
// NOTE: There's an intermittent auth issue with Streaming API that requires the connection to be refreshed
// The builtin org.refreshAuth() util only refreshes the connection associated with the instance of the org you provide, not all connections associated with that username's orgs
init() {
return __awaiter(this, void 0, void 0, function* () {
const username = this.conn.getUsername();
const org = yield core_1.Org.create({ aliasOrUsername: username });
yield org.refreshAuth();
yield utils_1.refreshAuth(this.conn);
const accessToken = this.conn.getConnectionOptions().accessToken;

@@ -70,0 +70,0 @@ if (accessToken) {

export { TestService } from './testService';
export { AsyncTestConfiguration, AsyncTestArrayConfiguration, SyncTestConfiguration, OutputDirConfig, ApexTestResultData, ApexTestResultOutcome, CodeCoverageResult, TestItem, TestResult } from './types';
export { AsyncTestConfiguration, AsyncTestArrayConfiguration, SyncTestConfiguration, OutputDirConfig, ApexTestResultData, ApexTestResultOutcome, CodeCoverageResult, TestItem, TestResult, TestLevel } from './types';

@@ -13,2 +13,3 @@ "use strict";

exports.ApexTestResultOutcome = types_1.ApexTestResultOutcome;
exports.TestLevel = types_1.TestLevel;
//# sourceMappingURL=index.js.map

@@ -5,1 +5,2 @@ export { createFile } from './fileSystemHandler';

export { getCurrentTime, formatStartTime, msToSecond } from './dateUtil';
export { refreshAuth } from './authUtil';

@@ -17,2 +17,4 @@ "use strict";

exports.msToSecond = dateUtil_1.msToSecond;
var authUtil_1 = require("./authUtil");
exports.refreshAuth = authUtil_1.refreshAuth;
//# sourceMappingURL=index.js.map
{
"name": "@salesforce/apex-node",
"description": "Salesforce js library for Apex",
"version": "0.1.9",
"version": "0.1.10",
"author": "Salesforce",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/forcedotcom/salesforcedx-apex/issues",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc