mastra-starter 1.0.1 → 1.0.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 (2) hide show
  1. package/index.mjs +4 -2
  2. package/package.json +1 -1
package/index.mjs CHANGED
@@ -1,3 +1,5 @@
1
+ #!/usr/bin/env node
2
+
1
3
  import path from 'path';
2
4
  import child_process from 'child_process';
3
5
 
@@ -20,8 +22,8 @@ const main = async () => {
20
22
 
21
23
  const character = options.character || 'default';
22
24
 
23
- const p = path.join(__dirname, 'node_modules', 'mastra', 'dist', 'index.js');
24
- const cp = child_process.spawn(process.execPath, [p, 'dev'], {
25
+ const mastraPath = import.meta.resolve('mastra').replace('file://', '');
26
+ const cp = child_process.spawn(process.execPath, [mastraPath, 'dev'], {
25
27
  env: {
26
28
  ...process.env,
27
29
  CHARACTER_JSON_PATH: character,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastra-starter",
3
- "version": "1.0.1",
3
+ "version": "1.0.3",
4
4
  "main": "index.mjs",
5
5
  "bin": {
6
6
  "mastra-starter": "./index.mjs"