@windwalker-io/core 4.0.8 → 4.0.9
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.
- package/.gulp.json +7 -7
- package/LICENSE +19 -19
- package/dist/debugger/114.js.map +1 -0
- package/dist/debugger/338.js.map +1 -0
- package/dist/debugger/358.js.map +1 -0
- package/dist/debugger/500.js.map +1 -0
- package/dist/debugger/548.js.map +1 -0
- package/dist/debugger/694.js.map +1 -0
- package/dist/debugger/798.js.map +1 -0
- package/dist/debugger/851.js.map +1 -0
- package/dist/debugger/864.js.map +1 -0
- package/dist/debugger/chunk-vendor-114.js +3 -0
- package/dist/debugger/chunk-vendor-114.js.LICENSE.txt +8 -0
- package/dist/debugger/chunk-vendor-338.js +3 -0
- package/dist/debugger/chunk-vendor-338.js.LICENSE.txt +15 -0
- package/dist/debugger/chunk-vendor-358.js +2 -0
- package/dist/debugger/chunk-vendor-500.js +3 -0
- package/dist/debugger/chunk-vendor-500.js.LICENSE.txt +8 -0
- package/dist/debugger/chunk-vendor-548.js +3 -0
- package/dist/debugger/chunk-vendor-548.js.LICENSE.txt +15 -0
- package/dist/debugger/chunk-vendor-694.js +3 -0
- package/dist/debugger/chunk-vendor-694.js.LICENSE.txt +1 -0
- package/dist/debugger/chunk-vendor-798.js +3 -0
- package/dist/debugger/chunk-vendor-798.js.LICENSE.txt +1 -0
- package/dist/debugger/chunk-vendor-851.js +3 -0
- package/dist/debugger/chunk-vendor-851.js.LICENSE.txt +8 -0
- package/dist/debugger/chunk-vendor-864.js +3 -0
- package/dist/debugger/chunk-vendor-864.js.LICENSE.txt +1 -0
- package/dist/debugger/debugger.js +1 -1
- package/dist/debugger/debugger.js.LICENSE.txt +11 -2
- package/dist/debugger/debugger.js.map +1 -1
- package/dist/debugger/dev/chunk-vendor-scss_debugger_scss.js +219 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_layouts_DefaultLayout_vue.js +77 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Dashboard_vue.js +81 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Database_vue.js +187 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Events_vue.js +122 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Request_vue.js +122 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Routing_vue.js +122 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_System_vue.js +67 -0
- package/dist/debugger/dev/chunk-vendor-src_debugger_views_Timeline_vue.js +132 -0
- package/dist/debugger/dev/chunk-vendor-vendors-node_modules_bootstrap_js_src_modal_js-node_modules_sql-formatter_lib_index_js.js +923 -0
- package/dist/debugger/dev/chunk-vendor-vendors-node_modules_sql-formatter_lib_index_js-node_modules_bootstrap_js_src_modal_js.js +923 -0
- package/fusionfile.mjs +26 -10
- package/package.json +11 -5
- package/scss/_variables.scss +1 -0
- package/scss/base/_typography.scss +9 -0
- package/scss/debugger.scss +47 -1
- package/src/debugger/App.vue +40 -16
- package/src/debugger/Store.vue +1 -1
- package/src/debugger/components/BsModal.vue +128 -0
- package/src/debugger/components/KeyValueTable.vue +51 -0
- package/src/debugger/components/db/{query-info.vue → QueryInfo.vue} +55 -27
- package/src/debugger/components/events/EventListenersTable.vue +75 -0
- package/src/debugger/components/timeline/TimelineTable.vue +107 -0
- package/src/debugger/debugger.js +4 -1
- package/src/debugger/font-awesome.js +23 -0
- package/src/debugger/layouts/DefaultLayout.vue +17 -2
- package/src/debugger/routes.js +5 -2
- package/src/debugger/services/utilities.js +18 -0
- package/src/debugger/views/Dashboard.vue +20 -10
- package/src/debugger/views/Database.vue +113 -26
- package/src/debugger/views/Events.vue +113 -0
- package/src/debugger/views/Request.vue +133 -1
- package/src/debugger/views/Routing.vue +210 -0
- package/src/debugger/views/System.vue +37 -8
- package/src/debugger/views/Timeline.vue +92 -0
- package/src/{webpack.config.js → debugger/webpack.config.js} +1 -1
- package/src/index.mjs +9 -9
- package/src/install-vendors.mjs +10 -3
- package/src/utils.mjs +1 -2
- package/dist/debugger/1.js +0 -2
- package/dist/debugger/1.js.map +0 -1
- package/dist/debugger/144.js +0 -2
- package/dist/debugger/144.js.map +0 -1
- package/dist/debugger/2.js +0 -8
- package/dist/debugger/2.js.map +0 -1
- package/dist/debugger/3.js +0 -2
- package/dist/debugger/3.js.map +0 -1
- package/dist/debugger/4.js +0 -2
- package/dist/debugger/4.js.map +0 -1
- package/dist/debugger/5.js +0 -2
- package/dist/debugger/5.js.map +0 -1
- package/dist/debugger/523.js +0 -2
- package/dist/debugger/523.js.map +0 -1
- package/dist/debugger/659.js +0 -3
- package/dist/debugger/659.js.LICENSE.txt +0 -6
- package/dist/debugger/659.js.map +0 -1
- package/dist/debugger/689.js +0 -2
- package/dist/debugger/689.js.map +0 -1
- package/dist/debugger/715.js +0 -2
- package/dist/debugger/715.js.map +0 -1
- package/dist/debugger/727.js +0 -3
- package/dist/debugger/727.js.LICENSE.txt +0 -6
- package/dist/debugger/727.js.map +0 -1
- package/dist/debugger/src_debugger_views_Dashboard_vue.js +0 -67
- package/dist/debugger/src_debugger_views_Database_vue.js +0 -187
- package/dist/debugger/src_debugger_views_Request_vue.js +0 -67
- package/dist/debugger/src_debugger_views_System_vue.js +0 -122
- package/dist/debugger/vendors-node_modules_sql-formatter_lib_sqlFormatter_js.js +0 -212
|
@@ -1,10 +1,142 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<DefaultLayout>
|
|
3
|
+
<template #title>
|
|
4
|
+
Request
|
|
5
|
+
</template>
|
|
2
6
|
|
|
7
|
+
<div ref="root" class="p-4" v-if="data">
|
|
8
|
+
<section class="l-section l-section--get mt-5">
|
|
9
|
+
<h3>GET Variables</h3>
|
|
10
|
+
|
|
11
|
+
<KeyValueTable :data="data.request.query" />
|
|
12
|
+
|
|
13
|
+
</section>
|
|
14
|
+
|
|
15
|
+
<section class="l-section l-section--body mt-5">
|
|
16
|
+
<h3>Body Variables</h3>
|
|
17
|
+
|
|
18
|
+
<KeyValueTable :data="data.request.body" />
|
|
19
|
+
|
|
20
|
+
</section>
|
|
21
|
+
|
|
22
|
+
<section class="l-section l-section--files mt-5">
|
|
23
|
+
<h3>FILES Variables</h3>
|
|
24
|
+
|
|
25
|
+
<KeyValueTable :data="data.request.files" />
|
|
26
|
+
|
|
27
|
+
</section>
|
|
28
|
+
|
|
29
|
+
<section class="l-section l-section--session mt-5">
|
|
30
|
+
<h3>Session Variables</h3>
|
|
31
|
+
|
|
32
|
+
<KeyValueTable :data="data.session" />
|
|
33
|
+
|
|
34
|
+
</section>
|
|
35
|
+
|
|
36
|
+
<section class="l-section l-section--cookies mt-5">
|
|
37
|
+
<h3>Cookies Variables</h3>
|
|
38
|
+
|
|
39
|
+
<KeyValueTable :data="data.cookies || data.request.cookies" />
|
|
40
|
+
|
|
41
|
+
</section>
|
|
42
|
+
|
|
43
|
+
<section class="l-section l-section--server mt-5">
|
|
44
|
+
<h3>SERVER Variables</h3>
|
|
45
|
+
|
|
46
|
+
<KeyValueTable :data="data.request.server" />
|
|
47
|
+
|
|
48
|
+
</section>
|
|
49
|
+
|
|
50
|
+
<section class="l-section l-section--env mt-5">
|
|
51
|
+
<h3>ENV Variables</h3>
|
|
52
|
+
|
|
53
|
+
<KeyValueTable :data="data.request.env" />
|
|
54
|
+
|
|
55
|
+
</section>
|
|
56
|
+
</div>
|
|
57
|
+
|
|
58
|
+
<teleport to=".nav-item--request">
|
|
59
|
+
<ul class="nav flex-column ps-4 small">
|
|
60
|
+
<li class="nav-item">
|
|
61
|
+
<a href="#" class="nav-link" @click.prevent="goto('get')">
|
|
62
|
+
GET Variables
|
|
63
|
+
</a>
|
|
64
|
+
</li>
|
|
65
|
+
<li class="nav-item">
|
|
66
|
+
<a href="#" class="nav-link" @click.prevent="goto('body')">
|
|
67
|
+
Body Variables
|
|
68
|
+
</a>
|
|
69
|
+
</li>
|
|
70
|
+
<li class="nav-item">
|
|
71
|
+
<a href="#" class="nav-link" @click.prevent="goto('files')">
|
|
72
|
+
Files Variables
|
|
73
|
+
</a>
|
|
74
|
+
</li>
|
|
75
|
+
<li class="nav-item">
|
|
76
|
+
<a href="#" class="nav-link" @click.prevent="goto('session')">
|
|
77
|
+
Session Variables
|
|
78
|
+
</a>
|
|
79
|
+
</li>
|
|
80
|
+
<li class="nav-item">
|
|
81
|
+
<a href="#" class="nav-link" @click.prevent="goto('cookies')">
|
|
82
|
+
Cookies Variables
|
|
83
|
+
</a>
|
|
84
|
+
</li>
|
|
85
|
+
<li class="nav-item">
|
|
86
|
+
<a href="#" class="nav-link" @click.prevent="goto('server')">
|
|
87
|
+
SERVER Variables
|
|
88
|
+
</a>
|
|
89
|
+
</li>
|
|
90
|
+
<li class="nav-item">
|
|
91
|
+
<a href="#" class="nav-link" @click.prevent="goto('env')">
|
|
92
|
+
ENV Variables
|
|
93
|
+
</a>
|
|
94
|
+
</li>
|
|
95
|
+
</ul>
|
|
96
|
+
</teleport>
|
|
97
|
+
</DefaultLayout>
|
|
3
98
|
</template>
|
|
4
99
|
|
|
5
100
|
<script>
|
|
101
|
+
import { ref } from 'vue';
|
|
102
|
+
import KeyValueTable from '../components/KeyValueTable.vue';
|
|
103
|
+
import DefaultLayout from '../layouts/DefaultLayout.vue';
|
|
104
|
+
import $http from '../services/http.js';
|
|
105
|
+
|
|
6
106
|
export default {
|
|
7
|
-
name: 'Request'
|
|
107
|
+
name: 'Request',
|
|
108
|
+
components: { KeyValueTable, DefaultLayout },
|
|
109
|
+
async beforeRouteEnter(to, from ,next) {
|
|
110
|
+
next(async (vm) => {
|
|
111
|
+
const res = await $http.get('ajax/data?path=http');
|
|
112
|
+
vm.data = res.data.data;
|
|
113
|
+
});
|
|
114
|
+
},
|
|
115
|
+
async beforeRouteUpdate(to, from ,next) {
|
|
116
|
+
const res = await $http.get('ajax/data?path=http');
|
|
117
|
+
this.data = res.data.data;
|
|
118
|
+
},
|
|
119
|
+
setup() {
|
|
120
|
+
const data = ref(null);
|
|
121
|
+
const root = ref(null);
|
|
122
|
+
|
|
123
|
+
function goto(section) {
|
|
124
|
+
const sec = root.value.querySelector(`.l-section--${section}`);
|
|
125
|
+
|
|
126
|
+
if (sec) {
|
|
127
|
+
window.scrollTo({
|
|
128
|
+
top: sec.offsetTop - 100,
|
|
129
|
+
behavior: 'smooth'
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
return {
|
|
135
|
+
data,
|
|
136
|
+
root,
|
|
137
|
+
goto,
|
|
138
|
+
}
|
|
139
|
+
}
|
|
8
140
|
};
|
|
9
141
|
</script>
|
|
10
142
|
|
|
@@ -0,0 +1,210 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<DefaultLayout>
|
|
3
|
+
<template #title>
|
|
4
|
+
Routing
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<div class="p-4" v-if="data">
|
|
8
|
+
|
|
9
|
+
<section class="l-section l-section--info">
|
|
10
|
+
<h3 class="mb-3">Route Information</h3>
|
|
11
|
+
|
|
12
|
+
<table class="table table-bordered">
|
|
13
|
+
<tbody>
|
|
14
|
+
<!-- Method -->
|
|
15
|
+
<tr>
|
|
16
|
+
<th style="width: 20%">
|
|
17
|
+
Request Method
|
|
18
|
+
</th>
|
|
19
|
+
<td>
|
|
20
|
+
{{ data.request.method }}
|
|
21
|
+
</td>
|
|
22
|
+
</tr>
|
|
23
|
+
|
|
24
|
+
<!-- Routes -->
|
|
25
|
+
<tr>
|
|
26
|
+
<th>
|
|
27
|
+
Total Routes
|
|
28
|
+
</th>
|
|
29
|
+
<td>
|
|
30
|
+
{{ Object.keys(data.routing.routes).length }}
|
|
31
|
+
</td>
|
|
32
|
+
</tr>
|
|
33
|
+
|
|
34
|
+
<!-- Matched -->
|
|
35
|
+
<tr>
|
|
36
|
+
<th>
|
|
37
|
+
Matched Route
|
|
38
|
+
</th>
|
|
39
|
+
<td>
|
|
40
|
+
<pre class="m-0">{{ data.routing.matched?.name }}</pre>
|
|
41
|
+
</td>
|
|
42
|
+
</tr>
|
|
43
|
+
|
|
44
|
+
<!-- Controller -->
|
|
45
|
+
<tr>
|
|
46
|
+
<th>
|
|
47
|
+
Controller / View
|
|
48
|
+
</th>
|
|
49
|
+
<td>
|
|
50
|
+
<pre class="m-0">{{ data.routing.controller }}</pre>
|
|
51
|
+
|
|
52
|
+
<div v-if="data.routing.matched?.options?.vars?.view"
|
|
53
|
+
class="ps-3 mt-2">
|
|
54
|
+
<pre class="m-0"><strong>View:</strong> {{ data.routing.matched?.options?.vars?.view }}</pre>
|
|
55
|
+
</div>
|
|
56
|
+
</td>
|
|
57
|
+
</tr>
|
|
58
|
+
|
|
59
|
+
<!-- Handler -->
|
|
60
|
+
<tr>
|
|
61
|
+
<th>
|
|
62
|
+
Handler
|
|
63
|
+
</th>
|
|
64
|
+
<td>
|
|
65
|
+
<pre class="m-0">{{ JSON.stringify(data.routing.matched?.options?.handlers, null, 2) }}</pre>
|
|
66
|
+
</td>
|
|
67
|
+
</tr>
|
|
68
|
+
|
|
69
|
+
<!-- Middlewares -->
|
|
70
|
+
<tr>
|
|
71
|
+
<th>
|
|
72
|
+
Middlewares
|
|
73
|
+
</th>
|
|
74
|
+
<td>
|
|
75
|
+
<div v-for="middleware of data.routing?.matched?.options?.middlewares">
|
|
76
|
+
<pre class="mb-1">{{ middleware }}</pre>
|
|
77
|
+
</div>
|
|
78
|
+
</td>
|
|
79
|
+
</tr>
|
|
80
|
+
</tbody>
|
|
81
|
+
</table>
|
|
82
|
+
</section>
|
|
83
|
+
|
|
84
|
+
<section class="l-section l-section--uri mt-5">
|
|
85
|
+
<h3 class="mb-3">Uri Information</h3>
|
|
86
|
+
|
|
87
|
+
<KeyValueTable :data="data.uri" />
|
|
88
|
+
</section>
|
|
89
|
+
|
|
90
|
+
<section class="l-section l-section--routes mt-5">
|
|
91
|
+
<h3 class="mb-3">Routes</h3>
|
|
92
|
+
|
|
93
|
+
<table class="table table-bordered">
|
|
94
|
+
<thead>
|
|
95
|
+
<tr>
|
|
96
|
+
<th>
|
|
97
|
+
Route Name
|
|
98
|
+
</th>
|
|
99
|
+
<th>
|
|
100
|
+
Pattern
|
|
101
|
+
</th>
|
|
102
|
+
<th>
|
|
103
|
+
Methods
|
|
104
|
+
</th>
|
|
105
|
+
<th>
|
|
106
|
+
Controller / View
|
|
107
|
+
</th>
|
|
108
|
+
<!--<th>-->
|
|
109
|
+
<!-- Detail-->
|
|
110
|
+
<!--</th>-->
|
|
111
|
+
</tr>
|
|
112
|
+
</thead>
|
|
113
|
+
|
|
114
|
+
<tbody>
|
|
115
|
+
<tr v-for="(route, name) of data.routing.routes"
|
|
116
|
+
:class="{ 'table-success': data.routing.matched?.name === route.name }">
|
|
117
|
+
<td>
|
|
118
|
+
<code>{{ route.name }}</code>
|
|
119
|
+
</td>
|
|
120
|
+
<td>
|
|
121
|
+
<code>{{ route.options.pattern }}</code>
|
|
122
|
+
</td>
|
|
123
|
+
<td>
|
|
124
|
+
{{ route.options?.method?.join('|') || 'Any' }}
|
|
125
|
+
</td>
|
|
126
|
+
<td style="max-width: 400px">
|
|
127
|
+
<div style="overflow-x: auto">
|
|
128
|
+
<div v-if="route?.options?.vars?.view"
|
|
129
|
+
class="">
|
|
130
|
+
<pre class="m-0">{{ route?.options?.vars?.view }}</pre>
|
|
131
|
+
</div>
|
|
132
|
+
<div v-else>
|
|
133
|
+
<pre>{{ getHandler(route.options.handlers || {}) }}</pre>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</td>
|
|
137
|
+
<!--<td></td>-->
|
|
138
|
+
</tr>
|
|
139
|
+
</tbody>
|
|
140
|
+
</table>
|
|
141
|
+
|
|
142
|
+
</section>
|
|
143
|
+
|
|
144
|
+
</div>
|
|
145
|
+
</DefaultLayout>
|
|
146
|
+
</template>
|
|
147
|
+
|
|
148
|
+
<script>
|
|
149
|
+
import { ref } from 'vue';
|
|
150
|
+
import KeyValueTable from '../components/KeyValueTable.vue';
|
|
151
|
+
import DefaultLayout from '../layouts/DefaultLayout.vue';
|
|
152
|
+
import $http from '../services/http.js';
|
|
153
|
+
export default {
|
|
154
|
+
name: 'Routing',
|
|
155
|
+
components: { KeyValueTable, DefaultLayout },
|
|
156
|
+
async beforeRouteEnter(to, from ,next) {
|
|
157
|
+
next(async (vm) => {
|
|
158
|
+
const params = new URLSearchParams();
|
|
159
|
+
params.set('path[request]', 'http::request');
|
|
160
|
+
params.set('path[uri]', 'http::systemUri');
|
|
161
|
+
params.set('path[routing]', 'routing');
|
|
162
|
+
|
|
163
|
+
const res = await $http.get('ajax/data?' + params.toString());
|
|
164
|
+
vm.data = res.data.data;
|
|
165
|
+
});
|
|
166
|
+
},
|
|
167
|
+
async beforeRouteUpdate(to, from ,next) {
|
|
168
|
+
const params = new URLSearchParams();
|
|
169
|
+
params.set('path[request]', 'http::request');
|
|
170
|
+
params.set('path[uri]', 'http::systemUri');
|
|
171
|
+
params.set('path[routing]', 'routing');
|
|
172
|
+
|
|
173
|
+
const res = await $http.get('ajax/data?' + params.toString());
|
|
174
|
+
vm.data = res.data.data;
|
|
175
|
+
},
|
|
176
|
+
setup() {
|
|
177
|
+
const data = ref(null);
|
|
178
|
+
|
|
179
|
+
function getHandler(handlers) {
|
|
180
|
+
if (handlers['*']) {
|
|
181
|
+
return getCallable(handlers['*']);
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
return getCallable(Object.values(handlers)[0]);
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function getCallable(callable) {
|
|
188
|
+
if (!callable) {
|
|
189
|
+
return '-';
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
if (typeof callable === 'string') {
|
|
193
|
+
return callable;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
return callable.join('::') + '()';
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
return {
|
|
200
|
+
data,
|
|
201
|
+
|
|
202
|
+
getHandler
|
|
203
|
+
};
|
|
204
|
+
}
|
|
205
|
+
};
|
|
206
|
+
</script>
|
|
207
|
+
|
|
208
|
+
<style scoped>
|
|
209
|
+
|
|
210
|
+
</style>
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<
|
|
2
|
+
<DefaultLayout>
|
|
3
3
|
<template #title>
|
|
4
4
|
System
|
|
5
5
|
</template>
|
|
@@ -8,31 +8,56 @@
|
|
|
8
8
|
<div>
|
|
9
9
|
<h4>Windwalker</h4>
|
|
10
10
|
|
|
11
|
-
<table class="table
|
|
11
|
+
<table class="table table-bordered">
|
|
12
|
+
<tbody>
|
|
12
13
|
<tr>
|
|
13
|
-
<th style="width: 25%" class="
|
|
14
|
+
<th style="width: 25%" class="">Framework Version</th>
|
|
14
15
|
<td>{{ data.framework_version }}</td>
|
|
15
16
|
</tr>
|
|
16
17
|
<tr>
|
|
17
|
-
<th class="
|
|
18
|
+
<th class="">Core Version</th>
|
|
18
19
|
<td>{{ data.core_version }}</td>
|
|
19
20
|
</tr>
|
|
20
21
|
<tr>
|
|
21
22
|
<th class="border-right">PHP Version</th>
|
|
22
23
|
<td>{{ data.php_version }}</td>
|
|
23
24
|
</tr>
|
|
25
|
+
</tbody>
|
|
24
26
|
</table>
|
|
25
27
|
</div>
|
|
26
28
|
|
|
27
|
-
<
|
|
29
|
+
<div class="mt-5">
|
|
30
|
+
<h4>Debug Messages</h4>
|
|
28
31
|
|
|
29
|
-
|
|
32
|
+
<table class="table table-bordered">
|
|
33
|
+
<thead>
|
|
34
|
+
<tr>
|
|
35
|
+
<th>Type</th>
|
|
36
|
+
<th>Message</th>
|
|
37
|
+
</tr>
|
|
38
|
+
</thead>
|
|
39
|
+
<tbody>
|
|
40
|
+
<template v-for="(msgs, type) of data.messages" :key="msgs">
|
|
41
|
+
<tr v-for="msg of msgs" :key="msg">
|
|
42
|
+
<td style="width: 20%;" class="text-nowrap">
|
|
43
|
+
{{ type }}
|
|
44
|
+
</td>
|
|
45
|
+
<td>
|
|
46
|
+
{{ msg }}
|
|
47
|
+
</td>
|
|
48
|
+
</tr>
|
|
49
|
+
</template>
|
|
50
|
+
</tbody>
|
|
51
|
+
</table>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<div class="mt-5">
|
|
30
55
|
<h4>Config</h4>
|
|
31
56
|
|
|
32
|
-
<pre class="bg-
|
|
57
|
+
<pre class="bg-light p-3"><code>{{ JSON.stringify(data.config, null, 2) }}</code></pre>
|
|
33
58
|
</div>
|
|
34
59
|
</div>
|
|
35
|
-
</
|
|
60
|
+
</DefaultLayout>
|
|
36
61
|
</template>
|
|
37
62
|
|
|
38
63
|
<script>
|
|
@@ -50,6 +75,10 @@ export default {
|
|
|
50
75
|
vm.data = res.data.data;
|
|
51
76
|
});
|
|
52
77
|
},
|
|
78
|
+
async beforeRouteUpdate(to, from ,next) {
|
|
79
|
+
const res = await $http.get('ajax/data?path=system');
|
|
80
|
+
this.data = res.data.data;
|
|
81
|
+
},
|
|
53
82
|
setup() {
|
|
54
83
|
const data = ref({});
|
|
55
84
|
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<DefaultLayout>
|
|
3
|
+
<template #title>
|
|
4
|
+
Timeline
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<div class="p-4" v-if="data">
|
|
8
|
+
|
|
9
|
+
<section class="l-section l-section--system">
|
|
10
|
+
<h3>System Timeline</h3>
|
|
11
|
+
|
|
12
|
+
<TimelineTable :items="systemItems" />
|
|
13
|
+
</section>
|
|
14
|
+
|
|
15
|
+
<section class="l-section l-section--profilers mt-5">
|
|
16
|
+
|
|
17
|
+
<ul class="nav nav-pills" id="profilers-tab" role="tablist">
|
|
18
|
+
<li class="nav-item" role="presentation"
|
|
19
|
+
v-for="(instance, i) of instances">
|
|
20
|
+
<button class="nav-link active" id="home-tab" data-bs-toggle="tab"
|
|
21
|
+
:data-bs-target="`tab-${instance}`"
|
|
22
|
+
type="button"
|
|
23
|
+
role="tab"
|
|
24
|
+
aria-selected="true">
|
|
25
|
+
{{ instance }}
|
|
26
|
+
</button>
|
|
27
|
+
</li>
|
|
28
|
+
</ul>
|
|
29
|
+
<div class="tab-content mt-4" id="myTabContent">
|
|
30
|
+
<div class="tab-pane fade "
|
|
31
|
+
v-for="(instance, i) of instances"
|
|
32
|
+
:class="[ i === 0 ? 'show active' : '' ]"
|
|
33
|
+
:id="`tab-${instance}`"
|
|
34
|
+
role="tabpanel"
|
|
35
|
+
tabindex="0">
|
|
36
|
+
<div class="">
|
|
37
|
+
<TimelineTable :items="data[instance].items" />
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
|
|
42
|
+
</section>
|
|
43
|
+
</div>
|
|
44
|
+
</DefaultLayout>
|
|
45
|
+
</template>
|
|
46
|
+
|
|
47
|
+
<script>
|
|
48
|
+
import { computed, ref } from 'vue';
|
|
49
|
+
import TimelineTable from '../components/timeline/TimelineTable.vue';
|
|
50
|
+
import DefaultLayout from '../layouts/DefaultLayout.vue';
|
|
51
|
+
import $http from '../services/http.js';
|
|
52
|
+
export default {
|
|
53
|
+
name: 'Timeline',
|
|
54
|
+
components: { TimelineTable, DefaultLayout },
|
|
55
|
+
async beforeRouteEnter(to, from ,next) {
|
|
56
|
+
next(async (vm) => {
|
|
57
|
+
const res = await $http.get('ajax/data?path=profiler');
|
|
58
|
+
vm.data = res.data.data;
|
|
59
|
+
});
|
|
60
|
+
},
|
|
61
|
+
async beforeRouteUpdate(to, from ,next) {
|
|
62
|
+
const res = await $http.get('ajax/data?path=profiler');
|
|
63
|
+
this.data = res.data.data;
|
|
64
|
+
},
|
|
65
|
+
setup() {
|
|
66
|
+
const data = ref(null);
|
|
67
|
+
|
|
68
|
+
const instances = computed(() => Object.keys(data.value));
|
|
69
|
+
const systemItems = computed(() => {
|
|
70
|
+
if (!data.value) {
|
|
71
|
+
return [];
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
return data.value.main.items.filter((item) => {
|
|
75
|
+
const tags = item.tags || [];
|
|
76
|
+
|
|
77
|
+
return tags.indexOf('system') !== -1;
|
|
78
|
+
}) || [];
|
|
79
|
+
});
|
|
80
|
+
|
|
81
|
+
return {
|
|
82
|
+
data,
|
|
83
|
+
instances,
|
|
84
|
+
systemItems,
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style scoped>
|
|
91
|
+
|
|
92
|
+
</style>
|
package/src/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Part of funclass project.
|
|
3
|
-
*
|
|
4
|
-
* @copyright Copyright (C) 2021 LYRASOFT.
|
|
5
|
-
* @license __LICENSE__
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
export * from './asset-sync.mjs';
|
|
9
|
-
export * from './install-vendors.mjs';
|
|
1
|
+
/**
|
|
2
|
+
* Part of funclass project.
|
|
3
|
+
*
|
|
4
|
+
* @copyright Copyright (C) 2021 LYRASOFT.
|
|
5
|
+
* @license __LICENSE__
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export * from './asset-sync.mjs';
|
|
9
|
+
export * from './install-vendors.mjs';
|
package/src/install-vendors.mjs
CHANGED
|
@@ -30,7 +30,7 @@ export async function installVendors(npmVendors, composerVendors = [], to = 'www
|
|
|
30
30
|
deleteExists(dir);
|
|
31
31
|
});
|
|
32
32
|
|
|
33
|
-
vendors = findVendors().concat(vendors);
|
|
33
|
+
vendors = findVendors(composerVendors).concat(vendors);
|
|
34
34
|
vendors = [...new Set(vendors)];
|
|
35
35
|
|
|
36
36
|
vendors.forEach((vendor) => {
|
|
@@ -59,12 +59,12 @@ function doInstall(source, dest) {
|
|
|
59
59
|
}
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
-
function findVendors() {
|
|
62
|
+
function findVendors(composerVendors = []) {
|
|
63
63
|
const pkg = path.resolve(process.cwd(), 'package.json');
|
|
64
64
|
|
|
65
65
|
const pkgJson = loadJson(pkg);
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
let vendors = Object.keys(pkgJson.devDependencies || {})
|
|
68
68
|
.concat(Object.keys(pkgJson.dependencies || {}))
|
|
69
69
|
.map(id => `node_modules/${id}/package.json`)
|
|
70
70
|
.map((file) => loadJson(file))
|
|
@@ -72,6 +72,13 @@ function findVendors() {
|
|
|
72
72
|
.map(pkgJson => pkgJson.windwalker.vendors || [])
|
|
73
73
|
.flat();
|
|
74
74
|
|
|
75
|
+
composerVendors.forEach((cv) => {
|
|
76
|
+
const composerManifest = `vendor/${cv}/composer.json`;
|
|
77
|
+
const composerJson = loadJson(composerManifest);
|
|
78
|
+
|
|
79
|
+
vendors = vendors.concat(composerJson?.windwalker?.asset_vendors || []);
|
|
80
|
+
});
|
|
81
|
+
|
|
75
82
|
return [ ...new Set(vendors) ];
|
|
76
83
|
}
|
|
77
84
|
|