copious-mail 0.0.0-stage → 0.9.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.
Files changed (182) hide show
  1. package/LICENSE +504 -0
  2. package/README.md +143 -2
  3. package/bin/index.js +345 -0
  4. package/client/copiousLogo.svg +123 -0
  5. package/client/hosted.html +5259 -0
  6. package/client/mail_styles.css +40 -0
  7. package/client/mikado.bundle.debug.js +1406 -0
  8. package/client/mikado.bundle.min.js +68 -0
  9. package/client/mikado.bundle.module.debug.js +1401 -0
  10. package/client/mikado.bundle.module.min.js +67 -0
  11. package/client/mikado.bundle.profiler.debug.js +1490 -0
  12. package/client/mikado.es5.debug.js +1995 -0
  13. package/client/mikado.es5.min.js +85 -0
  14. package/client/mikado.light.debug.js +535 -0
  15. package/client/mikado.light.min.js +29 -0
  16. package/client/mikado.light.module.debug.js +530 -0
  17. package/data/user_list.db +14 -0
  18. package/index.html +7242 -0
  19. package/index.js +5 -0
  20. package/jsconfig.json +32 -0
  21. package/lib/mail_repo_bridge_ops.js +1177 -0
  22. package/lib/utils.js +70 -0
  23. package/lib/websocket_con.js +249 -0
  24. package/mail_bridge.conf +10 -0
  25. package/package.json +41 -5
  26. package/svelte-src/App.svelte +2513 -0
  27. package/svelte-src/ContactGrid.svelte +98 -0
  28. package/svelte-src/FloatWindow.svelte +181 -0
  29. package/svelte-src/MessageDisplay.svelte +230 -0
  30. package/svelte-src/MessageEditor.svelte +664 -0
  31. package/svelte-src/MessageListEditor.svelte +133 -0
  32. package/svelte-src/Thing.svelte +190 -0
  33. package/svelte-src/ThingFull.svelte +117 -0
  34. package/svelte-src/ipfs_profile_proxy.js +923 -0
  35. package/svelte-src/main.js +10 -0
  36. package/svelte-src/search_box.js +69 -0
  37. package/svelte-src/utilities.js +180 -0
  38. package/test/c +28 -0
  39. package/test/copiousLogo.svg +123 -0
  40. package/test/index.html +4408 -0
  41. package/test/index.js +244 -0
  42. package/test/mail_styles.css +40 -0
  43. package/test/mikado.bundle.debug.js +1406 -0
  44. package/test/mikado.bundle.min.js +68 -0
  45. package/test/mikado.bundle.module.debug.js +1401 -0
  46. package/test/mikado.bundle.module.min.js +67 -0
  47. package/test/mikado.bundle.profiler.debug.js +1490 -0
  48. package/test/mikado.es5.debug.js +1995 -0
  49. package/test/mikado.es5.min.js +85 -0
  50. package/test/mikado.light.debug.js +535 -0
  51. package/test/mikado.light.min.js +29 -0
  52. package/test/mikado.light.module.debug.js +530 -0
  53. package/test/tpl/partial/attachment_edit.es5.js +1 -0
  54. package/test/tpl/partial/attachment_edit.html +5 -0
  55. package/test/tpl/partial/attachment_edit.js +1 -0
  56. package/test/tpl/partial/attachment_view.es5.js +1 -0
  57. package/test/tpl/partial/attachment_view.html +1 -0
  58. package/test/tpl/partial/attachment_view.js +1 -0
  59. package/test/tpl/partial/contact_list.es5.js +1 -0
  60. package/test/tpl/partial/contact_list.html +9 -0
  61. package/test/tpl/partial/contact_list.js +1 -0
  62. package/test/tpl/partial/draft_list.es5.js +1 -0
  63. package/test/tpl/partial/draft_list.html +8 -0
  64. package/test/tpl/partial/draft_list.js +1 -0
  65. package/test/tpl/partial/inbox_list.es5.js +1 -0
  66. package/test/tpl/partial/inbox_list.html +7 -0
  67. package/test/tpl/partial/inbox_list.js +1 -0
  68. package/test/tpl/partial/notify_list.es5.js +1 -0
  69. package/test/tpl/partial/notify_list.html +8 -0
  70. package/test/tpl/partial/notify_list.js +1 -0
  71. package/test/tpl/partial/sent_list.es5.js +1 -0
  72. package/test/tpl/partial/sent_list.html +7 -0
  73. package/test/tpl/partial/sent_list.js +1 -0
  74. package/test/tpl/partial/spam_list.es5.js +1 -0
  75. package/test/tpl/partial/spam_list.html +8 -0
  76. package/test/tpl/partial/spam_list.js +1 -0
  77. package/test/tpl/partial/trash_list.es5.js +1 -0
  78. package/test/tpl/partial/trash_list.html +7 -0
  79. package/test/tpl/partial/trash_list.js +1 -0
  80. package/test/tpl/partial/user.es5.js +1 -0
  81. package/test/tpl/partial/user.html +18 -0
  82. package/test/tpl/partial/user.js +1 -0
  83. package/tools/jsdoc.conf +47 -0
  84. package/tools/templates/docdash/publish.js +843 -0
  85. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  86. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  87. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  88. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  89. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  90. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  91. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  92. package/tools/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  93. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  94. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  95. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  96. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  97. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  98. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  99. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  100. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  101. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  102. package/tools/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  103. package/tools/templates/docdash/static/scripts/collapse.js +67 -0
  104. package/tools/templates/docdash/static/scripts/commonNav.js +28 -0
  105. package/tools/templates/docdash/static/scripts/linenumber.js +25 -0
  106. package/tools/templates/docdash/static/scripts/nav.js +12 -0
  107. package/tools/templates/docdash/static/scripts/polyfill.js +4 -0
  108. package/tools/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  109. package/tools/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
  110. package/tools/templates/docdash/static/scripts/prettify/prettify.js +28 -0
  111. package/tools/templates/docdash/static/scripts/search.js +99 -0
  112. package/tools/templates/docdash/static/styles/jsdoc.css +803 -0
  113. package/tools/templates/docdash/static/styles/prettify.css +80 -0
  114. package/tools/templates/docdash/tmpl/augments.tmpl +10 -0
  115. package/tools/templates/docdash/tmpl/container.tmpl +203 -0
  116. package/tools/templates/docdash/tmpl/details.tmpl +152 -0
  117. package/tools/templates/docdash/tmpl/example.tmpl +2 -0
  118. package/tools/templates/docdash/tmpl/examples.tmpl +13 -0
  119. package/tools/templates/docdash/tmpl/exceptions.tmpl +32 -0
  120. package/tools/templates/docdash/tmpl/layout.tmpl +102 -0
  121. package/tools/templates/docdash/tmpl/mainpage.tmpl +15 -0
  122. package/tools/templates/docdash/tmpl/members.tmpl +38 -0
  123. package/tools/templates/docdash/tmpl/method.tmpl +132 -0
  124. package/tools/templates/docdash/tmpl/modifies.tmpl +14 -0
  125. package/tools/templates/docdash/tmpl/namespace.tmpl +133 -0
  126. package/tools/templates/docdash/tmpl/params.tmpl +132 -0
  127. package/tools/templates/docdash/tmpl/properties.tmpl +107 -0
  128. package/tools/templates/docdash/tmpl/returns.tmpl +19 -0
  129. package/tools/templates/docdash/tmpl/source.tmpl +8 -0
  130. package/tools/templates/docdash/tmpl/tutorial.tmpl +19 -0
  131. package/tools/templates/docdash/tmpl/type.tmpl +26 -0
  132. package/tools/templates/templates/docdash/publish.js +843 -0
  133. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  134. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  135. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  136. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  137. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  138. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  139. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  140. package/tools/templates/templates/docdash/static/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  141. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  142. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  143. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  144. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  145. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  146. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  147. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  148. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  149. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  150. package/tools/templates/templates/docdash/static/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  151. package/tools/templates/templates/docdash/static/scripts/collapse.js +67 -0
  152. package/tools/templates/templates/docdash/static/scripts/commonNav.js +28 -0
  153. package/tools/templates/templates/docdash/static/scripts/linenumber.js +25 -0
  154. package/tools/templates/templates/docdash/static/scripts/nav.js +12 -0
  155. package/tools/templates/templates/docdash/static/scripts/polyfill.js +4 -0
  156. package/tools/templates/templates/docdash/static/scripts/prettify/Apache-License-2.0.txt +202 -0
  157. package/tools/templates/templates/docdash/static/scripts/prettify/lang-css.js +2 -0
  158. package/tools/templates/templates/docdash/static/scripts/prettify/prettify.js +28 -0
  159. package/tools/templates/templates/docdash/static/scripts/search.js +99 -0
  160. package/tools/templates/templates/docdash/static/styles/jsdoc.css +803 -0
  161. package/tools/templates/templates/docdash/static/styles/prettify.css +80 -0
  162. package/tools/templates/templates/docdash/tmpl/augments.tmpl +10 -0
  163. package/tools/templates/templates/docdash/tmpl/container.tmpl +203 -0
  164. package/tools/templates/templates/docdash/tmpl/details.tmpl +152 -0
  165. package/tools/templates/templates/docdash/tmpl/example.tmpl +2 -0
  166. package/tools/templates/templates/docdash/tmpl/examples.tmpl +13 -0
  167. package/tools/templates/templates/docdash/tmpl/exceptions.tmpl +32 -0
  168. package/tools/templates/templates/docdash/tmpl/layout.tmpl +102 -0
  169. package/tools/templates/templates/docdash/tmpl/mainpage.tmpl +15 -0
  170. package/tools/templates/templates/docdash/tmpl/members.tmpl +38 -0
  171. package/tools/templates/templates/docdash/tmpl/method.tmpl +132 -0
  172. package/tools/templates/templates/docdash/tmpl/modifies.tmpl +14 -0
  173. package/tools/templates/templates/docdash/tmpl/namespace.tmpl +133 -0
  174. package/tools/templates/templates/docdash/tmpl/params.tmpl +132 -0
  175. package/tools/templates/templates/docdash/tmpl/properties.tmpl +107 -0
  176. package/tools/templates/templates/docdash/tmpl/returns.tmpl +19 -0
  177. package/tools/templates/templates/docdash/tmpl/source.tmpl +8 -0
  178. package/tools/templates/templates/docdash/tmpl/tutorial.tmpl +19 -0
  179. package/tools/templates/templates/docdash/tmpl/type.tmpl +26 -0
  180. package/tpl/partial/user.es5.js +1 -0
  181. package/tpl/partial/user.html +10 -0
  182. package/tpl/partial/user.js +1 -0
package/test/index.js ADDED
@@ -0,0 +1,244 @@
1
+ #!/usr/bin/env node
2
+ const polka = require('polka');
3
+ const send = require('@polka/send-type');
4
+ const app = polka();
5
+ //
6
+ const { json } = require('body-parser');
7
+ const cors = require('cors')
8
+
9
+ app.use(json())
10
+
11
+ // let corsOptions = {
12
+ // origin: 'http://localhost:*',
13
+ // optionsSuccessStatus: 200 // some legacy browsers (IE11, various SmartTVs) choke on 204
14
+ // }
15
+ app.use(cors())
16
+ //
17
+ const fs = require('fs')
18
+ const http = require('http')
19
+ const path = require('path')
20
+
21
+ const WebSocket = require('ws')
22
+ const WebSocketServer = WebSocket.Server;
23
+
24
+ const RepoBridgeOps = require('../lib/repo_bridge_ops')
25
+ const WebSocketActions = require('../lib/websocket_con')
26
+
27
+
28
+ // g_repo_bridge_ops
29
+
30
+ /*
31
+ TERMINAL ... set it up...
32
+
33
+ // need frame for : ssh richard@76.229.181.242 -L 8080:localhost:8080 -N
34
+ // goes to ttyd ... pick a good port (consider using some keys, etc.)
35
+
36
+
37
+ */
38
+
39
+ // This process becomes the forever process manager for processes launched off of a very private web service.
40
+ //
41
+
42
+ // For each type of shared table launched, this process maintains a list of interface types that may be configured
43
+ // for processes that it launches. Also, can launch other DB management processes.
44
+ // When this launches a processes, it can check that the configuration of the process has an interface conforming
45
+ // to the types of DB managers that this has launched.
46
+
47
+ // Principle going forward: Every single application process can attach to a DB/Shared Mem table, while every DB or table
48
+ // is a standalone manager that provides lifecycle for the shared object.
49
+
50
+ // This proces, the copious-transions-manager, manages the DB lifecycle processes and spawns applications configured to attach
51
+ // to the share objects.
52
+
53
+ //
54
+ class WSConsole extends console.Console {
55
+ constructor(fn,out,err) {
56
+ super(out,err)
57
+ this.log_custom = fn
58
+ }
59
+
60
+ log(...args) {
61
+ super.log(...args)
62
+ this.log_custom(args)
63
+ }
64
+ }
65
+
66
+ let save_console = false
67
+ function setup_console(fn) {
68
+ save_console = console
69
+ //
70
+ let custom_console = new WSConsole(fn,process.stdout,process.stderr)
71
+ console = custom_console
72
+ }
73
+
74
+
75
+ let g_ws_socks = false
76
+ let g_config = false
77
+ //
78
+ // let g_descriptions = false
79
+
80
+ // ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----
81
+
82
+
83
+ // LOAD CONFIGURATION ... if this crashes, that's fine
84
+ try {
85
+ let conf_str = fs.readFileSync("mail_bridge.conf").toString()
86
+ g_config = JSON.parse(conf_str)
87
+ } catch (e) {
88
+ console.log("THERE NEEDS TO BE A PROPERLY JSON-FORMATTED CONFIGURATION FILE, mail_bridge.conf IN YOUR WORKING DIRECTORY")
89
+ process.exit(0)
90
+ }
91
+
92
+
93
+
94
+
95
+ /**
96
+ * write_out_config
97
+ * update the configuration file with operational changes...
98
+ * for example, this method is added to handle the case of ignoring directories, which in turn have .gitignore inside them.
99
+ *
100
+ */
101
+ function write_out_config() {
102
+ if ( typeof g_config === 'object' ) {
103
+ try {
104
+ console.log("write_out_config")
105
+ let conf_output_str = JSON.stringify(g_config,null,2)
106
+ fs.writeFileSync("manager.conf",conf_output_str)
107
+ } catch (e) {}
108
+ }
109
+ }
110
+
111
+ console.dir(g_config)
112
+
113
+ //
114
+ // -------- -------- -------- -------- -------- -------- -------- -------- -------- -------- -------- --------
115
+ //
116
+ const MANAGER_PORT = g_config.web_page_port
117
+
118
+ let g_proc_managers = {}
119
+
120
+
121
+ let g_system_coms = false
122
+ let g_all_procs = false
123
+
124
+
125
+ let g_repo_bridge_ops = new RepoBridgeOps(g_config.repo_bridge,g_all_procs,g_system_coms)
126
+
127
+
128
+ //g_repo_ops.test()
129
+
130
+ console.log(__dirname)
131
+
132
+
133
+ app.get('/', async (req, res) => {
134
+ let obj = {
135
+ "file": "index.html"
136
+ }
137
+ let status = await g_repo_bridge_ops.get_app_file(obj)
138
+ //
139
+ if ( status ) {
140
+ let page = obj.data.toString()
141
+ res.end(page);
142
+ } else {
143
+ send(res,404,"root: could not load the requested file")
144
+ }
145
+ //
146
+ });
147
+
148
+
149
+
150
+ app.get('/:file', async (req, res) => {
151
+ let file = ""
152
+ let obj = {
153
+ "file": req.params.file
154
+ }
155
+ let status = await g_repo_bridge_ops.get_app_file(obj)
156
+ if ( status ) {
157
+ let page = obj.data.toString()
158
+ res.end(page);
159
+ } else {
160
+ send(res,404,"could not load the requested file: " + file)
161
+ }
162
+ })
163
+
164
+
165
+ // not accessible by nginx (i.e. must be on the machine in ssh ... use wget)
166
+
167
+ app.get('assets/:file', async (req, res) => {
168
+ let obj = {
169
+ "file": req.params.file
170
+ }
171
+ let status = await g_repo_bridge_ops.get_asset_file(obj)
172
+ if ( status ) {
173
+ let page = obj.data.toString()
174
+ res.end(page);
175
+ } else {
176
+ send(res,404,"could not load the requested file: " + obj.file)
177
+ }
178
+ })
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ function handler_ws_messages(message_body) {
187
+ console.dir(message_body)
188
+ }
189
+
190
+
191
+ function ws_proc_status() {
192
+ if ( g_proc_managers && g_ws_socks ) {
193
+ let sendable = g_repo_ops.sendable_proc_data()
194
+ let op_message = {
195
+ "op" : "proc-status",
196
+ "data" : sendable
197
+ }
198
+ g_ws_socks.send_to_going_sessions(op_message)
199
+ }
200
+ }
201
+
202
+
203
+ function ws_console_log(data) {
204
+ if ( g_proc_managers && g_ws_socks ) {
205
+ let op_message = {
206
+ "op" : "console-output",
207
+ "data" : data
208
+ }
209
+ g_ws_socks.send_to_going_sessions(op_message)
210
+ }
211
+ }
212
+
213
+
214
+ // ------------- ------------- ------------- ------------- ------------- ------------- ------------- -------------
215
+ if ( g_config.wss_app_port ) { // WEB APP SCOCKETS OPTION (START)
216
+ // ------------- ------------- ------------- ------------- ------------- ------------- ------------- -------------
217
+
218
+ g_ws_socks = new WebSocketActions()
219
+
220
+ let app_server = http.createServer(app);
221
+ app_server.listen(g_config.wss_app_port);
222
+ //
223
+ var g_app_wss = new WebSocketServer({server: app_server});
224
+ g_ws_socks.set_socket_server(g_app_wss,handler_ws_messages)
225
+ //
226
+
227
+ setInterval(() => { ws_proc_status() },5000)
228
+
229
+ setup_console(ws_console_log)
230
+
231
+ // ------------- ------------- ------------- ------------- ------------- ------------- ------------- -------------
232
+ } // WEB APP SCOCKETS OPTION (END)
233
+ // ------------- ------------- ------------- ------------- ------------- ------------- ------------- -------------
234
+
235
+
236
+ //
237
+ //
238
+ //
239
+
240
+ // ---- ---- ---- ---- ----
241
+ //g_all_procs.initialize_children()
242
+ // ---- ---- ---- ---- ----
243
+ app.listen(MANAGER_PORT)
244
+ console.log(`listening on port ${MANAGER_PORT}`)
@@ -0,0 +1,40 @@
1
+
2
+
3
+
4
+ nav {
5
+ min-height: 32px;
6
+ max-height: 32px;
7
+ border-bottom: 1px solid rgb(35, 8, 53);
8
+ width: 100%;
9
+ vertical-align: middle;
10
+ }
11
+
12
+ button {
13
+ cursor: pointer;
14
+ }
15
+
16
+
17
+ .squash_m {
18
+ width: fit-content;
19
+ min-height: 30px;
20
+ position: relative;
21
+ left:2px;
22
+ top: 2px;
23
+ bottom:28px;
24
+ cursor: pointer;
25
+ vertical-align: bottom;
26
+ background-color: white;
27
+ }
28
+
29
+
30
+ /*
31
+ .squash_m:hover {
32
+ } */
33
+
34
+ .heroicon-ui {
35
+ fill: black;
36
+ }
37
+ .heroicon-ui:hover {
38
+ fill: rgb(21, 68, 15);
39
+ background-color: rgb(245, 249, 255);
40
+ }