@mojojs/core 0.37.0 → 0.39.0
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/README.md +1 -1
- package/lib/cgi.js +1 -0
- package/lib/cgi.js.map +1 -1
- package/lib/cli/create-full-app.js +1 -1
- package/lib/context.d.ts +1 -1
- package/lib/context.js +13 -6
- package/lib/context.js.map +1 -1
- package/lib/core.d.ts +1 -1
- package/lib/renderer.js +1 -1
- package/lib/static.js +1 -1
- package/lib/types.d.ts +0 -6
- package/package.json +4 -5
- package/vendor/public/mojo/bootstrap/bootstrap.bundle.min.js +2 -2
- package/vendor/public/mojo/bootstrap/bootstrap.min.css +2 -2
- package/vendor/public/mojo/highlight.js/highlight.pack.js +656 -608
- package/vendor/public/mojo/mojo.css +10 -10
- package/vendor/views/mojo/debug.html.tmpl +60 -53
|
@@ -10,7 +10,7 @@ main {
|
|
|
10
10
|
border: solid #cce4ff 1px;
|
|
11
11
|
border-radius: .25rem;
|
|
12
12
|
color: #333;
|
|
13
|
-
font:
|
|
13
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;;
|
|
14
14
|
padding: 0.4em;
|
|
15
15
|
}
|
|
16
16
|
h2 {
|
|
@@ -18,13 +18,13 @@ h2 {
|
|
|
18
18
|
font-size: 2em;
|
|
19
19
|
}
|
|
20
20
|
pre {
|
|
21
|
-
font:
|
|
21
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
22
22
|
margin: 0;
|
|
23
23
|
white-space: pre-wrap;
|
|
24
24
|
}
|
|
25
25
|
pre > code {
|
|
26
26
|
display: block;
|
|
27
|
-
font:
|
|
27
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
28
28
|
margin-bottom: 0.7em;
|
|
29
29
|
margin-top: 0.7em;
|
|
30
30
|
}
|
|
@@ -82,13 +82,13 @@ th {
|
|
|
82
82
|
.mojobar {
|
|
83
83
|
background-color: #1a1a1a;
|
|
84
84
|
}
|
|
85
|
-
.mojobar #
|
|
85
|
+
.mojobar #navbarContent .nav-link {
|
|
86
86
|
color: #bbb;
|
|
87
87
|
}
|
|
88
|
-
.mojobar #
|
|
88
|
+
.mojobar #navbarContent .nav-link:hover {
|
|
89
89
|
color: #fff;
|
|
90
90
|
}
|
|
91
|
-
.mojobar #
|
|
91
|
+
.mojobar #navbarContent input[type=search] {
|
|
92
92
|
background-color: #3a3a3a;
|
|
93
93
|
border: 1px solid rgba(0, 0, 0, 0.1);
|
|
94
94
|
border-radius: 3px;
|
|
@@ -97,7 +97,7 @@ th {
|
|
|
97
97
|
margin-left: 1em;
|
|
98
98
|
transition: all 0.15s;
|
|
99
99
|
}
|
|
100
|
-
.mojobar #
|
|
100
|
+
.mojobar #navbarContent input[type="search"]:focus {
|
|
101
101
|
background-color: #fff;
|
|
102
102
|
color: #111;
|
|
103
103
|
outline: 0;
|
|
@@ -131,13 +131,13 @@ th {
|
|
|
131
131
|
background-color: #282c34;
|
|
132
132
|
border: 0;
|
|
133
133
|
border-radius: .25rem;
|
|
134
|
-
font:
|
|
134
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
135
135
|
padding: 1em;
|
|
136
136
|
width: 100%;
|
|
137
137
|
}
|
|
138
138
|
.mojo-terminal > code {
|
|
139
139
|
color: #eee;
|
|
140
|
-
font:
|
|
140
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
|
141
141
|
line-height: 1.5em;
|
|
142
142
|
text-align: left;
|
|
143
143
|
white-space: pre-wrap;
|
|
@@ -192,6 +192,6 @@ th {
|
|
|
192
192
|
border: 0;
|
|
193
193
|
border-radius: 0;
|
|
194
194
|
color: #eee;
|
|
195
|
-
font:
|
|
195
|
+
font: 0.875rem SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;;
|
|
196
196
|
padding: 0;
|
|
197
197
|
}
|
|
@@ -24,55 +24,62 @@
|
|
|
24
24
|
<header>
|
|
25
25
|
<nav class="navbar navbar-expand-lg navbar-dark mojobar">
|
|
26
26
|
<div class="container-fluid">
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
<
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
27
|
+
<a href="https://mojojs.org" id="mojobar-brand" class="navbar-brand">
|
|
28
|
+
<picture>
|
|
29
|
+
<img src="<%= ctx.urlForFile('/mojo/logo-white.png') %>"
|
|
30
|
+
srcset="<%= ctx.urlForFile('/mojo/logo-white-2x.png') %> 2x">
|
|
31
|
+
</picture>
|
|
32
|
+
</a>
|
|
33
|
+
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarContent"
|
|
34
|
+
aria-controls="navbarContent" aria-expanded="false" aria-label="Toggle navigation">
|
|
35
|
+
<span class="navbar-toggler-icon"></span>
|
|
36
|
+
</button>
|
|
37
|
+
<div class="collapse navbar-collapse" id="navbarContent">
|
|
38
|
+
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
|
|
39
|
+
<li class="nav-item dropdown">
|
|
40
|
+
<a class="nav-link dropdown-toggle" href="#" id="docDropdown" role="button"
|
|
41
|
+
data-bs-toggle="dropdown" aria-expanded="false">
|
|
42
|
+
Documentation
|
|
43
|
+
</a>
|
|
44
|
+
<div class="dropdown-menu" aria-labelledby="docDropdown">
|
|
45
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/">Overview</a>
|
|
46
|
+
<div class="dropdown-divider"></div>
|
|
47
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Introduction.md">Introduction</a>
|
|
48
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Growing.md">Growing</a>
|
|
49
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Routing.md">Routing</a>
|
|
50
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Rendering.md">Rendering</a>
|
|
51
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/User-Agent.md">User-Agent</a>
|
|
52
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Cookbook.md">Cookbook</a>
|
|
53
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Contributing.md">Contributing</a>
|
|
54
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/FAQ.md">FAQ</a>
|
|
55
|
+
<div class="dropdown-divider"></div>
|
|
56
|
+
<a class="dropdown-item" href="https://mojojs.org/docs/Cheatsheet.md">Cheatsheet</a>
|
|
57
|
+
</div>
|
|
58
|
+
</li>
|
|
59
|
+
<li class="nav-item dropdown">
|
|
60
|
+
<a class="nav-link dropdown-toggle" href="#" id="communityDropdown" role="button"
|
|
61
|
+
data-bs-toggle="dropdown" aria-expanded="false">
|
|
62
|
+
Community
|
|
63
|
+
</a>
|
|
64
|
+
<div class="dropdown-menu" aria-labelledby="communityDropdown">
|
|
65
|
+
<a class="dropdown-item" href="https://matrix.to/#/#mojo:matrix.org">Matrix</a>
|
|
66
|
+
<a class="dropdown-item" href="https://web.libera.chat/#mojo">IRC</a>
|
|
67
|
+
<a class="dropdown-item" href="https://github.com/mojolicious/mojo.js/discussions">Forum</a>
|
|
68
|
+
<a class="dropdown-item" href="https://twitter.com/mojolicious_org">Twitter</a>
|
|
69
|
+
<a class="dropdown-item" href="https://blogs.mojolicious.org">Blogs</a>
|
|
70
|
+
<a class="dropdown-item" href="https://www.linkedin.com/groups/8963713/">LinkedIn</a>
|
|
71
|
+
</div>
|
|
72
|
+
</li>
|
|
73
|
+
<li class="nav-item">
|
|
74
|
+
<a class="nav-link" href="https://github.com/mojolicious/mojo.js/">Contribute on GitHub</a>
|
|
75
|
+
</li>
|
|
76
|
+
</ul>
|
|
77
|
+
<form action="https://www.google.com/cse" target="_blank" class="form-inline my-2 my-lg-0">
|
|
78
|
+
<input type="hidden" name="cx" value="047dacf0d8b084ef8">
|
|
79
|
+
<input type="hidden" name="ie" value="URF-8">
|
|
80
|
+
<input type="search" name="q" placeholder="Search...">
|
|
81
|
+
</form>
|
|
82
|
+
</div>
|
|
76
83
|
</div>
|
|
77
84
|
</nav>
|
|
78
85
|
</header>
|
|
@@ -128,7 +135,7 @@
|
|
|
128
135
|
for <code><%= ctx.req.path %></code>, maybe you need to add a new one?
|
|
129
136
|
</p>
|
|
130
137
|
</div>
|
|
131
|
-
|
|
138
|
+
<{walkBlock(route, depth)}>
|
|
132
139
|
% const pattern = route.pattern;
|
|
133
140
|
% let unparsed = pattern.unparsed || '/';
|
|
134
141
|
% if (depth > 0) unparsed = `+${unparsed}`;
|
|
@@ -151,9 +158,9 @@
|
|
|
151
158
|
</td>
|
|
152
159
|
</tr>
|
|
153
160
|
% depth++;
|
|
154
|
-
|
|
161
|
+
%== (await Promise.all(route.children.map(child => walkBlock(child, depth)))).join('')
|
|
155
162
|
% depth--;
|
|
156
|
-
|
|
163
|
+
<{/walkBlock}>
|
|
157
164
|
<table class="mojo-striped-light mojo-wide">
|
|
158
165
|
<thead>
|
|
159
166
|
<tr>
|
|
@@ -162,7 +169,7 @@
|
|
|
162
169
|
<th>Name</th>
|
|
163
170
|
</tr>
|
|
164
171
|
</thead>
|
|
165
|
-
|
|
172
|
+
%== (await Promise.all(ctx.app.router.children.map(child => walkBlock(child, 0)))).join('')
|
|
166
173
|
</table>
|
|
167
174
|
</div>
|
|
168
175
|
% }
|