@redocly/replay 0.29.0-next.6 → 0.29.0-next.7

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 (63) hide show
  1. package/dist/{replay-AiChatProvider-Dp-0hM6u.js → replay-AiChatProvider-CsMz9Ny8.js} +1 -1
  2. package/dist/{replay-AiChatProvider-_4MWKqjh.js → replay-AiChatProvider-PrZdp8BS.js} +52 -52
  3. package/dist/{replay-AiChatSqliteDBStorage-UzxSiaa4.js → replay-AiChatSqliteDBStorage-2UcwycP7.js} +1 -1
  4. package/dist/{replay-AiChatSqliteDBStorage-Oa4hysNI.js → replay-AiChatSqliteDBStorage-Ch8nYYAX.js} +1 -1
  5. package/dist/{replay-AiPanel-C7V7VEFK.js → replay-AiPanel-BVP0e_Ra.js} +1 -1
  6. package/dist/{replay-AiPanel-Cng3cFVq.js → replay-AiPanel-jeLVfdPf.js} +4 -4
  7. package/dist/replay-FileWatcher-ByAuX5yb.js +1 -0
  8. package/dist/{replay-FileWatcher-B2REfBM5.js → replay-FileWatcher-CCeuRwSI.js} +2 -2
  9. package/dist/{replay-SemanticSearchService-BhnCT7Z0.js → replay-SemanticSearchService-CWnYSg2x.js} +1 -1
  10. package/dist/{replay-SemanticSearchService-B027vvCl.js → replay-SemanticSearchService-CqpTIrD8.js} +32 -32
  11. package/dist/{replay-SqliteDBStorage-SoY4qOnd.js → replay-SqliteDBStorage-8Q5sVT__.js} +2 -2
  12. package/dist/{replay-SqliteDBStorage-IZ7jCbkY.js → replay-SqliteDBStorage-DlhoTUy-.js} +1 -1
  13. package/dist/{replay-TauriFileSystemAdapter-BfH97cwK.js → replay-TauriFileSystemAdapter-CsxsNEHS.js} +1 -1
  14. package/dist/{replay-TauriFileSystemAdapter-C8LC19nl.js → replay-TauriFileSystemAdapter-D2TWeqg4.js} +1 -1
  15. package/dist/{replay-TauriRootStorage-11a1y8Gt.js → replay-TauriRootStorage-DU5cTkJu.js} +15 -15
  16. package/dist/{replay-TauriRootStorage-BzJznVb7.js → replay-TauriRootStorage-DVr-1sCz.js} +1 -1
  17. package/dist/{replay-agent-loop-BjoAr7G_.js → replay-agent-loop-BIWlrZnE.js} +3 -3
  18. package/dist/{replay-agent-loop-Ck47szY-.js → replay-agent-loop-BclAkqxN.js} +1 -1
  19. package/dist/{replay-ai-chat-mappers-DQMFqfm5.js → replay-ai-chat-mappers-IIq8wpuk.js} +1 -1
  20. package/dist/{replay-ai-chat-mappers-B7xdsJNR.js → replay-ai-chat-mappers-tMl4GKpA.js} +1 -1
  21. package/dist/{replay-create-model-Bli_v8yv.js → replay-create-model-CJJtDY2W.js} +4 -4
  22. package/dist/{replay-create-model-Dsn4EnHO.js → replay-create-model-Dbu-RKR1.js} +3 -3
  23. package/dist/{replay-db-CVwyQ9mx.js → replay-db-CiDc3f4H.js} +6 -6
  24. package/dist/{replay-db-CQ4ZMVoP.js → replay-db-DuJyF4Fr.js} +1 -1
  25. package/dist/{replay-external-resolver-BTxGCk8J.js → replay-external-resolver-CUHRd2KI.js} +1 -1
  26. package/dist/{replay-external-resolver-BeVOSP0e.js → replay-external-resolver-hjlmO2_f.js} +2 -2
  27. package/dist/{replay-index-Cj1st_Mh.js → replay-index-BJkWpnD3.js} +1 -1
  28. package/dist/{replay-index-GMdv2Mbb.js → replay-index-BKy0VJhC.js} +1 -1
  29. package/dist/{replay-index-DCXNHuqM.js → replay-index-BRps0K8N.js} +5 -5
  30. package/dist/{replay-index-BRATjW8A.js → replay-index-BiX81nFD.js} +1 -1
  31. package/dist/{replay-index-JSdiVy-s.js → replay-index-BvHpl6n6.js} +1 -1
  32. package/dist/{replay-index-fAxVJ0Lp.js → replay-index-CI5fXezW.js} +1164 -1164
  33. package/dist/replay-index-DUwBFEXC.js +4 -0
  34. package/dist/replay-index-DV7TIbcG.js +1 -0
  35. package/dist/{replay-index-jkDlU0Lx.js → replay-index-MZZGINEM.js} +6 -6
  36. package/dist/{replay-index-DiSy_1OY.js → replay-index-PvlFMxhx.js} +1 -1
  37. package/dist/{replay-index-CZKbLR1Q.js → replay-index-jO1drB_G.js} +19812 -19779
  38. package/dist/replay-index-twpStg_q.js +1 -0
  39. package/dist/{replay-lint-B5Y0f_xB.js → replay-lint-DG6Bpj__.js} +3 -3
  40. package/dist/{replay-lint-D9lcI1vl.js → replay-lint-DviuCvyd.js} +3 -3
  41. package/dist/{replay-lint-graphql-BvBl_3l8.js → replay-lint-graphql-DCVDIu3K.js} +15 -15
  42. package/dist/{replay-lint-graphql-DKWH5u_B.js → replay-lint-graphql-y5Q8AbLi.js} +1 -1
  43. package/dist/{replay-periodic-revalidation-VvJSzZwq.js → replay-periodic-revalidation-8ApdHWIQ.js} +1 -1
  44. package/dist/{replay-periodic-revalidation-COYMnQbs.js → replay-periodic-revalidation-BwkTngTv.js} +1 -1
  45. package/dist/{replay-resolve-BJBgR5ui.js → replay-resolve-DXK9kMSh.js} +1 -1
  46. package/dist/{replay-resolve-DnJdXpgd.js → replay-resolve-mFgjNvXW.js} +1 -1
  47. package/dist/{replay-respect-run-B0VuZsRD.js → replay-respect-run-C_EkBybE.js} +3 -3
  48. package/dist/{replay-respect-run-DfeDqBey.js → replay-respect-run-Xc6vPsJi.js} +1 -1
  49. package/dist/{replay-tauri-path-CspwsPg-.js → replay-tauri-path-9izlvCOU.js} +1 -1
  50. package/dist/{replay-tauri-path-2hh0ihN5.js → replay-tauri-path-DQJXzOyo.js} +2 -2
  51. package/dist/{replay-useAiChatQueries-npA6uTpu.js → replay-useAiChatQueries-BIfk0TxI.js} +460 -460
  52. package/dist/{replay-useAiChatQueries-Mu7qBzg7.js → replay-useAiChatQueries-d02SKxxb.js} +43 -43
  53. package/dist/{replay-validate-key-rnDZ0V6_.js → replay-validate-key-BBw0AkiP.js} +1 -1
  54. package/dist/{replay-validate-key-BEKlKcuC.js → replay-validate-key-DO3mXt_J.js} +2 -2
  55. package/dist/replay.cjs +1 -1
  56. package/dist/replay.js +9 -9
  57. package/package.json +3 -2
  58. package/dist/replay-FileWatcher-DlDB2pmS.js +0 -1
  59. package/dist/replay-core-BJmXmoC5.js +0 -1
  60. package/dist/replay-core-B_hiOZZr.js +0 -10
  61. package/dist/replay-index-3lwhSmvi.js +0 -1
  62. package/dist/replay-index-BUuiEmgb.js +0 -4
  63. package/dist/replay-index-Oct6Dygd.js +0 -1
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-Dsn4EnHO.js"),n=require("./replay-index-fAxVJ0Lp.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("./replay-create-model-Dbu-RKR1.js"),n=require("./replay-index-CI5fXezW.js"),l=require("./replay-defaults-DVvOnvnR.js");async function s(t,a,o,i){try{const e=r.createModel({provider:t,modelId:o,apiKey:a});return await r.generateText({model:e,prompt:l.VALIDATION_PROMPT,maxOutputTokens:n.MAX_OUTPUT_TOKENS_FOR_VALIDATION,abortSignal:i?.abortSignal}),{valid:!0}}catch(e){if(e instanceof Error&&e.name==="AbortError")throw e;return{valid:!1,error:e instanceof Error&&e.message.length>0?e.message:"Validation failed. Please try again."}}}exports.validateApiKey=s;
@@ -1,5 +1,5 @@
1
- import { c as i, g as n } from "./replay-create-model-Bli_v8yv.js";
2
- import { M as s } from "./replay-index-CZKbLR1Q.js";
1
+ import { c as i, g as n } from "./replay-create-model-CJJtDY2W.js";
2
+ import { M as s } from "./replay-index-jO1drB_G.js";
3
3
  import { V as l } from "./replay-defaults-CzR6jw9a.js";
4
4
  async function g(a, e, t, o) {
5
5
  try {
package/dist/replay.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-fAxVJ0Lp.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./replay-index-CI5fXezW.js"),t=require("./replay-oauth2-redirect-handler-BfZRvm6l.js");exports.AI_PROVIDERS=e.AI_PROVIDERS;exports.AiPanelContext=e.AiPanelContext;exports.EmbeddedReplay=e.EmbeddedReplay;exports.Modal=e.Modal;exports.REUNITE_AI_PROVIDER=e.REUNITE_AI_PROVIDER;exports.Replay=e.Replay;exports.ReplayOverlay=e.ReplayOverlay;Object.defineProperty(exports,"SpanStatusCode",{enumerable:!0,get:()=>e.SpanStatusCode});exports.TelemetryClient=e.TelemetryClient;exports.applyThemeToDOM=e.applyThemeToDOM;exports.createResource=e.createResource;exports.getCurrentTheme=e.getCurrentTheme;exports.loadAgentLoop=e.loadAgentLoop;exports.makeProviderRecord=e.makeProviderRecord;exports.resolveTheme=e.resolveTheme;exports.useAiPanel=e.useAiPanel;exports.useTelemetry=e.useTelemetry;exports.useTelemetryClient=e.useTelemetryClient;exports.validateApiKey=e.validateApiKey;exports.OAuth2Error=t.OAuth2Error;exports.handleOAuth2Redirect=t.handleOAuth2Redirect;
package/dist/replay.js CHANGED
@@ -1,11 +1,11 @@
1
- import { A as s, av as r, bN as t, bO as l, R as o, bP as b, bQ as R, K as d, bR as m, bS as p, L as n, bT as u, bU as y, bV as A, bW as T, au as i, at as O, bX as h, bY as E } from "./replay-index-CZKbLR1Q.js";
2
- import { O as v, h as C } from "./replay-oauth2-redirect-handler-Bq6bpZMm.js";
1
+ import { A as s, ax as r, bQ as t, bR as l, R as o, bS as b, bT as R, N as d, bU as m, bV as p, O as n, bW as y, bX as A, bY as T, bZ as i, aw as u, av as O, b_ as h, b$ as E } from "./replay-index-jO1drB_G.js";
2
+ import { O as C, h as I } from "./replay-oauth2-redirect-handler-Bq6bpZMm.js";
3
3
  export {
4
4
  s as AI_PROVIDERS,
5
5
  r as AiPanelContext,
6
6
  t as EmbeddedReplay,
7
7
  l as Modal,
8
- v as OAuth2Error,
8
+ C as OAuth2Error,
9
9
  o as REUNITE_AI_PROVIDER,
10
10
  b as Replay,
11
11
  R as ReplayOverlay,
@@ -13,12 +13,12 @@ export {
13
13
  m as TelemetryClient,
14
14
  p as applyThemeToDOM,
15
15
  n as createResource,
16
- u as getCurrentTheme,
17
- C as handleOAuth2Redirect,
18
- y as loadAgentLoop,
19
- A as makeProviderRecord,
20
- T as resolveTheme,
21
- i as useAiPanel,
16
+ y as getCurrentTheme,
17
+ I as handleOAuth2Redirect,
18
+ A as loadAgentLoop,
19
+ T as makeProviderRecord,
20
+ i as resolveTheme,
21
+ u as useAiPanel,
22
22
  O as useTelemetry,
23
23
  h as useTelemetryClient,
24
24
  E as validateApiKey
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@redocly/replay",
3
- "version": "0.29.0-next.6",
3
+ "version": "0.29.0-next.7",
4
4
  "type": "module",
5
5
  "main": "./dist/replay.cjs",
6
6
  "module": "./dist/replay.js",
@@ -16,7 +16,7 @@
16
16
  }
17
17
  },
18
18
  "peerDependencies": {
19
- "@redocly/theme": "0.70.0-next.6",
19
+ "@redocly/theme": "0.70.0-next.7",
20
20
  "@tanstack/react-query": "5.62.3",
21
21
  "react": "^19.2.7",
22
22
  "react-dom": "^19.2.7",
@@ -55,6 +55,7 @@
55
55
  "@redocly/replay-asyncapi-sdk": "0.0.1",
56
56
  "@redocly/respect-core": "2.55.0",
57
57
  "@redocly/vscode-json-languageservice": "^3.4.9",
58
+ "@redocly/tooling-test-utils": "0.0.0",
58
59
  "@tauri-apps/api": "2.4.1",
59
60
  "@tauri-apps/plugin-deep-link": "^2.4.5",
60
61
  "@tauri-apps/plugin-dialog": "2.0.0-rc.1",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("./replay-index-fAxVJ0Lp.js"),f=require("./replay-SemanticSearchService-BhnCT7Z0.js");var v;(function(l){l.WINDOW_RESIZED="tauri://resize",l.WINDOW_MOVED="tauri://move",l.WINDOW_CLOSE_REQUESTED="tauri://close-requested",l.WINDOW_DESTROYED="tauri://destroyed",l.WINDOW_FOCUS="tauri://focus",l.WINDOW_BLUR="tauri://blur",l.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",l.WINDOW_THEME_CHANGED="tauri://theme-changed",l.WINDOW_CREATED="tauri://window-created",l.WEBVIEW_CREATED="tauri://webview-created",l.DRAG_ENTER="tauri://drag-enter",l.DRAG_OVER="tauri://drag-over",l.DRAG_DROP="tauri://drag-drop",l.DRAG_LEAVE="tauri://drag-leave"})(v||(v={}));async function m(l,e){await h.invoke("plugin:event|unlisten",{event:l,eventId:e})}async function E(l,e,i){var s;const n=(s=void 0)!==null&&s!==void 0?s:{kind:"Any"};return h.invoke("plugin:event|listen",{event:l,target:n,handler:h.transformCallback(e)}).then(t=>async()=>m(l,t))}class w{constructor(e,i,s,n,t,o){this.storage=e,this.projectDir=i,this.aiEnabled=s,this.environments=n,this.apis=t,this.collections=o}storage;projectDir;aiEnabled;environments;apis;collections;watchPath=null;unlistenEvent=null;pendingEnvironmentsReload=Promise.resolve();get tauriStorage(){return this.storage}indexApis(e){!this.aiEnabled||e.length===0||f.getSemanticSearchService().indexApis(e).catch(i=>console.error("Semantic index (apis):",i))}indexCollections(e){!this.aiEnabled||e.length===0||f.getSemanticSearchService().indexCollections(e).catch(i=>console.error("Semantic index (collections):",i))}removeApis(e){if(!this.aiEnabled||e.length===0)return;const i=f.getSemanticSearchService();Promise.all(e.map(s=>i.removeApi(s))).catch(s=>console.error("Semantic remove (apis):",s))}removeCollections(e){if(!this.aiEnabled||e.length===0)return;const i=f.getSemanticSearchService();Promise.all(e.map(s=>i.removeCollection(s))).catch(s=>console.error("Semantic remove (collections):",s))}async start(){if(this.watchPath){console.warn("Watcher already started for:",this.watchPath);return}try{this.unlistenEvent=await E("fs-watch-event",async e=>{const i=e.payload;try{await this.handleEvent(i)}catch(s){console.error("Error handling file change:",s)}}),await h.invoke("fs_watch",{path:this.projectDir,options:{recursive:!0,delayMs:500}}),this.watchPath=this.projectDir}catch(e){throw console.error("Failed to start file watcher:",e),this.unlistenEvent&&(this.unlistenEvent(),this.unlistenEvent=null),e}}async stop(){if(this.watchPath)try{await h.invoke("fs_unwatch",{path:this.watchPath})}catch(e){console.error("Error stopping file watcher:",e)}finally{this.unlistenEvent&&(this.unlistenEvent(),this.unlistenEvent=null),this.watchPath=null}}async handleEvent(e){const{changeType:i,paths:s,pathTypes:n,type:t}=e;if(await this.isProjectFolderRemoved(s,i)){await this.handleProjectFolderRemoval();return}const o=this.filterSpecFiles(s,n);if(o.paths.length===0)return;const a=await this.toFileEntries(o.paths,o.pathTypes);switch(i){case"changed":{(t.includes("Data")||t.includes("Name"))&&await this.handleModify(a);break}case"added":await this.handleCreate(a);break;case"deleted":await this.handleDelete(a);break;case"renamed":await this.handleRename(a);break;default:console.log("Unhandled change type:",i)}}filterSpecFiles(e,i){const s=[],n=[];for(let t=0;t<e.length;t++){const o=e[t],a=o.split(".").pop()?.toLowerCase();a&&["yaml","yml","json"].includes(a)&&(s.push(o),n.push(i[t]||"unknown"))}return{paths:s,pathTypes:n}}async toFileEntries(e,i){return Promise.all(e.map(async(s,n)=>({relative_path:await h.PathUtils.relative(this.projectDir,s),absolute_path:s,type:i[n]||"unknown"})))}hasExternalConfigChange(e){return e.some(i=>h.isRedoclyConfigFile(i.relative_path)&&!this.storage.isWatchExcluded(i.relative_path))}withoutConfigFile(e){return e.filter(i=>!h.isRedoclyConfigFile(i.relative_path))}consolidateFileEntries(e){const i=[],s=new Set;for(const n of e)s.has(n.relative_path)||(s.add(n.relative_path),this.storage.isWatchExcluded(n.relative_path)||i.push(n));return i}async handleModify(e){const i=this.hasExternalConfigChange(e),s=this.withoutConfigFile(e),{newApiFiles:n,existingApiFiles:t}=this.categorizeApisFromFiles(s),{newCollectionFiles:o,existingCollectionFiles:a}=this.categorizeCollectionsFromFiles(s),c=await this.findApisToReload(e),r=await this.findCollectionsToReload(e),p=[...n,...o];p.length>0&&await this.handleCreate(p),i&&await this.reloadEnvironments();const u=this.consolidateFileEntries([...t,...c]),g=this.consolidateFileEntries([...a,...r]);await this.reloadApis(u),await this.reloadCollections(g)}async handleCreate(e){this.hasExternalConfigChange(e)&&await this.reloadEnvironments();const i=this.withoutConfigFile(e),s=i.filter(r=>r.type==="api"),n=i.filter(r=>r.type==="collection"),{newApiFiles:t,existingApiFiles:o}=this.categorizeApisFromFiles(s),{newCollectionFiles:a,existingCollectionFiles:c}=this.categorizeCollectionsFromFiles(n);if(t.length>0||a.length>0){t.forEach(d=>this.storage.addPersistExcludedId(d.relative_path)),a.forEach(d=>this.storage.addPersistExcludedId(d.relative_path));const r=t.length>0?await this.tauriStorage.loadAndParseApis(t,void 0,!0):[],p=a.length>0?await this.tauriStorage.loadAndParseCollections(a,void 0):[],u=r.filter(d=>d!==null),g=p.filter(d=>d!==null);this.apis.set([...this.apis.get(),...u]),this.collections.set([...this.collections.get(),...g]),this.indexApis(u),this.indexCollections(g),setTimeout(()=>{t.forEach(d=>this.storage.removePersistExcludedId(d.relative_path)),a.forEach(d=>this.storage.removePersistExcludedId(d.relative_path))},500)}o.length>0&&await this.reloadApis(o),c.length>0&&await this.reloadCollections(c)}categorizeApisFromFiles(e){const i=new Set,s=[],n=[];for(const t of e){if(i.has(t.relative_path))continue;i.add(t.relative_path),this.apis.get().some(a=>a.id===t.relative_path)?n.push(t):t.type==="api"&&s.push(t)}return{newApiFiles:s,existingApiFiles:n}}categorizeCollectionsFromFiles(e){const i=new Set,s=[],n=[];for(const t of e){if(i.has(t.relative_path))continue;i.add(t.relative_path),this.collections.get().some(a=>a.id===t.relative_path)?n.push(t):t.type==="collection"&&s.push(t)}return{newCollectionFiles:s,existingCollectionFiles:n}}async handleDelete(e){this.hasExternalConfigChange(e)&&await this.reloadEnvironments();const i=this.withoutConfigFile(e),s=[],n=[];for(const t of i){this.storage.addPersistExcludedId(t.relative_path);const o=this.apis.get();o.some(r=>r.id===t.relative_path)&&(this.apis.set(o.filter(r=>r.id!==t.relative_path)),this.tauriStorage.deleteApiFromCache(t.relative_path),s.push(t.relative_path));const a=this.collections.get(),c=a.findIndex(r=>r.id===t.relative_path);c>=0&&(this.collections.set(a.filter((r,p)=>p!==c)),n.push(t.relative_path)),setTimeout(()=>{this.storage.removePersistExcludedId(t.relative_path)},500)}this.removeApis(s),this.removeCollections(n)}async handleRename(e){if(e.length>=2){const[i,s]=e;await this.handleDelete([i]),await this.handleCreate([s])}else await this.handleCreate(e)}async isProjectFolderRemoved(e,i){if(e.length===0)return!1;if(i==="deleted"||i==="renamed"){for(const n of e)if(n===this.projectDir)return!0}return e.filter(n=>!n.startsWith(this.projectDir+"/")&&n!==this.projectDir).length>0&&i==="renamed"}async handleProjectFolderRemoval(){const e=this.apis.get(),i=e.map(t=>t.id);e.forEach(t=>{this.storage.addPersistExcludedId(t.id),this.tauriStorage.deleteApiFromCache(t.id)}),this.apis.set([]);const s=this.collections.get(),n=s.map(t=>t.id);s.forEach(t=>{this.storage.addPersistExcludedId(t.id)}),this.collections.set([]),setTimeout(()=>{e.forEach(t=>this.storage.removePersistExcludedId(t.id)),s.forEach(t=>this.storage.removePersistExcludedId(t.id))},500),this.removeApis(i),this.removeCollections(n),await this.stop()}async findApisToReload(e){const i=[];return await Promise.all(this.apis.get().map(async s=>{const n=s.fileDependencies??new Set,t=s.id,o=e.find(a=>n.has(a.absolute_path));if(!this.storage.isWatchExcluded(t)&&o){const a=await h.PathUtils.join(this.projectDir,t);i.push({relative_path:t,absolute_path:a,type:"api"})}})),i}async findCollectionsToReload(e){const i=[];return await Promise.all(this.collections.get().map(async s=>{const n=s.fileDependencies??new Set,t=s.id,o=e.find(a=>n.has(a.absolute_path));if(!this.storage.isWatchExcluded(t)&&o){const a=await h.PathUtils.join(this.projectDir,t);i.push({relative_path:t,absolute_path:a,type:"collection"})}})),i}reloadEnvironments(){const e=this.pendingEnvironmentsReload.then(()=>this.readAndPublishEnvironments());return this.pendingEnvironmentsReload=e.catch(()=>{}),e}async readAndPublishEnvironments(){const e=this.environments.get(),i=await this.tauriStorage.readEnvironments();!(this.environments.get()!==e)&&(i.length>0||!this.storage.getEnvironmentsConfigError())&&this.environments.set(i.length>0?i:h.cloneObject(h.DEFAULT_ENVIRONMENTS)),this.storage.publishEnvironmentsConfigError()}async reloadApis(e){if(e.length===0)return;const i=await this.tauriStorage.loadAndParseApis(e,void 0,!0),s=[];await Promise.all(i.map(async(n,t)=>{if(!n){await this.handleDelete([e[t]]);return}const o=this.apis.get();o.some(a=>a.id===n.id)?(this.storage.addPersistExcludedId(n.id),this.apis.set(o.map(a=>a.id===n.id?n:a)),s.push(n),setTimeout(()=>this.storage.removePersistExcludedId(n.id),500)):console.warn("API not found in state after reload:",n.id)})),s.length>0&&this.indexApis(s)}async reloadCollections(e){if(e.length===0)return;const i=await this.tauriStorage.loadAndParseCollections(e,void 0),s=[];await Promise.all(i.map(async(n,t)=>{if(!n){await this.handleDelete([e[t]]);return}const o=this.collections.get(),a=o.findIndex(c=>c.id===n.id);a>=0?(this.storage.addPersistExcludedId(n.id),this.collections.set(o.map((c,r)=>r===a?n:c)),s.push(n),setTimeout(()=>this.storage.removePersistExcludedId(n.id),500)):console.warn("Collection not found in state after reload:",n.id)})),s.length>0&&this.indexCollections(s)}}exports.FileWatcher=w;
@@ -1 +0,0 @@
1
- "use strict";function o(r,n=!1){return window.__TAURI_INTERNALS__.transformCallback(r,n)}async function s(r,n={},e){return window.__TAURI_INTERNALS__.invoke(r,n,e)}exports.invoke=s;exports.transformCallback=o;
@@ -1,10 +0,0 @@
1
- function o(r, e = !1) {
2
- return window.__TAURI_INTERNALS__.transformCallback(r, e);
3
- }
4
- async function s(r, e = {}, n) {
5
- return window.__TAURI_INTERNALS__.invoke(r, e, n);
6
- }
7
- export {
8
- s as i,
9
- o as t
10
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./replay-core-BJmXmoC5.js");var i;(function(e){e.WINDOW_RESIZED="tauri://resize",e.WINDOW_MOVED="tauri://move",e.WINDOW_CLOSE_REQUESTED="tauri://close-requested",e.WINDOW_DESTROYED="tauri://destroyed",e.WINDOW_FOCUS="tauri://focus",e.WINDOW_BLUR="tauri://blur",e.WINDOW_SCALE_FACTOR_CHANGED="tauri://scale-change",e.WINDOW_THEME_CHANGED="tauri://theme-changed",e.WINDOW_CREATED="tauri://window-created",e.WINDOW_SUSPENDED="tauri://suspended",e.WINDOW_RESUMED="tauri://resumed",e.WEBVIEW_CREATED="tauri://webview-created",e.DRAG_ENTER="tauri://drag-enter",e.DRAG_OVER="tauri://drag-over",e.DRAG_DROP="tauri://drag-drop",e.DRAG_LEAVE="tauri://drag-leave"})(i||(i={}));async function u(e,r){window.__TAURI_EVENT_PLUGIN_INTERNALS__.unregisterListener(e,r),await n.invoke("plugin:event|unlisten",{event:e,eventId:r})}async function _(e,r,l){var t;const a=(t=void 0)!==null&&t!==void 0?t:{kind:"Any"};return n.invoke("plugin:event|listen",{event:e,target:a,handler:n.transformCallback(r)}).then(o=>async()=>u(e,o))}async function D(){return await n.invoke("plugin:deep-link|get_current")}async function s(e){return await _("deep-link://new-url",r=>{e(r.payload)})}exports.getCurrent=D;exports.onOpenUrl=s;
@@ -1,4 +0,0 @@
1
- import { g as r } from "./replay-SemanticSearchService-B027vvCl.js";
2
- export {
3
- r as getSemanticSearchService
4
- };
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("./replay-core-BJmXmoC5.js");async function o(e,n){await i.invoke("plugin:opener|open_url",{url:e,with:n})}async function t(e,n){await i.invoke("plugin:opener|open_path",{path:e,with:n})}async function r(e){const n=typeof e=="string"?[e]:e;return i.invoke("plugin:opener|reveal_item_in_dir",{paths:n})}exports.openPath=t;exports.openUrl=o;exports.revealItemInDir=r;