underpost 2.8.881 → 2.8.882
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/.github/workflows/release.cd.yml +1 -2
- package/README.md +46 -36
- package/cli.md +86 -86
- package/conf.js +1 -0
- package/manifests/deployment/dd-default-development/deployment.yaml +2 -2
- package/manifests/deployment/dd-test-development/deployment.yaml +6 -6
- package/package.json +1 -1
- package/src/api/document/document.service.js +9 -1
- package/src/cli/repository.js +2 -0
- package/src/client/components/core/Auth.js +258 -89
- package/src/client/components/core/BtnIcon.js +10 -1
- package/src/client/components/core/CssCore.js +36 -27
- package/src/client/components/core/Docs.js +189 -85
- package/src/client/components/core/LoadingAnimation.js +5 -10
- package/src/client/components/core/Modal.js +255 -120
- package/src/client/components/core/ObjectLayerEngine.js +154 -158
- package/src/client/components/core/Panel.js +2 -0
- package/src/client/components/core/PanelForm.js +94 -60
- package/src/client/components/core/Router.js +15 -15
- package/src/client/components/core/ToolTip.js +83 -19
- package/src/client/components/core/Translate.js +1 -1
- package/src/client/components/core/VanillaJs.js +4 -3
- package/src/client/components/core/windowGetDimensions.js +202 -0
- package/src/client/components/default/MenuDefault.js +11 -0
- package/src/client/ssr/Render.js +1 -1
- package/src/index.js +1 -1
- package/src/server/auth.js +68 -17
- package/src/server/crypto.js +195 -76
- package/src/server/peer.js +47 -5
- package/src/server/process.js +85 -1
- package/src/server/runtime.js +13 -10
- package/test/crypto.test.js +117 -0
|
@@ -1,12 +1,9 @@
|
|
|
1
1
|
import { Badge } from './Badge.js';
|
|
2
2
|
import { BtnIcon } from './BtnIcon.js';
|
|
3
3
|
import { Css, renderCssAttr, simpleIconsRender, ThemeEvents, Themes } from './Css.js';
|
|
4
|
-
import {
|
|
5
|
-
import { buildBadgeToolTipMenuOption, Modal, renderMenuLabel, renderViewTitle } from './Modal.js';
|
|
4
|
+
import { buildBadgeToolTipMenuOption, Modal, renderViewTitle } from './Modal.js';
|
|
6
5
|
import { listenQueryPathInstance, setQueryPath, closeModalRouteChangeEvent, getProxyPath } from './Router.js';
|
|
7
|
-
import { Translate } from './Translate.js';
|
|
8
6
|
import { htmls, s } from './VanillaJs.js';
|
|
9
|
-
import Sortable from 'sortablejs';
|
|
10
7
|
|
|
11
8
|
// https://mintlify.com/docs/quickstart
|
|
12
9
|
|
|
@@ -159,7 +156,13 @@ const Docs = {
|
|
|
159
156
|
id: options.idModal,
|
|
160
157
|
routeId: 'docs',
|
|
161
158
|
event: (path) => {
|
|
159
|
+
Modal.subMenuBtnClass['docs'].open = !Modal.subMenuBtnClass['docs'].open;
|
|
162
160
|
if (s(`.btn-docs-${path}`)) s(`.btn-docs-${path}`).click();
|
|
161
|
+
if (Modal.mobileModal()) {
|
|
162
|
+
setTimeout(() => {
|
|
163
|
+
s(`.btn-close-modal-menu`).click();
|
|
164
|
+
});
|
|
165
|
+
}
|
|
163
166
|
},
|
|
164
167
|
});
|
|
165
168
|
});
|
|
@@ -183,98 +186,199 @@ const Docs = {
|
|
|
183
186
|
tabHref = docData.url();
|
|
184
187
|
docMenuRender += html`
|
|
185
188
|
${await BtnIcon.Render({
|
|
186
|
-
class: `in wfa main-btn-menu btn-docs-${docData.type}`,
|
|
187
|
-
label: html`<span class="menu-btn-icon">${docData.icon}</span
|
|
188
|
-
><span class="menu-label-text"> ${docData.text} </span>`,
|
|
189
|
+
class: `in wfa main-btn-menu submenu-btn btn-docs btn-docs-${docData.type}`,
|
|
190
|
+
label: html`<span class="inl menu-btn-icon">${docData.icon}</span
|
|
191
|
+
><span class="menu-label-text menu-label-text-docs"> ${docData.text} </span>`,
|
|
189
192
|
tabHref,
|
|
190
|
-
handleContainerClass: 'handle-btn-container',
|
|
191
193
|
tooltipHtml: await Badge.Render(buildBadgeToolTipMenuOption(docData.text, 'right')),
|
|
192
|
-
|
|
193
|
-
handleContainerClass: 'handle-btn-container',
|
|
194
|
+
useMenuBtn: true,
|
|
194
195
|
})}
|
|
195
196
|
`;
|
|
196
197
|
}
|
|
198
|
+
// s(`.menu-btn-container-children`).classList.remove('hide');
|
|
199
|
+
// htmls(`.nav-path-display-${'modal-menu'}`, location.pathname);
|
|
197
200
|
|
|
198
|
-
htmls('.menu-btn-container-children',
|
|
199
|
-
if (s(`.menu-btn-container-main`)) s(`.menu-btn-container-main`).classList.add('hide');
|
|
200
|
-
htmls(`.nav-path-display-${'modal-menu'}`, location.pathname);
|
|
201
|
+
htmls('.menu-btn-container-children-docs', docMenuRender);
|
|
201
202
|
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
/**
|
|
210
|
-
* Get the order of elements. Called once during initialization.
|
|
211
|
-
* @param {Sortable} sortable
|
|
212
|
-
* @returns {Array}
|
|
213
|
-
*/
|
|
214
|
-
get: function (sortable) {
|
|
215
|
-
const order = localStorage.getItem(sortable.options.group.name);
|
|
216
|
-
return order ? order.split('|') : [];
|
|
203
|
+
{
|
|
204
|
+
const docsData = [
|
|
205
|
+
{
|
|
206
|
+
id: 'getting-started',
|
|
207
|
+
icon: 'rocket',
|
|
208
|
+
title: 'Getting Started',
|
|
209
|
+
description: 'Learn the basics and get started with our platform',
|
|
217
210
|
},
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
set: function (sortable) {
|
|
224
|
-
const order = sortable.toArray();
|
|
225
|
-
localStorage.setItem(sortable.options.group.name, order.join('|'));
|
|
211
|
+
{
|
|
212
|
+
id: 'api-docs',
|
|
213
|
+
icon: 'code',
|
|
214
|
+
title: 'API Reference',
|
|
215
|
+
description: 'Detailed documentation of our API endpoints',
|
|
226
216
|
},
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
217
|
+
{
|
|
218
|
+
id: 'guides',
|
|
219
|
+
icon: 'book',
|
|
220
|
+
title: 'Guides',
|
|
221
|
+
description: 'Step-by-step tutorials and how-to guides',
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
id: 'demo',
|
|
225
|
+
icon: 'laptop-code',
|
|
226
|
+
title: 'Demo',
|
|
227
|
+
description: 'Practical examples and code snippets',
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
id: 'faq',
|
|
231
|
+
icon: 'question-circle',
|
|
232
|
+
title: 'FAQ',
|
|
233
|
+
description: 'Frequently asked questions',
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: 'community',
|
|
237
|
+
icon: 'users',
|
|
238
|
+
title: 'Community',
|
|
239
|
+
description: 'Join our developer community',
|
|
240
|
+
},
|
|
241
|
+
];
|
|
238
242
|
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
243
|
+
return html`
|
|
244
|
+
<style>
|
|
245
|
+
.docs-landing {
|
|
246
|
+
padding: 2rem;
|
|
247
|
+
max-width: 1200px;
|
|
248
|
+
margin: 0 auto;
|
|
249
|
+
height: 100%;
|
|
250
|
+
box-sizing: border-box;
|
|
251
|
+
}
|
|
252
|
+
.docs-header {
|
|
253
|
+
text-align: center;
|
|
254
|
+
margin-bottom: 3rem;
|
|
255
|
+
opacity: 0;
|
|
256
|
+
animation: fadeInUp 0.6s ease-out forwards;
|
|
257
|
+
}
|
|
258
|
+
.docs-header h1 {
|
|
259
|
+
font-size: 2.5rem;
|
|
260
|
+
margin: 0 0 1rem;
|
|
261
|
+
line-height: 1.2;
|
|
262
|
+
}
|
|
263
|
+
.docs-header p {
|
|
264
|
+
font-size: 1.2rem;
|
|
265
|
+
max-width: 700px;
|
|
266
|
+
margin: 0 auto 2rem;
|
|
267
|
+
line-height: 1.6;
|
|
268
|
+
}
|
|
269
|
+
.docs-grid {
|
|
270
|
+
display: grid;
|
|
271
|
+
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
|
|
272
|
+
gap: 1.5rem;
|
|
273
|
+
margin: 0;
|
|
274
|
+
padding: 0;
|
|
275
|
+
list-style: none;
|
|
276
|
+
}
|
|
277
|
+
.docs-card-container {
|
|
278
|
+
cursor: pointer;
|
|
279
|
+
opacity: 0;
|
|
280
|
+
margin-bottom: 3rem;
|
|
281
|
+
animation: fadeInUp 0.6s ease-out forwards;
|
|
282
|
+
}
|
|
283
|
+
.docs-card {
|
|
284
|
+
border-radius: 8px;
|
|
285
|
+
padding: 1.5rem;
|
|
286
|
+
display: flex;
|
|
287
|
+
flex-direction: column;
|
|
288
|
+
height: 100%;
|
|
289
|
+
position: relative;
|
|
290
|
+
transition: all 0.3s ease-in-out;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.card-icon {
|
|
294
|
+
font-size: 1.75rem;
|
|
295
|
+
width: 56px;
|
|
296
|
+
height: 56px;
|
|
297
|
+
border-radius: 12px;
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
justify-content: center;
|
|
301
|
+
margin: 0 0 1.25rem;
|
|
302
|
+
transition: transform 0.2s ease;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
.card-content {
|
|
306
|
+
flex: 1;
|
|
307
|
+
}
|
|
308
|
+
.card-content h3 {
|
|
309
|
+
margin: 0 0 0.5rem;
|
|
310
|
+
font-size: 1.25rem;
|
|
311
|
+
font-weight: 600;
|
|
312
|
+
}
|
|
313
|
+
.card-content p {
|
|
314
|
+
margin: 0;
|
|
315
|
+
font-size: 0.95rem;
|
|
316
|
+
transition: color 0.3s ease;
|
|
317
|
+
}
|
|
318
|
+
</style>
|
|
319
|
+
|
|
320
|
+
<style>
|
|
321
|
+
${docsData
|
|
322
|
+
.map(
|
|
323
|
+
(_, index) => css`
|
|
324
|
+
.docs-card-container:nth-child(${index + 1}) {
|
|
325
|
+
animation-delay: ${0.1 * (index + 1)}s;
|
|
326
|
+
}
|
|
327
|
+
`,
|
|
328
|
+
)
|
|
329
|
+
.join('')}
|
|
330
|
+
</style>
|
|
250
331
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
332
|
+
<div class="docs-landing">
|
|
333
|
+
<div class="docs-header">
|
|
334
|
+
<h1>Documentation</h1>
|
|
335
|
+
<p>
|
|
336
|
+
Find everything you need to build amazing applications with our platform. Get started with our guides, API
|
|
337
|
+
reference, and examples.
|
|
338
|
+
</p>
|
|
339
|
+
<!--
|
|
340
|
+
<div class="search-bar">
|
|
341
|
+
<i class="fas fa-search"></i>
|
|
342
|
+
<input type="text" placeholder="Search documentation..." id="docs-search">
|
|
343
|
+
</div>
|
|
344
|
+
-->
|
|
345
|
+
</div>
|
|
346
|
+
|
|
347
|
+
<ul class="docs-grid">
|
|
348
|
+
${docsData
|
|
349
|
+
.map((item) => {
|
|
350
|
+
setTimeout(() => {
|
|
351
|
+
if (s(`.docs-card-container-${item.id}`)) {
|
|
352
|
+
s(`.docs-card-container-${item.id}`).onclick = () => {
|
|
353
|
+
if (item.id.match('demo')) {
|
|
354
|
+
location.href = 'https://underpostnet.github.io/pwa-microservices-template-ghpkg/';
|
|
355
|
+
} else if (item.id.match('api')) {
|
|
356
|
+
if (s(`.btn-docs-api`)) s(`.btn-docs-api`).click();
|
|
357
|
+
} else {
|
|
358
|
+
if (s(`.btn-docs-src`)) s(`.btn-docs-src`).click();
|
|
359
|
+
}
|
|
360
|
+
};
|
|
361
|
+
}
|
|
362
|
+
});
|
|
363
|
+
return html`
|
|
364
|
+
<div class="in docs-card-container docs-card-container-${item.id}">
|
|
365
|
+
<li class="docs-card">
|
|
366
|
+
<div class="card-icon">
|
|
367
|
+
<i class="fas fa-${item.icon}"></i>
|
|
368
|
+
</div>
|
|
369
|
+
<div class="card-content">
|
|
370
|
+
<h3>${item.title}</h3>
|
|
371
|
+
<p>${item.description}</p>
|
|
372
|
+
</div>
|
|
373
|
+
</li>
|
|
374
|
+
</div>
|
|
375
|
+
`;
|
|
376
|
+
})
|
|
377
|
+
.join('')}
|
|
378
|
+
</ul>
|
|
379
|
+
</div>
|
|
380
|
+
`;
|
|
381
|
+
}
|
|
278
382
|
},
|
|
279
383
|
};
|
|
280
384
|
|
|
@@ -129,16 +129,11 @@ const LoadingAnimation = {
|
|
|
129
129
|
removeSplashScreen: function (backgroundContainer, callBack) {
|
|
130
130
|
if (s(`.clean-cache-container`)) s(`.clean-cache-container`).style.display = 'none';
|
|
131
131
|
if (!backgroundContainer) backgroundContainer = '.ssr-background';
|
|
132
|
-
if (s(backgroundContainer))
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
if (s(`.modal-menu`)) s(`.modal-menu`).classList.remove('hide');
|
|
138
|
-
if (s(`.main-body-btn-container`)) s(`.main-body-btn-container`).classList.remove('hide');
|
|
139
|
-
if (callBack) callBack();
|
|
140
|
-
}, 300);
|
|
141
|
-
});
|
|
132
|
+
if (s(backgroundContainer)) {
|
|
133
|
+
s(backgroundContainer).style.display = 'none';
|
|
134
|
+
if (s(`.main-body-btn-container`)) s(`.main-body-btn-container`).classList.remove('hide');
|
|
135
|
+
if (callBack) callBack();
|
|
136
|
+
}
|
|
142
137
|
},
|
|
143
138
|
|
|
144
139
|
RenderCurrentSrcLoad: function (event) {
|