zibri-cli 2.2.0 → 2.2.1
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/assets/public/assets.svg +3 -1
- package/assets/public/home.svg +3 -0
- package/assets/public/lib/chartjs-adapter-date-fns.js +7 -0
- package/assets/public/metrics.svg +3 -0
- package/assets/public/style.css +4 -127
- package/dist/commands/new/new.command.js +164 -26
- package/dist/commands/new/new.command.js.map +1 -1
- package/dist/encapsulation/fs.utilities.js +13 -3
- package/dist/encapsulation/fs.utilities.js.map +1 -1
- package/package.json +2 -2
- package/templates/components/base-page.tsx.tpl +24 -0
- package/templates/components/button.tsx.tpl +34 -0
- package/templates/components/card.tsx.tpl +13 -0
- package/templates/components/chart.tsx.tpl +19 -0
- package/templates/components/checkbox.tsx.tpl +24 -0
- package/templates/components/dialog.tsx.tpl +14 -0
- package/templates/components/empty-page.tsx.tpl +34 -0
- package/templates/components/file-entry.tsx.tpl +31 -0
- package/templates/components/form.tsx.tpl +17 -0
- package/templates/components/heading.tsx.tpl +19 -0
- package/templates/components/link.tsx.tpl +29 -0
- package/templates/components/metrics-status.tsx.tpl +92 -0
- package/templates/components/navbar.tsx.tpl +31 -0
- package/templates/components/network-chart.tsx.tpl +99 -0
- package/templates/components/request-duration-chart.tsx.tpl +83 -0
- package/templates/components/requests-per-second-chart.tsx.tpl +167 -0
- package/templates/components/resource-usage-chart.tsx.tpl +121 -0
- package/templates/components/textarea.tsx.tpl +23 -0
- package/templates/pages/assets.tsx.tpl +23 -0
- package/templates/pages/error.tsx.tpl +42 -0
- package/templates/pages/home.tsx.tpl +44 -0
- package/templates/pages/mailing-list-preferences.tsx.tpl +149 -0
- package/templates/pages/mailing-list-unsubscribe-confirmation.tsx.tpl +40 -0
- package/templates/pages/metrics.tsx.tpl +82 -0
- package/assets/public/socket.io.js +0 -4908
- package/templates/pages/assets.hbs +0 -25
- package/templates/pages/base-page.hbs +0 -15
- package/templates/pages/error.hbs +0 -41
- package/templates/pages/index.hbs +0 -20
- package/templates/pages/mailing-list-preferences.hbs +0 -152
- package/templates/pages/mailing-list-unsubscribe.hbs +0 -25
- package/templates/pages/metrics.hbs +0 -443
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
|
|
4
|
-
<head>
|
|
5
|
-
<meta charset="utf-8">
|
|
6
|
-
<title>Assets | {{name}}</title>
|
|
7
|
-
<link rel="icon" href="/assets/favicon.png">
|
|
8
|
-
<link rel="stylesheet" href="/assets/style.css">
|
|
9
|
-
</head>
|
|
10
|
-
|
|
11
|
-
<body>
|
|
12
|
-
<div class="container">
|
|
13
|
-
<div style="display: flex; flex-direction: column; gap: 30px; width: 500px;">
|
|
14
|
-
<div class="box" style="display: flex; align-items: center; margin: 0px; max-width: 100%;">
|
|
15
|
-
<a href="/"><img src="/assets/logo.jpg" width="100" height="100"></a>
|
|
16
|
-
<a href="/" style="margin-left: auto; margin-right: auto;"><h1>{{name}}</h1></a>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="box" style="margin: 0px; max-width: 100%; height: 500px; overflow: scroll;">
|
|
19
|
-
{{{renderTree tree}}}
|
|
20
|
-
</div>
|
|
21
|
-
</div>
|
|
22
|
-
</div>
|
|
23
|
-
</body>
|
|
24
|
-
|
|
25
|
-
</html>
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>{{base.title}}</title>
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
-
<link rel="icon" type="image/png" href="/assets/favicon.png">
|
|
8
|
-
<link rel="stylesheet" href="/assets/style.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div class="container">
|
|
12
|
-
{{{content}}}
|
|
13
|
-
</div>
|
|
14
|
-
</body>
|
|
15
|
-
</html>
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="utf-8">
|
|
5
|
-
<title>{{error.title}} | {{name}}</title>
|
|
6
|
-
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
7
|
-
<link rel="icon" type="image/png" href="/assets/favicon.png">
|
|
8
|
-
<link rel="stylesheet" href="/assets/style.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body>
|
|
11
|
-
<div class="container">
|
|
12
|
-
<div style="display: flex; flex-direction: column; gap: 15px;">
|
|
13
|
-
|
|
14
|
-
<div style="display: flex; gap: 30px;">
|
|
15
|
-
<div class="box" style="padding-top: 0px; max-width: 250px;">
|
|
16
|
-
<a href="/"><img src="/assets/logo.jpg" width="250px" height="250px"></a>
|
|
17
|
-
<a href="/"><h2>{{name}}</h2></a>
|
|
18
|
-
</div>
|
|
19
|
-
<div style="width: 500px; display: flex; flex-direction: column; gap: 15px">
|
|
20
|
-
<div class="box" style="margin: 0px; max-width: 100%;">
|
|
21
|
-
<h1 style="text-align: left;">{{error.status}}: {{error.title}}</h1>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="box" style="margin: 0px; max-width: 100%; flex: 1;">
|
|
24
|
-
<div style="display: flex; flex-direction: column; gap: 8px;">
|
|
25
|
-
{{#each error.paragraphs}}
|
|
26
|
-
<p style="font-size: 110%;">
|
|
27
|
-
{{this}}
|
|
28
|
-
</p>
|
|
29
|
-
{{/each}}
|
|
30
|
-
</div>
|
|
31
|
-
</div>
|
|
32
|
-
<div class="box" style="margin: 0px; max-width: 100%; display: flex; align-items: center; gap: 5px;">
|
|
33
|
-
<img src="/assets/open-api/swagger.png" width="30px" height="30px">
|
|
34
|
-
<a href="/explorer"><h2>OpenAPI Explorer</h2></a>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
|
-
</div>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
</body>
|
|
41
|
-
</html>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
<div style="display: flex; flex-direction: column; gap: 30px;">
|
|
2
|
-
<div class="box" style="padding-top: 0px; width: 300px;">
|
|
3
|
-
<img src="/assets/logo.jpg" width="300px" height="300px">
|
|
4
|
-
<h1>{{name}}</h1>
|
|
5
|
-
</div>
|
|
6
|
-
<div style="display: flex; gap: 20px; justify-content: space-evenly; width: 600px;">
|
|
7
|
-
<div class="box" style="flex: 1; margin: 0px; max-width: 100%;">
|
|
8
|
-
<div style="display: flex; align-items: center; justify-content: center; gap: 5px;">
|
|
9
|
-
<img style="filter: brightness(0) saturate(100%) invert(60%) sepia(100%) saturate(700%) hue-rotate(15deg) contrast(1.1);" src="/assets/assets.svg" width="30px" height="30px">
|
|
10
|
-
<a href="/assets"><h2>Assets</h2></a>
|
|
11
|
-
</div>
|
|
12
|
-
</div>
|
|
13
|
-
<div class="box" style="flex: 1; margin: 0px; max-width: 100%;">
|
|
14
|
-
<div style="display: flex; align-items: center; justify-content: center; gap: 5px;">
|
|
15
|
-
<img src="/assets/open-api/swagger.png" width="30px" height="30px">
|
|
16
|
-
<a href="/explorer"><h2>OpenAPI Explorer</h2></a>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
</div>
|
|
@@ -1,152 +0,0 @@
|
|
|
1
|
-
<div class="box" style="display: flex; flex-direction: column; gap: 24px;">
|
|
2
|
-
<img src="/assets/logo.jpg" width="200px" height="200px" style="display: block; margin-left: auto; margin-right: auto;">
|
|
3
|
-
<p style="text-align: center;">{{maskEmail subscriber.email}}</p>
|
|
4
|
-
<h1 style="margin-bottom: 8px; margin-top: 8px;">
|
|
5
|
-
Mailing list preferences
|
|
6
|
-
</h1>
|
|
7
|
-
<ul>
|
|
8
|
-
{{#each mailingLists}}
|
|
9
|
-
<li style="margin-bottom: 8px;">
|
|
10
|
-
<div style="display: flex; align-items: center; font-size: 16px; column-gap: 8px;">
|
|
11
|
-
<input
|
|
12
|
-
type="checkbox"
|
|
13
|
-
id="{{this.data.id}}"
|
|
14
|
-
onchange="updateCheckedMailingListIds(event)"
|
|
15
|
-
{{#if this.isSubscribedTo}}checked{{/if}}
|
|
16
|
-
>
|
|
17
|
-
<label style="cursor: pointer;" for="{{this.data.id}}">{{this.data.name}}</label>
|
|
18
|
-
</div>
|
|
19
|
-
</li>
|
|
20
|
-
{{/each}}
|
|
21
|
-
</ul>
|
|
22
|
-
<button style="margin-left: auto; margin-right: auto;" onclick="update()">Update</button>
|
|
23
|
-
<div class="status-bar">
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
|
|
27
|
-
<script>
|
|
28
|
-
let checkedMailingListIdsPriorChanges = getCheckedMailingListIds();
|
|
29
|
-
let currentCheckedMailingListIds = getCheckedMailingListIds();
|
|
30
|
-
document.querySelector('button').disabled = true;
|
|
31
|
-
|
|
32
|
-
function updateCheckedMailingListIds(event) {
|
|
33
|
-
const targetId = event.target.id;
|
|
34
|
-
const isChecked = event.target.checked;
|
|
35
|
-
|
|
36
|
-
if (isChecked) {
|
|
37
|
-
currentCheckedMailingListIds.push(targetId);
|
|
38
|
-
}
|
|
39
|
-
else {
|
|
40
|
-
currentCheckedMailingListIds = currentCheckedMailingListIds.filter(id => id !== targetId);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
checkIsDirty();
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
function checkIsDirty() {
|
|
47
|
-
if (checkedMailingListIdsPriorChanges.find(id => !currentCheckedMailingListIds.includes(id))) {
|
|
48
|
-
document.querySelector('button').disabled = false;
|
|
49
|
-
return;
|
|
50
|
-
}
|
|
51
|
-
if (currentCheckedMailingListIds.find(id => !checkedMailingListIdsPriorChanges.includes(id))) {
|
|
52
|
-
document.querySelector('button').disabled = false;
|
|
53
|
-
return;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
document.querySelector('button').disabled = true;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
function getCheckedMailingListIds() {
|
|
60
|
-
const checkboxes = document.querySelectorAll('input');
|
|
61
|
-
const mailingListIds = [];
|
|
62
|
-
for (const checkbox of checkboxes) {
|
|
63
|
-
if (checkbox.checked) {
|
|
64
|
-
mailingListIds.push(checkbox.id);
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
return mailingListIds;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
async function update() {
|
|
71
|
-
setIsLoading();
|
|
72
|
-
|
|
73
|
-
const success = (await fetch(
|
|
74
|
-
`{{base.baseUrl}}{{mailingListBaseRoute}}/preferences?subscriberId={{subscriber.id}}`,
|
|
75
|
-
{ method: 'PATCH', body: JSON.stringify({ mailingListIds: currentCheckedMailingListIds }), headers: { 'content-type': 'application/json' } }
|
|
76
|
-
)).ok;
|
|
77
|
-
|
|
78
|
-
if (success) {
|
|
79
|
-
setIsSuccess();
|
|
80
|
-
return;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
for (const id of mailingListIds) {
|
|
84
|
-
if (!checkedMailingListIdsPriorChanges.includes(id)) {
|
|
85
|
-
document.getElementById(id).checked = false;
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
for (const id of checkedMailingListIdsPriorChanges) {
|
|
89
|
-
if (!mailingListIds.includes(id)) {
|
|
90
|
-
document.getElementById(id).checked = true;
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
setIsFailed();
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
function reset() {
|
|
97
|
-
checkedMailingListIdsPriorChanges = getCheckedMailingListIds();
|
|
98
|
-
checkIsDirty();
|
|
99
|
-
}
|
|
100
|
-
function removeStatus() {
|
|
101
|
-
document.querySelector('.status-bar').classList.remove('status-loading');
|
|
102
|
-
document.querySelector('.status-bar').classList.remove('status-success');
|
|
103
|
-
document.querySelector('.status-bar').classList.remove('status-failed');
|
|
104
|
-
document.querySelector('.status-bar').textContent = null;
|
|
105
|
-
}
|
|
106
|
-
function setIsLoading() {
|
|
107
|
-
document.querySelector('button').disabled = true;
|
|
108
|
-
document.querySelector('.status-bar').classList.add('status-loading');
|
|
109
|
-
document.querySelector('.status-bar').textContent = 'loading...';
|
|
110
|
-
}
|
|
111
|
-
function setIsSuccess() {
|
|
112
|
-
removeStatus();
|
|
113
|
-
document.querySelector('.status-bar').classList.add('status-success');
|
|
114
|
-
document.querySelector('.status-bar').textContent = 'preferences updated';
|
|
115
|
-
reset();
|
|
116
|
-
setTimeout(removeStatus, 3000);
|
|
117
|
-
}
|
|
118
|
-
function setIsFailed() {
|
|
119
|
-
removeStatus();
|
|
120
|
-
document.querySelector('.status-bar').classList.add('status-failed');
|
|
121
|
-
document.querySelector('.status-bar').textContent = 'failed updating preferences';
|
|
122
|
-
reset();
|
|
123
|
-
setTimeout(removeStatus, 3000);
|
|
124
|
-
}
|
|
125
|
-
</script>
|
|
126
|
-
|
|
127
|
-
<style>
|
|
128
|
-
.status-bar {
|
|
129
|
-
display: flex;
|
|
130
|
-
justify-content: center;
|
|
131
|
-
align-items: center;
|
|
132
|
-
height: 24px;
|
|
133
|
-
margin-top: -9px;
|
|
134
|
-
margin-bottom: -15px;
|
|
135
|
-
margin-left: -15px;
|
|
136
|
-
margin-right: -15px;
|
|
137
|
-
border-bottom-right-radius: 5px;
|
|
138
|
-
border-bottom-left-radius: 5px;
|
|
139
|
-
}
|
|
140
|
-
.status-loading {
|
|
141
|
-
background-color: gray;
|
|
142
|
-
transition: 0.3s ease;
|
|
143
|
-
}
|
|
144
|
-
.status-success {
|
|
145
|
-
background-color: green;
|
|
146
|
-
transition: 0.3s ease;
|
|
147
|
-
}
|
|
148
|
-
.status-failed {
|
|
149
|
-
background-color: red;
|
|
150
|
-
transition: 0.3s ease;
|
|
151
|
-
}
|
|
152
|
-
</style>
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
<div class="box" style="text-align: center; display: flex; flex-direction: column; gap: 24px;">
|
|
2
|
-
<img src="/assets/logo.jpg" width="200px" height="200px" style="display: block; margin-left: auto; margin-right: auto;">
|
|
3
|
-
<p>{{maskEmail subscriber.email}}</p>
|
|
4
|
-
<h1 style="margin-bottom: 8px; margin-top: 8px;">
|
|
5
|
-
You've unsubscribed from
|
|
6
|
-
<br>
|
|
7
|
-
{{mailingList.name}}
|
|
8
|
-
</h1>
|
|
9
|
-
<p style="margin-bottom: 16px">
|
|
10
|
-
We are sad to see you go 😕
|
|
11
|
-
</p>
|
|
12
|
-
<!-- <p>
|
|
13
|
-
If you have any feedback for us, we would be happy to hear it:
|
|
14
|
-
</p>
|
|
15
|
-
<textarea style="margin-left: 16px; margin-right: 16px;"></textarea>
|
|
16
|
-
<button style="margin-left: auto; margin-right: auto;" onclick="console.debug('Hello World')">Send</button> -->
|
|
17
|
-
<div>
|
|
18
|
-
<hr>
|
|
19
|
-
</div>
|
|
20
|
-
<p>
|
|
21
|
-
Unsubscribed by accident?
|
|
22
|
-
<br>
|
|
23
|
-
<a href="">Subscribe again</a> or <a href="/mailing-lists/preferences">manage other email preferences</a>
|
|
24
|
-
</p>
|
|
25
|
-
</div>
|