mastra 0.1.57-alpha.92 → 0.1.57-alpha.94

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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/cloudflare/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,SAAgB;IAEd,UAAU;IAMV,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE;IAIlD,YAAY;IA2ClB,UAAU,IAAI,IAAI;IAgCZ,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAajE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/commands/deploy/cloudflare/index.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,qBAAa,kBAAmB,SAAQ,QAAQ;IAC9C,IAAI,SAAgB;IAEd,UAAU;IAUV,KAAK,CAAC,EAAE,GAAG,EAAE,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAA;KAAE;IAIlD,YAAY;IA2ClB,UAAU,IAAI,IAAI;IA4CZ,aAAa,CAAC,EAAE,KAAK,EAAE,EAAE;QAAE,KAAK,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC;CAajE"}
@@ -10,6 +10,10 @@ export class CloudflareDeployer extends Deployer {
10
10
  this.name = 'Cloudflare';
11
11
  }
12
12
  async installCli() {
13
+ if (process.env.SKIP_INSTALL_CLI === 'true') {
14
+ console.log('Skipping Wrangler CLI installation...');
15
+ return;
16
+ }
13
17
  console.log('Installing Wrangler CLI...');
14
18
  const depsService = new DepsService();
15
19
  await depsService.installPackages(['wrangler -g']);
@@ -52,10 +56,13 @@ export class CloudflareDeployer extends Deployer {
52
56
  }, null, 2));
53
57
  }
54
58
  writeFiles() {
59
+ const cfWorkerName = process.env.CF_WORKER_NAME ?? 'mastra';
60
+ const cfRoute = process.env.CF_ROUTE_NAME;
61
+ const cfZone = process.env.CF_ZONE_NAME;
55
62
  const envVars = this.getEnvVars();
56
63
  // TODO ENV KEYS
57
64
  writeFileSync(join(this.dotMastraPath, 'wrangler.toml'), `
58
- name = "mastra"
65
+ name = "${cfWorkerName}"
59
66
  main = "index.mjs" # Your main worker file
60
67
  compatibility_date = "2024-12-02"
61
68
  compatibility_flags = ["nodejs_compat"]
@@ -71,6 +78,13 @@ main = "mastra.mjs"
71
78
  [observability.logs]
72
79
  enabled = true
73
80
 
81
+ ${cfRoute
82
+ ? `[[routes]]
83
+ pattern = "${cfRoute}"
84
+ zone_name = "${cfZone}"
85
+ custom_domain = true`
86
+ : ``}
87
+
74
88
  [vars]
75
89
  ${Object.entries(envVars || {})
76
90
  ?.map(([key, value]) => `${key} = "${value}"`)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mastra",
3
- "version": "0.1.57-alpha.92",
3
+ "version": "0.1.57-alpha.94",
4
4
  "license": "MIT",
5
5
  "description": "cli for mastra",
6
6
  "type": "module",
@@ -61,7 +61,6 @@
61
61
  "fs-extra": "^11.2.0",
62
62
  "is-port-reachable": "^4.0.0",
63
63
  "itty-router": "^5.0.18",
64
- "jest": "^29.7.0",
65
64
  "json-schema-to-zod": "^2.5.0",
66
65
  "lucide-react": "^0.468.0",
67
66
  "memfs": "^4.14.0",
@@ -88,7 +87,6 @@
88
87
  "tailwind-merge": "^2.5.5",
89
88
  "tailwindcss-animate": "^1.0.7",
90
89
  "tcp-port-used": "^1.0.2",
91
- "ts-jest": "^29.2.4",
92
90
  "tsconfig-paths": "^4.2.0",
93
91
  "type-fest": "^4.30.0",
94
92
  "typescript": "^5.5.4",
@@ -101,7 +99,6 @@
101
99
  "devDependencies": {
102
100
  "@types/express": "^5.0.0",
103
101
  "@types/fs-extra": "^11.0.4",
104
- "@types/jest": "^29.5.12",
105
102
  "@types/node": "^22.10.0",
106
103
  "@types/prompt": "^1.1.8",
107
104
  "@types/react": "^18",
@@ -126,7 +123,8 @@
126
123
  "dev:playground": "cd src/playground && vite",
127
124
  "init": "npx tsx src/index.ts init",
128
125
  "dev": "npx tsx src/index.ts dev",
129
- "test": "node --experimental-vm-modules node_modules/jest/bin/jest.js",
126
+ "test": "vitest run",
127
+ "test:watch": "vitest watch",
130
128
  "clean": "rm -rf dist && rm -rf node_modules",
131
129
  "typecheck": "tsc --noEmit --incremental",
132
130
  "postinstall": "node src/scripts/postinstall.js"