@mastra/deployer 0.0.1-alpha.28 → 0.0.1-alpha.3

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 (75) hide show
  1. package/CHANGELOG.md +0 -190
  2. package/dist/build/bundle.d.ts +8 -0
  3. package/dist/build/bundle.d.ts.map +1 -0
  4. package/dist/build/deps.d.ts +25 -0
  5. package/dist/build/deps.d.ts.map +1 -0
  6. package/dist/build/env.d.ts +14 -0
  7. package/dist/build/env.d.ts.map +1 -0
  8. package/dist/build/fs.d.ts +22 -0
  9. package/dist/build/fs.d.ts.map +1 -0
  10. package/dist/build/index.d.ts +6 -0
  11. package/dist/build/index.d.ts.map +1 -0
  12. package/dist/build/utils.d.ts +4 -0
  13. package/dist/build/utils.d.ts.map +1 -0
  14. package/dist/deploy/base.d.ts +39 -0
  15. package/dist/deploy/base.d.ts.map +1 -0
  16. package/dist/deploy/index.d.ts +2 -0
  17. package/dist/deploy/index.d.ts.map +1 -0
  18. package/dist/deployer.cjs.development.js +3442 -0
  19. package/dist/deployer.cjs.development.js.map +1 -0
  20. package/dist/deployer.cjs.production.min.js +2 -0
  21. package/dist/deployer.cjs.production.min.js.map +1 -0
  22. package/dist/deployer.esm.js +3410 -0
  23. package/dist/deployer.esm.js.map +1 -0
  24. package/dist/index.d.ts +4 -116
  25. package/dist/index.d.ts.map +1 -0
  26. package/dist/index.js +5 -661
  27. package/dist/server/handlers/agents.d.ts +6 -0
  28. package/dist/server/handlers/agents.d.ts.map +1 -0
  29. package/dist/server/handlers/client.d.ts +7 -0
  30. package/dist/server/handlers/client.d.ts.map +1 -0
  31. package/dist/server/handlers/error.d.ts +7 -0
  32. package/dist/server/handlers/error.d.ts.map +1 -0
  33. package/dist/server/handlers/logs.d.ts +4 -0
  34. package/dist/server/handlers/logs.d.ts.map +1 -0
  35. package/dist/server/handlers/memory.d.ts +17 -0
  36. package/dist/server/handlers/memory.d.ts.map +1 -0
  37. package/dist/server/handlers/root.d.ts +3 -0
  38. package/dist/server/handlers/root.d.ts.map +1 -0
  39. package/dist/server/handlers/syncs.d.ts +3 -0
  40. package/dist/server/handlers/syncs.d.ts.map +1 -0
  41. package/dist/server/handlers/tools.d.ts +7 -0
  42. package/dist/server/handlers/tools.d.ts.map +1 -0
  43. package/dist/server/handlers/utils.d.ts +2 -0
  44. package/dist/server/handlers/utils.d.ts.map +1 -0
  45. package/dist/server/handlers/workflows.d.ts +11 -0
  46. package/dist/server/handlers/workflows.d.ts.map +1 -0
  47. package/dist/server/index.d.ts +7 -14
  48. package/dist/server/index.d.ts.map +1 -0
  49. package/dist/server/index.js +106 -516
  50. package/dist/server/types.d.ts +5 -0
  51. package/dist/server/types.d.ts.map +1 -0
  52. package/dist/server/welcome.d.ts +2 -0
  53. package/dist/server/welcome.d.ts.map +1 -0
  54. package/package.json +28 -22
  55. package/src/build/bundle.ts +11 -45
  56. package/src/build/deps.ts +14 -31
  57. package/src/deploy/base.ts +13 -28
  58. package/src/deploy/index.ts +0 -1
  59. package/src/index.ts +1 -0
  60. package/src/server/handlers/agents.ts +12 -58
  61. package/src/server/handlers/client.ts +2 -2
  62. package/src/server/handlers/error.ts +5 -5
  63. package/src/server/handlers/logs.ts +1 -1
  64. package/src/server/handlers/memory.ts +1 -1
  65. package/src/server/handlers/root.ts +1 -1
  66. package/src/server/handlers/syncs.ts +19 -0
  67. package/src/server/handlers/tools.ts +1 -1
  68. package/src/server/handlers/workflows.ts +5 -8
  69. package/src/server/index.ts +68 -326
  70. package/src/server/openapi.json +16 -127
  71. package/tsconfig.json +6 -1
  72. package/vitest.config.ts +1 -1
  73. package/README.md +0 -159
  74. package/src/deploy/log.ts +0 -61
  75. package/src/server/handlers/vector.ts +0 -149
package/CHANGELOG.md CHANGED
@@ -1,195 +1,5 @@
1
1
  # @mastra/deployer
2
2
 
3
- ## 0.0.1-alpha.28
4
-
5
- ### Patch Changes
6
-
7
- - 2ab57d6: Fix: Workflows require a trigger schema otherwise it fails to run in dev
8
- - 9625602: Use mastra core splitted bundles in other packages
9
- - Updated dependencies [30322ce]
10
- - Updated dependencies [78eec7c]
11
- - Updated dependencies [9625602]
12
- - Updated dependencies [8769a62]
13
- - @mastra/core@0.2.0-alpha.83
14
-
15
- ## 0.0.1-alpha.27
16
-
17
- ### Patch Changes
18
-
19
- - 73d112c: Core and deployer fixes
20
- - ac8c61a: Mastra server vector operations
21
- - Updated dependencies [73d112c]
22
- - @mastra/core@0.1.27-alpha.82
23
-
24
- ## 0.0.1-alpha.26
25
-
26
- ### Patch Changes
27
-
28
- - Updated dependencies [9fb3039]
29
- - @mastra/core@0.1.27-alpha.81
30
-
31
- ## 0.0.1-alpha.25
32
-
33
- ### Patch Changes
34
-
35
- - Updated dependencies [327ece7]
36
- - @mastra/core@0.1.27-alpha.80
37
-
38
- ## 0.0.1-alpha.24
39
-
40
- ### Patch Changes
41
-
42
- - Updated dependencies [21fe536]
43
- - @mastra/core@0.1.27-alpha.79
44
-
45
- ## 0.0.1-alpha.23
46
-
47
- ### Patch Changes
48
-
49
- - 88f18d7: Update cors support
50
-
51
- ## 0.0.1-alpha.22
52
-
53
- ### Patch Changes
54
-
55
- - 685108a: Remove syncs and excess rag
56
- - 685108a: Removing mastra syncs
57
- - Updated dependencies [685108a]
58
- - Updated dependencies [685108a]
59
- - @mastra/core@0.1.27-alpha.78
60
-
61
- ## 0.0.1-alpha.21
62
-
63
- ### Patch Changes
64
-
65
- - cfb966f: Deprecate @mastra/tts for mastra speech providers
66
- - Updated dependencies [8105fae]
67
- - @mastra/core@0.1.27-alpha.77
68
-
69
- ## 0.0.1-alpha.20
70
-
71
- ### Patch Changes
72
-
73
- - ae7bf94: Fix loggers messing up deploys
74
- - ae7bf94: Changeset
75
- - Updated dependencies [ae7bf94]
76
- - Updated dependencies [ae7bf94]
77
- - @mastra/core@0.1.27-alpha.76
78
-
79
- ## 0.0.1-alpha.19
80
-
81
- ### Patch Changes
82
-
83
- - 7064554: deployer fixes
84
- - Updated dependencies [23dcb23]
85
- - @mastra/core@0.1.27-alpha.75
86
-
87
- ## 0.0.1-alpha.18
88
-
89
- ### Patch Changes
90
-
91
- - Updated dependencies [7b87567]
92
- - @mastra/core@0.1.27-alpha.74
93
-
94
- ## 0.0.1-alpha.17
95
-
96
- ### Patch Changes
97
-
98
- - Updated dependencies [3427b95]
99
- - @mastra/core@0.1.27-alpha.73
100
-
101
- ## 0.0.1-alpha.16
102
-
103
- ### Patch Changes
104
-
105
- - e4d4ede: Better setLogger()
106
- - Updated dependencies [e4d4ede]
107
- - Updated dependencies [06b2c0a]
108
- - @mastra/core@0.1.27-alpha.72
109
-
110
- ## 0.0.1-alpha.15
111
-
112
- ### Patch Changes
113
-
114
- - d9c8dd0: Logger changes for default transports
115
- - Updated dependencies [d9c8dd0]
116
- - @mastra/core@0.1.27-alpha.71
117
-
118
- ## 0.0.1-alpha.14
119
-
120
- ### Patch Changes
121
-
122
- - ad2cd74: Deploy fix
123
-
124
- ## 0.0.1-alpha.13
125
-
126
- ### Patch Changes
127
-
128
- - a1774e7: Improve bundling
129
-
130
- ## 0.0.1-alpha.12
131
-
132
- ### Patch Changes
133
-
134
- - 28dceab: Catch apiKey error in dev
135
-
136
- ## 0.0.1-alpha.11
137
-
138
- ### Patch Changes
139
-
140
- - bdaf834: publish packages
141
-
142
- ## 0.0.1-alpha.10
143
-
144
- ### Patch Changes
145
-
146
- - Updated dependencies [dd6d87f]
147
- - Updated dependencies [04434b6]
148
- - @mastra/core@0.1.27-alpha.70
149
-
150
- ## 0.0.1-alpha.9
151
-
152
- ### Patch Changes
153
-
154
- - 9066f95: CF deployer fixes
155
-
156
- ## 0.0.1-alpha.8
157
-
158
- ### Patch Changes
159
-
160
- - b425845: Logger and execa logs
161
-
162
- ## 0.0.1-alpha.7
163
-
164
- ### Patch Changes
165
-
166
- - 1944807: Unified logger and major step in better logs
167
- - 9ade36e: Changed measure for evals, added endpoints, attached metrics to agent, added ui for evals in playground, and updated docs
168
- - Updated dependencies [1944807]
169
- - Updated dependencies [9ade36e]
170
- - @mastra/core@0.1.27-alpha.69
171
-
172
- ## 0.0.1-alpha.6
173
-
174
- ### Patch Changes
175
-
176
- - 291fe57: mastra openapi, swagger ui, dynamic servers
177
- - 1a41fbf: Fix playground workflow triggerData on execution
178
-
179
- ## 0.0.1-alpha.5
180
-
181
- ### Patch Changes
182
-
183
- - Updated dependencies [0be7181]
184
- - Updated dependencies [0be7181]
185
- - @mastra/core@0.1.27-alpha.68
186
-
187
- ## 0.0.1-alpha.4
188
-
189
- ### Patch Changes
190
-
191
- - 7babd5c: CLI build and other
192
-
193
3
  ## 0.0.1-alpha.3
194
4
 
195
5
  ### Patch Changes
@@ -0,0 +1,8 @@
1
+ export declare function bundle(entry: string, { useBanner, buildName, outfile, devMode, }?: {
2
+ devMode?: boolean;
3
+ outfile?: string;
4
+ entryFile?: string;
5
+ buildName?: string;
6
+ useBanner?: boolean;
7
+ }): Promise<void>;
8
+ //# sourceMappingURL=bundle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["../../src/build/bundle.ts"],"names":[],"mappings":"AA6LA,wBAAsB,MAAM,CAC1B,KAAK,EAAE,MAAM,EACb,EACE,SAAgB,EAChB,SAAmB,EACnB,OAAO,EACP,OAAO,GACR,GAAE;IAAE,OAAO,CAAC,EAAE,OAAO,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,OAAO,CAAA;CAAO,iBAsB7G"}
@@ -0,0 +1,25 @@
1
+ export declare class Deps {
2
+ private packageManager;
3
+ constructor();
4
+ private findLockFile;
5
+ private getPackageManager;
6
+ install({ dir, packages }: {
7
+ dir?: string;
8
+ packages?: string[];
9
+ }): Promise<import("execa").Result<{
10
+ cwd: string;
11
+ all: true;
12
+ shell: true;
13
+ stdio: "inherit";
14
+ }>>;
15
+ installPackages(packages: string[]): Promise<import("execa").Result<{
16
+ all: true;
17
+ shell: true;
18
+ stdio: "inherit";
19
+ }>>;
20
+ checkDependencies(dependencies: string[]): Promise<string>;
21
+ getProjectName(): Promise<any>;
22
+ getPackageVersion(): Promise<string | undefined>;
23
+ addScriptsToPackageJson(scripts: Record<string, string>): Promise<void>;
24
+ }
25
+ //# sourceMappingURL=deps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"deps.d.ts","sourceRoot":"","sources":["../../src/build/deps.ts"],"names":[],"mappings":"AASA,qBAAa,IAAI;IACf,OAAO,CAAC,cAAc,CAAS;;IAM/B,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,iBAAiB;IAcZ,OAAO,CAAC,EAAE,GAAmB,EAAE,QAAa,EAAE,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE;;;;;;IAgBrF,eAAe,CAAC,QAAQ,EAAE,MAAM,EAAE;;;;;IAgBlC,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC;IAwB1D,cAAc;IAWd,iBAAiB;IASjB,uBAAuB,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC;CAQrE"}
@@ -0,0 +1,14 @@
1
+ export declare abstract class EnvService {
2
+ abstract getEnvValue(key: string): Promise<string | null>;
3
+ abstract setEnvValue(key: string, value: string): Promise<void>;
4
+ }
5
+ export declare class FileEnvService extends EnvService {
6
+ private filePath;
7
+ constructor(filePath: string);
8
+ private readFile;
9
+ private writeFile;
10
+ private updateEnvData;
11
+ getEnvValue(key: string): Promise<string | null>;
12
+ setEnvValue(key: string, value: string): Promise<void>;
13
+ }
14
+ //# sourceMappingURL=env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/build/env.ts"],"names":[],"mappings":"AAEA,8BAAsB,UAAU;IAC9B,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IACzD,QAAQ,CAAC,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAChE;AAED,qBAAa,cAAe,SAAQ,UAAU;IAC5C,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,MAAM;IAK5B,OAAO,CAAC,QAAQ;IAShB,OAAO,CAAC,SAAS;YASH,aAAa;IAsBrB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAYhD,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;CAQ7D"}
@@ -0,0 +1,22 @@
1
+ export declare class FileService {
2
+ /**
3
+ *
4
+ * @param inputFile the file in the starter files directory to copy
5
+ * @param outputFilePath the destination path
6
+ * @param replaceIfExists flag to replace if it exists
7
+ * @returns
8
+ */
9
+ copyStarterFile(inputFile: string, outputFilePath: string, replaceIfExists?: boolean): Promise<boolean>;
10
+ setupEnvFile({ dbUrl }: {
11
+ dbUrl: string;
12
+ }): Promise<void>;
13
+ getFirstExistingFile(files: string[]): string;
14
+ replaceValuesInFile({ filePath, replacements, }: {
15
+ filePath: string;
16
+ replacements: {
17
+ search: string;
18
+ replace: string;
19
+ }[];
20
+ }): void;
21
+ }
22
+ //# sourceMappingURL=fs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fs.d.ts","sourceRoot":"","sources":["../../src/build/fs.ts"],"names":[],"mappings":"AAQA,qBAAa,WAAW;IACtB;;;;;;OAMG;IACU,eAAe,CAAC,SAAS,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,eAAe,CAAC,EAAE,OAAO;IAgBpF,YAAY,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE;IAS/C,oBAAoB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,MAAM;IAU7C,mBAAmB,CAAC,EACzB,QAAQ,EACR,YAAY,GACb,EAAE;QACD,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE;YAAE,MAAM,EAAE,MAAM,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,EAAE,CAAC;KACrD;CAQF"}
@@ -0,0 +1,6 @@
1
+ export * from './fs.js';
2
+ export * from './env.js';
3
+ export * from './utils.js';
4
+ export * from './bundle.js';
5
+ export * from './deps.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/build/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare function upsertMastraDir({ dir }: {
2
+ dir?: string;
3
+ }): void;
4
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/build/utils.ts"],"names":[],"mappings":"AAIA,wBAAgB,eAAe,CAAC,EAAE,GAAmB,EAAE,EAAE;IAAE,GAAG,CAAC,EAAE,MAAM,CAAA;CAAE,QAOxE"}
@@ -0,0 +1,39 @@
1
+ import { Mastra } from '@mastra/core';
2
+ import { Deps } from '../build/deps.js';
3
+ export declare class Deployer {
4
+ deps: Deps;
5
+ dotMastraPath: string;
6
+ projectPath: string;
7
+ name: string;
8
+ type: 'Deploy' | 'Dev';
9
+ log: (message: string) => void;
10
+ constructor({ dir, type }: {
11
+ dir: string;
12
+ type: 'Deploy' | 'Dev';
13
+ });
14
+ getMastraPath(): string;
15
+ getMastra(): Promise<{
16
+ mastra: Mastra;
17
+ }>;
18
+ writePackageJson(): Promise<void>;
19
+ install(): Promise<void>;
20
+ protected getEnvFiles(): string[];
21
+ getEnvVars(): Record<string, string>;
22
+ protected parseEnvFile(filePath: string): string[];
23
+ build({ dir, useBanner }: {
24
+ dir: string;
25
+ useBanner?: boolean;
26
+ }): Promise<void>;
27
+ buildServer({ playground, swaggerUI }?: {
28
+ playground?: boolean;
29
+ swaggerUI?: boolean;
30
+ }): Promise<void>;
31
+ writeServerFile(): Promise<void>;
32
+ prepare({ dir, playground, useBanner, swaggerUI, }: {
33
+ useBanner?: boolean;
34
+ dir?: string;
35
+ playground?: boolean;
36
+ swaggerUI?: boolean;
37
+ }): Promise<void>;
38
+ }
39
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/deploy/base.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAMtC,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAGxC,qBAAa,QAAQ;IACnB,IAAI,EAAE,IAAI,CAAc;IACxB,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE,MAAM,CAAM;IAClB,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAC;IAEvB,GAAG,YAAa,MAAM,UAEpB;gBAEU,EAAE,GAAG,EAAE,IAAI,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,QAAQ,GAAG,KAAK,CAAA;KAAE;IAMlE,aAAa;IAIP,SAAS;gBAC8D,MAAM;;IAG7E,gBAAgB;IA0DhB,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAK9B,SAAS,CAAC,WAAW,IAAI,MAAM,EAAE;IAOjC,UAAU;IAkBV,SAAS,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE;IAS5C,KAAK,CAAC,EAAE,GAAG,EAAE,SAAgB,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAAE;IAQrE,WAAW,CACf,EAAE,UAAkB,EAAE,SAAiB,EAAE,GAAE;QAAE,UAAU,CAAC,EAAE,OAAO,CAAC;QAAC,SAAS,CAAC,EAAE,OAAO,CAAA;KAGrF;IAiBG,eAAe;IAMf,OAAO,CAAC,EACZ,GAAG,EACH,UAAU,EACV,SAAgB,EAChB,SAAS,GACV,EAAE;QACD,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,UAAU,CAAC,EAAE,OAAO,CAAC;QACrB,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB;CAUF"}
@@ -0,0 +1,2 @@
1
+ export * from './base.js';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/deploy/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAC"}