Skip to content
This repository has been archived by the owner on Jul 24, 2023. It is now read-only.

Commit

Permalink
Merged PR 268: v0.8.12 release
Browse files Browse the repository at this point in the history
Related work items: #636, #637, #638, #639, #640
  • Loading branch information
CloudSmithBrandon committed Feb 13, 2020
2 parents 1bb3df6 + 0fa812a commit c269da5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
8 changes: 7 additions & 1 deletion ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,13 @@ All notable changes to the "cds-for-code" extension will be documented in this f

## v0.8 Early Preview - December 2019 - January 2020

> Release 0.8.11 will likely be the last release in the 0.8 branch. We look forward to shipping some exciting new features in 0.9 for evaluation soon!
### v0.8.12 (February 13, 2020)

- Bugfix: Users received "Authentication for this request failed." error when accessing non-US environments (reported on GitHub) ([GitHub Issue #10](https://github.com/cloudsmithconsulting/cds-for-code/issues/10) | [#636](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/636/))
- Bugfix: Deploying web resources under locations not in the solution root fails under certain circumstances ([#637](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/637/))
- Bugfix: Users received error "Errors occurred while saving web resource: Property _modifiedonbehalfby_value cannot be updated to null. The reference property can only be deleted." when deploying web resource file to CDS outside of a solution not using the "New Web Resource" command ([#638](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/638/))
- Bugfix: Web Resources do not expand under Solutions in the treeview if you've experienced issue #637 ([#639](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/639/))
- Bugfix: Editing a connection fails after you encountered issue #637 ([#640](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_workitems/edit/640/))

### v0.8.11 (February 6, 2020)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This extension is designed to help developers with a simple development loop for

|Version|Link||
|:--|:--|:--|
|Release Version:|[0.8.11](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.11)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)|
|Release Version:|[0.8.12](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.8.12)|![Marketplace: Version](https://flat.badgen.net/vs-marketplace/v/cloudsmithconsulting.cds-for-code) ![Marketplace: Installs](https://flat.badgen.net/vs-marketplace/i/cloudsmithconsulting.cds-for-code) ![Marketplace: Downloads](https://flat.badgen.net/vs-marketplace/d/cloudsmithconsulting.cds-for-code) ![Marketplace: Rating](https://flat.badgen.net/vs-marketplace/rating/cloudsmithconsulting.cds-for-code) ![Open Issues](https://flat.badgen.net/github/open-issues/cloudsmithconsulting/cds-for-code) ![Stars](https://flat.badgen.net/github/stars/cloudsmithconsulting/cds-for-code)|
|Development Version:|[0.9.0](https://github.com/cloudsmithconsulting/cds-for-code/releases/tag/v0.9.0)|[![Board Status](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/b63fc4c8-773b-4ffc-ac61-c71890277c2c/_apis/work/boardbadge/350decde-59a7-49b4-a6f6-ee220fa7e391)](https://dev.azure.com/cloudsmith-consulting/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/_boards/board/t/b63fc4c8-773b-4ffc-ac61-c71890277c2c/Microsoft.RequirementCategory/) [![Build Status](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_apis/build/status/cds-for-code?branchName=master)](https://dev.azure.com/cloudsmith-consulting/CloudSmith/_build/latest?definitionId=2&branchName=master) [![Release Status](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)](https://vsrm.dev.azure.com/cloudsmith-consulting/_apis/public/Release/badge/c20ca92d-a9a9-45af-8bdb-da3ce0803b59/1/2)|

---
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions src/api/cds-webapi/odata/sendRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import nodeJsRequest from "../../../core/http/nodeJsRequest";
import odataResponseNodeJs from "./odataResponse.nodejs";
import odataResponseXhr from "./odataResponse.xhr";
import { CdsWebApi } from "../CdsWebApi";
import { Credential, OAuthCredential } from '../../../core/security/Types';
import { Credential, OAuthCredential, CdsOnlineCredential } from '../../../core/security/Types';
import Quickly from '../../../core/Quickly';
import { isatty } from 'tty';
import logger from '../../../core/framework/Logger';
import { Utilities } from '../../../core/Utilities';

let _entityNames;

Expand Down Expand Up @@ -284,18 +285,20 @@ export function sendRequest(
if ((<OAuthCredential>config.credentials).accessToken) {
sendInternalRequest((<OAuthCredential>config.credentials).accessToken);
} else {
// https://colinvermander.com/2017/01/19/calling-the-dynamics-global-discovery-service/ provides details into this flow.
Authentication(
config.id,
config.credentials,
isDiscovery && config.type === CdsWebApi.ConfigType.Online ? `https://disco.${Utility.crmHostSuffix(config.webApiUrl)}/` : (<any>config.credentials).resource,
isDiscovery && config.type === CdsWebApi.ConfigType.Online ? Utilities.String.withTrailingSlash(CdsOnlineCredential.defaultResource) : (<any>config.credentials).resource,
{ timeout: config.timeout || CdsWebApi.WebApiClient.defaultTimeout })
.then(auth => {
if (!auth.success) {
config.onTokenRefresh(sendInternalRequest);
} else {
config.credentials = auth.credentials || config.credentials;
sendInternalRequest(auth.response);
}

sendInternalRequest(auth.response);
}).catch(error => {
if (error instanceof AuthenticationError) {
const type = (<AuthenticationError>error).type || "unknown_type";
Expand All @@ -306,6 +309,8 @@ export function sendRequest(
} else {
Quickly.error("Authentication for this request failed.");
}

errorCallback(error);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/helpers/Object.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export function clone<T extends Object>(source: T, target?: any, excludeProperti
if (source.hasOwnProperty(prop) && (!excludeProperties || excludeProperties.indexOf(prop) === -1)) {
// we deep clone here
if (isObject(source[prop])) {
target[prop] = clone(source[prop], undefined, excludeProperties);
target[prop] = Object.assign({}, source[prop]);
} else {
target[prop] = source[prop];
}
Expand Down

0 comments on commit c269da5

Please sign in to comment.