@activeledger/activestorage 2.15.7 → 4.3.3

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 (122) hide show
  1. package/es/cache.d.ts +18 -0
  2. package/es/cache.d.ts.map +1 -0
  3. package/es/cache.js +57 -0
  4. package/es/cache.js.map +1 -0
  5. package/es/datastore.d.ts +1 -0
  6. package/es/datastore.d.ts.map +1 -1
  7. package/es/datastore.js +8 -3
  8. package/es/datastore.js.map +1 -1
  9. package/es/driver.d.ts +16 -0
  10. package/es/driver.d.ts.map +1 -0
  11. package/es/driver.js +2 -0
  12. package/es/driver.js.map +1 -0
  13. package/es/drivers/leveldb.d.ts +21 -0
  14. package/es/drivers/leveldb.d.ts.map +1 -0
  15. package/es/drivers/leveldb.js +121 -0
  16. package/es/drivers/leveldb.js.map +1 -0
  17. package/es/drivers/rocksdb.d.ts +21 -0
  18. package/es/drivers/rocksdb.d.ts.map +1 -0
  19. package/es/drivers/rocksdb.js +98 -0
  20. package/es/drivers/rocksdb.js.map +1 -0
  21. package/es/heartbeat.d.ts +7 -0
  22. package/es/heartbeat.d.ts.map +1 -0
  23. package/es/heartbeat.js +15 -0
  24. package/es/heartbeat.js.map +1 -0
  25. package/es/levelme.d.ts +18 -18
  26. package/es/levelme.d.ts.map +1 -1
  27. package/es/levelme.js +290 -155
  28. package/es/levelme.js.map +1 -1
  29. package/es/newlinestream.d.ts +4 -0
  30. package/es/newlinestream.d.ts.map +1 -0
  31. package/es/newlinestream.js +28 -0
  32. package/es/newlinestream.js.map +1 -0
  33. package/es/selfhost.js +157 -58
  34. package/es/selfhost.js.map +1 -1
  35. package/es/sse.d.ts +10 -0
  36. package/es/sse.d.ts.map +1 -0
  37. package/es/sse.js +41 -0
  38. package/es/sse.js.map +1 -0
  39. package/lib/cache.d.ts +18 -0
  40. package/lib/cache.d.ts.map +1 -0
  41. package/lib/cache.js +62 -0
  42. package/lib/cache.js.map +1 -0
  43. package/lib/datastore.d.ts +1 -0
  44. package/lib/datastore.d.ts.map +1 -1
  45. package/lib/datastore.js +8 -3
  46. package/lib/datastore.js.map +1 -1
  47. package/lib/driver.d.ts +16 -0
  48. package/lib/driver.d.ts.map +1 -0
  49. package/lib/driver.js +3 -0
  50. package/lib/driver.js.map +1 -0
  51. package/lib/drivers/leveldb.d.ts +21 -0
  52. package/lib/drivers/leveldb.d.ts.map +1 -0
  53. package/lib/drivers/leveldb.js +125 -0
  54. package/lib/drivers/leveldb.js.map +1 -0
  55. package/lib/drivers/rocksdb.d.ts +21 -0
  56. package/lib/drivers/rocksdb.d.ts.map +1 -0
  57. package/lib/drivers/rocksdb.js +102 -0
  58. package/lib/drivers/rocksdb.js.map +1 -0
  59. package/lib/heartbeat.d.ts +7 -0
  60. package/lib/heartbeat.d.ts.map +1 -0
  61. package/lib/heartbeat.js +19 -0
  62. package/lib/heartbeat.js.map +1 -0
  63. package/lib/levelme.d.ts +18 -18
  64. package/lib/levelme.d.ts.map +1 -1
  65. package/lib/levelme.js +312 -157
  66. package/lib/levelme.js.map +1 -1
  67. package/lib/newlinestream.d.ts +4 -0
  68. package/lib/newlinestream.d.ts.map +1 -0
  69. package/lib/newlinestream.js +32 -0
  70. package/lib/newlinestream.js.map +1 -0
  71. package/lib/selfhost.js +157 -58
  72. package/lib/selfhost.js.map +1 -1
  73. package/lib/sse.d.ts +10 -0
  74. package/lib/sse.d.ts.map +1 -0
  75. package/lib/sse.js +45 -0
  76. package/lib/sse.js.map +1 -0
  77. package/package.json +8 -18
  78. package/src/cache.ts +72 -0
  79. package/src/datastore.ts +187 -0
  80. package/src/driver.ts +18 -0
  81. package/src/drivers/leveldb.ts +145 -0
  82. package/src/drivers/rocksdb.ts +118 -0
  83. package/src/fauxton/dashboard.assets/css/styles.d43d3249088a6c04b633.css +33 -0
  84. package/src/fauxton/dashboard.assets/fonts/fauxtonicon5.eot +0 -0
  85. package/src/fauxton/dashboard.assets/fonts/fauxtonicon5.ttf +0 -0
  86. package/src/fauxton/dashboard.assets/fonts/fauxtonicon5.woff +0 -0
  87. package/src/fauxton/dashboard.assets/fonts/fontawesome-webfont.eot +0 -0
  88. package/src/fauxton/dashboard.assets/fonts/fontawesome-webfont.ttf +0 -0
  89. package/src/fauxton/dashboard.assets/fonts/fontawesome-webfont.woff +0 -0
  90. package/src/fauxton/dashboard.assets/img/activeledger-logo.png +0 -0
  91. package/src/fauxton/dashboard.assets/img/activeledger.png +0 -0
  92. package/src/fauxton/dashboard.assets/img/asf-feather-logo.png +0 -0
  93. package/src/fauxton/dashboard.assets/img/couch-watermark.png +0 -0
  94. package/src/fauxton/dashboard.assets/img/couchdb-logo.png +0 -0
  95. package/src/fauxton/dashboard.assets/img/fauxtonicon5.svg +729 -0
  96. package/src/fauxton/dashboard.assets/img/fontawesome-webfont.svg +399 -0
  97. package/src/fauxton/dashboard.assets/img/github.png +0 -0
  98. package/src/fauxton/dashboard.assets/img/googleplus.png +0 -0
  99. package/src/fauxton/dashboard.assets/img/linkedin.png +0 -0
  100. package/src/fauxton/dashboard.assets/img/loader.gif +0 -0
  101. package/src/fauxton/dashboard.assets/img/twitter.png +0 -0
  102. package/src/fauxton/dashboard.assets/js/bundle.d43d3249088a6c04b633.js +1 -0
  103. package/src/fauxton/dashboard.assets/js/manifest.a154524a560e5f6f431b.js +1 -0
  104. package/src/fauxton/dashboard.assets/js/vendor.156793045cdeb7c63707.js +96 -0
  105. package/src/fauxton/index.html +52 -0
  106. package/src/heartbeat.ts +60 -0
  107. package/src/index.ts +25 -0
  108. package/src/levelme.ts +901 -0
  109. package/src/newlinestream.ts +32 -0
  110. package/src/selfhost.ts +931 -0
  111. package/src/sse.ts +136 -0
  112. package/src/types/rocksdb.d.ts +1 -0
  113. package/tsconfig.json +8 -0
  114. package/tsconfig.tsbuildinfo +1 -0
  115. package/es/pouchdb.d.ts +0 -4
  116. package/es/pouchdb.d.ts.map +0 -1
  117. package/es/pouchdb.js +0 -16
  118. package/es/pouchdb.js.map +0 -1
  119. package/lib/pouchdb.d.ts +0 -4
  120. package/lib/pouchdb.d.ts.map +0 -1
  121. package/lib/pouchdb.js +0 -22
  122. package/lib/pouchdb.js.map +0 -1
@@ -0,0 +1,52 @@
1
+ <!--
2
+ // Licensed under the Apache License, Version 2.0 (the "License"); you may not
3
+ // use this file except in compliance with the License. You may obtain a copy of
4
+ // the License at
5
+ //
6
+ // http://www.apache.org/licenses/LICENSE-2.0
7
+ //
8
+ // Unless required by applicable law or agreed to in writing, software
9
+ // distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
10
+ // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
11
+ // License for the specific language governing permissions and limitations under
12
+ // the License.
13
+ -->
14
+ <!doctype html>
15
+ <html lang="en">
16
+ <head>
17
+ <meta charset="utf-8">
18
+ <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
19
+ <meta name="viewport" content="width=device-width,initial-scale=1">
20
+ <meta http-equiv="Content-Language" content="en" />
21
+ <link rel="shortcut icon" type="image/png" href="dashboard.assets/img/activeledger-logo.png"/>
22
+ <title>Activeledger Data</title>
23
+
24
+ <!-- Application styles. -->
25
+ <style>
26
+ .noscript-warning {
27
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
28
+ padding: 1px 30px 10px 30px;
29
+ color: #fff;
30
+ background: @brandHighlight;
31
+ margin: 100px;
32
+ box-shadow: 2px 2px 5px #989898;
33
+ }
34
+ </style>
35
+
36
+ <link href="dashboard.assets/css/styles.d43d3249088a6c04b633.css" rel="stylesheet"></head>
37
+
38
+ <body id="home">
39
+
40
+ <noscript>
41
+ <div class="noscript-warning">
42
+ <h1>Please turn on JavaScript</h1>
43
+ <p>Fauxton <strong>requires</strong> JavaScript to be enabled.</p>
44
+ </div>
45
+ </noscript>
46
+
47
+
48
+ <div id="app"></div>
49
+
50
+ <!-- Fauxton Release : 2020-07-01T23:24:05.040Z -->
51
+ <script type="text/javascript" src="dashboard.assets/js/manifest.a154524a560e5f6f431b.js"></script><script type="text/javascript" src="dashboard.assets/js/vendor.156793045cdeb7c63707.js"></script><script type="text/javascript" src="dashboard.assets/js/bundle.d43d3249088a6c04b633.js"></script></body>
52
+ </html>
@@ -0,0 +1,60 @@
1
+ /*
2
+ * MIT License (MIT)
3
+ * Copyright (c) 2018 Activeledger
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+ import { IActiveHttpResponse } from "@activeledger/httpd/lib/httpd";
24
+
25
+ /**
26
+ * Connection Heartbeat management
27
+ *
28
+ * @export
29
+ * @class HeartBeat
30
+ */
31
+ export class HeartBeat {
32
+ /**
33
+ * Start & Maintain SSE Heartbeat
34
+ *
35
+ * @static
36
+ * @param {ServerResponse} response
37
+ * @returns {NodeJS.Timeout}
38
+ */
39
+ public static Start(response: IActiveHttpResponse): NodeJS.Timeout {
40
+ return setInterval(() => {
41
+ if (response.writable) {
42
+ response.cork(() => {
43
+ response.write(":\n\n");
44
+ });
45
+ }
46
+ // Increase timeout with TCP keepalive enabled.
47
+ // Some connections still may timeout after long periods of inactivity
48
+ }, 10 * 60 * 1000);
49
+ }
50
+
51
+ /**
52
+ * Stop SSE Heartbeat
53
+ *
54
+ * @static
55
+ * @param {NodeJS.Timeout} interval
56
+ */
57
+ public static Stop(interval: NodeJS.Timeout): void {
58
+ clearInterval(interval);
59
+ }
60
+ }
package/src/index.ts ADDED
@@ -0,0 +1,25 @@
1
+ /*
2
+ * MIT License (MIT)
3
+ * Copyright (c) 2018 Activeledger
4
+ *
5
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ * of this software and associated documentation files (the "Software"), to deal
7
+ * in the Software without restriction, including without limitation the rights
8
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ * copies of the Software, and to permit persons to whom the Software is
10
+ * furnished to do so, subject to the following conditions:
11
+ *
12
+ * The above copyright notice and this permission notice shall be included in all
13
+ * copies or substantial portions of the Software.
14
+ *
15
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ * SOFTWARE.
22
+ */
23
+
24
+ import { ActiveDataStore } from "./datastore";
25
+ export { ActiveDataStore };