jazz-tools 0.9.23 → 0.10.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 (56) hide show
  1. package/.turbo/turbo-build.log +10 -12
  2. package/CHANGELOG.md +27 -0
  3. package/dist/{chunk-OJIEP4WE.js → chunk-24EJ3CKA.js} +566 -118
  4. package/dist/chunk-24EJ3CKA.js.map +1 -0
  5. package/dist/{index.web.js → index.js} +20 -9
  6. package/dist/index.js.map +1 -0
  7. package/dist/testing.js +125 -34
  8. package/dist/testing.js.map +1 -1
  9. package/package.json +11 -15
  10. package/src/auth/AuthSecretStorage.ts +109 -0
  11. package/src/auth/DemoAuth.ts +188 -0
  12. package/src/auth/InMemoryKVStore.ts +25 -0
  13. package/src/auth/KvStoreContext.ts +39 -0
  14. package/src/auth/PassphraseAuth.ts +113 -0
  15. package/src/coValues/account.ts +8 -3
  16. package/src/coValues/coFeed.ts +1 -1
  17. package/src/coValues/coList.ts +1 -1
  18. package/src/coValues/coMap.ts +1 -1
  19. package/src/coValues/group.ts +9 -8
  20. package/src/coValues/interfaces.ts +14 -5
  21. package/src/exports.ts +17 -3
  22. package/src/implementation/ContextManager.ts +178 -0
  23. package/src/implementation/activeAccountContext.ts +6 -1
  24. package/src/implementation/createContext.ts +173 -149
  25. package/src/implementation/schema.ts +3 -3
  26. package/src/index.ts +3 -0
  27. package/src/testing.ts +172 -34
  28. package/src/tests/AuthSecretStorage.test.ts +275 -0
  29. package/src/tests/ContextManager.test.ts +256 -0
  30. package/src/tests/DemoAuth.test.ts +269 -0
  31. package/src/tests/PassphraseAuth.test.ts +152 -0
  32. package/src/tests/coFeed.test.ts +48 -42
  33. package/src/tests/coList.test.ts +26 -24
  34. package/src/tests/coMap.test.ts +25 -23
  35. package/src/tests/coPlainText.test.ts +25 -23
  36. package/src/tests/coRichText.test.ts +24 -23
  37. package/src/tests/createContext.test.ts +339 -0
  38. package/src/tests/deepLoading.test.ts +44 -45
  39. package/src/tests/fixtures.ts +2050 -0
  40. package/src/tests/groupsAndAccounts.test.ts +3 -3
  41. package/src/tests/schema.test.ts +1 -1
  42. package/src/tests/schemaUnion.test.ts +2 -2
  43. package/src/tests/subscribe.test.ts +43 -10
  44. package/src/tests/testing.test.ts +56 -0
  45. package/src/tests/utils.ts +13 -13
  46. package/src/types.ts +54 -0
  47. package/tsconfig.json +3 -1
  48. package/tsup.config.ts +1 -2
  49. package/dist/chunk-OJIEP4WE.js.map +0 -1
  50. package/dist/index.native.js +0 -75
  51. package/dist/index.native.js.map +0 -1
  52. package/dist/index.web.js.map +0 -1
  53. package/src/index.native.ts +0 -6
  54. package/src/index.web.ts +0 -3
  55. package/tsconfig.native.json +0 -5
  56. package/tsconfig.web.json +0 -5
@@ -1,75 +0,0 @@
1
- import {
2
- Account,
3
- AnonymousJazzAgent,
4
- CoFeed,
5
- CoList,
6
- CoMap,
7
- CoPlainText,
8
- CoRichText,
9
- CoValueBase,
10
- Encoders,
11
- FileStream,
12
- Group,
13
- ImageDefinition,
14
- Inbox,
15
- InboxSender,
16
- Marks,
17
- Profile,
18
- SchemaUnion,
19
- co,
20
- consumeInviteLink,
21
- createAnonymousJazzContext,
22
- createCoValueObservable,
23
- createInviteLink,
24
- createJazzContext,
25
- ephemeralCredentialsAuth,
26
- fixedCredentialsAuth,
27
- isControlledAccount,
28
- loadCoValue,
29
- parseInviteLink,
30
- randomSessionProvider,
31
- subscribeToCoValue
32
- } from "./chunk-OJIEP4WE.js";
33
-
34
- // src/index.native.ts
35
- import {
36
- MAX_RECOMMENDED_TX_SIZE,
37
- cojsonInternals
38
- } from "cojson/native";
39
- export {
40
- Account,
41
- AnonymousJazzAgent,
42
- FileStream as BinaryCoStream,
43
- CoFeed,
44
- CoList,
45
- CoMap,
46
- CoPlainText,
47
- CoRichText,
48
- CoFeed as CoStream,
49
- CoValueBase,
50
- Encoders,
51
- FileStream,
52
- Group,
53
- ImageDefinition,
54
- Inbox,
55
- InboxSender,
56
- MAX_RECOMMENDED_TX_SIZE,
57
- Marks,
58
- Profile,
59
- SchemaUnion,
60
- co,
61
- cojsonInternals,
62
- consumeInviteLink,
63
- createAnonymousJazzContext,
64
- createCoValueObservable,
65
- createInviteLink,
66
- createJazzContext,
67
- ephemeralCredentialsAuth,
68
- fixedCredentialsAuth,
69
- isControlledAccount,
70
- loadCoValue,
71
- parseInviteLink,
72
- randomSessionProvider,
73
- subscribeToCoValue
74
- };
75
- //# sourceMappingURL=index.native.js.map
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.native.ts"],"sourcesContent":["export * from \"./exports.js\";\n\nexport {\n MAX_RECOMMENDED_TX_SIZE,\n cojsonInternals,\n} from \"cojson/native\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA;AAAA,EACE;AAAA,EACA;AAAA,OACK;","names":[]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/index.web.ts"],"sourcesContent":["export * from \"./exports.js\";\n\nexport { cojsonInternals, MAX_RECOMMENDED_TX_SIZE, WasmCrypto } from \"cojson\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,SAAS,iBAAiB,yBAAyB,kBAAkB;","names":[]}
@@ -1,6 +0,0 @@
1
- export * from "./exports.js";
2
-
3
- export {
4
- MAX_RECOMMENDED_TX_SIZE,
5
- cojsonInternals,
6
- } from "cojson/native";
package/src/index.web.ts DELETED
@@ -1,3 +0,0 @@
1
- export * from "./exports.js";
2
-
3
- export { cojsonInternals, MAX_RECOMMENDED_TX_SIZE, WasmCrypto } from "cojson";
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["./src/**/*.ts"],
4
- "exclude": ["./node_modules", "./src/tests", "./src/index.native.ts"]
5
- }
package/tsconfig.web.json DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "include": ["./src/**/*.ts"],
4
- "exclude": ["./node_modules", "./src/tests", "./src/index.web.ts"]
5
- }