@redocly/replay 0.28.0-next.9 → 0.29.0-next.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 (62) hide show
  1. package/dist/replay-AiChatProvider-DUQ2hsZo.js +6 -0
  2. package/dist/{replay-AiChatProvider-DuTK5g1N.js → replay-AiChatProvider-DWj4kzZG.js} +182 -180
  3. package/dist/{replay-AiChatSqliteDBStorage-CHfMo6M6.js → replay-AiChatSqliteDBStorage-AwkpaRF3.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-cXsRIQfJ.js → replay-AiChatSqliteDBStorage-C-QR82Oo.js} +1 -1
  5. package/dist/{replay-AiPanel-CGbGwIMX.js → replay-AiPanel-DkUjsiBN.js} +50 -50
  6. package/dist/{replay-AiPanel-C_C52r20.js → replay-AiPanel-jffKz76q.js} +2 -2
  7. package/dist/replay-FileWatcher-BuLGLLQr.js +1 -0
  8. package/dist/replay-FileWatcher-DUvCC-PY.js +365 -0
  9. package/dist/{replay-SemanticSearchService-BLF1oOOu.js → replay-SemanticSearchService-CHkdWIcG.js} +15 -15
  10. package/dist/{replay-SemanticSearchService-DTc0oxN4.js → replay-SemanticSearchService-VF6AneJg.js} +1 -1
  11. package/dist/{replay-SqliteDBStorage-B_kyJ0a3.js → replay-SqliteDBStorage-CSYBSOEO.js} +1 -1
  12. package/dist/{replay-SqliteDBStorage-DF9kKplR.js → replay-SqliteDBStorage-EbVgsvZY.js} +1 -1
  13. package/dist/replay-TauriFileSystemAdapter-C2Vhu3Ay.js +108 -0
  14. package/dist/replay-TauriFileSystemAdapter-ZLQv2Jpa.js +1 -0
  15. package/dist/{replay-TauriRootStorage-Den8gI4S.js → replay-TauriRootStorage-Bqoz3cld.js} +192 -188
  16. package/dist/replay-TauriRootStorage-D8DYLi8t.js +1 -0
  17. package/dist/{replay-agent-loop-Z_nrrmg_.js → replay-agent-loop-Bm9BCm02.js} +1 -1
  18. package/dist/{replay-agent-loop-B8Mjb8DU.js → replay-agent-loop-De5Qyhy9.js} +3 -3
  19. package/dist/{replay-ai-chat-mappers-D7e8buTk.js → replay-ai-chat-mappers-lYbHE7LU.js} +1 -1
  20. package/dist/{replay-ai-chat-mappers-aJ_VMb6Z.js → replay-ai-chat-mappers-y3wFVHQe.js} +1 -1
  21. package/dist/{replay-create-model-Be3vPVDb.js → replay-create-model-BR_hDMYz.js} +4 -4
  22. package/dist/{replay-create-model-Bw20x80b.js → replay-create-model-DeyX2a2A.js} +3 -3
  23. package/dist/{replay-db-BQXljNM0.js → replay-db-8Yfdu1EO.js} +1 -1
  24. package/dist/{replay-db-BmZNrdZM.js → replay-db-CmLId87t.js} +1 -1
  25. package/dist/{replay-external-resolver-BQvSDNfH.js → replay-external-resolver-BL-garqK.js} +2 -2
  26. package/dist/{replay-external-resolver-BLzbbtnT.js → replay-external-resolver-CkqL8AKf.js} +1 -1
  27. package/dist/replay-index-49ub7kjO.js +4 -0
  28. package/dist/{replay-index-C7y4K4Cr.js → replay-index-B2_OwIzz.js} +1 -1
  29. package/dist/{replay-index-C0kvTxxm.js → replay-index-BAD7NmvH.js} +41 -41
  30. package/dist/{replay-index-BCz452N6.js → replay-index-BDcjQnps.js} +22286 -21701
  31. package/dist/{replay-index-DAIwC3ls.js → replay-index-BfiTbks9.js} +1 -1
  32. package/dist/{replay-index-B-uZhXHj.js → replay-index-CDhdpEsv.js} +1 -1
  33. package/dist/{replay-index-DYtXcqDk.js → replay-index-DTg-X2sJ.js} +1150 -1149
  34. package/dist/{replay-index-wBHsAQEV.js → replay-index-DorMJxDL.js} +1 -1
  35. package/dist/{replay-lint-CqDMOMQt.js → replay-lint-BTpTdc1d.js} +6100 -6063
  36. package/dist/{replay-lint-BzkTeXqI.js → replay-lint-DvPtwqB_.js} +97 -97
  37. package/dist/{replay-lint-graphql-BDBGJSir.js → replay-lint-graphql-B9_N8uLm.js} +1 -1
  38. package/dist/{replay-lint-graphql-BZF2eLiZ.js → replay-lint-graphql-BE8DlHWF.js} +1 -1
  39. package/dist/{replay-periodic-revalidation-C7SkB1vs.js → replay-periodic-revalidation-Dk5I6zpL.js} +1 -1
  40. package/dist/{replay-periodic-revalidation-orCv_JoF.js → replay-periodic-revalidation-QN1Nzs5P.js} +1 -1
  41. package/dist/{replay-resolve-0e5f8I7b.js → replay-resolve-Bu8MUbb4.js} +1 -1
  42. package/dist/{replay-resolve-DZMWoig2.js → replay-resolve-CiT66v_T.js} +1 -1
  43. package/dist/{replay-respect-run-ChP63WzG.js → replay-respect-run-_H2BVClG.js} +1 -1
  44. package/dist/{replay-respect-run-CLW3wGhx.js → replay-respect-run-vyQ9167I.js} +3 -3
  45. package/dist/{replay-tauri-path-DBt1dqkG.js → replay-tauri-path-C2_c3UUW.js} +1 -1
  46. package/dist/{replay-tauri-path-DvLF4Z8f.js → replay-tauri-path-nSR1IXTa.js} +2 -2
  47. package/dist/{replay-useAiChatQueries-S6v5duiJ.js → replay-useAiChatQueries-Di7srepQ.js} +994 -945
  48. package/dist/replay-useAiChatQueries-Z3RHPc9x.js +215 -0
  49. package/dist/{replay-validate-key-CMJODIH6.js → replay-validate-key-DCjaZPTw.js} +2 -2
  50. package/dist/{replay-validate-key-CNl7BV_v.js → replay-validate-key-DTrKCzzp.js} +1 -1
  51. package/dist/replay.cjs +1 -1
  52. package/dist/replay.d.ts +5 -0
  53. package/dist/replay.js +8 -8
  54. package/package.json +5 -5
  55. package/dist/replay-AiChatProvider-B_f9Wn8a.js +0 -6
  56. package/dist/replay-FileWatcher-DEOB0_DG.js +0 -1
  57. package/dist/replay-FileWatcher-Z6eygcBI.js +0 -359
  58. package/dist/replay-TauriFileSystemAdapter-CwSMakdJ.js +0 -1
  59. package/dist/replay-TauriFileSystemAdapter-DcFBYSUW.js +0 -99
  60. package/dist/replay-TauriRootStorage-DEGEIJrz.js +0 -1
  61. package/dist/replay-index-gM6vL6iT.js +0 -4
  62. package/dist/replay-useAiChatQueries-Bypgnkwa.js +0 -215
@@ -0,0 +1,108 @@
1
+ import { m as o, r as u, j as c, P as d, b as h, e as l, s as w, w as y, d as m, f } from "./replay-index-BDcjQnps.js";
2
+ import { O as E } from "./replay-Observable-D6wKbFwB.js";
3
+ const F = /* @__PURE__ */ new Set(["node_modules"]), T = /\(os error [23]\)/;
4
+ function g(r) {
5
+ return typeof r != "string" ? !1 : r.includes("No such file or directory") || r.includes("forbidden path") || T.test(r);
6
+ }
7
+ class b extends E {
8
+ constructor(t) {
9
+ super(), this.baseDir = t, this.initializeDirectory(t);
10
+ }
11
+ baseDir;
12
+ writeExcludedKeys = /* @__PURE__ */ new Set();
13
+ writeEndTimers = /* @__PURE__ */ new Map();
14
+ async initializeDirectory(t) {
15
+ await o(t, {
16
+ recursive: !0
17
+ });
18
+ }
19
+ setWriteExcludedKeys(t) {
20
+ this.writeExcludedKeys = t;
21
+ }
22
+ async ls(t) {
23
+ const e = await this.getFullPath(t);
24
+ return this.getDirEntryFilesRecursively(e);
25
+ }
26
+ async getDirEntryFilesRecursively(t) {
27
+ try {
28
+ const e = [], i = await u(t);
29
+ for (const s of i)
30
+ if (s.isDirectory) {
31
+ if (F.has(s.name))
32
+ continue;
33
+ const n = await c(t, s.name), a = await this.getDirEntryFilesRecursively(n);
34
+ e.push(...a);
35
+ } else {
36
+ const n = await c(t, s.name), a = await d.relative(this.baseDir, n);
37
+ e.push(a);
38
+ }
39
+ return e;
40
+ } catch (e) {
41
+ return e.includes("forbidden path") || console.error(e), [];
42
+ }
43
+ }
44
+ async get(t) {
45
+ const e = await this.getFullPath(t);
46
+ try {
47
+ return await h(e);
48
+ } catch (i) {
49
+ if (g(i)) return null;
50
+ try {
51
+ if (!await l(e)) return null;
52
+ } catch {
53
+ }
54
+ throw console.error(i), i;
55
+ }
56
+ }
57
+ async has(t) {
58
+ const e = await this.getFullPath(t);
59
+ return await l(e);
60
+ }
61
+ async set(t, e) {
62
+ if (!this.writeExcludedKeys.has(t)) {
63
+ this.cancelWriteEndTimer(t), this.emit("write-start", t);
64
+ try {
65
+ const i = await this.getFullPath(t), s = w(), n = i.split(s).slice(0, -1).join(s);
66
+ await o(n, {
67
+ recursive: !0
68
+ }), await y(i, e);
69
+ } finally {
70
+ this.scheduleWriteEnd(t);
71
+ }
72
+ }
73
+ }
74
+ async remove(t) {
75
+ if (!this.writeExcludedKeys.has(t)) {
76
+ this.cancelWriteEndTimer(t), this.emit("write-start", t);
77
+ try {
78
+ const e = await this.getFullPath(t);
79
+ await m(e);
80
+ } catch (e) {
81
+ !e.includes("No such file or directory") && !e.includes("forbidden path") && console.error(e);
82
+ } finally {
83
+ this.scheduleWriteEnd(t);
84
+ }
85
+ }
86
+ }
87
+ cancelWriteEndTimer(t) {
88
+ const e = this.writeEndTimers.get(t);
89
+ e && (clearTimeout(e), this.writeEndTimers.delete(t));
90
+ }
91
+ scheduleWriteEnd(t) {
92
+ this.cancelWriteEndTimer(t);
93
+ const e = setTimeout(() => {
94
+ this.emit("write-end", t), this.writeEndTimers.delete(t);
95
+ }, 1e3);
96
+ this.writeEndTimers.set(t, e);
97
+ }
98
+ async rename(t, e) {
99
+ const i = await this.getFullPath(t), s = await this.getFullPath(e);
100
+ await f(i, s);
101
+ }
102
+ async getFullPath(t) {
103
+ return await c(this.baseDir, t ?? "");
104
+ }
105
+ }
106
+ export {
107
+ b as TauriFileSystemAdapter
108
+ };
@@ -0,0 +1 @@
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-index-DTg-X2sJ.js"),o=require("./replay-Observable-bjJ6wkRB.js"),l=new Set(["node_modules"]),u=/\(os error [23]\)/;function d(n){return typeof n!="string"?!1:n.includes("No such file or directory")||n.includes("forbidden path")||u.test(n)}class h extends o.Observable{constructor(e){super(),this.baseDir=e,this.initializeDirectory(e)}baseDir;writeExcludedKeys=new Set;writeEndTimers=new Map;async initializeDirectory(e){await i.mkdir(e,{recursive:!0})}setWriteExcludedKeys(e){this.writeExcludedKeys=e}async ls(e){const t=await this.getFullPath(e);return this.getDirEntryFilesRecursively(t)}async getDirEntryFilesRecursively(e){try{const t=[],s=await i.readDir(e);for(const r of s)if(r.isDirectory){if(l.has(r.name))continue;const a=await i.join(e,r.name),c=await this.getDirEntryFilesRecursively(a);t.push(...c)}else{const a=await i.join(e,r.name),c=await i.PathUtils.relative(this.baseDir,a);t.push(c)}return t}catch(t){return t.includes("forbidden path")||console.error(t),[]}}async get(e){const t=await this.getFullPath(e);try{return await i.readTextFile(t)}catch(s){if(d(s))return null;try{if(!await i.exists(t))return null}catch{}throw console.error(s),s}}async has(e){const t=await this.getFullPath(e);return await i.exists(t)}async set(e,t){if(!this.writeExcludedKeys.has(e)){this.cancelWriteEndTimer(e),this.emit("write-start",e);try{const s=await this.getFullPath(e),r=i.sep(),a=s.split(r).slice(0,-1).join(r);await i.mkdir(a,{recursive:!0}),await i.writeTextFile(s,t)}finally{this.scheduleWriteEnd(e)}}}async remove(e){if(!this.writeExcludedKeys.has(e)){this.cancelWriteEndTimer(e),this.emit("write-start",e);try{const t=await this.getFullPath(e);await i.remove(t)}catch(t){!t.includes("No such file or directory")&&!t.includes("forbidden path")&&console.error(t)}finally{this.scheduleWriteEnd(e)}}}cancelWriteEndTimer(e){const t=this.writeEndTimers.get(e);t&&(clearTimeout(t),this.writeEndTimers.delete(e))}scheduleWriteEnd(e){this.cancelWriteEndTimer(e);const t=setTimeout(()=>{this.emit("write-end",e),this.writeEndTimers.delete(e)},1e3);this.writeEndTimers.set(e,t)}async rename(e,t){const s=await this.getFullPath(e),r=await this.getFullPath(t);await i.rename(s,r)}async getFullPath(e){return await i.join(this.baseDir,e??"")}}exports.TauriFileSystemAdapter=h;