@zenuml/core 3.35.1 → 3.36.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/dist/zenuml.esm.mjs +4603 -4594
- package/dist/zenuml.js +66 -66
- package/package.json +1 -1
- package/test-mermaid-zenuml.html +57 -0
package/package.json
CHANGED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
|
6
|
+
<title>Mermaid Zenuml Test Page</title>
|
|
7
|
+
</head>
|
|
8
|
+
|
|
9
|
+
<body>
|
|
10
|
+
<h1>Zenuml demos</h1>
|
|
11
|
+
<pre class="mermaid">
|
|
12
|
+
zenuml
|
|
13
|
+
BookLibService.Borrow(id) {
|
|
14
|
+
User = Session.GetUser()
|
|
15
|
+
if(User.isActive) {
|
|
16
|
+
try {
|
|
17
|
+
BookRepository.Update(id, onLoan, User)
|
|
18
|
+
receipt = new Receipt(id, dueDate)
|
|
19
|
+
} catch (BookNotFoundException) {
|
|
20
|
+
ErrorService.onException(BookNotFoundException)
|
|
21
|
+
} finally {
|
|
22
|
+
Connection.close()
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return receipt
|
|
26
|
+
}
|
|
27
|
+
</pre>
|
|
28
|
+
<pre class="mermaid">
|
|
29
|
+
zenuml
|
|
30
|
+
title Async Messages (SPA Authentication)
|
|
31
|
+
// ```
|
|
32
|
+
// GET https://${account.namespace}/authorize/?
|
|
33
|
+
// response_type=token
|
|
34
|
+
// &client_id=${account.clientId}
|
|
35
|
+
// &redirect_url=YOUR_CALLBACK_URL
|
|
36
|
+
// &state=VALUE_THAT_SURVIVES_REDIRECTS
|
|
37
|
+
// &scope=openid
|
|
38
|
+
// ```
|
|
39
|
+
Browser->Auth0: 1. initiate the authentication
|
|
40
|
+
Auth0->"Identity Provider": 2. OAuth2 / SAML, etc
|
|
41
|
+
"Identity Provider"->"Identity Provider": 3. user gets authenticated
|
|
42
|
+
Auth0->Browser: 4. redirect to ${YOUR_CALLBACK_URL}/#id_token=e68...
|
|
43
|
+
Browser->Auth0: 5. validate id_token and get user profile
|
|
44
|
+
Browser->"Your API": 6. call API sending JWT in Authorization header
|
|
45
|
+
"Your API"->"Your API": 7. validate token
|
|
46
|
+
</pre>
|
|
47
|
+
|
|
48
|
+
<script type="module">
|
|
49
|
+
import mermaid from 'https://unpkg.com/mermaid/dist/mermaid.esm.mjs';
|
|
50
|
+
import zenuml from 'https://unpkg.com/@mermaid-js/mermaid-zenuml/dist/mermaid-zenuml.esm.mjs';
|
|
51
|
+
await mermaid.registerExternalDiagrams([zenuml]);
|
|
52
|
+
mermaid.initialize({
|
|
53
|
+
logLevel: 3,
|
|
54
|
+
});
|
|
55
|
+
</script>
|
|
56
|
+
</body>
|
|
57
|
+
</html>
|