apollo-link-ws
Advanced tools
Comparing version 1.0.12 to 1.0.13
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('apollo-link'), require('subscriptions-transport-ws')) : | ||
typeof define === 'function' && define.amd ? define(['exports', 'apollo-link', 'subscriptions-transport-ws'], factory) : | ||
(factory((global.apolloLink = global.apolloLink || {}, global.apolloLink.ws = {}),global.apolloLink.core,global.subscriptionsTransportWs)); | ||
}(this, (function (exports,apolloLink,subscriptionsTransportWs) { 'use strict'; | ||
(global = global || self, factory((global.apolloLink = global.apolloLink || {}, global.apolloLink.ws = {}), global.apolloLink.core, global.subscriptionsTransportWs)); | ||
}(this, function (exports, apolloLink, subscriptionsTransportWs) { 'use strict'; | ||
var __extends = (undefined && undefined.__extends) || (function () { | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var WebSocketLink = /** @class */ (function (_super) { | ||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
/* global Reflect, Promise */ | ||
var extendStatics = function(d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
}; | ||
function __extends(d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
} | ||
var WebSocketLink = (function (_super) { | ||
__extends(WebSocketLink, _super); | ||
@@ -42,3 +58,3 @@ function WebSocketLink(paramsOrClient) { | ||
}))); | ||
})); | ||
//# sourceMappingURL=bundle.umd.js.map |
export * from './webSocketLink'; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -1,2 +0,7 @@ | ||
export * from './webSocketLink'; | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./webSocketLink")); | ||
//# sourceMappingURL=index.js.map |
import { ApolloLink, Operation, FetchResult, Observable } from 'apollo-link'; | ||
import { SubscriptionClient, ClientOptions } from 'subscriptions-transport-ws'; | ||
export declare namespace WebSocketLink { | ||
/** | ||
* Configuration to use when constructing the subscription client (subscriptions-transport-ws). | ||
*/ | ||
interface Configuration { | ||
/** | ||
* The endpoint to connect to. | ||
*/ | ||
uri: string; | ||
/** | ||
* Options to pass when constructing the subscription client. | ||
*/ | ||
options?: ClientOptions; | ||
/** | ||
* A custom WebSocket implementation to use. | ||
*/ | ||
webSocketImpl?: any; | ||
@@ -28,1 +16,2 @@ } | ||
} | ||
//# sourceMappingURL=webSocketLink.d.ts.map |
@@ -0,1 +1,2 @@ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
@@ -14,13 +15,14 @@ var extendStatics = function (d, b) { | ||
})(); | ||
import { ApolloLink } from 'apollo-link'; | ||
import { SubscriptionClient } from 'subscriptions-transport-ws'; | ||
var WebSocketLink = /** @class */ (function (_super) { | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var apollo_link_1 = require("apollo-link"); | ||
var subscriptions_transport_ws_1 = require("subscriptions-transport-ws"); | ||
var WebSocketLink = (function (_super) { | ||
__extends(WebSocketLink, _super); | ||
function WebSocketLink(paramsOrClient) { | ||
var _this = _super.call(this) || this; | ||
if (paramsOrClient instanceof SubscriptionClient) { | ||
if (paramsOrClient instanceof subscriptions_transport_ws_1.SubscriptionClient) { | ||
_this.subscriptionClient = paramsOrClient; | ||
} | ||
else { | ||
_this.subscriptionClient = new SubscriptionClient(paramsOrClient.uri, paramsOrClient.options, paramsOrClient.webSocketImpl); | ||
_this.subscriptionClient = new subscriptions_transport_ws_1.SubscriptionClient(paramsOrClient.uri, paramsOrClient.options, paramsOrClient.webSocketImpl); | ||
} | ||
@@ -33,4 +35,4 @@ return _this; | ||
return WebSocketLink; | ||
}(ApolloLink)); | ||
export { WebSocketLink }; | ||
}(apollo_link_1.ApolloLink)); | ||
exports.WebSocketLink = WebSocketLink; | ||
//# sourceMappingURL=webSocketLink.js.map |
{ | ||
"name": "apollo-link-ws", | ||
"version": "1.0.12", | ||
"version": "1.0.13", | ||
"description": "WebSocket transport layer for GraphQL", | ||
@@ -13,5 +13,4 @@ "author": "Evans Hauser <evanshauser@gmail.com>", | ||
"license": "MIT", | ||
"main": "./lib/bundle.umd.js", | ||
"module": "./lib/index.js", | ||
"jsnext:main": "./lib/index.js", | ||
"main": "./lib/index.js", | ||
"module": "./lib/bundle.esm.js", | ||
"typings": "./lib/index.d.ts", | ||
@@ -28,3 +27,3 @@ "repository": { | ||
"build:browser": "browserify ./lib/bundle.umd.js -o=./lib/bundle.js --i apollo-link && npm run minify:browser", | ||
"build": "tsc -p .", | ||
"build": "tsc -p ./tsconfig.cjs.json", | ||
"bundle": "rollup -c", | ||
@@ -34,6 +33,7 @@ "clean": "rimraf lib/* && rimraf coverage/*", | ||
"filesize": "npm run build && npm run build:browser", | ||
"lint": "tslint --type-check -p tsconfig.json -c ../../tslint.json src/*.ts", | ||
"lint": "tslint -c \"../../tslint.json\" -p tsconfig.json -c ../../tslint.json src/*.ts", | ||
"minify:browser": "uglifyjs -c -m -o ./lib/bundle.min.js -- ./lib/bundle.js", | ||
"postbuild": "npm run bundle", | ||
"prebuild": "npm run clean", | ||
"prepare": "npm run lint && npm run build", | ||
"prepublishOnly": "npm run clean && npm run build", | ||
@@ -44,3 +44,3 @@ "test": "jest", | ||
"dependencies": { | ||
"apollo-link": "^1.2.6" | ||
"apollo-link": "^1.2.7" | ||
}, | ||
@@ -51,13 +51,13 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@types/graphql": "14.0.3", | ||
"@types/graphql": "14.0.5", | ||
"@types/jest": "22.2.3", | ||
"browserify": "16.2.3", | ||
"graphql": "14.0.2", | ||
"graphql-tag": "2.10.0", | ||
"graphql": "14.1.1", | ||
"graphql-tag": "2.10.1", | ||
"jest": "22.4.4", | ||
"rimraf": "2.6.1", | ||
"rollup": "0.67.4", | ||
"rimraf": "2.6.3", | ||
"rollup": "0.68.2", | ||
"subscriptions-transport-ws": "0.9.15", | ||
"ts-jest": "22.4.6", | ||
"tslint": "5.11.0", | ||
"tslint": "5.12.1", | ||
"typescript": "3.0.3", | ||
@@ -77,5 +77,4 @@ "uglify-js": "3.4.9" | ||
], | ||
"mapCoverage": true, | ||
"testURL": "http://localhost" | ||
} | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Mixed license
License(Experimental) Package contains multiple licenses.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
42089
27
158
1
Updatedapollo-link@^1.2.7