@wovin/core 0.0.1-RC20 → 0.0.1-RC21

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 (47) hide show
  1. package/dist/applog.js +5 -4
  2. package/dist/chunk-3VDDRHGD.js +9854 -0
  3. package/dist/chunk-3VDDRHGD.js.map +1 -0
  4. package/dist/{chunk-RBXGBMA7.js → chunk-5FO6VRGW.js} +16 -5
  5. package/dist/chunk-5FO6VRGW.js.map +1 -0
  6. package/dist/chunk-AWVTEBES.js +7 -0
  7. package/dist/chunk-AWVTEBES.js.map +1 -0
  8. package/dist/chunk-JHX2WWYS.js +78766 -0
  9. package/dist/chunk-JHX2WWYS.js.map +1 -0
  10. package/dist/{chunk-XJPITJRE.js → chunk-JI36NHJX.js} +18 -6
  11. package/dist/chunk-JI36NHJX.js.map +1 -0
  12. package/dist/chunk-MTQJBBHB.js +4586 -0
  13. package/dist/chunk-MTQJBBHB.js.map +1 -0
  14. package/dist/chunk-TIIA4ZAI.js +56 -0
  15. package/dist/chunk-TIIA4ZAI.js.map +1 -0
  16. package/dist/chunk-TYUDGJVU.js +7 -0
  17. package/dist/chunk-TYUDGJVU.js.map +1 -0
  18. package/dist/chunk-YJXKRB2D.js +7651 -0
  19. package/dist/chunk-YJXKRB2D.js.map +1 -0
  20. package/dist/chunk-YNB6ALUV.js +56 -0
  21. package/dist/chunk-YNB6ALUV.js.map +1 -0
  22. package/dist/index.js +13 -9
  23. package/dist/index.js.map +1 -1
  24. package/dist/ipfs.js +4 -3
  25. package/dist/pubsub.js +5 -4
  26. package/dist/query.js +5 -4
  27. package/dist/stream.js +4 -3
  28. package/dist/types.js +5 -4
  29. package/dist/utils.js +6 -0
  30. package/dist/utils.js.map +1 -1
  31. package/package.json +1 -1
  32. package/dist/chunk-6ZDPEEFN.js +0 -67
  33. package/dist/chunk-6ZDPEEFN.js.map +0 -1
  34. package/dist/chunk-DBACGNVR.js +0 -1
  35. package/dist/chunk-DBACGNVR.js.map +0 -1
  36. package/dist/chunk-I5PELB4T.js +0 -770
  37. package/dist/chunk-I5PELB4T.js.map +0 -1
  38. package/dist/chunk-K2JRTCRC.js +0 -44
  39. package/dist/chunk-K2JRTCRC.js.map +0 -1
  40. package/dist/chunk-RBXGBMA7.js.map +0 -1
  41. package/dist/chunk-TR5AJKIN.js +0 -1
  42. package/dist/chunk-TR5AJKIN.js.map +0 -1
  43. package/dist/chunk-VKQDEGWA.js +0 -561
  44. package/dist/chunk-VKQDEGWA.js.map +0 -1
  45. package/dist/chunk-X23XAGRU.js +0 -60
  46. package/dist/chunk-X23XAGRU.js.map +0 -1
  47. package/dist/chunk-XJPITJRE.js.map +0 -1
@@ -1,15 +1,26 @@
1
1
  import {
2
2
  ApplogStreamInMemory
3
- } from "./chunk-VKQDEGWA.js";
3
+ } from "./chunk-MTQJBBHB.js";
4
4
  import {
5
+ autorun,
6
+ comparer,
5
7
  computedFnDeepCompare,
6
8
  createDebugName,
7
- observableArrayMap
8
- } from "./chunk-I5PELB4T.js";
9
+ observableArrayMap,
10
+ toJS
11
+ } from "./chunk-YJXKRB2D.js";
12
+ import {
13
+ Logger
14
+ } from "./chunk-JHX2WWYS.js";
15
+ import {
16
+ init_dirname
17
+ } from "./chunk-TIIA4ZAI.js";
18
+
19
+ // src/query.ts
20
+ init_dirname();
9
21
 
10
22
  // src/query/divergences.ts
11
- import { Logger } from "besonders-logger";
12
- import { autorun, comparer, toJS } from "mobx";
23
+ init_dirname();
13
24
  var { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.INFO);
14
25
  var queryDivergencesByPrev = computedFnDeepCompare(function queryConflictingByPrev(sourceStream) {
15
26
  DEBUG(`queryDivergencesByPrev<${sourceStream.nameAndSizeUntracked}>`);
@@ -49,6 +60,7 @@ var queryDivergencesByPrev = computedFnDeepCompare(function queryConflictingByPr
49
60
  }, { equals: comparer.structural });
50
61
 
51
62
  // src/query/matchers.ts
63
+ init_dirname();
52
64
  function includes(str) {
53
65
  return (vl) => vl?.includes?.(str);
54
66
  }
@@ -61,4 +73,4 @@ export {
61
73
  includes,
62
74
  includedIn
63
75
  };
64
- //# sourceMappingURL=chunk-XJPITJRE.js.map
76
+ //# sourceMappingURL=chunk-JI36NHJX.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/query.ts","../src/query/divergences.ts","../src/query/matchers.ts"],"sourcesContent":["export * from './mobx/mobx-utils'\nexport * from './query/basic'\nexport * from './query/divergences'\nexport * from './query/matchers'\n","import { Logger } from 'besonders-logger'\nimport { autorun, comparer, toJS } from 'mobx'\nimport { Applog } from '../applog/datom-types'\nimport { computedFnDeepCompare, createDebugName, observableArrayMap } from '../mobx/mobx-utils'\nimport { ApplogStream } from '../stream'\nimport { ApplogStreamInMemory } from '../stream/writeable'\n\nconst { WARN, LOG, DEBUG, VERBOSE, ERROR } = Logger.setup(Logger.INFO) // eslint-disable-line no-unused-vars\n\nexport interface DivergenceLeaf {\n\tlog: Applog\n\tstream: ApplogStream\n}\n\nexport const queryDivergencesByPrev = computedFnDeepCompare(function queryConflictingByPrev(\n\tsourceStream: ApplogStream,\n) {\n\tDEBUG(`queryDivergencesByPrev<${sourceStream.nameAndSizeUntracked}>`)\n\tif (sourceStream.filters.includes('withoutHistory')) WARN(`queryDivergencesByPrev on stream withoutHistory`, sourceStream)\n\n\tconst divergences = observableArrayMap(() => {\n\t\tconst logsForNode = new Map<string, Applog[]>()\n\t\tconst leafs = new Set<string>()\n\t\tVERBOSE('all applogs:', sourceStream.applogs)\n\t\tfor (const log of sourceStream.applogs) {\n\t\t\tlet prevLogs\n\t\t\tif (log.pv) {\n\t\t\t\tprevLogs = log.pv && logsForNode.get(log.pv.toString())\n\t\t\t\tleafs.delete(log.pv.toString())\n\t\t\t}\n\t\t\tVERBOSE('traversing log', { log, prevLogs, leafs: Array.from(leafs) })\n\t\t\tlogsForNode.set(log.cid, prevLogs ? [...prevLogs, log] : [log])\n\t\t\tleafs.add(log.cid)\n\t\t}\n\t\treturn Array.from(leafs).map(leafID => {\n\t\t\t// ? use MappedApplogStream?\n\t\t\tconst stream = new ApplogStreamInMemory(\n\t\t\t\tlogsForNode.get(leafID),\n\t\t\t\tsourceStream.filters,\n\t\t\t\tcreateDebugName({\n\t\t\t\t\tcaller: 'DivergenceLeaf',\n\t\t\t\t\tstream: sourceStream,\n\t\t\t\t\tpattern: `leaf: ${leafID}`,\n\t\t\t\t}),\n\t\t\t\ttrue,\n\t\t\t\tsourceStream,\n\t\t\t)\n\t\t\treturn ({ log: stream.latestLog, stream })\n\t\t})\n\t}, { name: createDebugName({ caller: 'queryDivergencesByPrev', stream: sourceStream }) })\n\tVERBOSE.isDisabled || autorun(() => VERBOSE(`[queryDivergencesByPrev] result:`, toJS(divergences)))\n\treturn divergences\n}, { equals: comparer.structural })\n","import { DatomPart } from '../applog/datom-types'\n\nexport function includes(str: string) {\n\treturn (vl: DatomPart) => vl?.includes?.(str)\n}\nexport function includedIn(arr: string[]) {\n\treturn (vl: DatomPart) => arr?.includes?.(vl)\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;AAAA;;;ACAA;AAOA,IAAM,EAAE,MAAM,KAAK,OAAO,SAAS,MAAM,IAAI,OAAO,MAAM,OAAO,IAAI;AAO9D,IAAM,yBAAyB,sBAAsB,SAAS,uBACpE,cACC;AACD,QAAM,0BAA0B,aAAa,oBAAoB,GAAG;AACpE,MAAI,aAAa,QAAQ,SAAS,gBAAgB;AAAG,SAAK,mDAAmD,YAAY;AAEzH,QAAM,cAAc,mBAAmB,MAAM;AAC5C,UAAM,cAAc,oBAAI,IAAsB;AAC9C,UAAM,QAAQ,oBAAI,IAAY;AAC9B,YAAQ,gBAAgB,aAAa,OAAO;AAC5C,eAAW,OAAO,aAAa,SAAS;AACvC,UAAI;AACJ,UAAI,IAAI,IAAI;AACX,mBAAW,IAAI,MAAM,YAAY,IAAI,IAAI,GAAG,SAAS,CAAC;AACtD,cAAM,OAAO,IAAI,GAAG,SAAS,CAA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