tapeworm 0.5.0 → 0.6.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.
Files changed (108) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/LICENSE +22 -22
  3. package/README.md +332 -332
  4. package/biome.json +58 -0
  5. package/dist/index.d.ts +5 -0
  6. package/dist/index.d.ts.map +1 -0
  7. package/dist/index.js +20 -0
  8. package/dist/index.js.map +1 -0
  9. package/dist/src/dispatch/dispatch_service.d.ts +8 -0
  10. package/dist/src/dispatch/dispatch_service.d.ts.map +1 -0
  11. package/dist/src/dispatch/dispatch_service.js +9 -0
  12. package/dist/src/dispatch/dispatch_service.js.map +1 -0
  13. package/dist/src/event.d.ts +10 -0
  14. package/dist/src/event.d.ts.map +1 -0
  15. package/dist/src/event.js +12 -0
  16. package/dist/src/event.js.map +1 -0
  17. package/dist/src/event_store.d.ts +29 -0
  18. package/dist/src/event_store.d.ts.map +1 -0
  19. package/dist/src/event_store.js +71 -0
  20. package/dist/src/event_store.js.map +1 -0
  21. package/dist/src/event_store_partition.d.ts +28 -0
  22. package/dist/src/event_store_partition.d.ts.map +1 -0
  23. package/dist/src/event_store_partition.js +130 -0
  24. package/dist/src/event_store_partition.js.map +1 -0
  25. package/dist/src/event_stream.d.ts +32 -0
  26. package/dist/src/event_stream.d.ts.map +1 -0
  27. package/dist/src/event_stream.js +142 -0
  28. package/dist/src/event_stream.js.map +1 -0
  29. package/dist/src/persistence/commit.d.ts +4 -0
  30. package/dist/src/persistence/commit.d.ts.map +1 -0
  31. package/dist/src/persistence/commit.js +11 -0
  32. package/dist/src/persistence/commit.js.map +1 -0
  33. package/dist/src/persistence/concurrency_error.d.ts +6 -0
  34. package/dist/src/persistence/concurrency_error.d.ts.map +1 -0
  35. package/dist/src/persistence/concurrency_error.js +13 -0
  36. package/dist/src/persistence/concurrency_error.js.map +1 -0
  37. package/dist/src/persistence/duplicate_commit_error.d.ts +6 -0
  38. package/dist/src/persistence/duplicate_commit_error.d.ts.map +1 -0
  39. package/dist/src/persistence/duplicate_commit_error.js +13 -0
  40. package/dist/src/persistence/duplicate_commit_error.js.map +1 -0
  41. package/dist/src/persistence/inmemory/inmemory_partition.d.ts +23 -0
  42. package/dist/src/persistence/inmemory/inmemory_partition.d.ts.map +1 -0
  43. package/dist/src/persistence/inmemory/inmemory_partition.js +138 -0
  44. package/dist/src/persistence/inmemory/inmemory_partition.js.map +1 -0
  45. package/dist/src/persistence/inmemory/inmemory_persistence.d.ts +13 -0
  46. package/dist/src/persistence/inmemory/inmemory_persistence.d.ts.map +1 -0
  47. package/dist/src/persistence/inmemory/inmemory_persistence.js +26 -0
  48. package/dist/src/persistence/inmemory/inmemory_persistence.js.map +1 -0
  49. package/dist/src/persistence/persistence_partition.d.ts +12 -0
  50. package/dist/src/persistence/persistence_partition.d.ts.map +1 -0
  51. package/dist/src/persistence/persistence_partition.js +21 -0
  52. package/dist/src/persistence/persistence_partition.js.map +1 -0
  53. package/dist/src/persistence/persistence_provider_template.d.ts +10 -0
  54. package/dist/src/persistence/persistence_provider_template.d.ts.map +1 -0
  55. package/dist/src/persistence/persistence_provider_template.js +11 -0
  56. package/dist/src/persistence/persistence_provider_template.js.map +1 -0
  57. package/dist/src/replication/master_replication_service.d.ts +7 -0
  58. package/dist/src/replication/master_replication_service.d.ts.map +1 -0
  59. package/dist/src/replication/master_replication_service.js +9 -0
  60. package/dist/src/replication/master_replication_service.js.map +1 -0
  61. package/dist/src/types.d.ts +68 -0
  62. package/dist/src/types.d.ts.map +1 -0
  63. package/dist/src/types.js +3 -0
  64. package/dist/src/types.js.map +1 -0
  65. package/index.ts +21 -0
  66. package/package.json +44 -46
  67. package/scripts/postbuild.js +27 -0
  68. package/src/dispatch/dispatch_service.ts +14 -0
  69. package/src/event.ts +24 -0
  70. package/src/event_store.ts +82 -0
  71. package/src/event_store_partition.ts +270 -0
  72. package/src/event_stream.ts +184 -0
  73. package/src/persistence/commit.ts +24 -0
  74. package/src/persistence/concurrency_error.ts +16 -0
  75. package/src/persistence/duplicate_commit_error.ts +16 -0
  76. package/src/persistence/inmemory/inmemory_partition.ts +194 -0
  77. package/src/persistence/inmemory/inmemory_persistence.ts +35 -0
  78. package/src/persistence/persistence_partition.ts +34 -0
  79. package/src/persistence/persistence_provider_template.ts +20 -0
  80. package/src/replication/master_replication_service.ts +12 -0
  81. package/src/types.ts +128 -0
  82. package/test/event_partition.ts +151 -0
  83. package/test/event_store.ts +25 -0
  84. package/test/event_stream.ts +160 -0
  85. package/test/persistence/inmemory.ts +139 -0
  86. package/tsconfig.json +13 -0
  87. package/vitest.config.ts +13 -0
  88. package/.eslintrc +0 -4
  89. package/.travis.yml +0 -4
  90. package/checkstyle-result.xml +0 -1
  91. package/index.js +0 -1
  92. package/lib/dispatch/dispatch_service.js +0 -7
  93. package/lib/event.js +0 -10
  94. package/lib/event_store.js +0 -53
  95. package/lib/event_store_partition.js +0 -148
  96. package/lib/event_stream.js +0 -150
  97. package/lib/persistence/commit.js +0 -12
  98. package/lib/persistence/concurrency_error.js +0 -10
  99. package/lib/persistence/duplicate_commit_error.js +0 -10
  100. package/lib/persistence/inmemory/inmemory_partition.js +0 -146
  101. package/lib/persistence/inmemory/inmemory_persistence.js +0 -25
  102. package/lib/persistence/persistence_partition.js +0 -23
  103. package/lib/persistence/persistence_provider_template.js +0 -17
  104. package/lib/replication/master_replication_service.js +0 -7
  105. package/test/event_partition.js +0 -232
  106. package/test/event_store.js +0 -36
  107. package/test/event_stream.js +0 -214
  108. package/test/persistence/inmemory.js +0 -162
package/CHANGELOG.md ADDED
@@ -0,0 +1,17 @@
1
+ # tapeworm
2
+
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 855c605: Convert monorepo to TypeScript with full type definitions
8
+
9
+ - Convert all packages from JavaScript to TypeScript with complete type annotations
10
+ - Add shared type system (IBaseEvent, ICommit, ISnapshot, IPersistencePartition)
11
+ - Migrate all test suites to vitest
12
+ - Add CJS backward-compatibility shims to preserve existing require() API
13
+ - Fix \_partitions initialization bug and indexeddb loadSnapshot error handler
14
+
15
+ ### Patch Changes
16
+
17
+ - Upgrade packages to fix vulnerabilities.
package/LICENSE CHANGED
@@ -1,22 +1,22 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2015 spralle
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
-
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 spralle
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
+