@lazycatcloud/lzc-cli 1.2.59 → 1.2.60
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/changelog.md +5 -0
- package/lib/app/lpk_build.js +5 -0
- package/lib/app/lpk_create_generator.js +0 -152
- package/lib/appstore/login.js +13 -1
- package/package.json +1 -1
- package/template/blank/lzc-build.yml +15 -16
- package/template/blank/lzc-manifest.yml +4 -4
- package/template/_lpk/golang.manifest.yml.in +0 -16
- package/template/_lpk/lite.manifest.yml.in +0 -19
- package/template/golang/.godir +0 -1
- package/template/golang/README.md +0 -10
- package/template/golang/_gitignore +0 -2
- package/template/golang/assets/css/bootstrap-responsive.css +0 -1091
- package/template/golang/assets/css/bootstrap-responsive.min.css +0 -1073
- package/template/golang/assets/css/bootstrap.css +0 -6264
- package/template/golang/assets/css/bootstrap.min.css +0 -5307
- package/template/golang/assets/css/rego.css +0 -45
- package/template/golang/assets/img/glyphicons-halflings-white.png +0 -0
- package/template/golang/assets/img/glyphicons-halflings.png +0 -0
- package/template/golang/assets/js/bootstrap.js +0 -2054
- package/template/golang/assets/js/bootstrap.min.js +0 -1241
- package/template/golang/assets/js/rego.js +0 -132
- package/template/golang/build.sh +0 -12
- package/template/golang/go.mod +0 -3
- package/template/golang/index.html +0 -269
- package/template/golang/lazycat.png +0 -0
- package/template/golang/lzc-build.yml +0 -60
- package/template/golang/rego.go +0 -82
- package/template/golang/rego_test.go +0 -13
- package/template/ionic_vue3/README.md +0 -46
- package/template/ionic_vue3/_eslintrc.cjs +0 -24
- package/template/ionic_vue3/_gitignore +0 -29
- package/template/ionic_vue3/_vscode/extensions.json +0 -6
- package/template/ionic_vue3/capacitor.config.ts +0 -10
- package/template/ionic_vue3/env.d.ts +0 -1
- package/template/ionic_vue3/index.html +0 -13
- package/template/ionic_vue3/ionic.config.json +0 -7
- package/template/ionic_vue3/lazycat.png +0 -0
- package/template/ionic_vue3/lzc-build.yml +0 -61
- package/template/ionic_vue3/package-lock.json +0 -8100
- package/template/ionic_vue3/package.json +0 -52
- package/template/ionic_vue3/postcss.config.js +0 -6
- package/template/ionic_vue3/public/favicon.ico +0 -0
- package/template/ionic_vue3/src/App.vue +0 -11
- package/template/ionic_vue3/src/assets/logo.svg +0 -1
- package/template/ionic_vue3/src/index.css +0 -3
- package/template/ionic_vue3/src/main.ts +0 -35
- package/template/ionic_vue3/src/router/index.ts +0 -15
- package/template/ionic_vue3/src/theme/variables.css +0 -231
- package/template/ionic_vue3/src/views/Home.vue +0 -38
- package/template/ionic_vue3/tailwind.config.js +0 -7
- package/template/ionic_vue3/tsconfig.json +0 -16
- package/template/ionic_vue3/tsconfig.vite-config.json +0 -8
- package/template/ionic_vue3/vite.config.ts +0 -28
- package/template/lite/_gitignore +0 -4
- package/template/lite/error_pages/502.html.tpl +0 -13
- package/template/lite/lazycat.png +0 -0
- package/template/lite/lzc-build.yml +0 -59
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
// jQuery form oninput wrapper
|
|
2
|
-
// Thx to Mathias Bynens https://github.com/mathiasbynens/jquery-oninput
|
|
3
|
-
jQuery.fn.input = function (a) {
|
|
4
|
-
var b = this;
|
|
5
|
-
return a
|
|
6
|
-
? b.bind({
|
|
7
|
-
"input.input": function (c) {
|
|
8
|
-
b.unbind("keydown.input");
|
|
9
|
-
a.call(this, c);
|
|
10
|
-
},
|
|
11
|
-
"keydown.input": function (c) {
|
|
12
|
-
a.call(this, c);
|
|
13
|
-
},
|
|
14
|
-
})
|
|
15
|
-
: b.trigger("keydown.input");
|
|
16
|
-
};
|
|
17
|
-
|
|
18
|
-
$(document).ready(function () {
|
|
19
|
-
var testRegexTimeout;
|
|
20
|
-
|
|
21
|
-
function testRegex() {
|
|
22
|
-
$.ajax({
|
|
23
|
-
type: "POST",
|
|
24
|
-
url: "/test_regexp/",
|
|
25
|
-
data: {
|
|
26
|
-
regexp: $("#regexpInput").val(),
|
|
27
|
-
testString: $("#testStringInput").val(),
|
|
28
|
-
findAllSubmatch: $("#findAllSubmatchCheckbox").is(":checked"),
|
|
29
|
-
},
|
|
30
|
-
})
|
|
31
|
-
.done(function (msg) {
|
|
32
|
-
var res = $.parseJSON(msg);
|
|
33
|
-
var allMatches = res.matches;
|
|
34
|
-
var groupsName = res.groupsName;
|
|
35
|
-
|
|
36
|
-
// We clear previous results
|
|
37
|
-
clearResults();
|
|
38
|
-
|
|
39
|
-
if (allMatches && allMatches[0] != null) {
|
|
40
|
-
var l = allMatches.length;
|
|
41
|
-
|
|
42
|
-
// Match font color > green
|
|
43
|
-
$("#match").css("color", "green");
|
|
44
|
-
|
|
45
|
-
// Match groups
|
|
46
|
-
if (l > 0) {
|
|
47
|
-
var match = [];
|
|
48
|
-
var matchGroupsTable = [];
|
|
49
|
-
var index = 0;
|
|
50
|
-
|
|
51
|
-
for (var i = 0; i < l; i++) {
|
|
52
|
-
var matches = allMatches[i];
|
|
53
|
-
var m = matches.length;
|
|
54
|
-
|
|
55
|
-
match.push(matches[0]);
|
|
56
|
-
for (var j = 1; j < m; j++) {
|
|
57
|
-
matchGroupsTable.push(
|
|
58
|
-
"<tr><td>" +
|
|
59
|
-
index++ +
|
|
60
|
-
"</td><td>" +
|
|
61
|
-
(groupsName[j - 1] != "" ? groupsName[j - 1] : "-") +
|
|
62
|
-
"</td><td>" +
|
|
63
|
-
escapeHTML(matches[j]) +
|
|
64
|
-
"</td></tr>"
|
|
65
|
-
);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
$("#match").html(escapeHTML(match.join(" ")));
|
|
70
|
-
$("#matchGroupsTable > tbody:last").append(matchGroupsTable.join());
|
|
71
|
-
}
|
|
72
|
-
} else {
|
|
73
|
-
$("#match").html("No match !");
|
|
74
|
-
$("#match").css("color", "red");
|
|
75
|
-
}
|
|
76
|
-
})
|
|
77
|
-
.error(function (error) {
|
|
78
|
-
$("#match").html(error.responseText);
|
|
79
|
-
$("#match").css("color", "red");
|
|
80
|
-
});
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
function clear() {
|
|
84
|
-
$("#regexpInput").val("");
|
|
85
|
-
$("#testStringInput").val("");
|
|
86
|
-
|
|
87
|
-
// Remove placeholder
|
|
88
|
-
$("#regexpInput").attr("placeholder", "");
|
|
89
|
-
$("#testStringInput").attr("placeholder", "");
|
|
90
|
-
|
|
91
|
-
clearResults();
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
function clearResults() {
|
|
95
|
-
// Empty match groups table
|
|
96
|
-
$("#matchGroupsTable tbody > tr").remove();
|
|
97
|
-
|
|
98
|
-
$("#match").html("");
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
function escapeHTML(str) {
|
|
102
|
-
var div = document.createElement("div");
|
|
103
|
-
div.appendChild(document.createTextNode(str));
|
|
104
|
-
return div.innerHTML;
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
//
|
|
108
|
-
// Add Handlers
|
|
109
|
-
//
|
|
110
|
-
$("#regexpForm").submit(function () {
|
|
111
|
-
testRegex();
|
|
112
|
-
|
|
113
|
-
return false;
|
|
114
|
-
});
|
|
115
|
-
|
|
116
|
-
$("#regexpForm").input(function () {
|
|
117
|
-
if (testRegexTimeout) clearTimeout(testRegexTimeout);
|
|
118
|
-
|
|
119
|
-
testRegexTimeout = setTimeout(testRegex, 750);
|
|
120
|
-
});
|
|
121
|
-
|
|
122
|
-
$("#findAllSubmatchCheckbox").click(function () {
|
|
123
|
-
testRegex();
|
|
124
|
-
});
|
|
125
|
-
|
|
126
|
-
$("#clearAllFieldsButton").click(function () {
|
|
127
|
-
clear();
|
|
128
|
-
});
|
|
129
|
-
|
|
130
|
-
// Test sample regexp
|
|
131
|
-
testRegex();
|
|
132
|
-
});
|
package/template/golang/build.sh
DELETED
package/template/golang/go.mod
DELETED
|
@@ -1,269 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>Rego - A Go regular expression tester</title>
|
|
6
|
-
<meta name="viewport" content=
|
|
7
|
-
"width=device-width, initial-scale=1.0">
|
|
8
|
-
<meta name="description" content=
|
|
9
|
-
"Rego - A Go regular expression tester">
|
|
10
|
-
<meta name="author" content="Steve Domin"><!-- CSS -->
|
|
11
|
-
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
|
|
12
|
-
<style type="text/css">
|
|
13
|
-
|
|
14
|
-
/* Sticky footer styles
|
|
15
|
-
-------------------------------------------------- */
|
|
16
|
-
|
|
17
|
-
html,
|
|
18
|
-
body {
|
|
19
|
-
height: 100%;
|
|
20
|
-
/* The html and body elements cannot have any padding or margin. */
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
/* Wrapper for page content to push down footer */
|
|
24
|
-
#wrap {
|
|
25
|
-
min-height: 100%;
|
|
26
|
-
height: auto !important;
|
|
27
|
-
height: 100%;
|
|
28
|
-
/* Negative indent footer by it's height */
|
|
29
|
-
margin: 0 auto -60px;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
/* Set the fixed height of the footer here */
|
|
33
|
-
#push,
|
|
34
|
-
#footer {
|
|
35
|
-
height: 60px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
#footer {
|
|
39
|
-
background-color: #f5f5f5;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/* Lastly, apply responsive CSS fixes as necessary */
|
|
43
|
-
@media (max-width: 767px) {
|
|
44
|
-
#footer {
|
|
45
|
-
margin-left: -20px;
|
|
46
|
-
margin-right: -20px;
|
|
47
|
-
padding-left: 20px;
|
|
48
|
-
padding-right: 20px;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.page-header {
|
|
53
|
-
margin-bottom: 20px;
|
|
54
|
-
}
|
|
55
|
-
</style>
|
|
56
|
-
<link href="assets/css/bootstrap-responsive.min.css" rel=
|
|
57
|
-
"stylesheet"><!-- rego CSS -->
|
|
58
|
-
<link href="assets/css/rego.css" rel="stylesheet" media="screen">
|
|
59
|
-
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
|
60
|
-
<!--[if lt IE 9]>
|
|
61
|
-
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
|
62
|
-
<![endif]-->
|
|
63
|
-
<!-- Fav and touch icons -->
|
|
64
|
-
<link rel="shortcut icon" href="../assets/ico/favicon.ico">
|
|
65
|
-
<link rel="apple-touch-icon-precomposed" sizes="144x144" href=
|
|
66
|
-
"../assets/ico/apple-touch-icon-144-precomposed.png">
|
|
67
|
-
<link rel="apple-touch-icon-precomposed" sizes="114x114" href=
|
|
68
|
-
"../assets/ico/apple-touch-icon-114-precomposed.png">
|
|
69
|
-
<link rel="apple-touch-icon-precomposed" sizes="72x72" href=
|
|
70
|
-
"../assets/ico/apple-touch-icon-72-precomposed.png">
|
|
71
|
-
<link rel="apple-touch-icon-precomposed" href=
|
|
72
|
-
"../assets/ico/apple-touch-icon-57-precomposed.png">
|
|
73
|
-
</head>
|
|
74
|
-
<body>
|
|
75
|
-
<!-- Part 1: Wrap all page content here -->
|
|
76
|
-
<div id="wrap">
|
|
77
|
-
<!-- Begin page content -->
|
|
78
|
-
<div class="container">
|
|
79
|
-
<div class="page-header">
|
|
80
|
-
<h1>Rego</h1>A <a href="http://golang.org" target=
|
|
81
|
-
"_blank"></a>Go regular expression tester
|
|
82
|
-
</div>
|
|
83
|
-
<div class="row-fluid">
|
|
84
|
-
<form id="regexpForm" action="/test_regexp" method="post"
|
|
85
|
-
class="span6" name="regexpForm">
|
|
86
|
-
<label>Your regular expression :</label> <input id=
|
|
87
|
-
"regexpInput" type="text" placeholder="r([a-z]+)go"
|
|
88
|
-
value="r([a-z]+)go"> <label>Test string :</label>
|
|
89
|
-
<textarea id="testStringInput" rows="5" cols="20"
|
|
90
|
-
placeholder="rego">rego</textarea> <label class=
|
|
91
|
-
"checkbox"><input id="findAllSubmatchCheckbox" type=
|
|
92
|
-
"checkbox"> Find all submatch</label> <button id=
|
|
93
|
-
"clearAllFieldsButton" class="btn btn-warning" type=
|
|
94
|
-
"button">Clear all fields</button>
|
|
95
|
-
</form>
|
|
96
|
-
<form class="span6">
|
|
97
|
-
<label>Match :</label>
|
|
98
|
-
<div id="match" class="well"></div><label>Match groups
|
|
99
|
-
:</label>
|
|
100
|
-
<table id="matchGroupsTable" class=
|
|
101
|
-
"table table-bordered">
|
|
102
|
-
<thead>
|
|
103
|
-
<tr>
|
|
104
|
-
<th>#</th>
|
|
105
|
-
<th>Group Name</th>
|
|
106
|
-
<th>Group Match</th>
|
|
107
|
-
</tr>
|
|
108
|
-
</thead>
|
|
109
|
-
<tbody></tbody>
|
|
110
|
-
</table>
|
|
111
|
-
</form>
|
|
112
|
-
</div>
|
|
113
|
-
<div class="row-fluid">
|
|
114
|
-
<div id="quickref" class="well">
|
|
115
|
-
<h3>Go RegExp Quick Reference (<a href=
|
|
116
|
-
"http://rubular.com/" target="_blank">© Rubular</a>)</h3>
|
|
117
|
-
<div style="float:left">
|
|
118
|
-
<table>
|
|
119
|
-
<tbody>
|
|
120
|
-
<tr>
|
|
121
|
-
<td><code>[abc]</code></td>
|
|
122
|
-
<td>A single character of: a, b or c</td>
|
|
123
|
-
</tr>
|
|
124
|
-
<tr>
|
|
125
|
-
<td><code>[^abc]</code></td>
|
|
126
|
-
<td>Any single character except: a, b, or c</td>
|
|
127
|
-
</tr>
|
|
128
|
-
<tr>
|
|
129
|
-
<td><code>[a-z]</code></td>
|
|
130
|
-
<td>Any single character in the range a-z</td>
|
|
131
|
-
</tr>
|
|
132
|
-
<tr>
|
|
133
|
-
<td><code>[a-zA-Z]</code></td>
|
|
134
|
-
<td>Any single character in the range a-z or
|
|
135
|
-
A-Z</td>
|
|
136
|
-
</tr>
|
|
137
|
-
<tr>
|
|
138
|
-
<td><code>^</code></td>
|
|
139
|
-
<td>Start of line</td>
|
|
140
|
-
</tr>
|
|
141
|
-
<tr>
|
|
142
|
-
<td><code>$</code></td>
|
|
143
|
-
<td>End of line</td>
|
|
144
|
-
</tr>
|
|
145
|
-
<tr>
|
|
146
|
-
<td><code>\A</code></td>
|
|
147
|
-
<td>Start of string</td>
|
|
148
|
-
</tr>
|
|
149
|
-
<tr>
|
|
150
|
-
<td><code>\z</code></td>
|
|
151
|
-
<td>End of string</td>
|
|
152
|
-
</tr>
|
|
153
|
-
</tbody>
|
|
154
|
-
</table>
|
|
155
|
-
</div>
|
|
156
|
-
<div style="float:left">
|
|
157
|
-
<table>
|
|
158
|
-
<tbody>
|
|
159
|
-
<tr>
|
|
160
|
-
<td><code>.</code></td>
|
|
161
|
-
<td>Any single character</td>
|
|
162
|
-
</tr>
|
|
163
|
-
<tr>
|
|
164
|
-
<td><code>\s</code></td>
|
|
165
|
-
<td>Any whitespace character</td>
|
|
166
|
-
</tr>
|
|
167
|
-
<tr>
|
|
168
|
-
<td><code>\S</code></td>
|
|
169
|
-
<td>Any non-whitespace character</td>
|
|
170
|
-
</tr>
|
|
171
|
-
<tr>
|
|
172
|
-
<td><code>\d</code></td>
|
|
173
|
-
<td>Any digit</td>
|
|
174
|
-
</tr>
|
|
175
|
-
<tr>
|
|
176
|
-
<td><code>\D</code></td>
|
|
177
|
-
<td>Any non-digit</td>
|
|
178
|
-
</tr>
|
|
179
|
-
<tr>
|
|
180
|
-
<td><code>\w</code></td>
|
|
181
|
-
<td>Any word character (letter, number,
|
|
182
|
-
underscore)</td>
|
|
183
|
-
</tr>
|
|
184
|
-
<tr>
|
|
185
|
-
<td><code>\W</code></td>
|
|
186
|
-
<td>Any non-word character</td>
|
|
187
|
-
</tr>
|
|
188
|
-
<tr>
|
|
189
|
-
<td><code>\b</code></td>
|
|
190
|
-
<td>Any word boundary</td>
|
|
191
|
-
</tr>
|
|
192
|
-
</tbody>
|
|
193
|
-
</table>
|
|
194
|
-
</div>
|
|
195
|
-
<table>
|
|
196
|
-
<tbody>
|
|
197
|
-
<tr>
|
|
198
|
-
<td><code>(...)</code></td>
|
|
199
|
-
<td>Capture everything enclosed</td>
|
|
200
|
-
</tr>
|
|
201
|
-
<tr>
|
|
202
|
-
<td><code>(a|b)</code></td>
|
|
203
|
-
<td>a or b</td>
|
|
204
|
-
</tr>
|
|
205
|
-
<tr>
|
|
206
|
-
<td><code>a?</code></td>
|
|
207
|
-
<td>Zero or one of a</td>
|
|
208
|
-
</tr>
|
|
209
|
-
<tr>
|
|
210
|
-
<td><code>a*</code></td>
|
|
211
|
-
<td>Zero or more of a</td>
|
|
212
|
-
</tr>
|
|
213
|
-
<tr>
|
|
214
|
-
<td><code>a+</code></td>
|
|
215
|
-
<td>One or more of a</td>
|
|
216
|
-
</tr>
|
|
217
|
-
<tr>
|
|
218
|
-
<td><code>a{3}</code></td>
|
|
219
|
-
<td>Exactly 3 of a</td>
|
|
220
|
-
</tr>
|
|
221
|
-
<tr>
|
|
222
|
-
<td><code>a{3,}</code></td>
|
|
223
|
-
<td>3 or more of a</td>
|
|
224
|
-
</tr>
|
|
225
|
-
<tr>
|
|
226
|
-
<td><code>a{3,6}</code></td>
|
|
227
|
-
<td>Between 3 and 6 of a</td>
|
|
228
|
-
</tr>
|
|
229
|
-
</tbody>
|
|
230
|
-
</table>
|
|
231
|
-
<div id="quickrefFooter">
|
|
232
|
-
<p>Full syntax reference at <a href=
|
|
233
|
-
"http://code.google.com/p/re2/wiki/Syntax" target=
|
|
234
|
-
"_blank">http://code.google.com/p/re2/wiki/Syntax</a>.
|
|
235
|
-
Go RegExp doc at <a href=
|
|
236
|
-
"http://golang.org/pkg/regexp/" target=
|
|
237
|
-
"_blank">http://golang.org/pkg/regexp/</a>.</p><!--
|
|
238
|
-
<p>
|
|
239
|
-
options:
|
|
240
|
-
<code>i</code> case insensitive
|
|
241
|
-
<code>m</code> make dot match newlines
|
|
242
|
-
<code>x</code> ignore whitespace in regex
|
|
243
|
-
<code>o</code> perform #{...} substitutions only once
|
|
244
|
-
</p>
|
|
245
|
-
-->
|
|
246
|
-
</div>
|
|
247
|
-
</div>
|
|
248
|
-
</div>
|
|
249
|
-
</div>
|
|
250
|
-
<div id="push"></div>
|
|
251
|
-
</div>
|
|
252
|
-
<div id="footer">
|
|
253
|
-
<div class="container">
|
|
254
|
-
<p class="muted credit">Built by <a href=
|
|
255
|
-
"https://github.com/stevedomin" target="_blank">Steve
|
|
256
|
-
Domin</a>. Inspired by <a href="http://rubular.com/" target=
|
|
257
|
-
"_blank">Rubular</a>. You can find the sources at <a href=
|
|
258
|
-
"https://github.com/stevedomin/rego" target=
|
|
259
|
-
"_blank">github.com/stevedomin/rego</a>.</p>
|
|
260
|
-
</div>
|
|
261
|
-
</div><!-- Le javascript
|
|
262
|
-
================================================== -->
|
|
263
|
-
<!-- Placed at the end of the document so the pages load faster -->
|
|
264
|
-
<script src=
|
|
265
|
-
"//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script>
|
|
266
|
-
|
|
267
|
-
<script type="text/javascript" src="assets/js/rego.js"></script>
|
|
268
|
-
</body>
|
|
269
|
-
</html>
|
|
Binary file
|
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
# 整个文件中,可以通过 ${var} 的方式,使用 manifest 字段指定的文件定义的值
|
|
2
|
-
|
|
3
|
-
# buildscript
|
|
4
|
-
# - 可以为构建脚本的路径地址
|
|
5
|
-
# - 如果构建命令简单,也可以直接写 sh 的命令
|
|
6
|
-
buildscript: ./build.sh
|
|
7
|
-
|
|
8
|
-
# manifest: 指定 lpk 包的 manifest.yml 文件路径
|
|
9
|
-
# manifest: ./lzc-manifest.yml
|
|
10
|
-
|
|
11
|
-
# contentdir: 指定打包的内容,将会打包到 lpk 中
|
|
12
|
-
contentdir: ./build
|
|
13
|
-
|
|
14
|
-
# pkgout: lpk 包的输出路径
|
|
15
|
-
pkgout: ./
|
|
16
|
-
|
|
17
|
-
# icon 指定 lpk 包 icon 的路径路径,如果不指定将会警告
|
|
18
|
-
# icon 仅仅允许 png 后缀的文件
|
|
19
|
-
icon: ./lazycat.png
|
|
20
|
-
|
|
21
|
-
# devshell 自定义应用的开发容器环境
|
|
22
|
-
# - routers 指定应用容器的访问路由
|
|
23
|
-
|
|
24
|
-
# devshell 没有指定 image 的情况,将会默认使用 registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
25
|
-
# devshell:
|
|
26
|
-
# routers:
|
|
27
|
-
# - /=http://127.0.0.1:8080
|
|
28
|
-
|
|
29
|
-
# devshell 指定 image 的情况
|
|
30
|
-
# devshell:
|
|
31
|
-
# routes:
|
|
32
|
-
# - /=http://127.0.0.1:3000
|
|
33
|
-
# image: registry.lazycat.cloud/lzc-cli/devshell:v0.0.5
|
|
34
|
-
|
|
35
|
-
# devshell 指定构建Dockerfile
|
|
36
|
-
# image 字段如果没有定义,将默认使用 ${package}-devshell:${version}
|
|
37
|
-
# devshell:
|
|
38
|
-
# routes:
|
|
39
|
-
# - /=http://127.0.0.1:3000
|
|
40
|
-
# image: ${package}-devshell:${version}
|
|
41
|
-
# pull_policy: build
|
|
42
|
-
# build: .
|
|
43
|
-
|
|
44
|
-
# dvshell 指定开发依赖的情况
|
|
45
|
-
# 这种情况下,选用 alpine:latest 作为基础镜像,在 dependencies 中添加所需要的开发依赖即可
|
|
46
|
-
# 如果 dependencies 和 build 同时存在,将会优先使用 dependencies
|
|
47
|
-
devshell:
|
|
48
|
-
routes:
|
|
49
|
-
- /=http://127.0.0.1:3000
|
|
50
|
-
dependencies:
|
|
51
|
-
- go
|
|
52
|
-
- vim
|
|
53
|
-
# setupscript 每次进入到app container后都会执行的配置脚本
|
|
54
|
-
# - 可以为脚本的路径地址
|
|
55
|
-
# - 如果构建命令简单,也可以直接写 sh 的命令
|
|
56
|
-
# setupscript: export GOPROXY=https://goproxy.cn
|
|
57
|
-
# setupscript: ./setupscript.sh
|
|
58
|
-
setupscript: |
|
|
59
|
-
export GOPROXY=https://goproxy.cn
|
|
60
|
-
export npm_config_registry=https://registry.npmmirror.com
|
package/template/golang/rego.go
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
package main
|
|
2
|
-
|
|
3
|
-
import (
|
|
4
|
-
"encoding/json"
|
|
5
|
-
"flag"
|
|
6
|
-
"fmt"
|
|
7
|
-
"html/template"
|
|
8
|
-
"log"
|
|
9
|
-
"net/http"
|
|
10
|
-
"regexp"
|
|
11
|
-
"strconv"
|
|
12
|
-
)
|
|
13
|
-
|
|
14
|
-
type MatchResultResponse struct {
|
|
15
|
-
Matches [][]string `json:"matches"`
|
|
16
|
-
GroupsName []string `json:"groupsName"`
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
func regExpHandler(rw http.ResponseWriter, req *http.Request) {
|
|
20
|
-
var matches [][]string
|
|
21
|
-
|
|
22
|
-
req.ParseForm()
|
|
23
|
-
regexpString := req.FormValue("regexp")
|
|
24
|
-
testString := req.FormValue("testString")
|
|
25
|
-
findAllSubmatch, _ := strconv.ParseBool(req.FormValue("findAllSubmatch"))
|
|
26
|
-
|
|
27
|
-
log.Printf("Regexp : %s", regexpString)
|
|
28
|
-
log.Printf("Test string : %s", testString)
|
|
29
|
-
log.Printf("Find all : %t", findAllSubmatch)
|
|
30
|
-
|
|
31
|
-
m := &MatchResultResponse{}
|
|
32
|
-
r, err := regexp.Compile(regexpString)
|
|
33
|
-
if err != nil {
|
|
34
|
-
log.Printf("Invalid RegExp : %s \n", regexpString)
|
|
35
|
-
rw.WriteHeader(500)
|
|
36
|
-
fmt.Fprintf(rw, "Invalid RegExp : %s", regexpString)
|
|
37
|
-
return
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
if findAllSubmatch {
|
|
41
|
-
matches = r.FindAllStringSubmatch(testString, -1)
|
|
42
|
-
} else {
|
|
43
|
-
matches = [][]string{r.FindStringSubmatch(testString)}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
log.Println(matches)
|
|
47
|
-
|
|
48
|
-
if len(matches) > 0 {
|
|
49
|
-
m.Matches = matches
|
|
50
|
-
m.GroupsName = r.SubexpNames()[1:]
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
enc := json.NewEncoder(rw)
|
|
54
|
-
enc.Encode(m)
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
func main() {
|
|
58
|
-
indexHtml := flag.String("html", "index.html", "The html template file.")
|
|
59
|
-
port := flag.String("port", "3000", "The http port.")
|
|
60
|
-
flag.Parse()
|
|
61
|
-
|
|
62
|
-
// Main handler (index.html)
|
|
63
|
-
http.HandleFunc("/", func(rw http.ResponseWriter, req *http.Request) {
|
|
64
|
-
t, err := template.ParseFiles(*indexHtml)
|
|
65
|
-
if err != nil {
|
|
66
|
-
log.Fatal(err)
|
|
67
|
-
}
|
|
68
|
-
t.Execute(rw, nil)
|
|
69
|
-
})
|
|
70
|
-
|
|
71
|
-
// Regex testing service
|
|
72
|
-
http.HandleFunc("/test_regexp/", regExpHandler)
|
|
73
|
-
// Static file serving
|
|
74
|
-
http.Handle("/assets/", http.StripPrefix("/assets/", http.FileServer(http.Dir("assets"))))
|
|
75
|
-
|
|
76
|
-
// Launch server
|
|
77
|
-
log.Printf("server listen to %s \n", ":"+*port)
|
|
78
|
-
err := http.ListenAndServe(":"+*port, nil)
|
|
79
|
-
if err != nil {
|
|
80
|
-
log.Fatal(err)
|
|
81
|
-
}
|
|
82
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
# .
|
|
2
|
-
|
|
3
|
-
This template should help get you started developing with Vue 3 in Vite.
|
|
4
|
-
|
|
5
|
-
## Recommended IDE Setup
|
|
6
|
-
|
|
7
|
-
[VSCode](https://code.visualstudio.com/) + [Volar](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.volar) (and disable Vetur) + [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin).
|
|
8
|
-
|
|
9
|
-
## Type Support for `.vue` Imports in TS
|
|
10
|
-
|
|
11
|
-
TypeScript cannot handle type information for `.vue` imports by default, so we replace the `tsc` CLI with `vue-tsc` for type checking. In editors, we need [TypeScript Vue Plugin (Volar)](https://marketplace.visualstudio.com/items?itemName=johnsoncodehk.vscode-typescript-vue-plugin) to make the TypeScript language service aware of `.vue` types.
|
|
12
|
-
|
|
13
|
-
If the standalone TypeScript plugin doesn't feel fast enough to you, Volar has also implemented a [Take Over Mode](https://github.com/johnsoncodehk/volar/discussions/471#discussioncomment-1361669) that is more performant. You can enable it by the following steps:
|
|
14
|
-
|
|
15
|
-
1. Disable the built-in TypeScript Extension
|
|
16
|
-
1. Run `Extensions: Show Built-in Extensions` from VSCode's command palette
|
|
17
|
-
2. Find `TypeScript and JavaScript Language Features`, right click and select `Disable (Workspace)`
|
|
18
|
-
2. Reload the VSCode window by running `Developer: Reload Window` from the command palette.
|
|
19
|
-
|
|
20
|
-
## Customize configuration
|
|
21
|
-
|
|
22
|
-
See [Vite Configuration Reference](https://vitejs.dev/config/).
|
|
23
|
-
|
|
24
|
-
## Project Setup
|
|
25
|
-
|
|
26
|
-
```sh
|
|
27
|
-
npm install
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
### Compile and Hot-Reload for Development
|
|
31
|
-
|
|
32
|
-
```sh
|
|
33
|
-
npm run dev
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
### Type-Check, Compile and Minify for Production
|
|
37
|
-
|
|
38
|
-
```sh
|
|
39
|
-
npm run build
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
### Lint with [ESLint](https://eslint.org/)
|
|
43
|
-
|
|
44
|
-
```sh
|
|
45
|
-
npm run lint
|
|
46
|
-
```
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
/* eslint-env node */
|
|
2
|
-
require("@rushstack/eslint-patch/modern-module-resolution")
|
|
3
|
-
|
|
4
|
-
module.exports = {
|
|
5
|
-
root: true,
|
|
6
|
-
extends: [
|
|
7
|
-
"plugin:vue/vue3-essential",
|
|
8
|
-
"eslint:recommended",
|
|
9
|
-
"@vue/eslint-config-typescript/recommended",
|
|
10
|
-
"@vue/eslint-config-prettier",
|
|
11
|
-
],
|
|
12
|
-
env: {
|
|
13
|
-
"vue/setup-compiler-macros": true,
|
|
14
|
-
node: true,
|
|
15
|
-
},
|
|
16
|
-
overrides: [
|
|
17
|
-
{
|
|
18
|
-
files: ["src/**/*.vue"],
|
|
19
|
-
rules: {
|
|
20
|
-
"vue/multi-word-component-names": 0,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
# Logs
|
|
2
|
-
logs
|
|
3
|
-
*.log
|
|
4
|
-
npm-debug.log*
|
|
5
|
-
yarn-debug.log*
|
|
6
|
-
yarn-error.log*
|
|
7
|
-
pnpm-debug.log*
|
|
8
|
-
lerna-debug.log*
|
|
9
|
-
|
|
10
|
-
node_modules
|
|
11
|
-
.DS_Store
|
|
12
|
-
dist
|
|
13
|
-
dist-ssr
|
|
14
|
-
coverage
|
|
15
|
-
*.local
|
|
16
|
-
|
|
17
|
-
/cypress/videos/
|
|
18
|
-
/cypress/screenshots/
|
|
19
|
-
android
|
|
20
|
-
|
|
21
|
-
# Editor directories and files
|
|
22
|
-
.vscode/*
|
|
23
|
-
!.vscode/extensions.json
|
|
24
|
-
.idea
|
|
25
|
-
*.suo
|
|
26
|
-
*.ntvs*
|
|
27
|
-
*.njsproj
|
|
28
|
-
*.sln
|
|
29
|
-
*.sw?
|