@deboxsoft/module-core
Advanced tools
Comparing version 1.5.11 to 1.5.12
@@ -5,9 +5,4 @@ 'use strict'; | ||
var Container = require('typedi'); | ||
var graphqlRequest = require('graphql-request'); | ||
var typedi = require('typedi'); | ||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } | ||
var Container__default = /*#__PURE__*/_interopDefaultLegacy(Container); | ||
class Logger { | ||
@@ -23,20 +18,7 @@ } | ||
const createFetchGraphql = (options, persisted = true) => { | ||
const request2 = new graphqlRequest.GraphQLClient(options.url, options); | ||
if (persisted) { | ||
Container__default['default'].set(graphqlRequest.GraphQLClient, request2); | ||
} | ||
return request2; | ||
}; | ||
const getFetchGraphql = () => Container__default['default'].get(graphqlRequest.GraphQLClient); | ||
const fetchGraphql = (query, variables) => getFetchGraphql().request(query, variables); | ||
const gql = graphqlRequest.gql; | ||
const rawRequestGraphql = graphqlRequest.rawRequest; | ||
const requestGraphql = graphqlRequest.request; | ||
Object.keys(Container).forEach(function (k) { | ||
Object.keys(typedi).forEach(function (k) { | ||
if (k !== 'default') Object.defineProperty(exports, k, { | ||
enumerable: true, | ||
get: function () { | ||
return Container[k]; | ||
return typedi[k]; | ||
} | ||
@@ -47,8 +29,2 @@ }); | ||
exports.Logger = Logger; | ||
exports.createFetchGraphql = createFetchGraphql; | ||
exports.fetchGraphql = fetchGraphql; | ||
exports.getFetchGraphql = getFetchGraphql; | ||
exports.gql = gql; | ||
exports.rawRequestGraphql = rawRequestGraphql; | ||
exports.requestGraphql = requestGraphql; | ||
//# sourceMappingURL=index.cjs.js.map |
export * from 'typedi'; | ||
import { GraphQLClient, gql as gql$1, rawRequest, request } from 'graphql-request'; | ||
import { RequestInit } from 'graphql-request/dist/types.dom'; | ||
@@ -75,12 +73,2 @@ interface LogFn { | ||
declare type GraphqlRequestOptions = RequestInit & { | ||
url: string; | ||
}; | ||
declare const createFetchGraphql: (options: GraphqlRequestOptions, persisted?: boolean) => GraphQLClient; | ||
declare const getFetchGraphql: () => GraphQLClient; | ||
declare const fetchGraphql: <V>(query: string, variables?: V | undefined) => Promise<any>; | ||
declare const gql: typeof gql$1; | ||
declare const rawRequestGraphql: typeof rawRequest; | ||
declare const requestGraphql: typeof request; | ||
export { DeboxError, Logger, createFetchGraphql, fetchGraphql, getFetchGraphql, gql, rawRequestGraphql, requestGraphql }; | ||
export { DeboxError, Logger }; |
17
index.js
@@ -1,4 +0,2 @@ | ||
import Container__default from 'typedi'; | ||
export * from 'typedi'; | ||
import { GraphQLClient, gql as gql$1, rawRequest, request } from 'graphql-request'; | ||
@@ -15,16 +13,3 @@ class Logger { | ||
const createFetchGraphql = (options, persisted = true) => { | ||
const request2 = new GraphQLClient(options.url, options); | ||
if (persisted) { | ||
Container__default.set(GraphQLClient, request2); | ||
} | ||
return request2; | ||
}; | ||
const getFetchGraphql = () => Container__default.get(GraphQLClient); | ||
const fetchGraphql = (query, variables) => getFetchGraphql().request(query, variables); | ||
const gql = gql$1; | ||
const rawRequestGraphql = rawRequest; | ||
const requestGraphql = request; | ||
export { DeboxError, Logger, createFetchGraphql, fetchGraphql, getFetchGraphql, gql, rawRequestGraphql, requestGraphql }; | ||
export { DeboxError, Logger }; | ||
//# sourceMappingURL=index.js.map |
{ | ||
"name": "@deboxsoft/module-core", | ||
"version": "1.5.11", | ||
"version": "1.5.12", | ||
"license": "SEE LICENSE IN LICENSE", | ||
@@ -32,3 +32,2 @@ "maintainers": [ | ||
"change-case": "^4.1.1", | ||
"graphql-request": "3.3.0", | ||
"typedi": "^0.8.0" | ||
@@ -39,11 +38,3 @@ }, | ||
}, | ||
"peerDependencies": { | ||
"graphql": "*" | ||
}, | ||
"peerDependenciesMeta": { | ||
"graphql": { | ||
"optional": true | ||
} | ||
}, | ||
"gitHead": "204d5e2531b2244f7b9ca47030363bd3f44e6faa" | ||
"gitHead": "b773d3ce5c035cf4fd7514559e9c4f045b7f410a" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2
241971
366
- Removedgraphql-request@3.3.0
- Removedasynckit@0.4.0(transitive)
- Removedcombined-stream@1.0.8(transitive)
- Removedcross-fetch@3.1.8(transitive)
- Removeddelayed-stream@1.0.0(transitive)
- Removedextract-files@9.0.0(transitive)
- Removedform-data@3.0.2(transitive)
- Removedgraphql@15.9.016.9.0(transitive)
- Removedgraphql-request@3.3.0(transitive)
- Removedmime-db@1.52.0(transitive)
- Removedmime-types@2.1.35(transitive)
- Removednode-fetch@2.7.0(transitive)
- Removedtr46@0.0.3(transitive)
- Removedwebidl-conversions@3.0.1(transitive)
- Removedwhatwg-url@5.0.0(transitive)