mastra 0.1.57-alpha.92 → 0.1.57-alpha.93

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;IAMV,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"}
@@ -52,10 +52,13 @@ export class CloudflareDeployer extends Deployer {
52
52
  }, null, 2));
53
53
  }
54
54
  writeFiles() {
55
+ const cfWorkerName = process.env.CF_WORKER_NAME ?? 'mastra';
56
+ const cfRoute = process.env.CF_ROUTE_NAME;
57
+ const cfZone = process.env.CF_ZONE_NAME;
55
58
  const envVars = this.getEnvVars();
56
59
  // TODO ENV KEYS
57
60
  writeFileSync(join(this.dotMastraPath, 'wrangler.toml'), `
58
- name = "mastra"
61
+ name = "${cfWorkerName}"
59
62
  main = "index.mjs" # Your main worker file
60
63
  compatibility_date = "2024-12-02"
61
64
  compatibility_flags = ["nodejs_compat"]
@@ -71,6 +74,13 @@ main = "mastra.mjs"
71
74
  [observability.logs]
72
75
  enabled = true
73
76
 
77
+ ${cfRoute
78
+ ? `[[routes]]
79
+ pattern = "${cfRoute}"
80
+ zone_name = "${cfZone}"
81
+ custom_domain = true`
82
+ : ``}
83
+
74
84
  [vars]
75
85
  ${Object.entries(envVars || {})
76
86
  ?.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.93",
4
4
  "license": "MIT",
5
5
  "description": "cli for mastra",
6
6
  "type": "module",