expressa 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/.circleci/config.yml +1 -1
  2. package/listeners_validation.js +4 -0
  3. package/modules/admin/dist/index.html +1 -1
  4. package/modules/admin/dist/static/css/{chunk-7869.220d4af5.css → chunk-1059.220d4af5.css} +0 -0
  5. package/modules/admin/dist/static/css/{chunk-e80a.5ee55031.css → chunk-418a.5ee55031.css} +0 -0
  6. package/modules/admin/dist/static/css/chunk-787e.1d849865.css +1 -0
  7. package/modules/admin/dist/static/css/chunk-d0cd.97323951.css +1 -0
  8. package/modules/admin/dist/static/css/{chunk-759b.3a895a1e.css → chunk-f075.3a895a1e.css} +0 -0
  9. package/modules/admin/dist/static/css/chunk-libs.327ad89e.css +14 -0
  10. package/modules/admin/dist/static/js/{app.12d7fe96.js → app.4c984719.js} +1 -1
  11. package/modules/admin/dist/static/js/chunk-1059.e6aa7b61.js +1 -0
  12. package/modules/admin/dist/static/js/chunk-418a.e0987b3c.js +1 -0
  13. package/modules/admin/dist/static/js/chunk-787e.3ee96fce.js +1 -0
  14. package/modules/admin/dist/static/js/chunk-8bab.7052832d.js +2 -0
  15. package/modules/admin/dist/static/js/{chunk-23bd.5fa24c85.js.LICENSE.txt → chunk-8bab.7052832d.js.LICENSE.txt} +1 -1
  16. package/modules/admin/dist/static/js/chunk-d0cd.1781b9dd.js +1 -0
  17. package/modules/admin/dist/static/js/chunk-f075.315ceec1.js +1 -0
  18. package/modules/admin/dist/static/js/chunk-libs.06c38828.js +2 -0
  19. package/modules/admin/dist/static/js/{chunk-libs.b6f27cfe.js.LICENSE.txt → chunk-libs.06c38828.js.LICENSE.txt} +1 -1
  20. package/modules/admin/package.json +3 -3
  21. package/modules/admin/src/components/JSONEditor.vue +181 -180
  22. package/modules/admin/src/main.js +2 -2
  23. package/modules/admin/src/router/index.js +185 -185
  24. package/package.json +1 -1
  25. package/modules/admin/dist/static/css/chunk-36ca.e7e72230.css +0 -1
  26. package/modules/admin/dist/static/css/chunk-62f2.538cfd24.css +0 -1
  27. package/modules/admin/dist/static/css/chunk-libs.68e8d170.css +0 -14
  28. package/modules/admin/dist/static/js/chunk-23bd.5fa24c85.js +0 -2
  29. package/modules/admin/dist/static/js/chunk-36ca.eda87655.js +0 -1
  30. package/modules/admin/dist/static/js/chunk-62f2.ee07e11b.js +0 -1
  31. package/modules/admin/dist/static/js/chunk-759b.89a889b6.js +0 -1
  32. package/modules/admin/dist/static/js/chunk-7869.b7ab2c47.js +0 -1
  33. package/modules/admin/dist/static/js/chunk-e80a.cc0d79f4.js +0 -1
  34. package/modules/admin/dist/static/js/chunk-libs.b6f27cfe.js +0 -2
@@ -1,185 +1,185 @@
1
- import Vue from 'vue'
2
- import Router from 'vue-router'
3
-
4
- // in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
5
- // detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
6
-
7
- Vue.use(Router)
8
-
9
- /* Layout */
10
- import Layout from '../views/layout/Layout'
11
-
12
- const capitalize = (s) => {
13
- if (typeof s !== 'string') return ''
14
- return s.charAt(0).toUpperCase() + s.slice(1)
15
- }
16
-
17
- /**
18
- * hidden: true if `hidden:true` will not show in the sidebar(default is false)
19
- * alwaysShow: true if set true, will always show the root menu, whatever its child routes length
20
- * if not set alwaysShow, only more than one route under the children
21
- * it will becomes nested mode, otherwise not show the root menu
22
- * redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
23
- * name:'router-name' the name is used by <keep-alive> (must set!!!)
24
- * meta : {
25
- title: 'title' the name show in submenu and breadcrumb (recommend set)
26
- icon: 'svg-name' the icon show in the sidebar,
27
- }
28
- **/
29
-
30
- export const constantRouterMap = [
31
- { path: '/login', component: () => import('@/views/login/index'), hidden: true },
32
- { path: '/install', component: () => import('@/views/Install'), hidden: true },
33
- { path: '/404', component: () => import('@/views/404'), hidden: true },
34
-
35
- {
36
- path: '/',
37
- component: Layout,
38
- redirect: '/home',
39
- name: 'Home',
40
- meta: { title: 'Home', icon: 'home-alt' },
41
- children: [{
42
- path: 'home',
43
- meta: { title: 'Home', icon: 'home-alt' },
44
- component: () => import('@/views/Home')
45
- }, {
46
- path: '/edit/:collectionName/:id',
47
- component: () => import('@/views/EditDocument'),
48
- hidden: true
49
- }]
50
- },
51
-
52
- {
53
- path: '/users',
54
- redirect: '/users/list',
55
- component: Layout,
56
- name: 'Users',
57
- meta: { title: 'People', icon: 'users-alt' },
58
- children: [{
59
- path: 'list',
60
- meta: { title: 'Users', icon: 'users-alt' },
61
- name: 'users2',
62
- component: () => import('@/views/ListDocuments2'),
63
- props: { collectionName: 'users' },
64
- }, {
65
- path: 'add',
66
- meta: { title: 'Add User', icon: 'plus' },
67
- name: 'newuser',
68
- component: () => import('@/views/EditDocument'),
69
- props: { collectionName: 'users', id: 'create' },
70
- }, {
71
- path: 'role',
72
- meta: { title: 'Roles', icon: 'shield-check' },
73
- name: 'role',
74
- component: () => import('@/views/ListDocuments2'),
75
- props: { collectionName: 'role' },
76
- }, {
77
- path: 'addrole',
78
- meta: { title: 'Add Role', icon: 'plus' },
79
- name: 'newrole',
80
- component: () => import('@/views/EditDocument'),
81
- props: { collectionName: 'role', id: 'create' },
82
- }],
83
- },
84
-
85
- {
86
- path: '/list/:collectionName',
87
- component: Layout,
88
- hidden: true,
89
- name: 'Data',
90
- meta: { title: 'Data', icon: 'database' },
91
- children: [{
92
- path: '',
93
- name: ':collectionName',
94
- component: () => import('@/views/ListDocuments2'),
95
- props: route => ({ collectionName: route.params.collectionName }),
96
- meta: { title: capitalize(name) }
97
- }]
98
- },
99
-
100
- {
101
- path: '/manage/permissions',
102
- component: Layout,
103
- name: 'permissions',
104
- meta: { title: 'Manage' },
105
- children: [
106
- {
107
- path: '',
108
- name: 'permissions',
109
- component: () => import('@/views/ManagePermissions'),
110
- meta: { title: 'Permissions' }
111
- }
112
- ]
113
- },
114
-
115
- {
116
- path: '/dev',
117
- component: Layout,
118
- meta: { title: 'Dev', icon: 'flask' },
119
- name: 'Dev',
120
- children: [
121
- {
122
- path: '',
123
- name: '',
124
- component: () => import('@/views/Dev'),
125
- meta: { title: '' },
126
- hidden: true,
127
- },
128
- {
129
- path: 'listeners',
130
- name: 'listeners',
131
- component: () => import('@/views/ManageListeners'),
132
- meta: { title: 'Listeners' }
133
- },
134
- {
135
- path: 'middleware',
136
- name: 'middleware',
137
- component: () => import('@/views/ManageMiddleware'),
138
- meta: { title: 'Middleware' }
139
- }, {
140
- path: 'requestlogs',
141
- meta: { title: 'Request Logs', icon: 'diary' },
142
- name: 'requestlogs',
143
- component: () => import('@/views/ListDocuments2'),
144
- props: { collectionName: 'requestlog', columns: ['method', 'url', 'req.ip', 'user', 'res.message', 'res.statusCode', 'res.headers.content-length'] },
145
- }, {
146
- path: 'viewrequest/:requestId',
147
- hidden: true,
148
- meta: { title: 'View Request', icon: 'diary' },
149
- name: 'viewrequest',
150
- component: () => import('@/views/ViewRequest'),
151
- }, {
152
- path: '/edit/collection',
153
- component: Layout,
154
- name: 'Schema',
155
- hidden: true,
156
- meta: { title: 'Schemas', icon: 'cog' },
157
- children: [{
158
- hidden: true,
159
- path: '/:collectionName',
160
- name: name,
161
- meta: { title: capitalize(name) }
162
- }]
163
- },
164
- ]
165
- },
166
-
167
- {
168
- path: 'external-link',
169
- component: Layout,
170
- children: [
171
- {
172
- path: 'https://github.com/thomas4019/expressa',
173
- meta: { title: 'Expressa Docs', icon: 'link' }
174
- }
175
- ]
176
- },
177
-
178
- { path: '*', redirect: '/404', hidden: true }
179
- ]
180
-
181
- export default new Router({
182
- // mode: 'history',
183
- scrollBehavior: () => ({ y: 0 }),
184
- routes: constantRouterMap
185
- })
1
+ import Vue from 'vue'
2
+ import Router from 'vue-router'
3
+
4
+ // in development-env not use lazy-loading, because lazy-loading too many pages will cause webpack hot update too slow. so only in production use lazy-loading;
5
+ // detail: https://panjiachen.github.io/vue-element-admin-site/#/lazy-loading
6
+
7
+ Vue.use(Router)
8
+
9
+ /* Layout */
10
+ import Layout from '../views/layout/Layout'
11
+
12
+ const capitalize = (s) => {
13
+ if (typeof s !== 'string') return ''
14
+ return s.charAt(0).toUpperCase() + s.slice(1)
15
+ }
16
+
17
+ /**
18
+ * hidden: true if `hidden:true` will not show in the sidebar(default is false)
19
+ * alwaysShow: true if set true, will always show the root menu, whatever its child routes length
20
+ * if not set alwaysShow, only more than one route under the children
21
+ * it will becomes nested mode, otherwise not show the root menu
22
+ * redirect: noredirect if `redirect:noredirect` will no redirect in the breadcrumb
23
+ * name:'router-name' the name is used by <keep-alive> (must set!!!)
24
+ * meta : {
25
+ title: 'title' the name show in submenu and breadcrumb (recommend set)
26
+ icon: 'svg-name' the icon show in the sidebar,
27
+ }
28
+ **/
29
+
30
+ export const constantRouterMap = [
31
+ { path: '/login', component: () => import('@/views/login/index'), hidden: true },
32
+ { path: '/install', component: () => import('@/views/Install'), hidden: true },
33
+ { path: '/404', component: () => import('@/views/404'), hidden: true },
34
+
35
+ {
36
+ path: '/',
37
+ component: Layout,
38
+ redirect: '/home',
39
+ name: 'Home',
40
+ meta: { title: 'Home', icon: 'home' },
41
+ children: [{
42
+ path: 'home',
43
+ meta: { title: 'Home', icon: 'home' },
44
+ component: () => import('@/views/Home')
45
+ }, {
46
+ path: '/edit/:collectionName/:id',
47
+ component: () => import('@/views/EditDocument'),
48
+ hidden: true
49
+ }]
50
+ },
51
+
52
+ {
53
+ path: '/users',
54
+ redirect: '/users/list',
55
+ component: Layout,
56
+ name: 'Users',
57
+ meta: { title: 'People', icon: 'users-alt' },
58
+ children: [{
59
+ path: 'list',
60
+ meta: { title: 'Users', icon: 'users-alt' },
61
+ name: 'users2',
62
+ component: () => import('@/views/ListDocuments2'),
63
+ props: { collectionName: 'users' },
64
+ }, {
65
+ path: 'add',
66
+ meta: { title: 'Add User', icon: 'plus' },
67
+ name: 'newuser',
68
+ component: () => import('@/views/EditDocument'),
69
+ props: { collectionName: 'users', id: 'create' },
70
+ }, {
71
+ path: 'role',
72
+ meta: { title: 'Roles', icon: 'shield-check' },
73
+ name: 'role',
74
+ component: () => import('@/views/ListDocuments2'),
75
+ props: { collectionName: 'role' },
76
+ }, {
77
+ path: 'addrole',
78
+ meta: { title: 'Add Role', icon: 'plus' },
79
+ name: 'newrole',
80
+ component: () => import('@/views/EditDocument'),
81
+ props: { collectionName: 'role', id: 'create' },
82
+ }],
83
+ },
84
+
85
+ {
86
+ path: '/list/:collectionName',
87
+ component: Layout,
88
+ hidden: true,
89
+ name: 'Data',
90
+ meta: { title: 'Data', icon: 'database' },
91
+ children: [{
92
+ path: '',
93
+ name: ':collectionName',
94
+ component: () => import('@/views/ListDocuments2'),
95
+ props: route => ({ collectionName: route.params.collectionName }),
96
+ meta: { title: capitalize(name) }
97
+ }]
98
+ },
99
+
100
+ {
101
+ path: '/manage/permissions',
102
+ component: Layout,
103
+ name: 'permissions',
104
+ meta: { title: 'Manage', icon: 'shield-check' },
105
+ children: [
106
+ {
107
+ path: '',
108
+ name: 'permissions',
109
+ component: () => import('@/views/ManagePermissions'),
110
+ meta: { title: 'Permissions' }
111
+ }
112
+ ]
113
+ },
114
+
115
+ {
116
+ path: '/dev',
117
+ component: Layout,
118
+ meta: { title: 'Dev', icon: 'flask' },
119
+ name: 'Dev',
120
+ children: [
121
+ {
122
+ path: '',
123
+ name: '',
124
+ component: () => import('@/views/Dev'),
125
+ meta: { title: '' },
126
+ hidden: true,
127
+ },
128
+ {
129
+ path: 'listeners',
130
+ name: 'listeners',
131
+ component: () => import('@/views/ManageListeners'),
132
+ meta: { title: 'Listeners' }
133
+ },
134
+ {
135
+ path: 'middleware',
136
+ name: 'middleware',
137
+ component: () => import('@/views/ManageMiddleware'),
138
+ meta: { title: 'Middleware' }
139
+ }, {
140
+ path: 'requestlogs',
141
+ meta: { title: 'Request Logs', icon: 'diary' },
142
+ name: 'requestlogs',
143
+ component: () => import('@/views/ListDocuments2'),
144
+ props: { collectionName: 'requestlog', columns: ['method', 'url', 'req.ip', 'user', 'res.message', 'res.statusCode', 'res.headers.content-length'] },
145
+ }, {
146
+ path: 'viewrequest/:requestId',
147
+ hidden: true,
148
+ meta: { title: 'View Request', icon: 'diary' },
149
+ name: 'viewrequest',
150
+ component: () => import('@/views/ViewRequest'),
151
+ }, {
152
+ path: '/edit/collection',
153
+ component: Layout,
154
+ name: 'Schema',
155
+ hidden: true,
156
+ meta: { title: 'Schemas', icon: 'cog' },
157
+ children: [{
158
+ hidden: true,
159
+ path: '/:collectionName',
160
+ name: name,
161
+ meta: { title: capitalize(name) }
162
+ }]
163
+ },
164
+ ]
165
+ },
166
+
167
+ {
168
+ path: 'external-link',
169
+ component: Layout,
170
+ children: [
171
+ {
172
+ path: 'https://github.com/thomas4019/expressa',
173
+ meta: { title: 'Expressa Docs', icon: 'link' }
174
+ }
175
+ ]
176
+ },
177
+
178
+ { path: '*', redirect: '/404', hidden: true }
179
+ ]
180
+
181
+ export default new Router({
182
+ // mode: 'history',
183
+ scrollBehavior: () => ({ y: 0 }),
184
+ routes: constantRouterMap
185
+ })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expressa",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "API framework using JSON schemas",
5
5
  "main": "index.js",
6
6
  "repository": "https://github.com/thomas4019/expressa",
@@ -1 +0,0 @@
1
- .jsoneditor-vue img{border:1px solid #ddd;border-radius:4px;padding:5px;width:150px}.jsoneditor-vue img:hover{-webkit-box-shadow:0 0 2px 1px rgba(0,140,186,.5);box-shadow:0 0 2px 1px rgba(0,140,186,.5)}.expandable-textarea{display:block;min-height:250px;min-width:250px;resize:both!important}.jsoneditor-vue button.btn{font-size:14px!important;padding:3px}.jsoneditor-vue .form-control-label,label{font-weight:700}.jsoneditor-vue input[type=checkbox]{margin-right:5px;margin-top:3px}.error-message[data-v-3c5b79e9]{color:red}
@@ -1 +0,0 @@
1
- .jsoneditor-vue img{border:1px solid #ddd;border-radius:4px;padding:5px;width:150px}.jsoneditor-vue img:hover{-webkit-box-shadow:0 0 2px 1px rgba(0,140,186,.5);box-shadow:0 0 2px 1px rgba(0,140,186,.5)}.expandable-textarea{display:block;min-height:250px;min-width:250px;resize:both!important}.jsoneditor-vue button.btn{font-size:14px!important;padding:3px}.jsoneditor-vue .form-control-label,label{font-weight:700}.jsoneditor-vue input[type=checkbox]{margin-right:5px;margin-top:3px}.comment-link{margin-top:-15px}.error-message{color:red}