Initial Save
This commit is contained in:
57
node_modules/apollo-link/CHANGELOG.md
generated
vendored
Normal file
57
node_modules/apollo-link/CHANGELOG.md
generated
vendored
Normal file
@@ -0,0 +1,57 @@
|
||||
# Change log
|
||||
|
||||
----
|
||||
|
||||
**NOTE:** This changelog is no longer maintained. Changes are now tracked in
|
||||
the top level [`CHANGELOG.md`](https://github.com/apollographql/apollo-link/blob/master/CHANGELOG.md).
|
||||
|
||||
----
|
||||
|
||||
### 1.2.4
|
||||
|
||||
- No changes
|
||||
|
||||
### 1.2.3
|
||||
- Added `graphql` 14 to peer and dev deps; Updated `@types/graphql` to 14 <br/>
|
||||
[@hwillson](http://github.com/hwillson) in [#789](https://github.com/apollographql/apollo-link/pull/789)
|
||||
|
||||
### 1.2.2
|
||||
- Update apollo-link [#559](https://github.com/apollographql/apollo-link/pull/559)
|
||||
- export graphql types and add @types/graphql as a regular dependency [PR#576](https://github.com/apollographql/apollo-link/pull/576)
|
||||
- moved @types/node to dev dependencies in package.josn to avoid collisions with other projects. [PR#540](https://github.com/apollographql/apollo-link/pull/540)
|
||||
|
||||
### 1.2.1
|
||||
- update apollo link with zen-observable-ts to remove import issues [PR#515](https://github.com/apollographql/apollo-link/pull/515)
|
||||
|
||||
### 1.2.0
|
||||
- Add `fromError` Observable helper
|
||||
- change import method of zen-observable for rollup compat
|
||||
|
||||
### 1.1.0
|
||||
- Expose `#execute` on ApolloLink as static
|
||||
|
||||
### 1.0.7
|
||||
- Update to graphql@0.12
|
||||
|
||||
### 1.0.6
|
||||
- update rollup
|
||||
|
||||
### 1.0.5
|
||||
- fix bug where context wasn't merged when setting it
|
||||
|
||||
### 1.0.4
|
||||
- export link util helpers
|
||||
|
||||
### 1.0.3
|
||||
- removed requiring query on initial execution check
|
||||
- moved to move efficent rollup build
|
||||
|
||||
### 1.0.1, 1.0.2
|
||||
<!-- never published as latest -->
|
||||
- preleases for dev tool integation
|
||||
|
||||
### 0.8.0
|
||||
- added support for `extensions` on an operation
|
||||
|
||||
### 0.7.0
|
||||
- new operation API and start of changelog
|
||||
21
node_modules/apollo-link/LICENSE
generated
vendored
Normal file
21
node_modules/apollo-link/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 - 2017 Meteor Development Group, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
69
node_modules/apollo-link/README.md
generated
vendored
Normal file
69
node_modules/apollo-link/README.md
generated
vendored
Normal file
@@ -0,0 +1,69 @@
|
||||
# apollo-link
|
||||
|
||||
## Purpose
|
||||
|
||||
`apollo-link` is a standard interface for modifying control flow of GraphQL requests and fetching GraphQL results, designed to provide a simple GraphQL client that is capable of extensions.
|
||||
The targeted use cases of `apollo-link` are highlighted below:
|
||||
|
||||
* fetch queries directly without normalized cache
|
||||
* network interface for Apollo Client
|
||||
* network interface for Relay Modern
|
||||
* fetcher for
|
||||
|
||||
Apollo Link is the interface for creating new links in your application.
|
||||
|
||||
The client sends a request as a method call to a link and can recieve one or more (in the case of subscriptions) responses from the server. The responses are returned using the Observer pattern.
|
||||
|
||||

|
||||
|
||||
Results from the server can be provided by calling `next(result)` on the observer. In the case of a network/transport error (not a GraphQL Error) the `error(err)` method can be used to indicate a response will not be recieved. If multiple responses are not supported by the link, `complete()` should be called to inform the client no further data will be provided.
|
||||
|
||||
In the case of an intermediate link, a second argument to `request(operation, forward)` is the link to `forward(operation)` to. `forward` returns an observable and it can be returned directly or subscribed to.
|
||||
|
||||
```js
|
||||
forward(operation).subscribe({
|
||||
next: result => {
|
||||
handleTheResult(result)
|
||||
},
|
||||
error: error => {
|
||||
handleTheNetworkError(error)
|
||||
},
|
||||
});
|
||||
```
|
||||
|
||||
## Implementing a basic custom transport
|
||||
|
||||
```js
|
||||
import { ApolloLink, Observable } from 'apollo-link';
|
||||
|
||||
export class CustomApolloLink extends ApolloLink {
|
||||
request(operation /*, forward*/) {
|
||||
//Whether no one is listening anymore
|
||||
let unsubscribed = false;
|
||||
|
||||
return new Observable(observer => {
|
||||
somehowGetOperationToServer(operation, (error, result) => {
|
||||
if (unsubscribed) return;
|
||||
if (error) {
|
||||
//Network error
|
||||
observer.error(error);
|
||||
} else {
|
||||
observer.next(result);
|
||||
observer.complete(); //If subscriptions not supported
|
||||
}
|
||||
});
|
||||
|
||||
function unsubscribe() {
|
||||
unsubscribed = true;
|
||||
}
|
||||
|
||||
return unsubscribe;
|
||||
});
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
`npm install apollo-link --save`
|
||||
|
||||
212
node_modules/apollo-link/lib/bundle.cjs.js
generated
vendored
Normal file
212
node_modules/apollo-link/lib/bundle.cjs.js
generated
vendored
Normal file
@@ -0,0 +1,212 @@
|
||||
'use strict';
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
|
||||
|
||||
var Observable = _interopDefault(require('zen-observable-ts'));
|
||||
var tsInvariant = require('ts-invariant');
|
||||
var tslib = require('tslib');
|
||||
var apolloUtilities = require('apollo-utilities');
|
||||
|
||||
function validateOperation(operation) {
|
||||
var OPERATION_FIELDS = [
|
||||
'query',
|
||||
'operationName',
|
||||
'variables',
|
||||
'extensions',
|
||||
'context',
|
||||
];
|
||||
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
||||
var key = _a[_i];
|
||||
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
||||
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError(2) : new tsInvariant.InvariantError("illegal argument: " + key);
|
||||
}
|
||||
}
|
||||
return operation;
|
||||
}
|
||||
var LinkError = (function (_super) {
|
||||
tslib.__extends(LinkError, _super);
|
||||
function LinkError(message, link) {
|
||||
var _this = _super.call(this, message) || this;
|
||||
_this.link = link;
|
||||
return _this;
|
||||
}
|
||||
return LinkError;
|
||||
}(Error));
|
||||
function isTerminating(link) {
|
||||
return link.request.length <= 1;
|
||||
}
|
||||
function toPromise(observable) {
|
||||
var completed = false;
|
||||
return new Promise(function (resolve, reject) {
|
||||
observable.subscribe({
|
||||
next: function (data) {
|
||||
if (completed) {
|
||||
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn("Promise Wrapper does not support multiple results from Observable");
|
||||
}
|
||||
else {
|
||||
completed = true;
|
||||
resolve(data);
|
||||
}
|
||||
},
|
||||
error: reject,
|
||||
});
|
||||
});
|
||||
}
|
||||
var makePromise = toPromise;
|
||||
function fromPromise(promise) {
|
||||
return new Observable(function (observer) {
|
||||
promise
|
||||
.then(function (value) {
|
||||
observer.next(value);
|
||||
observer.complete();
|
||||
})
|
||||
.catch(observer.error.bind(observer));
|
||||
});
|
||||
}
|
||||
function fromError(errorValue) {
|
||||
return new Observable(function (observer) {
|
||||
observer.error(errorValue);
|
||||
});
|
||||
}
|
||||
function transformOperation(operation) {
|
||||
var transformedOperation = {
|
||||
variables: operation.variables || {},
|
||||
extensions: operation.extensions || {},
|
||||
operationName: operation.operationName,
|
||||
query: operation.query,
|
||||
};
|
||||
if (!transformedOperation.operationName) {
|
||||
transformedOperation.operationName =
|
||||
typeof transformedOperation.query !== 'string'
|
||||
? apolloUtilities.getOperationName(transformedOperation.query)
|
||||
: '';
|
||||
}
|
||||
return transformedOperation;
|
||||
}
|
||||
function createOperation(starting, operation) {
|
||||
var context = tslib.__assign({}, starting);
|
||||
var setContext = function (next) {
|
||||
if (typeof next === 'function') {
|
||||
context = tslib.__assign({}, context, next(context));
|
||||
}
|
||||
else {
|
||||
context = tslib.__assign({}, context, next);
|
||||
}
|
||||
};
|
||||
var getContext = function () { return (tslib.__assign({}, context)); };
|
||||
Object.defineProperty(operation, 'setContext', {
|
||||
enumerable: false,
|
||||
value: setContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'getContext', {
|
||||
enumerable: false,
|
||||
value: getContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'toKey', {
|
||||
enumerable: false,
|
||||
value: function () { return getKey(operation); },
|
||||
});
|
||||
return operation;
|
||||
}
|
||||
function getKey(operation) {
|
||||
var query = operation.query, variables = operation.variables, operationName = operation.operationName;
|
||||
return JSON.stringify([operationName, query, variables]);
|
||||
}
|
||||
|
||||
function passthrough(op, forward) {
|
||||
return forward ? forward(op) : Observable.of();
|
||||
}
|
||||
function toLink(handler) {
|
||||
return typeof handler === 'function' ? new ApolloLink(handler) : handler;
|
||||
}
|
||||
function empty() {
|
||||
return new ApolloLink(function () { return Observable.of(); });
|
||||
}
|
||||
function from(links) {
|
||||
if (links.length === 0)
|
||||
return empty();
|
||||
return links.map(toLink).reduce(function (x, y) { return x.concat(y); });
|
||||
}
|
||||
function split(test, left, right) {
|
||||
var leftLink = toLink(left);
|
||||
var rightLink = toLink(right || new ApolloLink(passthrough));
|
||||
if (isTerminating(leftLink) && isTerminating(rightLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation) || Observable.of()
|
||||
: rightLink.request(operation) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation, forward) || Observable.of()
|
||||
: rightLink.request(operation, forward) || Observable.of();
|
||||
});
|
||||
}
|
||||
}
|
||||
var concat = function (first, second) {
|
||||
var firstLink = toLink(first);
|
||||
if (isTerminating(firstLink)) {
|
||||
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn(new LinkError("You are calling concat on a terminating link, which will have no effect", firstLink));
|
||||
return firstLink;
|
||||
}
|
||||
var nextLink = toLink(second);
|
||||
if (isTerminating(nextLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return (firstLink.request(operation, function (op) {
|
||||
return nextLink.request(op, forward) || Observable.of();
|
||||
}) || Observable.of());
|
||||
});
|
||||
}
|
||||
};
|
||||
var ApolloLink = (function () {
|
||||
function ApolloLink(request) {
|
||||
if (request)
|
||||
this.request = request;
|
||||
}
|
||||
ApolloLink.prototype.split = function (test, left, right) {
|
||||
return this.concat(split(test, left, right || new ApolloLink(passthrough)));
|
||||
};
|
||||
ApolloLink.prototype.concat = function (next) {
|
||||
return concat(this, next);
|
||||
};
|
||||
ApolloLink.prototype.request = function (operation, forward) {
|
||||
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError(1) : new tsInvariant.InvariantError('request is not implemented');
|
||||
};
|
||||
ApolloLink.empty = empty;
|
||||
ApolloLink.from = from;
|
||||
ApolloLink.split = split;
|
||||
ApolloLink.execute = execute;
|
||||
return ApolloLink;
|
||||
}());
|
||||
function execute(link, operation) {
|
||||
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());
|
||||
}
|
||||
|
||||
exports.Observable = Observable;
|
||||
Object.defineProperty(exports, 'getOperationName', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return apolloUtilities.getOperationName;
|
||||
}
|
||||
});
|
||||
exports.ApolloLink = ApolloLink;
|
||||
exports.concat = concat;
|
||||
exports.createOperation = createOperation;
|
||||
exports.empty = empty;
|
||||
exports.execute = execute;
|
||||
exports.from = from;
|
||||
exports.fromError = fromError;
|
||||
exports.fromPromise = fromPromise;
|
||||
exports.makePromise = makePromise;
|
||||
exports.split = split;
|
||||
exports.toPromise = toPromise;
|
||||
//# sourceMappingURL=bundle.cjs.js.map
|
||||
1
node_modules/apollo-link/lib/bundle.cjs.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/bundle.cjs.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
191
node_modules/apollo-link/lib/bundle.esm.js
generated
vendored
Normal file
191
node_modules/apollo-link/lib/bundle.esm.js
generated
vendored
Normal file
@@ -0,0 +1,191 @@
|
||||
import Observable from 'zen-observable-ts';
|
||||
export { default as Observable } from 'zen-observable-ts';
|
||||
import { invariant, InvariantError } from 'ts-invariant';
|
||||
import { __extends, __assign } from 'tslib';
|
||||
import { getOperationName } from 'apollo-utilities';
|
||||
export { getOperationName } from 'apollo-utilities';
|
||||
|
||||
function validateOperation(operation) {
|
||||
var OPERATION_FIELDS = [
|
||||
'query',
|
||||
'operationName',
|
||||
'variables',
|
||||
'extensions',
|
||||
'context',
|
||||
];
|
||||
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
||||
var key = _a[_i];
|
||||
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
||||
throw process.env.NODE_ENV === "production" ? new InvariantError(2) : new InvariantError("illegal argument: " + key);
|
||||
}
|
||||
}
|
||||
return operation;
|
||||
}
|
||||
var LinkError = (function (_super) {
|
||||
__extends(LinkError, _super);
|
||||
function LinkError(message, link) {
|
||||
var _this = _super.call(this, message) || this;
|
||||
_this.link = link;
|
||||
return _this;
|
||||
}
|
||||
return LinkError;
|
||||
}(Error));
|
||||
function isTerminating(link) {
|
||||
return link.request.length <= 1;
|
||||
}
|
||||
function toPromise(observable) {
|
||||
var completed = false;
|
||||
return new Promise(function (resolve, reject) {
|
||||
observable.subscribe({
|
||||
next: function (data) {
|
||||
if (completed) {
|
||||
process.env.NODE_ENV === "production" || invariant.warn("Promise Wrapper does not support multiple results from Observable");
|
||||
}
|
||||
else {
|
||||
completed = true;
|
||||
resolve(data);
|
||||
}
|
||||
},
|
||||
error: reject,
|
||||
});
|
||||
});
|
||||
}
|
||||
var makePromise = toPromise;
|
||||
function fromPromise(promise) {
|
||||
return new Observable(function (observer) {
|
||||
promise
|
||||
.then(function (value) {
|
||||
observer.next(value);
|
||||
observer.complete();
|
||||
})
|
||||
.catch(observer.error.bind(observer));
|
||||
});
|
||||
}
|
||||
function fromError(errorValue) {
|
||||
return new Observable(function (observer) {
|
||||
observer.error(errorValue);
|
||||
});
|
||||
}
|
||||
function transformOperation(operation) {
|
||||
var transformedOperation = {
|
||||
variables: operation.variables || {},
|
||||
extensions: operation.extensions || {},
|
||||
operationName: operation.operationName,
|
||||
query: operation.query,
|
||||
};
|
||||
if (!transformedOperation.operationName) {
|
||||
transformedOperation.operationName =
|
||||
typeof transformedOperation.query !== 'string'
|
||||
? getOperationName(transformedOperation.query)
|
||||
: '';
|
||||
}
|
||||
return transformedOperation;
|
||||
}
|
||||
function createOperation(starting, operation) {
|
||||
var context = __assign({}, starting);
|
||||
var setContext = function (next) {
|
||||
if (typeof next === 'function') {
|
||||
context = __assign({}, context, next(context));
|
||||
}
|
||||
else {
|
||||
context = __assign({}, context, next);
|
||||
}
|
||||
};
|
||||
var getContext = function () { return (__assign({}, context)); };
|
||||
Object.defineProperty(operation, 'setContext', {
|
||||
enumerable: false,
|
||||
value: setContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'getContext', {
|
||||
enumerable: false,
|
||||
value: getContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'toKey', {
|
||||
enumerable: false,
|
||||
value: function () { return getKey(operation); },
|
||||
});
|
||||
return operation;
|
||||
}
|
||||
function getKey(operation) {
|
||||
var query = operation.query, variables = operation.variables, operationName = operation.operationName;
|
||||
return JSON.stringify([operationName, query, variables]);
|
||||
}
|
||||
|
||||
function passthrough(op, forward) {
|
||||
return forward ? forward(op) : Observable.of();
|
||||
}
|
||||
function toLink(handler) {
|
||||
return typeof handler === 'function' ? new ApolloLink(handler) : handler;
|
||||
}
|
||||
function empty() {
|
||||
return new ApolloLink(function () { return Observable.of(); });
|
||||
}
|
||||
function from(links) {
|
||||
if (links.length === 0)
|
||||
return empty();
|
||||
return links.map(toLink).reduce(function (x, y) { return x.concat(y); });
|
||||
}
|
||||
function split(test, left, right) {
|
||||
var leftLink = toLink(left);
|
||||
var rightLink = toLink(right || new ApolloLink(passthrough));
|
||||
if (isTerminating(leftLink) && isTerminating(rightLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation) || Observable.of()
|
||||
: rightLink.request(operation) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation, forward) || Observable.of()
|
||||
: rightLink.request(operation, forward) || Observable.of();
|
||||
});
|
||||
}
|
||||
}
|
||||
var concat = function (first, second) {
|
||||
var firstLink = toLink(first);
|
||||
if (isTerminating(firstLink)) {
|
||||
process.env.NODE_ENV === "production" || invariant.warn(new LinkError("You are calling concat on a terminating link, which will have no effect", firstLink));
|
||||
return firstLink;
|
||||
}
|
||||
var nextLink = toLink(second);
|
||||
if (isTerminating(nextLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return (firstLink.request(operation, function (op) {
|
||||
return nextLink.request(op, forward) || Observable.of();
|
||||
}) || Observable.of());
|
||||
});
|
||||
}
|
||||
};
|
||||
var ApolloLink = (function () {
|
||||
function ApolloLink(request) {
|
||||
if (request)
|
||||
this.request = request;
|
||||
}
|
||||
ApolloLink.prototype.split = function (test, left, right) {
|
||||
return this.concat(split(test, left, right || new ApolloLink(passthrough)));
|
||||
};
|
||||
ApolloLink.prototype.concat = function (next) {
|
||||
return concat(this, next);
|
||||
};
|
||||
ApolloLink.prototype.request = function (operation, forward) {
|
||||
throw process.env.NODE_ENV === "production" ? new InvariantError(1) : new InvariantError('request is not implemented');
|
||||
};
|
||||
ApolloLink.empty = empty;
|
||||
ApolloLink.from = from;
|
||||
ApolloLink.split = split;
|
||||
ApolloLink.execute = execute;
|
||||
return ApolloLink;
|
||||
}());
|
||||
function execute(link, operation) {
|
||||
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());
|
||||
}
|
||||
|
||||
export { ApolloLink, concat, createOperation, empty, execute, from, fromError, fromPromise, makePromise, split, toPromise };
|
||||
//# sourceMappingURL=bundle.esm.js.map
|
||||
1
node_modules/apollo-link/lib/bundle.esm.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/bundle.esm.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
213
node_modules/apollo-link/lib/bundle.umd.js
generated
vendored
Normal file
213
node_modules/apollo-link/lib/bundle.umd.js
generated
vendored
Normal file
@@ -0,0 +1,213 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('zen-observable-ts'), require('ts-invariant'), require('tslib'), require('apollo-utilities')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'zen-observable-ts', 'ts-invariant', 'tslib', 'apollo-utilities'], factory) :
|
||||
(global = global || self, factory((global.apolloLink = global.apolloLink || {}, global.apolloLink.core = {}), global.apolloLink.zenObservable, global.invariant, global.tslib, global.apolloUtilities));
|
||||
}(this, (function (exports, Observable, tsInvariant, tslib_1, apolloUtilities) { 'use strict';
|
||||
|
||||
Observable = Observable && Observable.hasOwnProperty('default') ? Observable['default'] : Observable;
|
||||
|
||||
function validateOperation(operation) {
|
||||
var OPERATION_FIELDS = [
|
||||
'query',
|
||||
'operationName',
|
||||
'variables',
|
||||
'extensions',
|
||||
'context',
|
||||
];
|
||||
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
||||
var key = _a[_i];
|
||||
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
||||
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError(2) : new tsInvariant.InvariantError("illegal argument: " + key);
|
||||
}
|
||||
}
|
||||
return operation;
|
||||
}
|
||||
var LinkError = (function (_super) {
|
||||
tslib_1.__extends(LinkError, _super);
|
||||
function LinkError(message, link) {
|
||||
var _this = _super.call(this, message) || this;
|
||||
_this.link = link;
|
||||
return _this;
|
||||
}
|
||||
return LinkError;
|
||||
}(Error));
|
||||
function isTerminating(link) {
|
||||
return link.request.length <= 1;
|
||||
}
|
||||
function toPromise(observable) {
|
||||
var completed = false;
|
||||
return new Promise(function (resolve, reject) {
|
||||
observable.subscribe({
|
||||
next: function (data) {
|
||||
if (completed) {
|
||||
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn("Promise Wrapper does not support multiple results from Observable");
|
||||
}
|
||||
else {
|
||||
completed = true;
|
||||
resolve(data);
|
||||
}
|
||||
},
|
||||
error: reject,
|
||||
});
|
||||
});
|
||||
}
|
||||
var makePromise = toPromise;
|
||||
function fromPromise(promise) {
|
||||
return new Observable(function (observer) {
|
||||
promise
|
||||
.then(function (value) {
|
||||
observer.next(value);
|
||||
observer.complete();
|
||||
})
|
||||
.catch(observer.error.bind(observer));
|
||||
});
|
||||
}
|
||||
function fromError(errorValue) {
|
||||
return new Observable(function (observer) {
|
||||
observer.error(errorValue);
|
||||
});
|
||||
}
|
||||
function transformOperation(operation) {
|
||||
var transformedOperation = {
|
||||
variables: operation.variables || {},
|
||||
extensions: operation.extensions || {},
|
||||
operationName: operation.operationName,
|
||||
query: operation.query,
|
||||
};
|
||||
if (!transformedOperation.operationName) {
|
||||
transformedOperation.operationName =
|
||||
typeof transformedOperation.query !== 'string'
|
||||
? apolloUtilities.getOperationName(transformedOperation.query)
|
||||
: '';
|
||||
}
|
||||
return transformedOperation;
|
||||
}
|
||||
function createOperation(starting, operation) {
|
||||
var context = tslib_1.__assign({}, starting);
|
||||
var setContext = function (next) {
|
||||
if (typeof next === 'function') {
|
||||
context = tslib_1.__assign({}, context, next(context));
|
||||
}
|
||||
else {
|
||||
context = tslib_1.__assign({}, context, next);
|
||||
}
|
||||
};
|
||||
var getContext = function () { return (tslib_1.__assign({}, context)); };
|
||||
Object.defineProperty(operation, 'setContext', {
|
||||
enumerable: false,
|
||||
value: setContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'getContext', {
|
||||
enumerable: false,
|
||||
value: getContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'toKey', {
|
||||
enumerable: false,
|
||||
value: function () { return getKey(operation); },
|
||||
});
|
||||
return operation;
|
||||
}
|
||||
function getKey(operation) {
|
||||
var query = operation.query, variables = operation.variables, operationName = operation.operationName;
|
||||
return JSON.stringify([operationName, query, variables]);
|
||||
}
|
||||
|
||||
function passthrough(op, forward) {
|
||||
return forward ? forward(op) : Observable.of();
|
||||
}
|
||||
function toLink(handler) {
|
||||
return typeof handler === 'function' ? new ApolloLink(handler) : handler;
|
||||
}
|
||||
function empty() {
|
||||
return new ApolloLink(function () { return Observable.of(); });
|
||||
}
|
||||
function from(links) {
|
||||
if (links.length === 0)
|
||||
return empty();
|
||||
return links.map(toLink).reduce(function (x, y) { return x.concat(y); });
|
||||
}
|
||||
function split(test, left, right) {
|
||||
var leftLink = toLink(left);
|
||||
var rightLink = toLink(right || new ApolloLink(passthrough));
|
||||
if (isTerminating(leftLink) && isTerminating(rightLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation) || Observable.of()
|
||||
: rightLink.request(operation) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation, forward) || Observable.of()
|
||||
: rightLink.request(operation, forward) || Observable.of();
|
||||
});
|
||||
}
|
||||
}
|
||||
var concat = function (first, second) {
|
||||
var firstLink = toLink(first);
|
||||
if (isTerminating(firstLink)) {
|
||||
process.env.NODE_ENV === "production" || tsInvariant.invariant.warn(new LinkError("You are calling concat on a terminating link, which will have no effect", firstLink));
|
||||
return firstLink;
|
||||
}
|
||||
var nextLink = toLink(second);
|
||||
if (isTerminating(nextLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return firstLink.request(operation, function (op) { return nextLink.request(op) || Observable.of(); }) || Observable.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return (firstLink.request(operation, function (op) {
|
||||
return nextLink.request(op, forward) || Observable.of();
|
||||
}) || Observable.of());
|
||||
});
|
||||
}
|
||||
};
|
||||
var ApolloLink = (function () {
|
||||
function ApolloLink(request) {
|
||||
if (request)
|
||||
this.request = request;
|
||||
}
|
||||
ApolloLink.prototype.split = function (test, left, right) {
|
||||
return this.concat(split(test, left, right || new ApolloLink(passthrough)));
|
||||
};
|
||||
ApolloLink.prototype.concat = function (next) {
|
||||
return concat(this, next);
|
||||
};
|
||||
ApolloLink.prototype.request = function (operation, forward) {
|
||||
throw process.env.NODE_ENV === "production" ? new tsInvariant.InvariantError(1) : new tsInvariant.InvariantError('request is not implemented');
|
||||
};
|
||||
ApolloLink.empty = empty;
|
||||
ApolloLink.from = from;
|
||||
ApolloLink.split = split;
|
||||
ApolloLink.execute = execute;
|
||||
return ApolloLink;
|
||||
}());
|
||||
function execute(link, operation) {
|
||||
return (link.request(createOperation(operation.context, transformOperation(validateOperation(operation)))) || Observable.of());
|
||||
}
|
||||
|
||||
exports.Observable = Observable;
|
||||
Object.defineProperty(exports, 'getOperationName', {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return apolloUtilities.getOperationName;
|
||||
}
|
||||
});
|
||||
exports.ApolloLink = ApolloLink;
|
||||
exports.concat = concat;
|
||||
exports.createOperation = createOperation;
|
||||
exports.empty = empty;
|
||||
exports.execute = execute;
|
||||
exports.from = from;
|
||||
exports.fromError = fromError;
|
||||
exports.fromPromise = fromPromise;
|
||||
exports.makePromise = makePromise;
|
||||
exports.split = split;
|
||||
exports.toPromise = toPromise;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
//# sourceMappingURL=bundle.umd.js.map
|
||||
1
node_modules/apollo-link/lib/bundle.umd.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/bundle.umd.js.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
6
node_modules/apollo-link/lib/index.d.ts
generated
vendored
Normal file
6
node_modules/apollo-link/lib/index.d.ts
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
export * from './link';
|
||||
export { createOperation, makePromise, toPromise, fromPromise, fromError, getOperationName, } from './linkUtils';
|
||||
export * from './types';
|
||||
import Observable from 'zen-observable-ts';
|
||||
export { Observable };
|
||||
//# sourceMappingURL=index.d.ts.map
|
||||
1
node_modules/apollo-link/lib/index.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/index.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC;AACvB,OAAO,EACL,eAAe,EACf,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,gBAAgB,GACjB,MAAM,aAAa,CAAC;AACrB,cAAc,SAAS,CAAC;AAExB,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,CAAC"}
|
||||
14
node_modules/apollo-link/lib/index.js
generated
vendored
Normal file
14
node_modules/apollo-link/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./link"), exports);
|
||||
var linkUtils_1 = require("./linkUtils");
|
||||
exports.createOperation = linkUtils_1.createOperation;
|
||||
exports.makePromise = linkUtils_1.makePromise;
|
||||
exports.toPromise = linkUtils_1.toPromise;
|
||||
exports.fromPromise = linkUtils_1.fromPromise;
|
||||
exports.fromError = linkUtils_1.fromError;
|
||||
exports.getOperationName = linkUtils_1.getOperationName;
|
||||
var zen_observable_ts_1 = tslib_1.__importDefault(require("zen-observable-ts"));
|
||||
exports.Observable = zen_observable_ts_1.default;
|
||||
//# sourceMappingURL=index.js.map
|
||||
1
node_modules/apollo-link/lib/index.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/index.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAAuB;AACvB,yCAOqB;AANnB,sCAAA,eAAe,CAAA;AACf,kCAAA,WAAW,CAAA;AACX,gCAAA,SAAS,CAAA;AACT,kCAAA,WAAW,CAAA;AACX,gCAAA,SAAS,CAAA;AACT,uCAAA,gBAAgB,CAAA;AAIlB,gFAA2C;AAClC,qBADF,2BAAU,CACE"}
|
||||
18
node_modules/apollo-link/lib/link.d.ts
generated
vendored
Normal file
18
node_modules/apollo-link/lib/link.d.ts
generated
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
import Observable from 'zen-observable-ts';
|
||||
import { GraphQLRequest, NextLink, Operation, RequestHandler, FetchResult } from './types';
|
||||
export declare function empty(): ApolloLink;
|
||||
export declare function from(links: ApolloLink[]): ApolloLink;
|
||||
export declare function split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink;
|
||||
export declare const concat: (first: RequestHandler | ApolloLink, second: RequestHandler | ApolloLink) => ApolloLink;
|
||||
export declare class ApolloLink {
|
||||
static empty: typeof empty;
|
||||
static from: typeof from;
|
||||
static split: typeof split;
|
||||
static execute: typeof execute;
|
||||
constructor(request?: RequestHandler);
|
||||
split(test: (op: Operation) => boolean, left: ApolloLink | RequestHandler, right?: ApolloLink | RequestHandler): ApolloLink;
|
||||
concat(next: ApolloLink | RequestHandler): ApolloLink;
|
||||
request(operation: Operation, forward?: NextLink): Observable<FetchResult> | null;
|
||||
}
|
||||
export declare function execute(link: ApolloLink, operation: GraphQLRequest): Observable<FetchResult>;
|
||||
//# sourceMappingURL=link.d.ts.map
|
||||
1
node_modules/apollo-link/lib/link.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/link.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"link.d.ts","sourceRoot":"","sources":["src/link.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAG3C,OAAO,EACL,cAAc,EACd,QAAQ,EACR,SAAS,EACT,cAAc,EACd,WAAW,EACZ,MAAM,SAAS,CAAC;AAkBjB,wBAAgB,KAAK,IAAI,UAAU,CAElC;AAED,wBAAgB,IAAI,CAAC,KAAK,EAAE,UAAU,EAAE,GAAG,UAAU,CAGpD;AAED,wBAAgB,KAAK,CACnB,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,OAAO,EAChC,IAAI,EAAE,UAAU,GAAG,cAAc,EACjC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAClC,UAAU,CAiBZ;AAGD,eAAO,MAAM,MAAM,yFAiClB,CAAC;AAEF,qBAAa,UAAU;IACrB,OAAc,KAAK,eAAS;IAC5B,OAAc,IAAI,cAAQ;IAC1B,OAAc,KAAK,eAAS;IAC5B,OAAc,OAAO,iBAAW;gBAEpB,OAAO,CAAC,EAAE,cAAc;IAI7B,KAAK,CACV,IAAI,EAAE,CAAC,EAAE,EAAE,SAAS,KAAK,OAAO,EAChC,IAAI,EAAE,UAAU,GAAG,cAAc,EACjC,KAAK,CAAC,EAAE,UAAU,GAAG,cAAc,GAClC,UAAU;IAIN,MAAM,CAAC,IAAI,EAAE,UAAU,GAAG,cAAc,GAAG,UAAU;IAIrD,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAGlC;AAED,wBAAgB,OAAO,CACrB,IAAI,EAAE,UAAU,EAChB,SAAS,EAAE,cAAc,GACxB,UAAU,CAAC,WAAW,CAAC,CASzB"}
|
||||
87
node_modules/apollo-link/lib/link.js
generated
vendored
Normal file
87
node_modules/apollo-link/lib/link.js
generated
vendored
Normal file
@@ -0,0 +1,87 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var zen_observable_ts_1 = tslib_1.__importDefault(require("zen-observable-ts"));
|
||||
var ts_invariant_1 = require("ts-invariant");
|
||||
var linkUtils_1 = require("./linkUtils");
|
||||
function passthrough(op, forward) {
|
||||
return forward ? forward(op) : zen_observable_ts_1.default.of();
|
||||
}
|
||||
function toLink(handler) {
|
||||
return typeof handler === 'function' ? new ApolloLink(handler) : handler;
|
||||
}
|
||||
function empty() {
|
||||
return new ApolloLink(function () { return zen_observable_ts_1.default.of(); });
|
||||
}
|
||||
exports.empty = empty;
|
||||
function from(links) {
|
||||
if (links.length === 0)
|
||||
return empty();
|
||||
return links.map(toLink).reduce(function (x, y) { return x.concat(y); });
|
||||
}
|
||||
exports.from = from;
|
||||
function split(test, left, right) {
|
||||
var leftLink = toLink(left);
|
||||
var rightLink = toLink(right || new ApolloLink(passthrough));
|
||||
if (linkUtils_1.isTerminating(leftLink) && linkUtils_1.isTerminating(rightLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation) || zen_observable_ts_1.default.of()
|
||||
: rightLink.request(operation) || zen_observable_ts_1.default.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return test(operation)
|
||||
? leftLink.request(operation, forward) || zen_observable_ts_1.default.of()
|
||||
: rightLink.request(operation, forward) || zen_observable_ts_1.default.of();
|
||||
});
|
||||
}
|
||||
}
|
||||
exports.split = split;
|
||||
exports.concat = function (first, second) {
|
||||
var firstLink = toLink(first);
|
||||
if (linkUtils_1.isTerminating(firstLink)) {
|
||||
ts_invariant_1.invariant.warn(new linkUtils_1.LinkError("You are calling concat on a terminating link, which will have no effect", firstLink));
|
||||
return firstLink;
|
||||
}
|
||||
var nextLink = toLink(second);
|
||||
if (linkUtils_1.isTerminating(nextLink)) {
|
||||
return new ApolloLink(function (operation) {
|
||||
return firstLink.request(operation, function (op) { return nextLink.request(op) || zen_observable_ts_1.default.of(); }) || zen_observable_ts_1.default.of();
|
||||
});
|
||||
}
|
||||
else {
|
||||
return new ApolloLink(function (operation, forward) {
|
||||
return (firstLink.request(operation, function (op) {
|
||||
return nextLink.request(op, forward) || zen_observable_ts_1.default.of();
|
||||
}) || zen_observable_ts_1.default.of());
|
||||
});
|
||||
}
|
||||
};
|
||||
var ApolloLink = (function () {
|
||||
function ApolloLink(request) {
|
||||
if (request)
|
||||
this.request = request;
|
||||
}
|
||||
ApolloLink.prototype.split = function (test, left, right) {
|
||||
return this.concat(split(test, left, right || new ApolloLink(passthrough)));
|
||||
};
|
||||
ApolloLink.prototype.concat = function (next) {
|
||||
return exports.concat(this, next);
|
||||
};
|
||||
ApolloLink.prototype.request = function (operation, forward) {
|
||||
throw new ts_invariant_1.InvariantError('request is not implemented');
|
||||
};
|
||||
ApolloLink.empty = empty;
|
||||
ApolloLink.from = from;
|
||||
ApolloLink.split = split;
|
||||
ApolloLink.execute = execute;
|
||||
return ApolloLink;
|
||||
}());
|
||||
exports.ApolloLink = ApolloLink;
|
||||
function execute(link, operation) {
|
||||
return (link.request(linkUtils_1.createOperation(operation.context, linkUtils_1.transformOperation(linkUtils_1.validateOperation(operation)))) || zen_observable_ts_1.default.of());
|
||||
}
|
||||
exports.execute = execute;
|
||||
//# sourceMappingURL=link.js.map
|
||||
1
node_modules/apollo-link/lib/link.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/link.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"link.js","sourceRoot":"","sources":["../src/link.ts"],"names":[],"mappings":"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"}
|
||||
19
node_modules/apollo-link/lib/linkUtils.d.ts
generated
vendored
Normal file
19
node_modules/apollo-link/lib/linkUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
import Observable from 'zen-observable-ts';
|
||||
import { GraphQLRequest, Operation } from './types';
|
||||
import { ApolloLink } from './link';
|
||||
import { getOperationName } from 'apollo-utilities';
|
||||
export { getOperationName };
|
||||
export declare function validateOperation(operation: GraphQLRequest): GraphQLRequest;
|
||||
export declare class LinkError extends Error {
|
||||
link: ApolloLink;
|
||||
constructor(message?: string, link?: ApolloLink);
|
||||
}
|
||||
export declare function isTerminating(link: ApolloLink): boolean;
|
||||
export declare function toPromise<R>(observable: Observable<R>): Promise<R>;
|
||||
export declare const makePromise: typeof toPromise;
|
||||
export declare function fromPromise<T>(promise: Promise<T>): Observable<T>;
|
||||
export declare function fromError<T>(errorValue: any): Observable<T>;
|
||||
export declare function transformOperation(operation: GraphQLRequest): GraphQLRequest;
|
||||
export declare function createOperation(starting: any, operation: GraphQLRequest): Operation;
|
||||
export declare function getKey(operation: GraphQLRequest): string;
|
||||
//# sourceMappingURL=linkUtils.d.ts.map
|
||||
1
node_modules/apollo-link/lib/linkUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/linkUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"linkUtils.d.ts","sourceRoot":"","sources":["src/linkUtils.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpD,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEpD,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAe3E;AAED,qBAAa,SAAU,SAAQ,KAAK;IAC3B,IAAI,EAAE,UAAU,CAAC;gBACZ,OAAO,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,UAAU;CAIhD;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,UAAU,GAAG,OAAO,CAEvD;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAiBlE;AAGD,eAAO,MAAM,WAAW,kBAAY,CAAC;AAErC,wBAAgB,WAAW,CAAC,CAAC,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CASjE;AAED,wBAAgB,SAAS,CAAC,CAAC,EAAE,UAAU,EAAE,GAAG,GAAG,UAAU,CAAC,CAAC,CAAC,CAI3D;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,cAAc,GAAG,cAAc,CAiB5E;AAED,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,GAAG,EACb,SAAS,EAAE,cAAc,GACxB,SAAS,CA2BX;AAED,wBAAgB,MAAM,CAAC,SAAS,EAAE,cAAc,UAK/C"}
|
||||
122
node_modules/apollo-link/lib/linkUtils.js
generated
vendored
Normal file
122
node_modules/apollo-link/lib/linkUtils.js
generated
vendored
Normal file
@@ -0,0 +1,122 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var zen_observable_ts_1 = tslib_1.__importDefault(require("zen-observable-ts"));
|
||||
var apollo_utilities_1 = require("apollo-utilities");
|
||||
exports.getOperationName = apollo_utilities_1.getOperationName;
|
||||
var ts_invariant_1 = require("ts-invariant");
|
||||
function validateOperation(operation) {
|
||||
var OPERATION_FIELDS = [
|
||||
'query',
|
||||
'operationName',
|
||||
'variables',
|
||||
'extensions',
|
||||
'context',
|
||||
];
|
||||
for (var _i = 0, _a = Object.keys(operation); _i < _a.length; _i++) {
|
||||
var key = _a[_i];
|
||||
if (OPERATION_FIELDS.indexOf(key) < 0) {
|
||||
throw new ts_invariant_1.InvariantError("illegal argument: " + key);
|
||||
}
|
||||
}
|
||||
return operation;
|
||||
}
|
||||
exports.validateOperation = validateOperation;
|
||||
var LinkError = (function (_super) {
|
||||
tslib_1.__extends(LinkError, _super);
|
||||
function LinkError(message, link) {
|
||||
var _this = _super.call(this, message) || this;
|
||||
_this.link = link;
|
||||
return _this;
|
||||
}
|
||||
return LinkError;
|
||||
}(Error));
|
||||
exports.LinkError = LinkError;
|
||||
function isTerminating(link) {
|
||||
return link.request.length <= 1;
|
||||
}
|
||||
exports.isTerminating = isTerminating;
|
||||
function toPromise(observable) {
|
||||
var completed = false;
|
||||
return new Promise(function (resolve, reject) {
|
||||
observable.subscribe({
|
||||
next: function (data) {
|
||||
if (completed) {
|
||||
ts_invariant_1.invariant.warn("Promise Wrapper does not support multiple results from Observable");
|
||||
}
|
||||
else {
|
||||
completed = true;
|
||||
resolve(data);
|
||||
}
|
||||
},
|
||||
error: reject,
|
||||
});
|
||||
});
|
||||
}
|
||||
exports.toPromise = toPromise;
|
||||
exports.makePromise = toPromise;
|
||||
function fromPromise(promise) {
|
||||
return new zen_observable_ts_1.default(function (observer) {
|
||||
promise
|
||||
.then(function (value) {
|
||||
observer.next(value);
|
||||
observer.complete();
|
||||
})
|
||||
.catch(observer.error.bind(observer));
|
||||
});
|
||||
}
|
||||
exports.fromPromise = fromPromise;
|
||||
function fromError(errorValue) {
|
||||
return new zen_observable_ts_1.default(function (observer) {
|
||||
observer.error(errorValue);
|
||||
});
|
||||
}
|
||||
exports.fromError = fromError;
|
||||
function transformOperation(operation) {
|
||||
var transformedOperation = {
|
||||
variables: operation.variables || {},
|
||||
extensions: operation.extensions || {},
|
||||
operationName: operation.operationName,
|
||||
query: operation.query,
|
||||
};
|
||||
if (!transformedOperation.operationName) {
|
||||
transformedOperation.operationName =
|
||||
typeof transformedOperation.query !== 'string'
|
||||
? apollo_utilities_1.getOperationName(transformedOperation.query)
|
||||
: '';
|
||||
}
|
||||
return transformedOperation;
|
||||
}
|
||||
exports.transformOperation = transformOperation;
|
||||
function createOperation(starting, operation) {
|
||||
var context = tslib_1.__assign({}, starting);
|
||||
var setContext = function (next) {
|
||||
if (typeof next === 'function') {
|
||||
context = tslib_1.__assign({}, context, next(context));
|
||||
}
|
||||
else {
|
||||
context = tslib_1.__assign({}, context, next);
|
||||
}
|
||||
};
|
||||
var getContext = function () { return (tslib_1.__assign({}, context)); };
|
||||
Object.defineProperty(operation, 'setContext', {
|
||||
enumerable: false,
|
||||
value: setContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'getContext', {
|
||||
enumerable: false,
|
||||
value: getContext,
|
||||
});
|
||||
Object.defineProperty(operation, 'toKey', {
|
||||
enumerable: false,
|
||||
value: function () { return getKey(operation); },
|
||||
});
|
||||
return operation;
|
||||
}
|
||||
exports.createOperation = createOperation;
|
||||
function getKey(operation) {
|
||||
var query = operation.query, variables = operation.variables, operationName = operation.operationName;
|
||||
return JSON.stringify([operationName, query, variables]);
|
||||
}
|
||||
exports.getKey = getKey;
|
||||
//# sourceMappingURL=linkUtils.js.map
|
||||
1
node_modules/apollo-link/lib/linkUtils.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/linkUtils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"linkUtils.js","sourceRoot":"","sources":["../src/linkUtils.ts"],"names":[],"mappings":"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"}
|
||||
5
node_modules/apollo-link/lib/test-utils.d.ts
generated
vendored
Normal file
5
node_modules/apollo-link/lib/test-utils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
import MockLink from './test-utils/mockLink';
|
||||
import SetContextLink from './test-utils/setContext';
|
||||
export * from './test-utils/testingUtils';
|
||||
export { MockLink, SetContextLink };
|
||||
//# sourceMappingURL=test-utils.d.ts.map
|
||||
1
node_modules/apollo-link/lib/test-utils.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"test-utils.d.ts","sourceRoot":"","sources":["src/test-utils.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,uBAAuB,CAAC;AAC7C,OAAO,cAAc,MAAM,yBAAyB,CAAC;AACrD,cAAc,2BAA2B,CAAC;AAE1C,OAAO,EAAE,QAAQ,EAAE,cAAc,EAAE,CAAC"}
|
||||
9
node_modules/apollo-link/lib/test-utils.js
generated
vendored
Normal file
9
node_modules/apollo-link/lib/test-utils.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var mockLink_1 = tslib_1.__importDefault(require("./test-utils/mockLink"));
|
||||
exports.MockLink = mockLink_1.default;
|
||||
var setContext_1 = tslib_1.__importDefault(require("./test-utils/setContext"));
|
||||
exports.SetContextLink = setContext_1.default;
|
||||
tslib_1.__exportStar(require("./test-utils/testingUtils"), exports);
|
||||
//# sourceMappingURL=test-utils.js.map
|
||||
1
node_modules/apollo-link/lib/test-utils.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"test-utils.js","sourceRoot":"","sources":["../src/test-utils.ts"],"names":[],"mappings":";;;AAAA,2EAA6C;AAIpC,mBAJF,kBAAQ,CAIE;AAHjB,+EAAqD;AAGlC,yBAHZ,oBAAc,CAGY;AAFjC,oEAA0C"}
|
||||
8
node_modules/apollo-link/lib/test-utils/mockLink.d.ts
generated
vendored
Normal file
8
node_modules/apollo-link/lib/test-utils/mockLink.d.ts
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
import { Operation, RequestHandler, NextLink, FetchResult } from '../types';
|
||||
import Observable from 'zen-observable-ts';
|
||||
import { ApolloLink } from '../link';
|
||||
export default class MockLink extends ApolloLink {
|
||||
constructor(handleRequest?: RequestHandler);
|
||||
request(operation: Operation, forward?: NextLink): Observable<FetchResult> | null;
|
||||
}
|
||||
//# sourceMappingURL=mockLink.d.ts.map
|
||||
1
node_modules/apollo-link/lib/test-utils/mockLink.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/mockLink.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mockLink.d.ts","sourceRoot":"","sources":["../src/test-utils/mockLink.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5E,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,QAAS,SAAQ,UAAU;gBAClC,aAAa,GAAE,cAA2B;IAK/C,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,CAAC,EAAE,QAAQ,GACjB,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI;CAGlC"}
|
||||
19
node_modules/apollo-link/lib/test-utils/mockLink.js
generated
vendored
Normal file
19
node_modules/apollo-link/lib/test-utils/mockLink.js
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var link_1 = require("../link");
|
||||
var MockLink = (function (_super) {
|
||||
tslib_1.__extends(MockLink, _super);
|
||||
function MockLink(handleRequest) {
|
||||
if (handleRequest === void 0) { handleRequest = function () { return null; }; }
|
||||
var _this = _super.call(this) || this;
|
||||
_this.request = handleRequest;
|
||||
return _this;
|
||||
}
|
||||
MockLink.prototype.request = function (operation, forward) {
|
||||
throw Error('should be overridden');
|
||||
};
|
||||
return MockLink;
|
||||
}(link_1.ApolloLink));
|
||||
exports.default = MockLink;
|
||||
//# sourceMappingURL=mockLink.js.map
|
||||
1
node_modules/apollo-link/lib/test-utils/mockLink.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/mockLink.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"mockLink.js","sourceRoot":"","sources":["../../src/test-utils/mockLink.ts"],"names":[],"mappings":";;;AAIA,gCAAqC;AAErC;IAAsC,oCAAU;IAC9C,kBAAY,aAA0C;QAA1C,8BAAA,EAAA,8BAAsC,OAAA,IAAI,EAAJ,CAAI;QAAtD,YACE,iBAAO,SAER;QADC,KAAI,CAAC,OAAO,GAAG,aAAa,CAAC;;IAC/B,CAAC;IAEM,0BAAO,GAAd,UACE,SAAoB,EACpB,OAAkB;QAElB,MAAM,KAAK,CAAC,sBAAsB,CAAC,CAAC;IACtC,CAAC;IACH,eAAC;AAAD,CAAC,AAZD,CAAsC,iBAAU,GAY/C"}
|
||||
9
node_modules/apollo-link/lib/test-utils/setContext.d.ts
generated
vendored
Normal file
9
node_modules/apollo-link/lib/test-utils/setContext.d.ts
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Operation, NextLink, FetchResult } from '../types';
|
||||
import Observable from 'zen-observable-ts';
|
||||
import { ApolloLink } from '../link';
|
||||
export default class SetContextLink extends ApolloLink {
|
||||
private setContext;
|
||||
constructor(setContext?: (context: Record<string, any>) => Record<string, any>);
|
||||
request(operation: Operation, forward: NextLink): Observable<FetchResult>;
|
||||
}
|
||||
//# sourceMappingURL=setContext.d.ts.map
|
||||
1
node_modules/apollo-link/lib/test-utils/setContext.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/setContext.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"setContext.d.ts","sourceRoot":"","sources":["../src/test-utils/setContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5D,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAE3C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAErC,MAAM,CAAC,OAAO,OAAO,cAAe,SAAQ,UAAU;IAElD,OAAO,CAAC,UAAU;gBAAV,UAAU,GAAE,CAClB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAU;IAK5B,OAAO,CACZ,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,QAAQ,GAChB,UAAU,CAAC,WAAW,CAAC;CAI3B"}
|
||||
20
node_modules/apollo-link/lib/test-utils/setContext.js
generated
vendored
Normal file
20
node_modules/apollo-link/lib/test-utils/setContext.js
generated
vendored
Normal file
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var link_1 = require("../link");
|
||||
var SetContextLink = (function (_super) {
|
||||
tslib_1.__extends(SetContextLink, _super);
|
||||
function SetContextLink(setContext) {
|
||||
if (setContext === void 0) { setContext = function (c) { return c; }; }
|
||||
var _this = _super.call(this) || this;
|
||||
_this.setContext = setContext;
|
||||
return _this;
|
||||
}
|
||||
SetContextLink.prototype.request = function (operation, forward) {
|
||||
operation.setContext(this.setContext(operation.getContext()));
|
||||
return forward(operation);
|
||||
};
|
||||
return SetContextLink;
|
||||
}(link_1.ApolloLink));
|
||||
exports.default = SetContextLink;
|
||||
//# sourceMappingURL=setContext.js.map
|
||||
1
node_modules/apollo-link/lib/test-utils/setContext.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/setContext.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"setContext.js","sourceRoot":"","sources":["../../src/test-utils/setContext.ts"],"names":[],"mappings":";;;AAIA,gCAAqC;AAErC;IAA4C,0CAAU;IACpD,wBACU,UAEyB;QAFzB,2BAAA,EAAA,uBAEmB,CAAC,IAAI,OAAA,CAAC,EAAD,CAAC;QAHnC,YAKE,iBAAO,SACR;QALS,gBAAU,GAAV,UAAU,CAEe;;IAGnC,CAAC;IAEM,gCAAO,GAAd,UACE,SAAoB,EACpB,OAAiB;QAEjB,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,UAAU,EAAE,CAAC,CAAC,CAAC;QAC9D,OAAO,OAAO,CAAC,SAAS,CAAC,CAAC;IAC5B,CAAC;IACH,qBAAC;AAAD,CAAC,AAhBD,CAA4C,iBAAU,GAgBrD"}
|
||||
12
node_modules/apollo-link/lib/test-utils/testingUtils.d.ts
generated
vendored
Normal file
12
node_modules/apollo-link/lib/test-utils/testingUtils.d.ts
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import { ApolloLink } from '../link';
|
||||
export declare function checkCalls<T>(calls: any[], results: Array<T>): void;
|
||||
export interface TestResultType {
|
||||
link: ApolloLink;
|
||||
results?: any[];
|
||||
query?: string;
|
||||
done?: () => void;
|
||||
context?: any;
|
||||
variables?: any;
|
||||
}
|
||||
export declare function testLinkResults(params: TestResultType): void;
|
||||
//# sourceMappingURL=testingUtils.d.ts.map
|
||||
1
node_modules/apollo-link/lib/test-utils/testingUtils.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/testingUtils.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"testingUtils.d.ts","sourceRoot":"","sources":["../src/test-utils/testingUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAW,UAAU,EAAE,MAAM,SAAS,CAAC;AAU9C,wBAAgB,UAAU,CAAC,CAAC,EAAE,KAAK,EAAE,GAAG,EAAO,EAAE,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,QAGjE;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,UAAU,CAAC;IACjB,OAAO,CAAC,EAAE,GAAG,EAAE,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,IAAI,CAAC;IAClB,OAAO,CAAC,EAAE,GAAG,CAAC;IACd,SAAS,CAAC,EAAE,GAAG,CAAC;CACjB;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,cAAc,QAuBrD"}
|
||||
38
node_modules/apollo-link/lib/test-utils/testingUtils.js
generated
vendored
Normal file
38
node_modules/apollo-link/lib/test-utils/testingUtils.js
generated
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
var tslib_1 = require("tslib");
|
||||
var graphql_tag_1 = tslib_1.__importDefault(require("graphql-tag"));
|
||||
var link_1 = require("../link");
|
||||
var sampleQuery = graphql_tag_1.default(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n query SampleQuery {\n stub {\n id\n }\n }\n"], ["\n query SampleQuery {\n stub {\n id\n }\n }\n"])));
|
||||
function checkCalls(calls, results) {
|
||||
if (calls === void 0) { calls = []; }
|
||||
expect(calls.length).toBe(results.length);
|
||||
calls.map(function (call, i) { return expect(call.data).toEqual(results[i]); });
|
||||
}
|
||||
exports.checkCalls = checkCalls;
|
||||
function testLinkResults(params) {
|
||||
var link = params.link, context = params.context, variables = params.variables;
|
||||
var results = params.results || [];
|
||||
var query = params.query || sampleQuery;
|
||||
var done = params.done || (function () { return void 0; });
|
||||
var spy = jest.fn();
|
||||
link_1.execute(link, { query: query, context: context, variables: variables }).subscribe({
|
||||
next: spy,
|
||||
error: function (error) {
|
||||
expect(error).toEqual(results.pop());
|
||||
checkCalls(spy.mock.calls[0], results);
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
},
|
||||
complete: function () {
|
||||
checkCalls(spy.mock.calls[0], results);
|
||||
if (done) {
|
||||
done();
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
exports.testLinkResults = testLinkResults;
|
||||
var templateObject_1;
|
||||
//# sourceMappingURL=testingUtils.js.map
|
||||
1
node_modules/apollo-link/lib/test-utils/testingUtils.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/test-utils/testingUtils.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"testingUtils.js","sourceRoot":"","sources":["../../src/test-utils/testingUtils.ts"],"names":[],"mappings":";;;AAAA,oEAA8B;AAC9B,gCAA8C;AAE9C,IAAM,WAAW,GAAG,qBAAG,wIAAA,6DAMtB,IAAA,CAAC;AAEF,SAAgB,UAAU,CAAI,KAAiB,EAAE,OAAiB;IAApC,sBAAA,EAAA,UAAiB;IAC7C,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;IAC1C,KAAK,CAAC,GAAG,CAAC,UAAC,IAAI,EAAE,CAAC,IAAK,OAAA,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,EAArC,CAAqC,CAAC,CAAC;AAChE,CAAC;AAHD,gCAGC;AAWD,SAAgB,eAAe,CAAC,MAAsB;IAC5C,IAAA,kBAAI,EAAE,wBAAO,EAAE,4BAAS,CAAY;IAC5C,IAAM,OAAO,GAAG,MAAM,CAAC,OAAO,IAAI,EAAE,CAAC;IACrC,IAAM,KAAK,GAAG,MAAM,CAAC,KAAK,IAAI,WAAW,CAAC;IAC1C,IAAM,IAAI,GAAG,MAAM,CAAC,IAAI,IAAI,CAAC,cAAM,OAAA,KAAK,CAAC,EAAN,CAAM,CAAC,CAAC;IAE3C,IAAM,GAAG,GAAG,IAAI,CAAC,EAAE,EAAE,CAAC;IACtB,cAAO,CAAC,IAAI,EAAE,EAAE,KAAK,OAAA,EAAE,OAAO,SAAA,EAAE,SAAS,WAAA,EAAE,CAAC,CAAC,SAAS,CAAC;QACrD,IAAI,EAAE,GAAG;QACT,KAAK,EAAE,UAAA,KAAK;YACV,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC;YACrC,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,EAAE;gBACR,IAAI,EAAE,CAAC;aACR;QACH,CAAC;QACD,QAAQ,EAAE;YACR,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC;YACvC,IAAI,IAAI,EAAE;gBACR,IAAI,EAAE,CAAC;aACR;QACH,CAAC;KACF,CAAC,CAAC;AACL,CAAC;AAvBD,0CAuBC"}
|
||||
34
node_modules/apollo-link/lib/types.d.ts
generated
vendored
Normal file
34
node_modules/apollo-link/lib/types.d.ts
generated
vendored
Normal file
@@ -0,0 +1,34 @@
|
||||
import Observable from 'zen-observable-ts';
|
||||
import { DocumentNode } from 'graphql/language/ast';
|
||||
import { ExecutionResult as GraphQLExecutionResult } from 'graphql';
|
||||
export { DocumentNode };
|
||||
export interface ExecutionResult<TData = {
|
||||
[key: string]: any;
|
||||
}> extends GraphQLExecutionResult {
|
||||
data?: TData | null;
|
||||
}
|
||||
export interface GraphQLRequest {
|
||||
query: DocumentNode;
|
||||
variables?: Record<string, any>;
|
||||
operationName?: string;
|
||||
context?: Record<string, any>;
|
||||
extensions?: Record<string, any>;
|
||||
}
|
||||
export interface Operation {
|
||||
query: DocumentNode;
|
||||
variables: Record<string, any>;
|
||||
operationName: string;
|
||||
extensions: Record<string, any>;
|
||||
setContext: (context: Record<string, any>) => Record<string, any>;
|
||||
getContext: () => Record<string, any>;
|
||||
toKey: () => string;
|
||||
}
|
||||
export declare type FetchResult<TData = {
|
||||
[key: string]: any;
|
||||
}, C = Record<string, any>, E = Record<string, any>> = ExecutionResult<TData> & {
|
||||
extensions?: E;
|
||||
context?: C;
|
||||
};
|
||||
export declare type NextLink = (operation: Operation) => Observable<FetchResult>;
|
||||
export declare type RequestHandler = (operation: Operation, forward: NextLink) => Observable<FetchResult> | null;
|
||||
//# sourceMappingURL=types.d.ts.map
|
||||
1
node_modules/apollo-link/lib/types.d.ts.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/types.d.ts.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,OAAO,UAAU,MAAM,mBAAmB,CAAC;AAC3C,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,MAAM,SAAS,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,CAAC;AAExB,MAAM,WAAW,eAAe,CAC9B,KAAK,GAAG;IACN,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB,CACD,SAAQ,sBAAsB;IAC9B,IAAI,CAAC,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,SAAS;IACxB,KAAK,EAAE,YAAY,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAChC,UAAU,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAClE,UAAU,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,KAAK,EAAE,MAAM,MAAM,CAAC;CACrB;AAED,oBAAY,WAAW,CACrB,KAAK,GAAG;IAAE,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAA;CAAE,EAC9B,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACvB,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,IACrB,eAAe,CAAC,KAAK,CAAC,GAAG;IAC3B,UAAU,CAAC,EAAE,CAAC,CAAC;IACf,OAAO,CAAC,EAAE,CAAC,CAAC;CACb,CAAC;AAEF,oBAAY,QAAQ,GAAG,CAAC,SAAS,EAAE,SAAS,KAAK,UAAU,CAAC,WAAW,CAAC,CAAC;AACzE,oBAAY,cAAc,GAAG,CAC3B,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,QAAQ,KACd,UAAU,CAAC,WAAW,CAAC,GAAG,IAAI,CAAC"}
|
||||
3
node_modules/apollo-link/lib/types.js
generated
vendored
Normal file
3
node_modules/apollo-link/lib/types.js
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
//# sourceMappingURL=types.js.map
|
||||
1
node_modules/apollo-link/lib/types.js.map
generated
vendored
Normal file
1
node_modules/apollo-link/lib/types.js.map
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":""}
|
||||
15
node_modules/apollo-link/node_modules/tslib/CopyrightNotice.txt
generated
vendored
Normal file
15
node_modules/apollo-link/node_modules/tslib/CopyrightNotice.txt
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
12
node_modules/apollo-link/node_modules/tslib/LICENSE.txt
generated
vendored
Normal file
12
node_modules/apollo-link/node_modules/tslib/LICENSE.txt
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
142
node_modules/apollo-link/node_modules/tslib/README.md
generated
vendored
Normal file
142
node_modules/apollo-link/node_modules/tslib/README.md
generated
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
# tslib
|
||||
|
||||
This is a runtime library for [TypeScript](http://www.typescriptlang.org/) that contains all of the TypeScript helper functions.
|
||||
|
||||
This library is primarily used by the `--importHelpers` flag in TypeScript.
|
||||
When using `--importHelpers`, a module that uses helper functions like `__extends` and `__assign` in the following emitted file:
|
||||
|
||||
```ts
|
||||
var __assign = (this && this.__assign) || Object.assign || function(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
||||
t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
exports.x = {};
|
||||
exports.y = __assign({}, exports.x);
|
||||
|
||||
```
|
||||
|
||||
will instead be emitted as something like the following:
|
||||
|
||||
```ts
|
||||
var tslib_1 = require("tslib");
|
||||
exports.x = {};
|
||||
exports.y = tslib_1.__assign({}, exports.x);
|
||||
```
|
||||
|
||||
Because this can avoid duplicate declarations of things like `__extends`, `__assign`, etc., this means delivering users smaller files on average, as well as less runtime overhead.
|
||||
For optimized bundles with TypeScript, you should absolutely consider using `tslib` and `--importHelpers`.
|
||||
|
||||
# Installing
|
||||
|
||||
For the latest stable version, run:
|
||||
|
||||
## npm
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
npm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
npm install tslib@1.6.1
|
||||
```
|
||||
|
||||
## yarn
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
yarn add tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
yarn add tslib@1.6.1
|
||||
```
|
||||
|
||||
## bower
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
bower install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
bower install tslib@1.6.1
|
||||
```
|
||||
|
||||
## JSPM
|
||||
|
||||
```sh
|
||||
# TypeScript 2.3.3 or later
|
||||
jspm install tslib
|
||||
|
||||
# TypeScript 2.3.2 or earlier
|
||||
jspm install tslib@1.6.1
|
||||
```
|
||||
|
||||
# Usage
|
||||
|
||||
Set the `importHelpers` compiler option on the command line:
|
||||
|
||||
```
|
||||
tsc --importHelpers file.ts
|
||||
```
|
||||
|
||||
or in your tsconfig.json:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"importHelpers": true
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
#### For bower and JSPM users
|
||||
|
||||
You will need to add a `paths` mapping for `tslib`, e.g. For Bower users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "amd",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["bower_components/tslib/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
For JSPM users:
|
||||
|
||||
```json
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "system",
|
||||
"importHelpers": true,
|
||||
"baseUrl": "./",
|
||||
"paths": {
|
||||
"tslib" : ["jspm_packages/npm/tslib@1.[version].0/tslib.d.ts"]
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
# Contribute
|
||||
|
||||
There are many ways to [contribute](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md) to TypeScript.
|
||||
|
||||
* [Submit bugs](https://github.com/Microsoft/TypeScript/issues) and help us verify fixes as they are checked in.
|
||||
* Review the [source code changes](https://github.com/Microsoft/TypeScript/pulls).
|
||||
* Engage with other TypeScript users and developers on [StackOverflow](http://stackoverflow.com/questions/tagged/typescript).
|
||||
* Join the [#typescript](http://twitter.com/#!/search/realtime/%23typescript) discussion on Twitter.
|
||||
* [Contribute bug fixes](https://github.com/Microsoft/TypeScript/blob/master/CONTRIBUTING.md).
|
||||
|
||||
# Documentation
|
||||
|
||||
* [Quick tutorial](http://www.typescriptlang.org/Tutorial)
|
||||
* [Programming handbook](http://www.typescriptlang.org/Handbook)
|
||||
* [Homepage](http://www.typescriptlang.org/)
|
||||
51
node_modules/apollo-link/node_modules/tslib/modules/index.js
generated
vendored
Normal file
51
node_modules/apollo-link/node_modules/tslib/modules/index.js
generated
vendored
Normal file
@@ -0,0 +1,51 @@
|
||||
import tslib from '../tslib.js';
|
||||
const {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__exportStar,
|
||||
__createBinding,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
} = tslib;
|
||||
export {
|
||||
__extends,
|
||||
__assign,
|
||||
__rest,
|
||||
__decorate,
|
||||
__param,
|
||||
__metadata,
|
||||
__awaiter,
|
||||
__generator,
|
||||
__exportStar,
|
||||
__createBinding,
|
||||
__values,
|
||||
__read,
|
||||
__spread,
|
||||
__spreadArrays,
|
||||
__await,
|
||||
__asyncGenerator,
|
||||
__asyncDelegator,
|
||||
__asyncValues,
|
||||
__makeTemplateObject,
|
||||
__importStar,
|
||||
__importDefault,
|
||||
__classPrivateFieldGet,
|
||||
__classPrivateFieldSet,
|
||||
};
|
||||
3
node_modules/apollo-link/node_modules/tslib/modules/package.json
generated
vendored
Normal file
3
node_modules/apollo-link/node_modules/tslib/modules/package.json
generated
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"type": "module"
|
||||
}
|
||||
37
node_modules/apollo-link/node_modules/tslib/package.json
generated
vendored
Normal file
37
node_modules/apollo-link/node_modules/tslib/package.json
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"name": "tslib",
|
||||
"author": "Microsoft Corp.",
|
||||
"homepage": "https://www.typescriptlang.org/",
|
||||
"version": "1.14.1",
|
||||
"license": "0BSD",
|
||||
"description": "Runtime library for TypeScript helper functions",
|
||||
"keywords": [
|
||||
"TypeScript",
|
||||
"Microsoft",
|
||||
"compiler",
|
||||
"language",
|
||||
"javascript",
|
||||
"tslib",
|
||||
"runtime"
|
||||
],
|
||||
"bugs": {
|
||||
"url": "https://github.com/Microsoft/TypeScript/issues"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Microsoft/tslib.git"
|
||||
},
|
||||
"main": "tslib.js",
|
||||
"module": "tslib.es6.js",
|
||||
"jsnext:main": "tslib.es6.js",
|
||||
"typings": "tslib.d.ts",
|
||||
"sideEffects": false,
|
||||
"exports": {
|
||||
".": {
|
||||
"module": "./tslib.es6.js",
|
||||
"import": "./modules/index.js",
|
||||
"default": "./tslib.js"
|
||||
},
|
||||
"./": "./"
|
||||
}
|
||||
}
|
||||
23
node_modules/apollo-link/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js
generated
vendored
Normal file
23
node_modules/apollo-link/node_modules/tslib/test/validateModuleExportsMatchCommonJS/index.js
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// When on node 14, it validates that all of the commonjs exports
|
||||
// are correctly re-exported for es modules importers.
|
||||
|
||||
const nodeMajor = Number(process.version.split(".")[0].slice(1))
|
||||
if (nodeMajor < 14) {
|
||||
console.log("Skipping because node does not support module exports.")
|
||||
process.exit(0)
|
||||
}
|
||||
|
||||
// ES Modules import via the ./modules folder
|
||||
import * as esTSLib from "../../modules/index.js"
|
||||
|
||||
// Force a commonjs resolve
|
||||
import { createRequire } from "module";
|
||||
const commonJSTSLib = createRequire(import.meta.url)("../../tslib.js");
|
||||
|
||||
for (const key in commonJSTSLib) {
|
||||
if (commonJSTSLib.hasOwnProperty(key)) {
|
||||
if(!esTSLib[key]) throw new Error(`ESModules is missing ${key} - it needs to be re-exported in ./modules/index.js`)
|
||||
}
|
||||
}
|
||||
|
||||
console.log("All exports in commonjs are available for es module consumers.")
|
||||
6
node_modules/apollo-link/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json
generated
vendored
Normal file
6
node_modules/apollo-link/node_modules/tslib/test/validateModuleExportsMatchCommonJS/package.json
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"test": "node index.js"
|
||||
}
|
||||
}
|
||||
37
node_modules/apollo-link/node_modules/tslib/tslib.d.ts
generated
vendored
Normal file
37
node_modules/apollo-link/node_modules/tslib/tslib.d.ts
generated
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
export declare function __extends(d: Function, b: Function): void;
|
||||
export declare function __assign(t: any, ...sources: any[]): any;
|
||||
export declare function __rest(t: any, propertyNames: (string | symbol)[]): any;
|
||||
export declare function __decorate(decorators: Function[], target: any, key?: string | symbol, desc?: any): any;
|
||||
export declare function __param(paramIndex: number, decorator: Function): Function;
|
||||
export declare function __metadata(metadataKey: any, metadataValue: any): Function;
|
||||
export declare function __awaiter(thisArg: any, _arguments: any, P: Function, generator: Function): any;
|
||||
export declare function __generator(thisArg: any, body: Function): any;
|
||||
export declare function __exportStar(m: any, exports: any): void;
|
||||
export declare function __values(o: any): any;
|
||||
export declare function __read(o: any, n?: number): any[];
|
||||
export declare function __spread(...args: any[][]): any[];
|
||||
export declare function __spreadArrays(...args: any[][]): any[];
|
||||
export declare function __await(v: any): any;
|
||||
export declare function __asyncGenerator(thisArg: any, _arguments: any, generator: Function): any;
|
||||
export declare function __asyncDelegator(o: any): any;
|
||||
export declare function __asyncValues(o: any): any;
|
||||
export declare function __makeTemplateObject(cooked: string[], raw: string[]): TemplateStringsArray;
|
||||
export declare function __importStar<T>(mod: T): T;
|
||||
export declare function __importDefault<T>(mod: T): T | { default: T };
|
||||
export declare function __classPrivateFieldGet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, get(o: T): V | undefined }): V;
|
||||
export declare function __classPrivateFieldSet<T extends object, V>(receiver: T, privateMap: { has(o: T): boolean, set(o: T, value: V): any }, value: V): V;
|
||||
export declare function __createBinding(object: object, target: object, key: PropertyKey, objectKey?: PropertyKey): void;
|
||||
1
node_modules/apollo-link/node_modules/tslib/tslib.es6.html
generated
vendored
Normal file
1
node_modules/apollo-link/node_modules/tslib/tslib.es6.html
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<script src="tslib.es6.js"></script>
|
||||
218
node_modules/apollo-link/node_modules/tslib/tslib.es6.js
generated
vendored
Normal file
218
node_modules/apollo-link/node_modules/tslib/tslib.es6.js
generated
vendored
Normal file
@@ -0,0 +1,218 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
/* 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);
|
||||
};
|
||||
|
||||
export function __extends(d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
}
|
||||
|
||||
export var __assign = function() {
|
||||
__assign = Object.assign || function __assign(t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
return __assign.apply(this, arguments);
|
||||
}
|
||||
|
||||
export function __rest(s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
}
|
||||
|
||||
export function __decorate(decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
}
|
||||
|
||||
export function __param(paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
}
|
||||
|
||||
export function __metadata(metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
}
|
||||
|
||||
export function __awaiter(thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
}
|
||||
|
||||
export function __generator(thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
}
|
||||
|
||||
export function __createBinding(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
}
|
||||
|
||||
export function __exportStar(m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
}
|
||||
|
||||
export function __values(o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
}
|
||||
|
||||
export function __read(o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
export function __spread() {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
}
|
||||
|
||||
export function __spreadArrays() {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
};
|
||||
|
||||
export function __await(v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
}
|
||||
|
||||
export function __asyncGenerator(thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
}
|
||||
|
||||
export function __asyncDelegator(o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
}
|
||||
|
||||
export function __asyncValues(o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
}
|
||||
|
||||
export function __makeTemplateObject(cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
export function __importStar(mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result.default = mod;
|
||||
return result;
|
||||
}
|
||||
|
||||
export function __importDefault(mod) {
|
||||
return (mod && mod.__esModule) ? mod : { default: mod };
|
||||
}
|
||||
|
||||
export function __classPrivateFieldGet(receiver, privateMap) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to get private field on non-instance");
|
||||
}
|
||||
return privateMap.get(receiver);
|
||||
}
|
||||
|
||||
export function __classPrivateFieldSet(receiver, privateMap, value) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to set private field on non-instance");
|
||||
}
|
||||
privateMap.set(receiver, value);
|
||||
return value;
|
||||
}
|
||||
1
node_modules/apollo-link/node_modules/tslib/tslib.html
generated
vendored
Normal file
1
node_modules/apollo-link/node_modules/tslib/tslib.html
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<script src="tslib.js"></script>
|
||||
284
node_modules/apollo-link/node_modules/tslib/tslib.js
generated
vendored
Normal file
284
node_modules/apollo-link/node_modules/tslib/tslib.js
generated
vendored
Normal file
@@ -0,0 +1,284 @@
|
||||
/*! *****************************************************************************
|
||||
Copyright (c) Microsoft Corporation.
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
||||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
PERFORMANCE OF THIS SOFTWARE.
|
||||
***************************************************************************** */
|
||||
|
||||
/* global global, define, System, Reflect, Promise */
|
||||
var __extends;
|
||||
var __assign;
|
||||
var __rest;
|
||||
var __decorate;
|
||||
var __param;
|
||||
var __metadata;
|
||||
var __awaiter;
|
||||
var __generator;
|
||||
var __exportStar;
|
||||
var __values;
|
||||
var __read;
|
||||
var __spread;
|
||||
var __spreadArrays;
|
||||
var __await;
|
||||
var __asyncGenerator;
|
||||
var __asyncDelegator;
|
||||
var __asyncValues;
|
||||
var __makeTemplateObject;
|
||||
var __importStar;
|
||||
var __importDefault;
|
||||
var __classPrivateFieldGet;
|
||||
var __classPrivateFieldSet;
|
||||
var __createBinding;
|
||||
(function (factory) {
|
||||
var root = typeof global === "object" ? global : typeof self === "object" ? self : typeof this === "object" ? this : {};
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("tslib", ["exports"], function (exports) { factory(createExporter(root, createExporter(exports))); });
|
||||
}
|
||||
else if (typeof module === "object" && typeof module.exports === "object") {
|
||||
factory(createExporter(root, createExporter(module.exports)));
|
||||
}
|
||||
else {
|
||||
factory(createExporter(root));
|
||||
}
|
||||
function createExporter(exports, previous) {
|
||||
if (exports !== root) {
|
||||
if (typeof Object.create === "function") {
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
}
|
||||
else {
|
||||
exports.__esModule = true;
|
||||
}
|
||||
}
|
||||
return function (id, v) { return exports[id] = previous ? previous(id, v) : v; };
|
||||
}
|
||||
})
|
||||
(function (exporter) {
|
||||
var 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]; };
|
||||
|
||||
__extends = function (d, b) {
|
||||
extendStatics(d, b);
|
||||
function __() { this.constructor = d; }
|
||||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
||||
};
|
||||
|
||||
__assign = Object.assign || function (t) {
|
||||
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
||||
s = arguments[i];
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
__rest = function (s, e) {
|
||||
var t = {};
|
||||
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
||||
t[p] = s[p];
|
||||
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
||||
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
||||
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
||||
t[p[i]] = s[p[i]];
|
||||
}
|
||||
return t;
|
||||
};
|
||||
|
||||
__decorate = function (decorators, target, key, desc) {
|
||||
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
||||
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
||||
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
||||
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
||||
};
|
||||
|
||||
__param = function (paramIndex, decorator) {
|
||||
return function (target, key) { decorator(target, key, paramIndex); }
|
||||
};
|
||||
|
||||
__metadata = function (metadataKey, metadataValue) {
|
||||
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
||||
};
|
||||
|
||||
__awaiter = function (thisArg, _arguments, P, generator) {
|
||||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
||||
return new (P || (P = Promise))(function (resolve, reject) {
|
||||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
||||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
||||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
||||
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
||||
});
|
||||
};
|
||||
|
||||
__generator = function (thisArg, body) {
|
||||
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
||||
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
||||
function verb(n) { return function (v) { return step([n, v]); }; }
|
||||
function step(op) {
|
||||
if (f) throw new TypeError("Generator is already executing.");
|
||||
while (_) try {
|
||||
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
||||
if (y = 0, t) op = [op[0] & 2, t.value];
|
||||
switch (op[0]) {
|
||||
case 0: case 1: t = op; break;
|
||||
case 4: _.label++; return { value: op[1], done: false };
|
||||
case 5: _.label++; y = op[1]; op = [0]; continue;
|
||||
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
||||
default:
|
||||
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
||||
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
||||
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
||||
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
||||
if (t[2]) _.ops.pop();
|
||||
_.trys.pop(); continue;
|
||||
}
|
||||
op = body.call(thisArg, _);
|
||||
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
||||
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
||||
}
|
||||
};
|
||||
|
||||
__createBinding = function(o, m, k, k2) {
|
||||
if (k2 === undefined) k2 = k;
|
||||
o[k2] = m[k];
|
||||
};
|
||||
|
||||
__exportStar = function (m, exports) {
|
||||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
||||
};
|
||||
|
||||
__values = function (o) {
|
||||
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
||||
if (m) return m.call(o);
|
||||
if (o && typeof o.length === "number") return {
|
||||
next: function () {
|
||||
if (o && i >= o.length) o = void 0;
|
||||
return { value: o && o[i++], done: !o };
|
||||
}
|
||||
};
|
||||
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
||||
};
|
||||
|
||||
__read = function (o, n) {
|
||||
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
||||
if (!m) return o;
|
||||
var i = m.call(o), r, ar = [], e;
|
||||
try {
|
||||
while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
|
||||
}
|
||||
catch (error) { e = { error: error }; }
|
||||
finally {
|
||||
try {
|
||||
if (r && !r.done && (m = i["return"])) m.call(i);
|
||||
}
|
||||
finally { if (e) throw e.error; }
|
||||
}
|
||||
return ar;
|
||||
};
|
||||
|
||||
__spread = function () {
|
||||
for (var ar = [], i = 0; i < arguments.length; i++)
|
||||
ar = ar.concat(__read(arguments[i]));
|
||||
return ar;
|
||||
};
|
||||
|
||||
__spreadArrays = function () {
|
||||
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
||||
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
||||
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
||||
r[k] = a[j];
|
||||
return r;
|
||||
};
|
||||
|
||||
__await = function (v) {
|
||||
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
||||
};
|
||||
|
||||
__asyncGenerator = function (thisArg, _arguments, generator) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
||||
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
||||
function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
||||
function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }
|
||||
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
||||
function fulfill(value) { resume("next", value); }
|
||||
function reject(value) { resume("throw", value); }
|
||||
function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }
|
||||
};
|
||||
|
||||
__asyncDelegator = function (o) {
|
||||
var i, p;
|
||||
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
||||
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
||||
};
|
||||
|
||||
__asyncValues = function (o) {
|
||||
if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
|
||||
var m = o[Symbol.asyncIterator], i;
|
||||
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
||||
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
||||
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }
|
||||
};
|
||||
|
||||
__makeTemplateObject = function (cooked, raw) {
|
||||
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
||||
return cooked;
|
||||
};
|
||||
|
||||
__importStar = function (mod) {
|
||||
if (mod && mod.__esModule) return mod;
|
||||
var result = {};
|
||||
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
||||
result["default"] = mod;
|
||||
return result;
|
||||
};
|
||||
|
||||
__importDefault = function (mod) {
|
||||
return (mod && mod.__esModule) ? mod : { "default": mod };
|
||||
};
|
||||
|
||||
__classPrivateFieldGet = function (receiver, privateMap) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to get private field on non-instance");
|
||||
}
|
||||
return privateMap.get(receiver);
|
||||
};
|
||||
|
||||
__classPrivateFieldSet = function (receiver, privateMap, value) {
|
||||
if (!privateMap.has(receiver)) {
|
||||
throw new TypeError("attempted to set private field on non-instance");
|
||||
}
|
||||
privateMap.set(receiver, value);
|
||||
return value;
|
||||
};
|
||||
|
||||
exporter("__extends", __extends);
|
||||
exporter("__assign", __assign);
|
||||
exporter("__rest", __rest);
|
||||
exporter("__decorate", __decorate);
|
||||
exporter("__param", __param);
|
||||
exporter("__metadata", __metadata);
|
||||
exporter("__awaiter", __awaiter);
|
||||
exporter("__generator", __generator);
|
||||
exporter("__exportStar", __exportStar);
|
||||
exporter("__createBinding", __createBinding);
|
||||
exporter("__values", __values);
|
||||
exporter("__read", __read);
|
||||
exporter("__spread", __spread);
|
||||
exporter("__spreadArrays", __spreadArrays);
|
||||
exporter("__await", __await);
|
||||
exporter("__asyncGenerator", __asyncGenerator);
|
||||
exporter("__asyncDelegator", __asyncDelegator);
|
||||
exporter("__asyncValues", __asyncValues);
|
||||
exporter("__makeTemplateObject", __makeTemplateObject);
|
||||
exporter("__importStar", __importStar);
|
||||
exporter("__importDefault", __importDefault);
|
||||
exporter("__classPrivateFieldGet", __classPrivateFieldGet);
|
||||
exporter("__classPrivateFieldSet", __classPrivateFieldSet);
|
||||
});
|
||||
72
node_modules/apollo-link/package.json
generated
vendored
Normal file
72
node_modules/apollo-link/package.json
generated
vendored
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "apollo-link",
|
||||
"version": "1.2.14",
|
||||
"description": "Flexible, lightweight transport layer for GraphQL",
|
||||
"author": "Evans Hauser <evanshauser@gmail.com>",
|
||||
"contributors": [
|
||||
"James Baxley <james@meteor.com>",
|
||||
"Jonas Helfer <jonas@helfer.email>",
|
||||
"jon wong <j@jnwng.com>",
|
||||
"Sashko Stubailo <sashko@stubailo.com>"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "./lib/index.js",
|
||||
"module": "./lib/bundle.esm.js",
|
||||
"typings": "./lib/index.d.ts",
|
||||
"sideEffects": false,
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/apollographql/apollo-link.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/apollographql/apollo-link/issues"
|
||||
},
|
||||
"homepage": "https://github.com/apollographql/apollo-link#readme",
|
||||
"scripts": {
|
||||
"build": "tsc && rollup -c",
|
||||
"clean": "rimraf lib/* && rimraf coverage/*",
|
||||
"coverage": "jest --coverage",
|
||||
"filesize": "../../scripts/minify",
|
||||
"lint": "tslint -c \"../../tslint.json\" -p tsconfig.json -c ../../tslint.json src/*.ts",
|
||||
"prebuild": "npm run clean",
|
||||
"prepare": "npm run build",
|
||||
"test": "npm run lint && jest",
|
||||
"watch": "tsc -w -p . & rollup -c -w"
|
||||
},
|
||||
"dependencies": {
|
||||
"apollo-utilities": "^1.3.0",
|
||||
"ts-invariant": "^0.4.0",
|
||||
"tslib": "^1.9.3",
|
||||
"zen-observable-ts": "^0.8.21"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"graphql": "^0.11.3 || ^0.12.3 || ^0.13.0 || ^14.0.0 || ^15.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/graphql": "14.2.3",
|
||||
"@types/jest": "24.9.0",
|
||||
"@types/node": "9.6.55",
|
||||
"graphql": "15.0.0",
|
||||
"graphql-tag": "2.10.1",
|
||||
"jest": "24.9.0",
|
||||
"rimraf": "2.7.1",
|
||||
"rollup": "1.29.1",
|
||||
"ts-jest": "22.4.6",
|
||||
"tslint": "5.20.1",
|
||||
"typescript": "3.0.3"
|
||||
},
|
||||
"jest": {
|
||||
"transform": {
|
||||
".(ts|tsx)": "ts-jest"
|
||||
},
|
||||
"testRegex": "(/__tests__/.*|\\.(test|spec))\\.(ts|tsx|js)$",
|
||||
"moduleFileExtensions": [
|
||||
"ts",
|
||||
"tsx",
|
||||
"js",
|
||||
"json"
|
||||
],
|
||||
"testURL": "http://localhost"
|
||||
},
|
||||
"gitHead": "1012934b4fd9ab436c4fdcd5e9b1bb1e4c1b0d98"
|
||||
}
|
||||
Reference in New Issue
Block a user