@webresto/graphql 1.3.2 → 1.3.3
Sign up to get free protection for your applications and to get access to all the features.
- package/package.json +1 -1
- package/src/additionalResolvers.js +1 -1
- package/src/additionalResolvers.ts +1 -1
- package/src/graphql.js +40 -22
- package/src/graphql.ts +42 -25
- package/src/resolvers/cart.d.ts +225 -7
- package/src/resolvers/cart.js +21 -7
- package/src/resolvers/cart.ts +23 -8
- package/src/resolvers/checkout.ts +1 -0
- package/test/{_bootstrap.js → bootstrap.js} +6 -7
- package/test/bootstrap.ts +3 -0
- package/test/fixture/.sailsrc +14 -0
- package/test/fixture/api/controllers/.gitkeep +0 -0
- package/test/fixture/api/models/.gitkeep +0 -0
- package/test/fixture/api/services/.gitkeep +0 -0
- package/test/fixture/app-export.js +73 -73
- package/test/fixture/app.js +56 -56
- package/test/fixture/config/adminpanel.js +25 -3
- package/test/fixture/config/bootstrap.js +161 -0
- package/test/fixture/config/connections.js +9 -9
- package/test/fixture/config/env/development.js +10 -10
- package/test/fixture/config/env/production.js +16 -16
- package/test/fixture/config/globals.js +16 -16
- package/test/fixture/config/hookTimeout.js +8 -8
- package/test/fixture/config/http.js +93 -93
- package/test/fixture/config/i18n.js +57 -57
- package/test/fixture/config/log.js +29 -29
- package/test/fixture/config/models.js +8 -8
- package/test/fixture/config/modulemanager.js +22 -22
- package/test/fixture/config/policies.js +51 -51
- package/test/fixture/config/routes.js +49 -49
- package/test/fixture/config/session.js +100 -100
- package/test/fixture/config/sockets.js +141 -141
- package/test/fixture/config/views.js +94 -94
- package/test/fixture/hacks/waterline.js +39 -0
- package/test/fixture/package.json +33 -30
- package/test/fixture/seeds/dish.json +37042 -0
- package/test/fixture/seeds/group.json +1418 -0
- package/test/fixture/seeds/iikoDiscount.json +365 -0
- package/test/fixture/views/403.ejs +68 -68
- package/test/fixture/views/404.ejs +68 -68
- package/test/fixture/views/500.ejs +73 -73
- package/test/fixture/views/homepage.ejs +74 -74
- package/test/fixture/views/layout.ejs +91 -91
- package/test/integration/graphql.test.js +11 -0
- package/test/integration/graphql.test.ts +15 -0
- package/test/{unit → integration}/sails_not_crash.test.js +0 -0
- package/test/{unit → integration}/sails_not_crash.test.ts +0 -0
- package/test/unit/first.test.js +1 -1
- package/test/unit/first.test.ts +1 -1
- package/test/fixture/.tmp/localDiskDb/archive.db +0 -1
- package/test/fixture/.tmp/localDiskDb/dish.db +0 -1
- package/test/fixture/.tmp/localDiskDb/dish_images__image_dish.db +0 -1
- package/test/fixture/.tmp/localDiskDb/group.db +0 -1
- package/test/fixture/.tmp/localDiskDb/group_images__image_group.db +0 -1
- package/test/fixture/.tmp/localDiskDb/image.db +0 -1
- package/test/fixture/.tmp/localDiskDb/maintenance.db +0 -1
- package/test/fixture/.tmp/localDiskDb/order.db +0 -1
- package/test/fixture/.tmp/localDiskDb/orderdish.db +0 -1
- package/test/fixture/.tmp/localDiskDb/paymentdocument.db +0 -1
- package/test/fixture/.tmp/localDiskDb/paymentmethod.db +0 -2
- package/test/fixture/.tmp/localDiskDb/place.db +0 -1
- package/test/fixture/.tmp/localDiskDb/settings.db +0 -2
- package/test/fixture/.tmp/localDiskDb/street.db +0 -1
- package/test/fixture/package-lock.json +0 -9805
- package/test.zip +0 -0
@@ -1,74 +1,74 @@
|
|
1
|
-
<!-- Default home page -->
|
2
|
-
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
|
3
|
-
<style>
|
4
|
-
/* Styles included inline since you'll probably be deleting this page anyway */
|
5
|
-
html,body{text-align:left;font-size:1em}html,body,img,form,textarea,input,fieldset,div,p,div,ul,li,ol,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,code{margin:0;padding:0}ul,li{list-style:none}img{display:block}a img{border:0}a{text-decoration:none;font-weight:normal;font-family:inherit}*:active,*:focus{outline:0;-moz-outline-style:none}h1,h2,h3,h4,h5,h6{font-weight:normal}div.clear{clear:both}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}body{font-family:"Open Sans",Arial,sans-serif;font-weight:300;}.top-bar {width: 100%; background-color: #e4f0f1; padding: 15px 0;}.top-bar .container img {float: left;}.top-bar .container ul {float: right; padding-top: 25px;}.top-bar .container li {float: left; width: 125px; text-align: center; font-size: 15px; color:#000; font-weight: 600;}.top-bar .container a li:hover {color: #118798; -webkit-transition:color 200ms; -moz-transition:color 200ms; -o-transition:color 200ms;transition:color 200ms;}.container{width: 80%; max-width: 1200px; margin: auto;}div.header {-webkit-transition: 6s; -moz-transition: 6s; -o-transition: 6s;transition: 6s; background: rgba(4, 36, 41, 0.89) url(http://sailsjs.org/images/img_sailsShadow.png) no-repeat 42% bottom; padding: 100px 0 65px;}.header h1#main-title{color: #fff; font-weight: 300; font-size: 2.5em;}.header h3{color: #b1eef7; font-style: italic; font-weight: 300;}.header h3 code{font-style: normal!important; background-color: rgba(255,255,255,0.5); font-weight: 300; color:#0e6471; margin: 0px 5px;}div.main.container{padding: 50px 0;}h1 {color: #118798; font-weight: 300;}code {font-size: inherit; font-family: 'Consolas', 'Monaco', monospace; padding:4px 5px 1px; background-color: #f3f5f7}a{color: #118798; font-weight: 300; text-decoration: underline;}a:hover {color: #0e6471; -webkit-transition:color 200ms; -moz-transition:color 200ms; -o-transition:color 200ms;transition:color 200ms;}p{line-height: 1.5em;}blockquote{background-color: #e4f0f1; padding: 25px; line-height: 1.5em; margin: 15px 0;}blockquote span{font-weight: 600; padding-right: 5px;}ul.getting-started{padding: 25px 75px 25px 0; width: 70%; float: left; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}ul.getting-started li{padding: 25px 0;}ul.getting-started li h3 {padding-bottom: 10px; font-size: 25px; font-weight: 300;}.sprite{background:url(http://sailsjs.org/images/newapp.sprite.png) no-repeat; position: absolute; left: 0; top:0;}.getting-started .sprite{margin-left:10px;padding-left:60px;height:42px;width:0; float: left;}.getting-started .one{background-position:0 0}.getting-started .two{background-position:0 -42px}.getting-started .three{background-position:0 -83px}div.step {position: relative; padding-left: 70px; opacity: 0.9;}div.step:hover{ opacity: 1;}div.links {float: left; width: 30%; max-width: 325px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; background-color: #f3f5f7; border: 1px solid #ebebeb; padding: 25px 45px 35px;}div.links h3 {color: #727272; text-align: center; font-size: 28px; font-weight: 300;}div.links h4 {color: #727272; font-size: 17px; font-weight: 600; padding: 15px 0 10px;}div.links .link-list a {text-decoration: none; font-weight: 400;}div.links .link-list a li {padding: 0px 0px 5px 10px;}div.default-page{min-width: 1200px;}.pocket{display:none;}
|
6
|
-
</style>
|
7
|
-
<script type="text/javascript">
|
8
|
-
setTimeout(function sunrise () {
|
9
|
-
document.getElementsByClassName('header')[0].style.backgroundColor = '#118798';
|
10
|
-
}, 0);
|
11
|
-
</script>
|
12
|
-
|
13
|
-
<div class="default-page">
|
14
|
-
<div class="header">
|
15
|
-
<h1 id="main-title" class="container"><%= __('A brand new app.') %></h1>
|
16
|
-
<h3 class="container">You're looking at: <code><%= view.pathFromApp + '.' +view.ext %></code></h3>
|
17
|
-
</div>
|
18
|
-
<div class="main container clearfix">
|
19
|
-
<!-- <h1>Getting started</h1>
|
20
|
-
<p>Don't worry, we've got your back.</p> -->
|
21
|
-
<ul class="getting-started">
|
22
|
-
<li class="clearfix">
|
23
|
-
<div class="step">
|
24
|
-
<div class="sprite one"></div>
|
25
|
-
<h3>Generate a REST API.</h3>
|
26
|
-
<p>
|
27
|
-
Run <code>sails generate api user</code>. This will create two files: a <a href="http://sailsjs.org/#!/documentation/concepts/ORM/Models.html">model</a> <code class="pocket">api/models/User.js</code> and a <a href="http://sailsjs.org/#!/documentation/concepts/Controllers">controller</a><code class="pocket">api/controllers/UserController.js</code>.
|
28
|
-
</p>
|
29
|
-
</div>
|
30
|
-
</li>
|
31
|
-
<li class="clearfix">
|
32
|
-
<div class="step">
|
33
|
-
<div class="sprite two"></div>
|
34
|
-
<h3>
|
35
|
-
Lift your app.
|
36
|
-
</h3>
|
37
|
-
<p>
|
38
|
-
Run <code>sails lift</code> to start up your app server. If you visit <a target="_blank" href="http://localhost:<%= sails.config.port || 1337%>/user"><code>http://localhost:<%= sails.config.port || 1337%>/user</code></a> in your browser, you'll see a <a href="http://sailsjs.org/#!/documentation/reference/blueprint-api">WebSocket-compatible</a> user API.
|
39
|
-
</p>
|
40
|
-
</div>
|
41
|
-
</li>
|
42
|
-
<li class="clearfix">
|
43
|
-
<div class="step">
|
44
|
-
<div class="sprite three"></div>
|
45
|
-
<h3>
|
46
|
-
Dive in.
|
47
|
-
</h3>
|
48
|
-
<p>Blueprints are just the beginning. You'll probably also want to learn how to customize your app's <a href="http://sailsjs.org/#!/documentation/concepts/Routes">routes</a>, set up <a href="http://sailsjs.org/#!/documentation/concepts/Policies">security policies</a>, configure your <a href="http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.connections.html">data sources</a>, and build custom <a target="_blank" href="http://sailsjs.org/#!/documentation/concepts/Controllers?q=actions">controller actions</a>. For more help getting started, check out the links on this page.</p>
|
49
|
-
|
50
|
-
</div>
|
51
|
-
</li>
|
52
|
-
</ul>
|
53
|
-
<div class="links">
|
54
|
-
<!-- <h3>Links</h3> -->
|
55
|
-
<ul class="link-list">
|
56
|
-
|
57
|
-
<h4>Docs</h4>
|
58
|
-
<a target="_blank" href="http://sailsjs.org/#!/documentation/anatomy/myApp"><li>App Structure</li></a>
|
59
|
-
<a target="_blank" href="http://sailsjs.org/#!/documentation/reference"><li>Reference</li></a>
|
60
|
-
<a target="_blank" href="http://sailsjs.org/#!/documentation/concepts/extending-sails/Adapters/adapterList.html"><li>Supported Databases</li></a>
|
61
|
-
|
62
|
-
<h4>Tutorials</h4>
|
63
|
-
<a target="_blank" href="https://github.com/sails101"><li>Sails 101</li></a>
|
64
|
-
|
65
|
-
<h4>Community</h4>
|
66
|
-
<a target="_blank" href="http://stackoverflow.com/search?q=sails.js"><li>StackOverFlow</li></a>
|
67
|
-
<a target="_blank" href="https://github.com/balderdashy/sails"><li>GitHub</li></a>
|
68
|
-
<a target="_blank" href="https://groups.google.com/forum/#!forum/sailsjs"><li>Google Group</li></a>
|
69
|
-
<a target="_blank" href="http://webchat.freenode.net/"><li>IRC (#sailsjs on freenode)</li></a>
|
70
|
-
|
71
|
-
</ul>
|
72
|
-
</div>
|
73
|
-
</div>
|
74
|
-
</div>
|
1
|
+
<!-- Default home page -->
|
2
|
+
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
|
3
|
+
<style>
|
4
|
+
/* Styles included inline since you'll probably be deleting this page anyway */
|
5
|
+
html,body{text-align:left;font-size:1em}html,body,img,form,textarea,input,fieldset,div,p,div,ul,li,ol,dl,dt,dd,h1,h2,h3,h4,h5,h6,pre,code{margin:0;padding:0}ul,li{list-style:none}img{display:block}a img{border:0}a{text-decoration:none;font-weight:normal;font-family:inherit}*:active,*:focus{outline:0;-moz-outline-style:none}h1,h2,h3,h4,h5,h6{font-weight:normal}div.clear{clear:both}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}body{font-family:"Open Sans",Arial,sans-serif;font-weight:300;}.top-bar {width: 100%; background-color: #e4f0f1; padding: 15px 0;}.top-bar .container img {float: left;}.top-bar .container ul {float: right; padding-top: 25px;}.top-bar .container li {float: left; width: 125px; text-align: center; font-size: 15px; color:#000; font-weight: 600;}.top-bar .container a li:hover {color: #118798; -webkit-transition:color 200ms; -moz-transition:color 200ms; -o-transition:color 200ms;transition:color 200ms;}.container{width: 80%; max-width: 1200px; margin: auto;}div.header {-webkit-transition: 6s; -moz-transition: 6s; -o-transition: 6s;transition: 6s; background: rgba(4, 36, 41, 0.89) url(http://sailsjs.org/images/img_sailsShadow.png) no-repeat 42% bottom; padding: 100px 0 65px;}.header h1#main-title{color: #fff; font-weight: 300; font-size: 2.5em;}.header h3{color: #b1eef7; font-style: italic; font-weight: 300;}.header h3 code{font-style: normal!important; background-color: rgba(255,255,255,0.5); font-weight: 300; color:#0e6471; margin: 0px 5px;}div.main.container{padding: 50px 0;}h1 {color: #118798; font-weight: 300;}code {font-size: inherit; font-family: 'Consolas', 'Monaco', monospace; padding:4px 5px 1px; background-color: #f3f5f7}a{color: #118798; font-weight: 300; text-decoration: underline;}a:hover {color: #0e6471; -webkit-transition:color 200ms; -moz-transition:color 200ms; -o-transition:color 200ms;transition:color 200ms;}p{line-height: 1.5em;}blockquote{background-color: #e4f0f1; padding: 25px; line-height: 1.5em; margin: 15px 0;}blockquote span{font-weight: 600; padding-right: 5px;}ul.getting-started{padding: 25px 75px 25px 0; width: 70%; float: left; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box;}ul.getting-started li{padding: 25px 0;}ul.getting-started li h3 {padding-bottom: 10px; font-size: 25px; font-weight: 300;}.sprite{background:url(http://sailsjs.org/images/newapp.sprite.png) no-repeat; position: absolute; left: 0; top:0;}.getting-started .sprite{margin-left:10px;padding-left:60px;height:42px;width:0; float: left;}.getting-started .one{background-position:0 0}.getting-started .two{background-position:0 -42px}.getting-started .three{background-position:0 -83px}div.step {position: relative; padding-left: 70px; opacity: 0.9;}div.step:hover{ opacity: 1;}div.links {float: left; width: 30%; max-width: 325px; -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; background-color: #f3f5f7; border: 1px solid #ebebeb; padding: 25px 45px 35px;}div.links h3 {color: #727272; text-align: center; font-size: 28px; font-weight: 300;}div.links h4 {color: #727272; font-size: 17px; font-weight: 600; padding: 15px 0 10px;}div.links .link-list a {text-decoration: none; font-weight: 400;}div.links .link-list a li {padding: 0px 0px 5px 10px;}div.default-page{min-width: 1200px;}.pocket{display:none;}
|
6
|
+
</style>
|
7
|
+
<script type="text/javascript">
|
8
|
+
setTimeout(function sunrise () {
|
9
|
+
document.getElementsByClassName('header')[0].style.backgroundColor = '#118798';
|
10
|
+
}, 0);
|
11
|
+
</script>
|
12
|
+
|
13
|
+
<div class="default-page">
|
14
|
+
<div class="header">
|
15
|
+
<h1 id="main-title" class="container"><%= __('A brand new app.') %></h1>
|
16
|
+
<h3 class="container">You're looking at: <code><%= view.pathFromApp + '.' +view.ext %></code></h3>
|
17
|
+
</div>
|
18
|
+
<div class="main container clearfix">
|
19
|
+
<!-- <h1>Getting started</h1>
|
20
|
+
<p>Don't worry, we've got your back.</p> -->
|
21
|
+
<ul class="getting-started">
|
22
|
+
<li class="clearfix">
|
23
|
+
<div class="step">
|
24
|
+
<div class="sprite one"></div>
|
25
|
+
<h3>Generate a REST API.</h3>
|
26
|
+
<p>
|
27
|
+
Run <code>sails generate api user</code>. This will create two files: a <a href="http://sailsjs.org/#!/documentation/concepts/ORM/Models.html">model</a> <code class="pocket">api/models/User.js</code> and a <a href="http://sailsjs.org/#!/documentation/concepts/Controllers">controller</a><code class="pocket">api/controllers/UserController.js</code>.
|
28
|
+
</p>
|
29
|
+
</div>
|
30
|
+
</li>
|
31
|
+
<li class="clearfix">
|
32
|
+
<div class="step">
|
33
|
+
<div class="sprite two"></div>
|
34
|
+
<h3>
|
35
|
+
Lift your app.
|
36
|
+
</h3>
|
37
|
+
<p>
|
38
|
+
Run <code>sails lift</code> to start up your app server. If you visit <a target="_blank" href="http://localhost:<%= sails.config.port || 1337%>/user"><code>http://localhost:<%= sails.config.port || 1337%>/user</code></a> in your browser, you'll see a <a href="http://sailsjs.org/#!/documentation/reference/blueprint-api">WebSocket-compatible</a> user API.
|
39
|
+
</p>
|
40
|
+
</div>
|
41
|
+
</li>
|
42
|
+
<li class="clearfix">
|
43
|
+
<div class="step">
|
44
|
+
<div class="sprite three"></div>
|
45
|
+
<h3>
|
46
|
+
Dive in.
|
47
|
+
</h3>
|
48
|
+
<p>Blueprints are just the beginning. You'll probably also want to learn how to customize your app's <a href="http://sailsjs.org/#!/documentation/concepts/Routes">routes</a>, set up <a href="http://sailsjs.org/#!/documentation/concepts/Policies">security policies</a>, configure your <a href="http://sailsjs.org/#!/documentation/reference/sails.config/sails.config.connections.html">data sources</a>, and build custom <a target="_blank" href="http://sailsjs.org/#!/documentation/concepts/Controllers?q=actions">controller actions</a>. For more help getting started, check out the links on this page.</p>
|
49
|
+
|
50
|
+
</div>
|
51
|
+
</li>
|
52
|
+
</ul>
|
53
|
+
<div class="links">
|
54
|
+
<!-- <h3>Links</h3> -->
|
55
|
+
<ul class="link-list">
|
56
|
+
|
57
|
+
<h4>Docs</h4>
|
58
|
+
<a target="_blank" href="http://sailsjs.org/#!/documentation/anatomy/myApp"><li>App Structure</li></a>
|
59
|
+
<a target="_blank" href="http://sailsjs.org/#!/documentation/reference"><li>Reference</li></a>
|
60
|
+
<a target="_blank" href="http://sailsjs.org/#!/documentation/concepts/extending-sails/Adapters/adapterList.html"><li>Supported Databases</li></a>
|
61
|
+
|
62
|
+
<h4>Tutorials</h4>
|
63
|
+
<a target="_blank" href="https://github.com/sails101"><li>Sails 101</li></a>
|
64
|
+
|
65
|
+
<h4>Community</h4>
|
66
|
+
<a target="_blank" href="http://stackoverflow.com/search?q=sails.js"><li>StackOverFlow</li></a>
|
67
|
+
<a target="_blank" href="https://github.com/balderdashy/sails"><li>GitHub</li></a>
|
68
|
+
<a target="_blank" href="https://groups.google.com/forum/#!forum/sailsjs"><li>Google Group</li></a>
|
69
|
+
<a target="_blank" href="http://webchat.freenode.net/"><li>IRC (#sailsjs on freenode)</li></a>
|
70
|
+
|
71
|
+
</ul>
|
72
|
+
</div>
|
73
|
+
</div>
|
74
|
+
</div>
|
@@ -1,91 +1,91 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title><%=typeof title == 'undefined' ? 'New Sails App' : title%></title>
|
5
|
-
|
6
|
-
<!-- Viewport mobile tag for sensible mobile support -->
|
7
|
-
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
8
|
-
|
9
|
-
|
10
|
-
<!--
|
11
|
-
Stylesheets and Preprocessors
|
12
|
-
==============================
|
13
|
-
|
14
|
-
You can always bring in CSS files manually with `<link>` tags, or asynchronously
|
15
|
-
using a solution like AMD (RequireJS). Or, if you like, you can take advantage
|
16
|
-
of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
17
|
-
|
18
|
-
By default, stylesheets from your `assets/styles` folder are included
|
19
|
-
here automatically (between STYLES and STYLES END). Both CSS (.css) and LESS (.less)
|
20
|
-
are supported. In production, your styles will be minified and concatenated into
|
21
|
-
a single file.
|
22
|
-
|
23
|
-
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
24
|
-
For example, here are a few things you could do:
|
25
|
-
|
26
|
-
+ Change the order of your CSS files
|
27
|
-
+ Import stylesheets from other directories
|
28
|
-
+ Use a different or additional preprocessor, like SASS, SCSS or Stylus
|
29
|
-
-->
|
30
|
-
|
31
|
-
<!--STYLES-->
|
32
|
-
<!--STYLES END-->
|
33
|
-
</head>
|
34
|
-
|
35
|
-
<body>
|
36
|
-
<%- body %>
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
<!--
|
41
|
-
Client-side Templates
|
42
|
-
========================
|
43
|
-
|
44
|
-
HTML templates are important prerequisites of modern, rich client applications.
|
45
|
-
To work their magic, frameworks like Backbone, Angular, Ember, and Knockout require
|
46
|
-
that you load these templates client-side.
|
47
|
-
|
48
|
-
By default, your Gruntfile is configured to automatically load and precompile
|
49
|
-
client-side JST templates in your `assets/templates` folder, then
|
50
|
-
include them here automatically (between TEMPLATES and TEMPLATES END).
|
51
|
-
|
52
|
-
To customize this behavior to fit your needs, just edit `tasks/pipeline.js`.
|
53
|
-
For example, here are a few things you could do:
|
54
|
-
|
55
|
-
+ Import templates from other directories
|
56
|
-
+ Use a different template engine (handlebars, jade, dust, etc.)
|
57
|
-
+ Internationalize your client-side templates using a server-side
|
58
|
-
stringfile before they're served.
|
59
|
-
-->
|
60
|
-
|
61
|
-
<!--TEMPLATES-->
|
62
|
-
<!--TEMPLATES END-->
|
63
|
-
|
64
|
-
|
65
|
-
<!--
|
66
|
-
|
67
|
-
Client-side Javascript
|
68
|
-
========================
|
69
|
-
|
70
|
-
You can always bring in JS files manually with `script` tags, or asynchronously
|
71
|
-
on the client using a solution like AMD (RequireJS). Or, if you like, you can
|
72
|
-
take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
73
|
-
|
74
|
-
By default, files in your `assets/js` folder are included here
|
75
|
-
automatically (between SCRIPTS and SCRIPTS END). Both JavaScript (.js) and
|
76
|
-
CoffeeScript (.coffee) are supported. In production, your scripts will be minified
|
77
|
-
and concatenated into a single file.
|
78
|
-
|
79
|
-
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
80
|
-
For example, here are a few things you could do:
|
81
|
-
|
82
|
-
+ Change the order of your scripts
|
83
|
-
+ Import scripts from other directories
|
84
|
-
+ Use a different preprocessor, like TypeScript
|
85
|
-
|
86
|
-
-->
|
87
|
-
|
88
|
-
<!--SCRIPTS-->
|
89
|
-
<!--SCRIPTS END-->
|
90
|
-
</body>
|
91
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title><%=typeof title == 'undefined' ? 'New Sails App' : title%></title>
|
5
|
+
|
6
|
+
<!-- Viewport mobile tag for sensible mobile support -->
|
7
|
+
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
8
|
+
|
9
|
+
|
10
|
+
<!--
|
11
|
+
Stylesheets and Preprocessors
|
12
|
+
==============================
|
13
|
+
|
14
|
+
You can always bring in CSS files manually with `<link>` tags, or asynchronously
|
15
|
+
using a solution like AMD (RequireJS). Or, if you like, you can take advantage
|
16
|
+
of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
17
|
+
|
18
|
+
By default, stylesheets from your `assets/styles` folder are included
|
19
|
+
here automatically (between STYLES and STYLES END). Both CSS (.css) and LESS (.less)
|
20
|
+
are supported. In production, your styles will be minified and concatenated into
|
21
|
+
a single file.
|
22
|
+
|
23
|
+
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
24
|
+
For example, here are a few things you could do:
|
25
|
+
|
26
|
+
+ Change the order of your CSS files
|
27
|
+
+ Import stylesheets from other directories
|
28
|
+
+ Use a different or additional preprocessor, like SASS, SCSS or Stylus
|
29
|
+
-->
|
30
|
+
|
31
|
+
<!--STYLES-->
|
32
|
+
<!--STYLES END-->
|
33
|
+
</head>
|
34
|
+
|
35
|
+
<body>
|
36
|
+
<%- body %>
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
<!--
|
41
|
+
Client-side Templates
|
42
|
+
========================
|
43
|
+
|
44
|
+
HTML templates are important prerequisites of modern, rich client applications.
|
45
|
+
To work their magic, frameworks like Backbone, Angular, Ember, and Knockout require
|
46
|
+
that you load these templates client-side.
|
47
|
+
|
48
|
+
By default, your Gruntfile is configured to automatically load and precompile
|
49
|
+
client-side JST templates in your `assets/templates` folder, then
|
50
|
+
include them here automatically (between TEMPLATES and TEMPLATES END).
|
51
|
+
|
52
|
+
To customize this behavior to fit your needs, just edit `tasks/pipeline.js`.
|
53
|
+
For example, here are a few things you could do:
|
54
|
+
|
55
|
+
+ Import templates from other directories
|
56
|
+
+ Use a different template engine (handlebars, jade, dust, etc.)
|
57
|
+
+ Internationalize your client-side templates using a server-side
|
58
|
+
stringfile before they're served.
|
59
|
+
-->
|
60
|
+
|
61
|
+
<!--TEMPLATES-->
|
62
|
+
<!--TEMPLATES END-->
|
63
|
+
|
64
|
+
|
65
|
+
<!--
|
66
|
+
|
67
|
+
Client-side Javascript
|
68
|
+
========================
|
69
|
+
|
70
|
+
You can always bring in JS files manually with `script` tags, or asynchronously
|
71
|
+
on the client using a solution like AMD (RequireJS). Or, if you like, you can
|
72
|
+
take advantage of Sails' conventional asset pipeline (boilerplate Gruntfile).
|
73
|
+
|
74
|
+
By default, files in your `assets/js` folder are included here
|
75
|
+
automatically (between SCRIPTS and SCRIPTS END). Both JavaScript (.js) and
|
76
|
+
CoffeeScript (.coffee) are supported. In production, your scripts will be minified
|
77
|
+
and concatenated into a single file.
|
78
|
+
|
79
|
+
To customize any part of the built-in behavior, just edit `tasks/pipeline.js`.
|
80
|
+
For example, here are a few things you could do:
|
81
|
+
|
82
|
+
+ Change the order of your scripts
|
83
|
+
+ Import scripts from other directories
|
84
|
+
+ Use a different preprocessor, like TypeScript
|
85
|
+
|
86
|
+
-->
|
87
|
+
|
88
|
+
<!--SCRIPTS-->
|
89
|
+
<!--SCRIPTS END-->
|
90
|
+
</body>
|
91
|
+
</html>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
const expect = require("chai").expect;
|
2
|
+
describe('GraphQl', function () {
|
3
|
+
it('Added fields exist in schema', async () => {
|
4
|
+
const graphql = require('./../fixture/node_modules/@webresto/graphql/src/graphql').default;
|
5
|
+
console.log(graphql);
|
6
|
+
const result = await graphql.getServer().executeOperation({
|
7
|
+
query: '{dish { id } \n group { id }}'
|
8
|
+
});
|
9
|
+
expect(result.errors).to.be.undefined;
|
10
|
+
});
|
11
|
+
});
|
@@ -0,0 +1,15 @@
|
|
1
|
+
const expect = require("chai").expect;
|
2
|
+
|
3
|
+
describe('GraphQl', function () {
|
4
|
+
it('Added fields exist in schema', async () => {
|
5
|
+
|
6
|
+
const graphql = require('./../fixture/node_modules/@webresto/graphql/src/graphql').default;
|
7
|
+
console.log(graphql)
|
8
|
+
const result = await graphql.getServer().executeOperation({
|
9
|
+
query: '{dish { id } \n group { id }}'
|
10
|
+
});
|
11
|
+
expect(result.errors).to.be.undefined;
|
12
|
+
});
|
13
|
+
});
|
14
|
+
|
15
|
+
|
File without changes
|
File without changes
|
package/test/unit/first.test.js
CHANGED
@@ -3,7 +3,7 @@ describe('GraphQl', function () {
|
|
3
3
|
it('schema exist', async () => {
|
4
4
|
// const data = await TestModel.find({});
|
5
5
|
// console.log(data);
|
6
|
-
const graphql = require('
|
6
|
+
const graphql = require('./../fixture/node_modules/@webresto/graphql/src/graphql').default;
|
7
7
|
expect(graphql.getServer().schema._typeMap.Dish != undefined);
|
8
8
|
});
|
9
9
|
});
|
package/test/unit/first.test.ts
CHANGED
@@ -5,7 +5,7 @@ describe('GraphQl', function () {
|
|
5
5
|
// const data = await TestModel.find({});
|
6
6
|
// console.log(data);
|
7
7
|
|
8
|
-
const graphql = require('
|
8
|
+
const graphql = require('./../fixture/node_modules/@webresto/graphql/src/graphql').default;
|
9
9
|
expect(graphql.getServer().schema._typeMap.Dish != undefined);
|
10
10
|
});
|
11
11
|
});
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|
@@ -1 +0,0 @@
|
|
1
|
-
{"$$indexCreated":{"fieldName":"id","unique":true,"sparse":false}}
|