mastra 0.2.0-alpha.157 → 0.2.0-alpha.158

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.js CHANGED
@@ -10,11 +10,10 @@ import { FileService as FileService$1, getWatcherInputOptions, createWatcher } f
10
10
  import { Bundler } from '@mastra/deployer/bundler';
11
11
  import * as fsExtra2 from 'fs-extra';
12
12
  import { readFileSync } from 'node:fs';
13
- import { fileURLToPath as fileURLToPath$1 } from 'node:url';
13
+ import { fileURLToPath } from 'node:url';
14
14
  import { getDeployer, FileService as FileService$2 } from '@mastra/deployer';
15
15
  import { join as join$1 } from 'path';
16
16
  import { execa } from 'execa';
17
- import { fileURLToPath } from 'url';
18
17
  import { MastraBundler } from '@mastra/core/bundler';
19
18
  import 'dotenv';
20
19
 
@@ -34,8 +33,8 @@ var BuildBundler = class extends Bundler {
34
33
  }
35
34
  async prepare(outputDirectory) {
36
35
  await super.prepare(outputDirectory);
37
- const __filename2 = fileURLToPath$1(import.meta.url);
38
- const __dirname = dirname(__filename2);
36
+ const __filename = fileURLToPath(import.meta.url);
37
+ const __dirname = dirname(__filename);
39
38
  const playgroundServePath = join(outputDirectory, this.outputDir, "playground");
40
39
  await fsExtra2.copy(join(dirname(__dirname), "src/playground/dist"), playgroundServePath, {
41
40
  overwrite: true
@@ -45,8 +44,8 @@ var BuildBundler = class extends Bundler {
45
44
  return this._bundle(this.getEntry(), entryFile, outputDirectory);
46
45
  }
47
46
  getEntry() {
48
- const __filename2 = fileURLToPath$1(import.meta.url);
49
- const __dirname = dirname(__filename2);
47
+ const __filename = fileURLToPath(import.meta.url);
48
+ const __dirname = dirname(__filename);
50
49
  return readFileSync(join(__dirname, "templates", "dev.entry.js"), "utf8");
51
50
  }
52
51
  };
@@ -120,16 +119,16 @@ var DevBundler = class extends MastraBundler {
120
119
  async prepare(outputDirectory) {
121
120
  await fsExtra2.ensureDir(outputDirectory);
122
121
  await fsExtra2.emptyDir(outputDirectory);
123
- const __filename2 = fileURLToPath$1(import.meta.url);
124
- const __dirname = dirname(__filename2);
122
+ const __filename = fileURLToPath(import.meta.url);
123
+ const __dirname = dirname(__filename);
125
124
  const playgroundServePath = join(outputDirectory, "playground");
126
125
  await fsExtra2.copy(join(dirname(__dirname), "src/playground/dist"), playgroundServePath, {
127
126
  overwrite: true
128
127
  });
129
128
  }
130
129
  async watch(outputDirectory) {
131
- const __filename2 = fileURLToPath$1(import.meta.url);
132
- const __dirname = dirname(__filename2);
130
+ const __filename = fileURLToPath(import.meta.url);
131
+ const __dirname = dirname(__filename);
133
132
  const fileService = new FileService$2();
134
133
  const entryFile = fileService.getFirstExistingFile([
135
134
  join(this.mastraDir, "index.ts"),
@@ -183,7 +182,6 @@ var DevBundler = class extends MastraBundler {
183
182
  };
184
183
 
185
184
  // src/commands/dev/dev.ts
186
- fileURLToPath(import.meta.url);
187
185
  var currentServerProcess;
188
186
  var isRestarting = false;
189
187
  var startServer = async (dotMastraPath, port, env) => {
@@ -6,6 +6,11 @@ import { evaluate } from '@mastra/core/eval';
6
6
  import { AvailableHooks, registerHook } from '@mastra/core/hooks';
7
7
  import { MastraStorage } from '@mastra/core/storage';
8
8
 
9
+ // init storage
10
+ if (mastra.storage) {
11
+ await mastra.storage.init();
12
+ }
13
+
9
14
  // @ts-ignore
10
15
  await createNodeServer(mastra, { playground: true, swaggerUI: true });
11
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastra",
3
- "version": "0.2.0-alpha.157",
3
+ "version": "0.2.0-alpha.158",
4
4
  "license": "MIT",
5
5
  "description": "cli for mastra",
6
6
  "type": "module",
@@ -55,8 +55,8 @@
55
55
  "yocto-spinner": "^0.1.1",
56
56
  "zod": "^3.24.1",
57
57
  "zod-to-json-schema": "^3.24.1",
58
- "@mastra/core": "^0.2.0-alpha.99",
59
- "@mastra/deployer": "^0.1.0-alpha.49"
58
+ "@mastra/core": "^0.2.0-alpha.100",
59
+ "@mastra/deployer": "^0.1.0-alpha.50"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@ai-sdk/openai": "^1.1.9",