create-mastra 0.1.0-alpha.24 → 0.1.0-alpha.27

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-mastra",
3
- "version": "0.1.0-alpha.24",
3
+ "version": "0.1.0-alpha.27",
4
4
  "description": "Create Mastra apps with one command",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -20,11 +20,14 @@
20
20
  "commander": "^12.0.0",
21
21
  "execa": "^9.3.1",
22
22
  "fs-extra": "^11.2.0",
23
+ "pino": "^9.6.0",
24
+ "pino-pretty": "^13.0.0",
23
25
  "posthog-node": "^4.3.1",
24
26
  "prettier": "^3.3.3"
25
27
  },
26
28
  "devDependencies": {
27
29
  "@rollup/plugin-commonjs": "^28.0.2",
30
+ "@rollup/plugin-json": "^6.1.0",
28
31
  "@rollup/plugin-node-resolve": "^16.0.0",
29
32
  "@types/fs-extra": "^11.0.4",
30
33
  "@types/node": "^22.1.0",
@@ -33,7 +36,7 @@
33
36
  "rollup-plugin-esbuild": "^6.1.1",
34
37
  "rollup-plugin-node-externals": "^8.0.0",
35
38
  "typescript": "^5.5.4",
36
- "mastra": "0.1.57-alpha.90"
39
+ "mastra": "0.1.57-alpha.113"
37
40
  },
38
41
  "engines": {
39
42
  "node": ">=20"
@@ -16,7 +16,9 @@ const fetchWeather = new Step({
16
16
 
17
17
  const geocodingUrl = `https://geocoding-api.open-meteo.com/v1/search?name=${encodeURIComponent(triggerData.city)}&count=1`;
18
18
  const geocodingResponse = await fetch(geocodingUrl);
19
- const geocodingData = await geocodingResponse.json();
19
+ const geocodingData = (await geocodingResponse.json()) as {
20
+ results: { latitude: number; longitude: number; name: string }[];
21
+ };
20
22
 
21
23
  if (!geocodingData.results?.[0]) {
22
24
  throw new Error(`Location '${triggerData.city}' not found`);
@@ -26,14 +28,22 @@ const fetchWeather = new Step({
26
28
 
27
29
  const weatherUrl = `https://api.open-meteo.com/v1/forecast?latitude=${latitude}&longitude=${longitude}&daily=temperature_2m_max,temperature_2m_min,precipitation_probability_mean,weathercode&timezone=auto`;
28
30
  const response = await fetch(weatherUrl);
29
- const data = await response.json();
31
+ const data = (await response.json()) as {
32
+ daily: {
33
+ time: string[];
34
+ temperature_2m_max: number[];
35
+ temperature_2m_min: number[];
36
+ precipitation_probability_mean: number[];
37
+ weathercode: number[];
38
+ };
39
+ };
30
40
 
31
41
  const forecast = data.daily.time.map((date: string, index: number) => ({
32
42
  date,
33
43
  maxTemp: data.daily.temperature_2m_max[index],
34
44
  minTemp: data.daily.temperature_2m_min[index],
35
45
  precipitationChance: data.daily.precipitation_probability_mean[index],
36
- condition: getWeatherCondition(data.daily.weathercode[index]),
46
+ condition: getWeatherCondition(data.daily.weathercode[index]!),
37
47
  location: name,
38
48
  }));
39
49