@webresto/graphql 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (70) hide show
  1. package/package.json +25 -8
  2. package/src/resolvers/cart.d.ts +4 -2
  3. package/src/resolvers/cart.ts +9 -4
  4. package/test/bootstrap.ts +33 -0
  5. package/test/fixture/.tmp/localDiskDb/archive.db +1 -0
  6. package/test/fixture/.tmp/localDiskDb/dish.db +1 -0
  7. package/test/fixture/.tmp/localDiskDb/dish_images__image_dish.db +1 -0
  8. package/test/fixture/.tmp/localDiskDb/group.db +1 -0
  9. package/test/fixture/.tmp/localDiskDb/group_images__image_group.db +1 -0
  10. package/test/fixture/.tmp/localDiskDb/image.db +1 -0
  11. package/test/fixture/.tmp/localDiskDb/maintenance.db +1 -0
  12. package/test/fixture/.tmp/localDiskDb/order.db +1 -0
  13. package/test/fixture/.tmp/localDiskDb/orderdish.db +1 -0
  14. package/test/fixture/.tmp/localDiskDb/paymentdocument.db +1 -0
  15. package/test/fixture/.tmp/localDiskDb/paymentmethod.db +2 -0
  16. package/test/fixture/.tmp/localDiskDb/place.db +1 -0
  17. package/test/fixture/.tmp/localDiskDb/settings.db +2 -0
  18. package/test/fixture/.tmp/localDiskDb/street.db +1 -0
  19. package/test/{fixtures/v0.12-app → fixture}/api/controllers/.gitkeep +0 -0
  20. package/test/{fixtures/v0.12-app → fixture}/api/models/.gitkeep +0 -0
  21. package/test/{fixtures/v0.12-app → fixture}/api/services/.gitkeep +0 -0
  22. package/test/{fixtures/v0.12-app/app.js → fixture/app-export.js} +73 -73
  23. package/test/fixture/app.js +56 -0
  24. package/test/fixture/config/adminpanel.js +3 -0
  25. package/test/fixture/config/connections.js +9 -0
  26. package/test/fixture/config/env/development.js +10 -0
  27. package/test/{fixtures/v0.12-app → fixture}/config/env/production.js +16 -16
  28. package/test/fixture/config/globals.js +16 -0
  29. package/test/{fixtures/v0.12-app → fixture}/config/hookTimeout.js +8 -8
  30. package/test/{fixtures/v0.12-app → fixture}/config/http.js +93 -93
  31. package/test/{fixtures/v0.12-app → fixture}/config/i18n.js +57 -57
  32. package/test/{fixtures/v0.12-app → fixture}/config/log.js +29 -29
  33. package/test/fixture/config/models.js +9 -0
  34. package/test/fixture/config/modulemanager.js +22 -0
  35. package/test/{fixtures/v0.12-app → fixture}/config/policies.js +51 -51
  36. package/test/{fixtures/v0.12-app → fixture}/config/routes.js +49 -49
  37. package/test/{fixtures/v0.12-app → fixture}/config/session.js +100 -100
  38. package/test/{fixtures/v0.12-app → fixture}/config/sockets.js +141 -141
  39. package/test/{fixtures/v0.12-app → fixture}/config/views.js +94 -94
  40. package/test/fixture/package-lock.json +9805 -0
  41. package/test/fixture/package.json +30 -0
  42. package/test/{fixtures/v0.12-app → fixture}/views/403.ejs +68 -68
  43. package/test/{fixtures/v0.12-app → fixture}/views/404.ejs +68 -68
  44. package/test/{fixtures/v0.12-app → fixture}/views/500.ejs +73 -73
  45. package/test/{fixtures/v0.12-app → fixture}/views/homepage.ejs +74 -74
  46. package/test/{fixtures/v0.12-app → fixture}/views/layout.ejs +91 -91
  47. package/test/unit/first.test.js +6 -8
  48. package/test/unit/first.test.ts +11 -0
  49. package/test/unit/sails_not_crash.test.ts +3 -0
  50. package/test.zip +0 -0
  51. package/test/fixtures/v0.12-app/.gitignore +0 -11
  52. package/test/fixtures/v0.12-app/.sailsrc +0 -11
  53. package/test/fixtures/v0.12-app/api/models/TestModel.js +0 -22
  54. package/test/fixtures/v0.12-app/api/responses/badRequest.js +0 -76
  55. package/test/fixtures/v0.12-app/api/responses/created.js +0 -60
  56. package/test/fixtures/v0.12-app/api/responses/forbidden.js +0 -89
  57. package/test/fixtures/v0.12-app/api/responses/notFound.js +0 -94
  58. package/test/fixtures/v0.12-app/api/responses/ok.js +0 -60
  59. package/test/fixtures/v0.12-app/api/responses/serverError.js +0 -89
  60. package/test/fixtures/v0.12-app/config/bootstrap.js +0 -6
  61. package/test/fixtures/v0.12-app/config/connections.js +0 -5
  62. package/test/fixtures/v0.12-app/config/cors.js +0 -78
  63. package/test/fixtures/v0.12-app/config/csrf.js +0 -64
  64. package/test/fixtures/v0.12-app/config/env/development.js +0 -10
  65. package/test/fixtures/v0.12-app/config/globals.js +0 -63
  66. package/test/fixtures/v0.12-app/config/models.js +0 -3
  67. package/test/fixtures/v0.12-app/config/restoapi.js +0 -3
  68. package/test/fixtures/v0.12-app/config/restocore.js +0 -39
  69. package/test/fixtures/v0.12-app/config/stateflow.js +0 -4
  70. package/test/fixtures/v0.12-app/package.json +0 -34
@@ -0,0 +1,30 @@
1
+ {
2
+ "name": "test-app",
3
+ "private": true,
4
+ "version": "0.0.0",
5
+ "description": "Sails test application",
6
+ "keywords": [],
7
+
8
+ "dependencies": {
9
+ "@webresto/core": "^1.0.0",
10
+ "@webresto/graphql": "file:../..",
11
+ "include-all": "^1.0.8",
12
+ "rc": "^1.0.1",
13
+ "request": "^2.88.2",
14
+ "sails": "^1.5.0",
15
+ "sails-hook-orm": "^2.1.1",
16
+ "sails-hook-stateflow": "^1.0.6",
17
+ "sails-memory": "^0.10.7"
18
+ },
19
+ "scripts": {
20
+ "debug": "node debug app.js",
21
+ "start": "node app.js"
22
+ },
23
+ "main": "app.js",
24
+ "repository": {
25
+ "type": "git",
26
+ "url": "git://github.com/webresto/app.git"
27
+ },
28
+ "author": "webresto",
29
+ "license": "MIT"
30
+ }
@@ -1,68 +1,68 @@
1
- <!--
2
-
3
-
4
- 444444444 000000000 333333333333333
5
- 4::::::::4 00:::::::::00 3:::::::::::::::33
6
- 4:::::::::4 00:::::::::::::00 3::::::33333::::::3
7
- 4::::44::::4 0:::::::000:::::::03333333 3:::::3
8
- 4::::4 4::::4 0::::::0 0::::::0 3:::::3
9
- 4::::4 4::::4 0:::::0 0:::::0 3:::::3
10
- 4::::4 4::::4 0:::::0 0:::::0 33333333:::::3
11
- 4::::444444::::4440:::::0 000 0:::::0 3:::::::::::3
12
- 4::::::::::::::::40:::::0 000 0:::::0 33333333:::::3
13
- 4444444444:::::4440:::::0 0:::::0 3:::::3
14
- 4::::4 0:::::0 0:::::0 3:::::3
15
- 4::::4 0::::::0 0::::::0 3:::::3
16
- 4::::4 0:::::::000:::::::03333333 3:::::3
17
- 44::::::44 00:::::::::::::00 3::::::33333::::::3
18
- 4::::::::4 00:::::::::00 3:::::::::::::::33
19
- 4444444444 000000000 333333333333333
20
-
21
-
22
-
23
- This is the default "403: Forbidden" page.
24
- User agents that don't "Accept" HTML will see a JSON version instead.
25
- You can customize the control logic for your needs in `config/403.js`
26
-
27
- You can trigger this response from one of your controllers or policies with:
28
- `return res.forbidden( msg );`
29
- (where `msg` is an optional error message to include in the response)
30
-
31
-
32
-
33
-
34
- -->
35
- <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
36
- <style>
37
- /* Styles included inline since you'll probably be deleting or replacing this page anyway */
38
- 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,h7{font-weight:normal;font-size:1em}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}.page .ocean{background:url('http://sailsjs.com/images/waves.png') #0c8da0 no-repeat center 282px;height:315px}.page .ocean img{margin-right:auto;margin-left:auto}.page .waves{display:block;padding-top:25px;margin-right:auto;margin-left:auto}.page .main{display:block;margin-top:90px}.page .logo{width:150px;margin-top:3.5em;margin-left:auto;margin-right:auto}.page .fishy{display:block;padding-top:100px}.page .help{padding-top:2em}.page h1{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:bold;font-size:1.7em;color:#001c20;text-align:center}.page h2{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:300;font-size:1.5em;color:#001c20;text-align:center}.page p{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-size:1.25em;color:#001c20;text-align:center}.page a{color:#118798}.page a:hover{color:#b1eef7}
39
- </style>
40
-
41
- <div class="page">
42
- <div class="ocean">
43
- <img class="fishy" src="http://sailsjs.com/images/image_devInTub.png">
44
- </div>
45
-
46
- <div class="main">
47
- <h1>
48
- Forbidden
49
- </h1>
50
- <h2>
51
- <% if (typeof data !== 'undefined') { %>
52
- <%= data %>
53
- <% } else { %>
54
- You don't have permission to see the page you're trying to reach.
55
- <% } %>
56
- </h2>
57
- <p class="help">
58
- <a href="http://en.wikipedia.org/wiki/HTTP_403">Why</a> might this be happening?
59
- </p>
60
- </div>
61
-
62
- <div class="logo">
63
- <a href="http://sailsjs.org">
64
- <img src="http://sailsjs.org/images/logo.png">
65
- </a>
66
- </div>
67
- </div>
68
-
1
+ <!--
2
+
3
+
4
+ 444444444 000000000 333333333333333
5
+ 4::::::::4 00:::::::::00 3:::::::::::::::33
6
+ 4:::::::::4 00:::::::::::::00 3::::::33333::::::3
7
+ 4::::44::::4 0:::::::000:::::::03333333 3:::::3
8
+ 4::::4 4::::4 0::::::0 0::::::0 3:::::3
9
+ 4::::4 4::::4 0:::::0 0:::::0 3:::::3
10
+ 4::::4 4::::4 0:::::0 0:::::0 33333333:::::3
11
+ 4::::444444::::4440:::::0 000 0:::::0 3:::::::::::3
12
+ 4::::::::::::::::40:::::0 000 0:::::0 33333333:::::3
13
+ 4444444444:::::4440:::::0 0:::::0 3:::::3
14
+ 4::::4 0:::::0 0:::::0 3:::::3
15
+ 4::::4 0::::::0 0::::::0 3:::::3
16
+ 4::::4 0:::::::000:::::::03333333 3:::::3
17
+ 44::::::44 00:::::::::::::00 3::::::33333::::::3
18
+ 4::::::::4 00:::::::::00 3:::::::::::::::33
19
+ 4444444444 000000000 333333333333333
20
+
21
+
22
+
23
+ This is the default "403: Forbidden" page.
24
+ User agents that don't "Accept" HTML will see a JSON version instead.
25
+ You can customize the control logic for your needs in `config/403.js`
26
+
27
+ You can trigger this response from one of your controllers or policies with:
28
+ `return res.forbidden( msg );`
29
+ (where `msg` is an optional error message to include in the response)
30
+
31
+
32
+
33
+
34
+ -->
35
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
36
+ <style>
37
+ /* Styles included inline since you'll probably be deleting or replacing this page anyway */
38
+ 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,h7{font-weight:normal;font-size:1em}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}.page .ocean{background:url('http://sailsjs.com/images/waves.png') #0c8da0 no-repeat center 282px;height:315px}.page .ocean img{margin-right:auto;margin-left:auto}.page .waves{display:block;padding-top:25px;margin-right:auto;margin-left:auto}.page .main{display:block;margin-top:90px}.page .logo{width:150px;margin-top:3.5em;margin-left:auto;margin-right:auto}.page .fishy{display:block;padding-top:100px}.page .help{padding-top:2em}.page h1{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:bold;font-size:1.7em;color:#001c20;text-align:center}.page h2{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:300;font-size:1.5em;color:#001c20;text-align:center}.page p{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-size:1.25em;color:#001c20;text-align:center}.page a{color:#118798}.page a:hover{color:#b1eef7}
39
+ </style>
40
+
41
+ <div class="page">
42
+ <div class="ocean">
43
+ <img class="fishy" src="http://sailsjs.com/images/image_devInTub.png">
44
+ </div>
45
+
46
+ <div class="main">
47
+ <h1>
48
+ Forbidden
49
+ </h1>
50
+ <h2>
51
+ <% if (typeof data !== 'undefined') { %>
52
+ <%= data %>
53
+ <% } else { %>
54
+ You don't have permission to see the page you're trying to reach.
55
+ <% } %>
56
+ </h2>
57
+ <p class="help">
58
+ <a href="http://en.wikipedia.org/wiki/HTTP_403">Why</a> might this be happening?
59
+ </p>
60
+ </div>
61
+
62
+ <div class="logo">
63
+ <a href="http://sailsjs.org">
64
+ <img src="http://sailsjs.org/images/logo.png">
65
+ </a>
66
+ </div>
67
+ </div>
68
+
@@ -1,68 +1,68 @@
1
- <!--
2
-
3
-
4
- 444444444 000000000 444444444
5
- 4::::::::4 00:::::::::00 4::::::::4
6
- 4:::::::::4 00:::::::::::::00 4:::::::::4
7
- 4::::44::::4 0:::::::000:::::::0 4::::44::::4
8
- 4::::4 4::::4 0::::::0 0::::::0 4::::4 4::::4
9
- 4::::4 4::::4 0:::::0 0:::::0 4::::4 4::::4
10
- 4::::4 4::::4 0:::::0 0:::::0 4::::4 4::::4
11
- 4::::444444::::4440:::::0 000 0:::::04::::444444::::444
12
- 4::::::::::::::::40:::::0 000 0:::::04::::::::::::::::4
13
- 4444444444:::::4440:::::0 0:::::04444444444:::::444
14
- 4::::4 0:::::0 0:::::0 4::::4
15
- 4::::4 0::::::0 0::::::0 4::::4
16
- 4::::4 0:::::::000:::::::0 4::::4
17
- 44::::::44 00:::::::::::::00 44::::::44
18
- 4::::::::4 00:::::::::00 4::::::::4
19
- 4444444444 000000000 4444444444
20
-
21
-
22
-
23
- This is the default "404: Not Found" page.
24
- User agents that don't "Accept" HTML will see a JSON version instead.
25
- You can customize the control logic for your needs in `config/404.js`
26
-
27
- Sails considers a request to be in a "404: Not Found" state when a user
28
- requests a URL which doesn't match any of your app's routes or blueprints.
29
-
30
- You can also trigger this response from one of your controllers or policies with:
31
- `return res.notFound();`
32
-
33
-
34
- -->
35
- <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
36
- <style>
37
- /* Styles included inline since you'll probably be deleting this page anyway */
38
- 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,h7{font-weight:normal;font-size:1em}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}.fourohfour .ocean{background:url('http://sailsjs.com/images/waves.png') #0c8da0 no-repeat center 282px;height:315px}.fourohfour .ocean img{margin-right:auto;margin-left:auto}.fourohfour .waves{display:block;padding-top:25px;margin-right:auto;margin-left:auto}.fourohfour .main{display:block;margin-top:90px}.fourohfour .logo{width:150px;margin-top:3.5em;margin-left:auto;margin-right:auto}.fourohfour .fishy{display:block;padding-top:27px}.fourohfour .help{padding-top:2em}.fourohfour h1{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:bold;font-size:1.7em;color:#001c20;text-align:center}.fourohfour h2{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:300;font-size:1.5em;color:#001c20;text-align:center}.fourohfour p{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-size:1.25em;color:#001c20;text-align:center}.fourohfour a{color:#118798}.fourohfour a:hover{color:#b1eef7}
39
- </style>
40
-
41
- <div class="fourohfour">
42
- <div class="ocean">
43
- <img class="fishy" src="http://sailsjs.org/images/fishy4.png">
44
- </div>
45
-
46
- <div class="main">
47
- <h1>
48
- Something's fishy here.
49
- </h1>
50
- <h2>
51
- <% if (typeof data!== 'undefined') { %>
52
- <%= data %>
53
- <% } else { %>
54
- The page you were trying to reach doesn't exist.
55
- <% } %>
56
- </h2>
57
- <p class="help">
58
- <a href="http://en.wikipedia.org/wiki/HTTP_404">Why</a> might this be happening?
59
- </p>
60
- </div>
61
-
62
- <div class="logo">
63
- <a href="http://sailsjs.org">
64
- <img src="http://sailsjs.org/images/logo.png">
65
- </a>
66
- </div>
67
- </div>
68
-
1
+ <!--
2
+
3
+
4
+ 444444444 000000000 444444444
5
+ 4::::::::4 00:::::::::00 4::::::::4
6
+ 4:::::::::4 00:::::::::::::00 4:::::::::4
7
+ 4::::44::::4 0:::::::000:::::::0 4::::44::::4
8
+ 4::::4 4::::4 0::::::0 0::::::0 4::::4 4::::4
9
+ 4::::4 4::::4 0:::::0 0:::::0 4::::4 4::::4
10
+ 4::::4 4::::4 0:::::0 0:::::0 4::::4 4::::4
11
+ 4::::444444::::4440:::::0 000 0:::::04::::444444::::444
12
+ 4::::::::::::::::40:::::0 000 0:::::04::::::::::::::::4
13
+ 4444444444:::::4440:::::0 0:::::04444444444:::::444
14
+ 4::::4 0:::::0 0:::::0 4::::4
15
+ 4::::4 0::::::0 0::::::0 4::::4
16
+ 4::::4 0:::::::000:::::::0 4::::4
17
+ 44::::::44 00:::::::::::::00 44::::::44
18
+ 4::::::::4 00:::::::::00 4::::::::4
19
+ 4444444444 000000000 4444444444
20
+
21
+
22
+
23
+ This is the default "404: Not Found" page.
24
+ User agents that don't "Accept" HTML will see a JSON version instead.
25
+ You can customize the control logic for your needs in `config/404.js`
26
+
27
+ Sails considers a request to be in a "404: Not Found" state when a user
28
+ requests a URL which doesn't match any of your app's routes or blueprints.
29
+
30
+ You can also trigger this response from one of your controllers or policies with:
31
+ `return res.notFound();`
32
+
33
+
34
+ -->
35
+ <link href='http://fonts.googleapis.com/css?family=Open+Sans:400italic,600' rel='stylesheet' type='text/css'>
36
+ <style>
37
+ /* Styles included inline since you'll probably be deleting this page anyway */
38
+ 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,h7{font-weight:normal;font-size:1em}.clearfix:after{clear:both;content:".";display:block;font-size:0;height:0;line-height:0;visibility:hidden}.fourohfour .ocean{background:url('http://sailsjs.com/images/waves.png') #0c8da0 no-repeat center 282px;height:315px}.fourohfour .ocean img{margin-right:auto;margin-left:auto}.fourohfour .waves{display:block;padding-top:25px;margin-right:auto;margin-left:auto}.fourohfour .main{display:block;margin-top:90px}.fourohfour .logo{width:150px;margin-top:3.5em;margin-left:auto;margin-right:auto}.fourohfour .fishy{display:block;padding-top:27px}.fourohfour .help{padding-top:2em}.fourohfour h1{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:bold;font-size:1.7em;color:#001c20;text-align:center}.fourohfour h2{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-weight:300;font-size:1.5em;color:#001c20;text-align:center}.fourohfour p{font-family:"Open Sans","Myriad Pro",Arial,sans-serif;font-size:1.25em;color:#001c20;text-align:center}.fourohfour a{color:#118798}.fourohfour a:hover{color:#b1eef7}
39
+ </style>
40
+
41
+ <div class="fourohfour">
42
+ <div class="ocean">
43
+ <img class="fishy" src="http://sailsjs.org/images/fishy4.png">
44
+ </div>
45
+
46
+ <div class="main">
47
+ <h1>
48
+ Something's fishy here.
49
+ </h1>
50
+ <h2>
51
+ <% if (typeof data!== 'undefined') { %>
52
+ <%= data %>
53
+ <% } else { %>
54
+ The page you were trying to reach doesn't exist.
55
+ <% } %>
56
+ </h2>
57
+ <p class="help">
58
+ <a href="http://en.wikipedia.org/wiki/HTTP_404">Why</a> might this be happening?
59
+ </p>
60
+ </div>
61
+
62
+ <div class="logo">
63
+ <a href="http://sailsjs.org">
64
+ <img src="http://sailsjs.org/images/logo.png">
65
+ </a>
66
+ </div>
67
+ </div>
68
+