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

@atlaskit/util-service-support

Package Overview
Dependencies
Maintainers
1
Versions
51
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atlaskit/util-service-support - npm Package Compare versions

Comparing version 2.0.3 to 2.0.4

14

CHANGELOG.md

@@ -1,6 +0,16 @@

<a name="2.0.3"></a>
## 2.0.3 (2017-12-26)
<a name="2.0.4"></a>
## 2.0.4 (2018-02-06)
<a name="2.0.4"></a>
## 2.0.4 (2018-02-06)
### Bug Fixes
* **component:** added omitCredentials to SecurityOptions ([88cb203](https://bitbucket.org/atlassian/atlaskit/commits/88cb203))
<a name="2.0.3"></a>

@@ -7,0 +17,0 @@ ## 2.0.3 (2017-12-26)

@@ -0,1 +1,2 @@

export * from './types';
export * from './serviceResources';

@@ -2,0 +3,0 @@ import * as serviceUtils from './serviceUtils';

5

dist/es2015/serviceUtils.js
import * as URL from 'url';
import * as URLSearchParams from 'url-search-params'; // IE, Safari, Mobile Chrome, Mobile Safari
import { buildCredentials } from './types';
const defaultRequestServiceOptions = {};

@@ -73,3 +74,5 @@ const buildUrl = (baseUrl, path = '', queryParams, secOptions) => {

const headers = buildHeaders(secOptions, requestInit && requestInit.headers);
const requestOptions = Object.assign({}, requestInit, { headers, credentials: 'include' });
const credentials = buildCredentials(secOptions);
const requestOptions = Object.assign({}, requestInit, { headers,
credentials });
return fetch(new Request(requestUrl, requestOptions))

@@ -76,0 +79,0 @@ .then((response) => {

@@ -54,3 +54,5 @@ export interface OnProviderChange<R, E, I> {

headers?: KeyValues;
omitCredentials?: boolean;
}
export declare const buildCredentials: (secOptions?: SecurityOptions | undefined) => "omit" | "include";
/**

@@ -57,0 +59,0 @@ * Returns a promise to a SecurityOptions that has just been forcibly refreshed with a

@@ -0,1 +1,4 @@

export const buildCredentials = (secOptions) => {
return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
};
//# sourceMappingURL=types.js.map

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

Object.defineProperty(exports, "__esModule", { value: true });
__export(require("./types"));
__export(require("./serviceResources"));

@@ -8,0 +9,0 @@ var serviceUtils = require("./serviceUtils");

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

var URLSearchParams = require("url-search-params"); // IE, Safari, Mobile Chrome, Mobile Safari
var types_1 = require("./types");
var defaultRequestServiceOptions = {};

@@ -78,3 +79,5 @@ var buildUrl = function (baseUrl, path, queryParams, secOptions) {

var headers = buildHeaders(secOptions, requestInit && requestInit.headers);
var requestOptions = tslib_1.__assign({}, requestInit, { headers: headers, credentials: 'include' });
var credentials = types_1.buildCredentials(secOptions);
var requestOptions = tslib_1.__assign({}, requestInit, { headers: headers,
credentials: credentials });
return fetch(new Request(requestUrl, requestOptions))

@@ -81,0 +84,0 @@ .then(function (response) {

@@ -54,3 +54,5 @@ export interface OnProviderChange<R, E, I> {

headers?: KeyValues;
omitCredentials?: boolean;
}
export declare const buildCredentials: (secOptions?: SecurityOptions | undefined) => "omit" | "include";
/**

@@ -57,0 +59,0 @@ * Returns a promise to a SecurityOptions that has just been forcibly refreshed with a

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.buildCredentials = function (secOptions) {
return secOptions && secOptions.omitCredentials ? 'omit' : 'include';
};
//# sourceMappingURL=types.js.map
{
"name": "@atlaskit/util-service-support",
"version": "2.0.3",
"version": "2.0.4",
"config": {

@@ -5,0 +5,0 @@ "access": "public"

import * as URL from 'url';
import * as URLSearchParams from 'url-search-params'; // IE, Safari, Mobile Chrome, Mobile Safari
import { KeyValues, RequestServiceOptions, ServiceConfig, SecurityOptions } from './types';
import { KeyValues, RequestServiceOptions, ServiceConfig, SecurityOptions, buildCredentials } from './types';

@@ -78,6 +78,7 @@ const defaultRequestServiceOptions: RequestServiceOptions = {};

const headers = buildHeaders(secOptions, requestInit && requestInit.headers);
const credentials = buildCredentials(secOptions);
const requestOptions = {
...requestInit,
headers,
credentials: 'include' as RequestCredentials,
credentials,
};

@@ -84,0 +85,0 @@

@@ -61,4 +61,9 @@ export interface OnProviderChange<R, E, I> {

headers?: KeyValues;
omitCredentials?: boolean;
}
export const buildCredentials = (secOptions?: SecurityOptions) => {
return secOptions && secOptions.omitCredentials ? 'omit' as 'omit' : 'include' as 'include';
};
/**

@@ -65,0 +70,0 @@ * Returns a promise to a SecurityOptions that has just been forcibly refreshed with a

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

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