@metagptx/web-sdk 0.0.24 → 0.0.26

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.
package/dist/index.d.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import * as axios0 from "axios";
2
2
  import { AxiosRequestConfig } from "axios";
3
- import { Plugin } from "vite";
4
3
 
5
4
  //#region src/utils/request.d.ts
6
5
  /**
@@ -182,6 +181,14 @@ interface PluginOptions {
182
181
  /**
183
182
  * Vite plugin to automatically create routes
184
183
  */
185
- declare function vitePluginPlayground(options?: PluginOptions): Plugin;
184
+ declare function viteDefaultRoutes(options?: PluginOptions): {
185
+ name: string;
186
+ resolveId(id: string): string | null;
187
+ load(id: string): string | null;
188
+ transform(code: string, id: string): {
189
+ code: string;
190
+ map: null;
191
+ } | null;
192
+ };
186
193
  //#endregion
187
- export { type AnyType, type ApiCallParams, type ClientConfig, type DefaultFrameMessageTypes, type FrameMessageData, type FrameMessageType, type FrameMessageTypes, type IntegrationFunction, type IntegrationParams, type PostMessageOptions, type RequestConfig, createClient, vitePluginPlayground };
194
+ export { type AnyType, type ApiCallParams, type ClientConfig, type DefaultFrameMessageTypes, type FrameMessageData, type FrameMessageType, type FrameMessageTypes, type IntegrationFunction, type IntegrationParams, type PostMessageOptions, type RequestConfig, createClient, viteDefaultRoutes };
package/dist/index.js CHANGED
@@ -33,6 +33,6 @@ export default function NotFoundPage() {
33
33
  );
34
34
  }
35
35
 
36
- `,m=[{path:`*`,componentName:`NotFoundPage`,componentCode:p}];function h(e={}){let t=e.routes||m,n=new Map;return t.forEach(e=>{let t=`\0virtual:${e.componentName.toLowerCase()}.tsx`;n.set(t,e.componentCode)}),{name:`vite-plugin-playground`,enforce:`pre`,resolveId(e){for(let n of t){let t=`virtual:${n.componentName.toLowerCase()}`;if(e===t)return`\0${t}.tsx`}return null},load(e){return n.get(e)||null},transform(e,n){if(!n.includes(`App.tsx`)||n.includes(`node_modules`))return null;let r=t.every(t=>e.includes(`import ${t.componentName}`)&&e.includes(t.path));if(r)return null;let i=e,a=[];if(t.forEach(t=>{if(!e.includes(`import ${t.componentName}`)){let e=`virtual:${t.componentName.toLowerCase()}`;a.push(`import ${t.componentName} from '${e}';`)}}),a.length>0){let n=e.match(/(import AuthError from[^;]+;)/);n&&(i=i.replace(n[0],`${n[0]}\n${a.join(`
36
+ `,m=[{path:`*`,componentName:`NotFoundPage`,componentCode:p}];function h(e={}){let t=e.routes||m,n=new Map;return t.forEach(e=>{let t=`\0virtual:${e.componentName.toLowerCase()}.tsx`;n.set(t,e.componentCode)}),{name:`vite-default-routes`,enforce:`pre`,resolveId(e){for(let n of t){let t=`virtual:${n.componentName.toLowerCase()}`;if(e===t)return`\0${t}.tsx`}return null},load(e){return n.get(e)||null},transform(e,n){if(!n.includes(`App.tsx`)||n.includes(`node_modules`))return null;let r=t.every(t=>e.includes(`import ${t.componentName}`)&&e.includes(t.path));if(r)return null;let i=e,a=[];if(t.forEach(t=>{if(!e.includes(`import ${t.componentName}`)){let e=`virtual:${t.componentName.toLowerCase()}`;a.push(`import ${t.componentName} from '${e}';`)}}),a.length>0){let n=e.match(/(import AuthError from[^;]+;)/);n&&(i=i.replace(n[0],`${n[0]}\n${a.join(`
37
37
  `)}`));let r=t,o=r.map(e=>` <Route path="${e.path}" element={<${e.componentName} />} />`).join(`
38
- `),s=i.match(/(\s+)(<\/Routes>)/i);s&&(i=i.replace(s[0],`${s[1]}${o}\n${s[0]}`))}return i===e?null:{code:i,map:null}}}}export{f as createClient,h as vitePluginPlayground};
38
+ `),s=i.match(/(\s+)(<\/Routes>)/i);s&&(i=i.replace(s[0],`${s[1]}${o}\n${s[0]}`))}return i===e?null:{code:i,map:null}}}}export{f as createClient,h as viteDefaultRoutes};
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@metagptx/web-sdk",
3
3
  "type": "module",
4
- "version": "0.0.24",
4
+ "version": "0.0.26",
5
5
  "packageManager": "pnpm@10.15.0+sha512.486ebc259d3e999a4e8691ce03b5cac4a71cbeca39372a9b762cb500cfdf0873e2cb16abe3d951b1ee2cf012503f027b98b6584e4df22524e0c7450d9ec7aa7b",
6
6
  "description": "TypeScript SDK for interacting with FuncSea API",
7
7
  "author": "MetaGPTX",