graphql-playground-middleware
Advanced tools
Comparing version 1.1.2 to 1.2.1-beta.4
@@ -1,6 +0,1 @@ | ||
import { default as expressPlayground } from './express'; | ||
import { default as hapiPlayground } from './hapi'; | ||
import { default as koaPlayground } from './koa'; | ||
import { default as renderPlaygroundPage } from './render-playground-page'; | ||
import { default as lambdaPlayground } from './lambda'; | ||
export { expressPlayground, hapiPlayground, koaPlayground, renderPlaygroundPage, lambdaPlayground }; | ||
export { renderPlaygroundPage, MiddlewareOptions } from './render-playground-page'; |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var express_1 = require("./express"); | ||
exports.expressPlayground = express_1.default; | ||
var hapi_1 = require("./hapi"); | ||
exports.hapiPlayground = hapi_1.default; | ||
var koa_1 = require("./koa"); | ||
exports.koaPlayground = koa_1.default; | ||
var render_playground_page_1 = require("./render-playground-page"); | ||
exports.renderPlaygroundPage = render_playground_page_1.default; | ||
var lambda_1 = require("./lambda"); | ||
exports.lambdaPlayground = lambda_1.default; | ||
exports.renderPlaygroundPage = render_playground_page_1.renderPlaygroundPage; | ||
//# sourceMappingURL=index.js.map |
export interface MiddlewareOptions { | ||
version: string; | ||
endpoint: string; | ||
subscriptionEndpoint?: string; | ||
version: string; | ||
setTitle?: string; | ||
folderName?: string; | ||
} | ||
export default function renderPlaygroundPage(options: MiddlewareOptions): string; | ||
export declare function renderPlaygroundPage(options: MiddlewareOptions): string; |
"use strict"; | ||
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; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var path = require("path"); | ||
var fs = require("fs"); | ||
var findUp = require("find-up"); | ||
var configPath = findUp.sync(['.graphqlconfig', '.graphqlconfig.yml']); | ||
var configString = configPath | ||
? fs.readFileSync(configPath, 'utf-8') | ||
: undefined; | ||
var folderName = configPath | ||
? path.basename(path.dirname(configPath)) | ||
: undefined; | ||
function renderPlaygroundPage(options) { | ||
return "\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <title>GraphQL Playground</title>\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/js/middleware.js\"></script>\n</head>\n<body>\n<div id=\"root\">\n <style>\n body {\n background-color: rgb(23,42,58);\n font-family: Open Sans,sans-serif;\n height: 90vh;\n }\n #root {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .loading {\n font-size: 32px;\n font-weight: 200;\n color: rgba(255,255,255,.6);\n margin-left: 20px;\n }\n img {\n width: 78px;\n height: 78px;\n }\n .title {\n font-weight: 400;\n }\n </style>\n <img src='http://cdn.jsdelivr.net/npm/graphql-playground/build/logo.png' alt=''>\n <div class=\"loading\">\n Loading <span class=\"title\">GraphQL Playground</span>\n </div>\n</div>\n <script>\n window.addEventListener('load', function(event) {\n GraphQLPlayground.init(document.getElementById('root'), " + JSON.stringify(options, null, 2) + ")\n })\n </script>\n</body>\n</html>\n"; | ||
var extendedOptions = __assign({}, options, { configString: configString, | ||
folderName: folderName, canSaveConfig: false }); | ||
return "\n<!DOCTYPE html>\n<html>\n<head>\n <meta charset=utf-8 />\n <meta name=\"viewport\" content=\"user-scalable=no, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, minimal-ui\">\n <title>GraphQL Playground</title>\n <link rel=\"stylesheet\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/css/index.css\" />\n <link rel=\"shortcut icon\" href=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/favicon.png\" />\n <script src=\"//cdn.jsdelivr.net/npm/graphql-playground@" + options.version + "/build/static/js/middleware.js\"></script>\n</head>\n<body>\n<div id=\"root\">\n <style>\n body {\n background-color: rgb(23,42,58);\n font-family: Open Sans,sans-serif;\n height: 90vh;\n }\n #root {\n height: 100%;\n width: 100%;\n display: flex;\n align-items: center;\n justify-content: center;\n }\n .loading {\n font-size: 32px;\n font-weight: 200;\n color: rgba(255,255,255,.6);\n margin-left: 20px;\n }\n img {\n width: 78px;\n height: 78px;\n }\n .title {\n font-weight: 400;\n }\n </style>\n <img src='//cdn.jsdelivr.net/npm/graphql-playground/build/logo.png' alt=''>\n <div class=\"loading\">\n Loading <span class=\"title\">GraphQL Playground</span>\n </div>\n</div>\n <script>\n window.addEventListener('load', function(event) {\n GraphQLPlayground.init(document.getElementById('root'), " + JSON.stringify(extendedOptions, null, 2) + ")\n })\n </script>\n</body>\n</html>\n"; | ||
} | ||
exports.default = renderPlaygroundPage; | ||
exports.renderPlaygroundPage = renderPlaygroundPage; | ||
//# sourceMappingURL=render-playground-page.js.map |
{ | ||
"name": "graphql-playground-middleware", | ||
"version": "1.1.2", | ||
"version": "1.2.1-beta.4", | ||
"homepage": "https://github.com/graphcool/graphql-playground/tree/master/packages/graphql-playground-middleware", | ||
@@ -8,3 +8,4 @@ "description": "GraphQL IDE for better development workflows (GraphQL Subscriptions, interactive docs & collaboration).", | ||
"Tim Suchanek <tim@graph.cool>", | ||
"Johannes Schickling <johannes@graph.cool>" | ||
"Johannes Schickling <johannes@graph.cool>", | ||
"Mohammad Rajabifard <mo.rajbi@gmail.com>" | ||
], | ||
@@ -21,9 +22,13 @@ "repository": "http://github.com/graphcool/graphql-playground.git", | ||
}, | ||
"keywords": [], | ||
"keywords": [ | ||
"graphql", | ||
"graphiql", | ||
"playground", | ||
"graphcool" | ||
], | ||
"peerDependencies": { | ||
"express": "^4.16.2" | ||
}, | ||
"devDependencies": { | ||
"@types/node": "^8.0.47", | ||
"aws-lambda": "^0.1.2", | ||
"express": "^4.16.2", | ||
"hapi": "^16.6.2", | ||
"koa": "^2.3.0", | ||
"typescript": "^2.6.1" | ||
@@ -34,3 +39,6 @@ }, | ||
"definition": "dist/index.d.ts" | ||
}, | ||
"dependencies": { | ||
"find-up": "^2.1.0" | ||
} | ||
} |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
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
5290
2
7
44
2
2
1
+ Addedfind-up@^2.1.0
+ Addedaccepts@1.3.8(transitive)
+ Addedarray-flatten@1.1.1(transitive)
+ Addedbody-parser@1.20.3(transitive)
+ Addedbytes@3.1.2(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedcontent-disposition@0.5.4(transitive)
+ Addedcontent-type@1.0.5(transitive)
+ Addedcookie@0.7.1(transitive)
+ Addedcookie-signature@1.0.6(transitive)
+ Addeddebug@2.6.9(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddepd@2.0.0(transitive)
+ Addeddestroy@1.2.0(transitive)
+ Addedee-first@1.1.1(transitive)
+ Addedencodeurl@1.0.22.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedescape-html@1.0.3(transitive)
+ Addedetag@1.8.1(transitive)
+ Addedexpress@4.21.1(transitive)
+ Addedfinalhandler@1.3.1(transitive)
+ Addedfind-up@2.1.0(transitive)
+ Addedforwarded@0.2.0(transitive)
+ Addedfresh@0.5.2(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedhttp-errors@2.0.0(transitive)
+ Addediconv-lite@0.4.24(transitive)
+ Addedinherits@2.0.4(transitive)
+ Addedipaddr.js@1.9.1(transitive)
+ Addedlocate-path@2.0.0(transitive)
+ Addedmedia-typer@0.3.0(transitive)
+ Addedmerge-descriptors@1.0.3(transitive)
+ Addedmethods@1.1.2(transitive)
+ Addedmime@1.6.0(transitive)
+ Addedmime-db@1.52.0(transitive)
+ Addedmime-types@2.1.35(transitive)
+ Addedms@2.0.02.1.3(transitive)
+ Addednegotiator@0.6.3(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedon-finished@2.4.1(transitive)
+ Addedp-limit@1.3.0(transitive)
+ Addedp-locate@2.0.0(transitive)
+ Addedp-try@1.0.0(transitive)
+ Addedparseurl@1.3.3(transitive)
+ Addedpath-exists@3.0.0(transitive)
+ Addedpath-to-regexp@0.1.10(transitive)
+ Addedproxy-addr@2.0.7(transitive)
+ Addedqs@6.13.0(transitive)
+ Addedrange-parser@1.2.1(transitive)
+ Addedraw-body@2.5.2(transitive)
+ Addedsafe-buffer@5.2.1(transitive)
+ Addedsafer-buffer@2.1.2(transitive)
+ Addedsend@0.19.0(transitive)
+ Addedserve-static@1.16.2(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedsetprototypeof@1.2.0(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedstatuses@2.0.1(transitive)
+ Addedtoidentifier@1.0.1(transitive)
+ Addedtype-is@1.6.18(transitive)
+ Addedunpipe@1.0.0(transitive)
+ Addedutils-merge@1.0.1(transitive)
+ Addedvary@1.1.2(transitive)