@mastra/deployer-cloud 1.37.0-alpha.5 → 1.37.0-alpha.9
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/CHANGELOG.md +32 -0
- package/dist/studio/assets/{index-DF5wZJtB.js → index-4j6JvUiL.js} +1 -1
- package/dist/studio/assets/index-B1hF4GOp.js +1 -0
- package/dist/studio/assets/index-BpTbV1qf.js +1 -0
- package/dist/studio/assets/index-BuhMwy39.js +1 -0
- package/dist/studio/assets/index-C2YLSzEZ.js +1 -0
- package/dist/studio/assets/index-CgagWtQY.js +1 -0
- package/dist/studio/assets/index-Cj4KLOcw.js +1 -0
- package/dist/studio/assets/index-DDdvh5fb.js +1 -0
- package/dist/studio/assets/index-DJmobUqz.js +1 -0
- package/dist/studio/assets/{index-Dexw8DCO.js → index-DK6Pai79.js} +2 -2
- package/dist/studio/assets/index-DLoSu-mW.js +1 -0
- package/dist/studio/assets/index-DM4LpEKt.js +7 -0
- package/dist/studio/assets/index-DML5MgRi.js +1 -0
- package/dist/studio/assets/index-KCtMH3Ww.js +1 -0
- package/dist/studio/assets/index-eE6lmP6_.js +3 -0
- package/dist/studio/assets/{index-DAUPZUYQ.js → index-eETYi5ih.js} +5 -5
- package/dist/studio/assets/index-jjgHvGiy.js +1 -0
- package/dist/studio/assets/index-tawDtGpI.js +1 -0
- package/dist/studio/assets/mastra-TKD6KYKY-Ddd5Vyi1.js +852 -0
- package/dist/studio/assets/registry-generator-74I3CDJ7-CcGlPN0t.js +48 -0
- package/dist/studio/assets/style-BOoUhAJb.css +1 -0
- package/dist/studio/index.html +2 -2
- package/dist/studio/routes-manifest.json +1 -0
- package/package.json +5 -5
- package/dist/studio/assets/index-BDZ9Jy6c.js +0 -7
- package/dist/studio/assets/index-BDxqNj9I.js +0 -1
- package/dist/studio/assets/index-BM9dV30i.js +0 -1
- package/dist/studio/assets/index-BRiYfLbj.js +0 -1
- package/dist/studio/assets/index-BRqlQ6wj.js +0 -1
- package/dist/studio/assets/index-CMGfLx5W.js +0 -1
- package/dist/studio/assets/index-CPVggTkW.js +0 -1
- package/dist/studio/assets/index-CTScD71L.js +0 -1
- package/dist/studio/assets/index-D0H1B4Xg.js +0 -1
- package/dist/studio/assets/index-D7J5uIZm.js +0 -1
- package/dist/studio/assets/index-De8rK0Lq.js +0 -3
- package/dist/studio/assets/index-Dep5CGET.js +0 -1
- package/dist/studio/assets/index-DhEAjc5l.js +0 -1
- package/dist/studio/assets/index-DlPHqZ1W.js +0 -1
- package/dist/studio/assets/index-ebhStByt.js +0 -1
- package/dist/studio/assets/main-BGpbUKIO.js +0 -660
- package/dist/studio/assets/style-ChoUQADa.css +0 -1
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import{x as u}from"./mastra-TKD6KYKY-Ddd5Vyi1.js";import"./index-4j6JvUiL.js";const l={};var v={};function g(r){return"getAttachmentCapabilities"in r&&typeof r.getAttachmentCapabilities=="function"}async function y(r,d,i="utf-8"){const n=Math.random().toString(36).substring(2,15),o=`${r}.${v.pid}.${Date.now()}.${n}.tmp`;try{await l.writeFile(o,d,i),await l.rename(o,r)}catch(c){try{await l.unlink(o)}catch{}throw c}}async function P(r){const d=[];for(const e of r)await e.shouldEnable()&&d.push(e);const i={},n={},o={},c=3;for(const e of d){let p=null;for(let t=1;t<=c;t++)try{p=await e.fetchProviders();break}catch{if(t<c){const s=Math.min(1e3*Math.pow(2,t-1),5e3);await new Promise(f=>setTimeout(f,s))}}if(!p)continue;const m=e.id==="models.dev",a=g(e)?e.getAttachmentCapabilities():void 0;for(const[t,s]of Object.entries(p)){const f=m?t:t===e.id?e.id:`${e.id}/${t}`;i[f]=s,n[f]=s.models.sort(),a?.[t]&&(o[f]=a[t])}}return{providers:i,models:n,attachmentCapabilities:o}}function M(r){return`/**
|
|
2
|
+
* THIS FILE IS AUTO-GENERATED - DO NOT EDIT
|
|
3
|
+
* Generated from model gateway providers
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Provider models mapping type
|
|
8
|
+
* This is derived from the JSON data and provides type-safe access
|
|
9
|
+
*/
|
|
10
|
+
export type ProviderModelsMap = {
|
|
11
|
+
${Object.entries(r).map(([i,n])=>{const o=n.map(m=>`'${m}'`),e=!/^[a-zA-Z_$][a-zA-Z0-9_$]*$/.test(i)?`'${i}'`:i,p=` readonly ${e}: readonly [${o.join(", ")}];`;if(p.length>120){const m=n.map(a=>` '${a}',`).join(`
|
|
12
|
+
`);return` readonly ${e}: readonly [
|
|
13
|
+
${m}
|
|
14
|
+
];`}return p}).join(`
|
|
15
|
+
`)}
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Union type of all registered provider IDs
|
|
20
|
+
*/
|
|
21
|
+
export type Provider = keyof ProviderModelsMap;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Provider models mapping interface
|
|
25
|
+
*/
|
|
26
|
+
export interface ProviderModels {
|
|
27
|
+
[key: string]: string[];
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* OpenAI-compatible model ID type
|
|
32
|
+
* Dynamically derived from ProviderModelsMap
|
|
33
|
+
* Full provider/model paths (e.g., "openai/gpt-4o", "anthropic/claude-3-5-sonnet-20241022")
|
|
34
|
+
*/
|
|
35
|
+
export type ModelRouterModelId =
|
|
36
|
+
| {
|
|
37
|
+
[P in Provider]: \`\${P}/\${ProviderModelsMap[P][number]}\`;
|
|
38
|
+
}[Provider]
|
|
39
|
+
| \`mastra/\${ProviderModelsMap['openrouter'][number]}\`
|
|
40
|
+
| (string & {});
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Extract the model part from a ModelRouterModelId for a specific provider
|
|
44
|
+
* Dynamically derived from ProviderModelsMap
|
|
45
|
+
* Example: ModelForProvider<'openai'> = 'gpt-4o' | 'gpt-4-turbo' | ...
|
|
46
|
+
*/
|
|
47
|
+
export type ModelForProvider<P extends Provider> = ProviderModelsMap[P][number];
|
|
48
|
+
`}async function $(r,d,i,n,o){const c=u.dirname(r),e=u.dirname(d);await l.mkdir(c,{recursive:!0}),await l.mkdir(e,{recursive:!0}),await y(r,JSON.stringify({providers:i,models:n,version:"1.0.0"},null,2),"utf-8");const m=M(n);if(await y(d,m,"utf-8"),o&&Object.keys(o).length>0){const a=u.join(c,"capabilities");await l.mkdir(a,{recursive:!0});try{const t=await l.readdir(a);for(const s of t)s.endsWith(".json")&&await l.unlink(u.join(a,s))}catch{}for(const[t,s]of Object.entries(o)){const f=u.join(a,`${t}.json`);await y(f,JSON.stringify({attachment:s},null,2),"utf-8")}}}export{y as atomicWriteFile,P as fetchProvidersFromGateways,M as generateTypesContent,$ as writeRegistryFiles};
|